logspout | Log routing for Docker container logs | Continuous Deployment library
kandi X-RAY | logspout Summary
kandi X-RAY | logspout Summary
Docker Hub automated builds for gliderlabs/logspout:latest and progrium/logspout:latest are now pointing to the release branch. For master, use gliderlabs/logspout:master. Individual versions are also available as saved images in releases. Logspout is a log router for Docker containers that runs inside Docker. It attaches to all containers on a host, then routes their logs wherever you want. It also has an extensible module system. It's a mostly stateless log appliance. It's not meant for managing log files or looking at history. It is just a means to get your logs out to live somewhere else, where they belong. For now it only captures stdout and stderr, but a module to collect container syslog is planned.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of logspout
logspout Key Features
logspout Examples and Code Snippets
Community Discussions
Trending Discussions on logspout
QUESTION
Following steps described here to setup logspout: https://hyperledger-fabric.readthedocs.io/en/release-2.2/deploy_chaincode.html
Running this produces below errors: ./monitordocker.sh net_test Starting monitoring on all containers on the network net_test xxxx docker: Error response from daemon: network net_test not found. curl: (7) Failed to connect to 127.0.0.1 port 8000: Connection refused xxx@xxxx:/home/fabric/fabric-samples/test-network# xxx@xxxx:/home/fabric/fabric-samples/test-network# ./monitordocker.sh Starting monitoring on all containers on the network basicnetwork_basic xxxx docker: Error response from daemon: network basicnetwork_basic not found. curl: (7) Failed to connect to 127.0.0.1 port 8000: Connection refusedxxx@xxxx:/home/fabric/fabric-samples/test-network# xxxx@xxxx:/home/fabric/fabric-samples/test-network# ./monitordocker.sh net_basic Starting monitoring on all containers on the network net_basic xxxx docker: Error response from daemon: network net_basic not found. curl: (7) Failed to connect to 127.0.0.1 port 8000: Connection refused
Few questions:
- there is no process running in default port 8000. So connection refused error is expected. Do we need to use any other port ?
- what is the name of the network to be given when running monitordocker.sh ?
Any other troubleshooting info is appreciated.
...ANSWER
Answered 2021-Apr-15 at 09:14Ok, found the issue. The network name is fabric_test. So I issued command like ./monitordocker.sh fabric_test
This resolved the problem.
QUESTION
I was trying to test out the endorsement policy feature of Fabric with the Running a Fabric Application tutorial and I have encountered a few questions/issues.
Instead of using LevelDB, I up the network using CouchDB by changing the command to ./network.sh up createChannel -c mychannel -ca -s couchdb
.
After the call to InitLedger
, I manually edit asset2's "Size"
field value to another random value through fauxton, accessed from http://127.0.0.1:5984/_utils/ (couchdb0, which belongs to organization 1). So at this point, asset2 has 2 different value sitting in couchdb0 and couchdb1.
Then I invoke the UpdateAsset
function in the chaincode to update asset2's value. I was expecting an error about endorsement policy is not met or something to be thrown as the different value of asset2 in couchdb0 and couchdb1 should results in different RW set.
ANSWER
Answered 2021-Mar-25 at 14:48This is working as expected. You updated the size field but not the version field. The read set check only checks the version field. It is up to the chaincode to check other fields such as asset ownership (and size, if there are business rules around that, such as size not being allowed to change in an update). The asset transfer chaincode is a trivial sample and only checks for asset existence in state database by key. So in your case chaincode execution succeeded because it passed the asset existence check, endorsements succeeded, and validation succeeded since both endorsements were over the same read set (version) and write set.
You get the CouchDB warning because the internal CouchDB revision number was different due to your external update, but this is not a fatal problem and gets resolved by a retry (CouchDB internal revision numbers are not guaranteed to be the same across state databases since peer may update the same state multiple times, e.g. in crash recovery scenarios).
QUESTION
version: '3.2'
services:
elasticsearch:
container_name: elasticsearch
build:
context: elasticsearch/
args:
ELK_VERSION: $ELK_VERSION
volumes:
- type: bind
source: ./elasticsearch/config/elasticsearch.yml
target: /usr/share/elasticsearch/config/elasticsearch.yml
read_only: true
- type: volume
source: elasticsearch
target: /usr/share/elasticsearch/data
ports:
- "9200:9200"
- "9300:9300"
environment:
LOGSPOUT: ignore
ES_JAVA_OPTS: "-Xmx256m -Xms256m"
ELASTIC_PASSWORD: changeme
# Use single node discovery in order to disable production mode and avoid bootstrap checks.
# see: https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html
discovery.type: single-node
networks:
- elk
networks:
elk:
driver: bridge
volumes:
elasticsearch:
...ANSWER
Answered 2021-Jan-02 at 13:59When you use a volume with type: volume
it will be saved where Docker service says to, in my case is in /var/lib/docker/volumes/{projectname_containername}/_data/.
If you want to save it in a specific folder you will need a type: bind
volume that points to the desired folder in your host, in your case /WDC1TB/docker/volumes/elasticsearch/data.
You should replace:
QUESTION
I have a setup with docker-compose and the elastic stack. My 'main' container is running a Django application (there are some more containers for metrics, certificates, and so on).
The logging itself works with this setup but I have no container labels or tags in Kibana. So I can't differentiate between logs from different containers (except when I know what I'm looking for).
How do I configure logstash or logspout to label or tag all logs with the container where they're from? In the best case tagging container image and container id.
I tried to add a label to the container but that didn't change anything. I also tried specified logging, with driver syslog and a tag, but that didn't work either.
I guess I have to make a specific logstash config and do some stuff there?
Below is my current docker-compose.yml
...ANSWER
Answered 2020-Sep-28 at 09:41Sorry, I'm really inexperienced with the elastic stack, but I got it right.
Indeed you have to provide a logstash config with filter, at least that's how I got it working. Additionally, I had to switch from UDP to just syslog in logspout, I guess the udp connection didn't forward all it got (for example the docker image).
Here are my configurations that work (there are definitely some improvements to do).
logstash.conf
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install logspout
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page