kandi background
Explore Kits

logspout | Log routing for Docker container logs | Continuous Deployment library

 by   gliderlabs Go Version: v3.2.13 License: MIT

 by   gliderlabs Go Version: v3.2.13 License: MIT

Download this library from

kandi X-RAY | logspout Summary

logspout is a Go library typically used in Devops, Continuous Deployment, Docker applications. logspout has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.
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
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • logspout has a medium active ecosystem.
  • It has 4319 star(s) with 687 fork(s). There are 101 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 86 open issues and 204 have been closed. On average issues are closed in 45 days. There are 19 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of logspout is v3.2.13
logspout Support
Best in #Continuous Deployment
Average in #Continuous Deployment
logspout Support
Best in #Continuous Deployment
Average in #Continuous Deployment

quality kandi Quality

  • logspout has 0 bugs and 0 code smells.
logspout Quality
Best in #Continuous Deployment
Average in #Continuous Deployment
logspout Quality
Best in #Continuous Deployment
Average in #Continuous Deployment

securitySecurity

  • logspout has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • logspout code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.
logspout Security
Best in #Continuous Deployment
Average in #Continuous Deployment
logspout Security
Best in #Continuous Deployment
Average in #Continuous Deployment

license License

  • logspout is licensed under the MIT License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.
logspout License
Best in #Continuous Deployment
Average in #Continuous Deployment
logspout License
Best in #Continuous Deployment
Average in #Continuous Deployment

buildReuse

  • logspout releases are available to install and integrate.
  • Installation instructions are not available. Examples and code snippets are available.
  • It has 3043 lines of code, 186 functions and 24 files.
  • It has medium code complexity. Code complexity directly impacts maintainability of the code.
logspout Reuse
Best in #Continuous Deployment
Average in #Continuous Deployment
logspout Reuse
Best in #Continuous Deployment
Average in #Continuous Deployment
Top functions reviewed by kandi - BETA

kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample Here

Get all kandi verified functions for this library.

Get all kandi verified functions for this library.

logspout Key Features

Log routing for Docker container logs

Getting logspout

copy iconCopydownload iconDownload
$ docker pull gliderlabs/logspout:latest

Using logspout

copy iconCopydownload iconDownload
$ docker run --name="logspout" \
	--volume=/var/run/docker.sock:/var/run/docker.sock \
	gliderlabs/logspout \
	syslog+tls://logs.papertrailapp.com:55555

TLS Settings

copy iconCopydownload iconDownload
export LOGSPOUT_TLS_CA_CERTS="/opt/tls/ca/myRootCA1.pem,/opt/tls/ca/myRootCA2.pem"

Loggly support

copy iconCopydownload iconDownload
$ docker run --name logspout -d --volume=/var/run/docker.sock:/var/run/docker.sock \
    -e SYSLOG_STRUCTURED_DATA="<Loggly API Key>@41058 tag=\"some tag name\"" \
    gliderlabs/logspout \
    syslog+tcp://logs-01.loggly.com:514

docker-compose type: volume persist in external folder

copy iconCopydownload iconDownload
  - type: volume
    source: elasticsearch
    target: /usr/share/elasticsearch/data
  - type: bind
    source: /WDC1TB/docker/volumes/elasticsearch/data
    target: /usr/share/elasticsearch/data
volumes:
  elasticsearch:
  - type: volume
    source: elasticsearch
    target: /usr/share/elasticsearch/data
  - type: bind
    source: /WDC1TB/docker/volumes/elasticsearch/data
    target: /usr/share/elasticsearch/data
volumes:
  elasticsearch:
  - type: volume
    source: elasticsearch
    target: /usr/share/elasticsearch/data
  - type: bind
    source: /WDC1TB/docker/volumes/elasticsearch/data
    target: /usr/share/elasticsearch/data
volumes:
  elasticsearch:
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:
 - type: volume
        source: elasticsearch
        target: /usr/share/elasticsearch/data
volumes:
  elasticsearch:
$ docker volume inspect elasticsearch
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: bind
        source: /WDC1TB/docker/volumes/elasticsearch/data
        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 
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:
 - type: volume
        source: elasticsearch
        target: /usr/share/elasticsearch/data
volumes:
  elasticsearch:
$ docker volume inspect elasticsearch
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: bind
        source: /WDC1TB/docker/volumes/elasticsearch/data
        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 
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:
 - type: volume
        source: elasticsearch
        target: /usr/share/elasticsearch/data
volumes:
  elasticsearch:
$ docker volume inspect elasticsearch
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: bind
        source: /WDC1TB/docker/volumes/elasticsearch/data
        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 
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:
 - type: volume
        source: elasticsearch
        target: /usr/share/elasticsearch/data
volumes:
  elasticsearch:
$ docker volume inspect elasticsearch
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: bind
        source: /WDC1TB/docker/volumes/elasticsearch/data
        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 
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:
 - type: volume
        source: elasticsearch
        target: /usr/share/elasticsearch/data
volumes:
  elasticsearch:
$ docker volume inspect elasticsearch
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: bind
        source: /WDC1TB/docker/volumes/elasticsearch/data
        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 

Docker-compose elastic stack no container tags

copy iconCopydownload iconDownload
input {
  syslog {
      port => 5000
      type => "docker"
  }
}

filter {
  grok {
    match => { "message" => "%{SYSLOG5424PRI}%{NONNEGINT:ver} +(?:%{TIMESTAMP_ISO8601:ts}|-) +(?:%{HOSTNAME:service}|-) +(?:%{NOTSPACE:containerName}|-) +(?:%{NOTSPACE:proc}|-) +(?:%{WORD:msgid}|-) +(?:%{SYSLOG5424SD:sd}|-|) +%{GREEDYDATA:msg}" }
  }
  syslog_pri { }
}

output {
  elasticsearch { hosts => "elasticsearch" }
  stdout {codec => rubydebug}
}

version: '2'

services:
    web:
        build: .
        command: gunicorn backend.wsgi:application --bind 0.0.0.0:8001 --log-level debug
        restart: unless-stopped
        container_name: web
        depends_on:
            - logspout
        image: myimage
        expose:
            - 8001
        env_file:
            - ./environments/web.test.env

        labels:
            container: "web"
            com.example.service: "web"

    logspout:
        image: gliderlabs/logspout:v3.2.11
        command: 'syslog://logstash:5000'
        restart: unless-stopped
        links:
            - logstash
        volumes:
            - '/var/run/docker.sock:/tmp/docker.sock'
        depends_on:
            - elasticsearch
            - logstash
            - kibana
        
    logstash:
        image: logstash:7.9.1
        restart: unless-stopped
        environment:
            - LOGSPOUT=ignore
        links:
            - elasticsearch
        depends_on:
            - elasticsearch
            - kibana
        volumes:
            - ./containers/logstash/logstash.conf:/usr/share/logstash/pipeline/logstash.conf

    kibana:
        image: kibana:7.9.1
        restart: unless-stopped
        links:
            - elasticsearch
        environment:
            - LOGSPOUT=ignore
            - ELASTICSEARCH_URL=http://elasticsearch:9200
        ports:
            - 5601:5601
        depends_on:
            - elasticsearch

    elasticsearch:
        image: elasticsearch:7.9.1
        restart: unless-stopped
        ports:
        - 9200:9200
        - 9300:9300
        environment:
            - LOGSPOUT=ignore
            - node.name=elasticsearch
            - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
            - cluster.initial_master_nodes=elasticsearch

 
input {
  syslog {
      port => 5000
      type => "docker"
  }
}

filter {
  grok {
    match => { "message" => "%{SYSLOG5424PRI}%{NONNEGINT:ver} +(?:%{TIMESTAMP_ISO8601:ts}|-) +(?:%{HOSTNAME:service}|-) +(?:%{NOTSPACE:containerName}|-) +(?:%{NOTSPACE:proc}|-) +(?:%{WORD:msgid}|-) +(?:%{SYSLOG5424SD:sd}|-|) +%{GREEDYDATA:msg}" }
  }
  syslog_pri { }
}

output {
  elasticsearch { hosts => "elasticsearch" }
  stdout {codec => rubydebug}
}

version: '2'

services:
    web:
        build: .
        command: gunicorn backend.wsgi:application --bind 0.0.0.0:8001 --log-level debug
        restart: unless-stopped
        container_name: web
        depends_on:
            - logspout
        image: myimage
        expose:
            - 8001
        env_file:
            - ./environments/web.test.env

        labels:
            container: "web"
            com.example.service: "web"

    logspout:
        image: gliderlabs/logspout:v3.2.11
        command: 'syslog://logstash:5000'
        restart: unless-stopped
        links:
            - logstash
        volumes:
            - '/var/run/docker.sock:/tmp/docker.sock'
        depends_on:
            - elasticsearch
            - logstash
            - kibana
        
    logstash:
        image: logstash:7.9.1
        restart: unless-stopped
        environment:
            - LOGSPOUT=ignore
        links:
            - elasticsearch
        depends_on:
            - elasticsearch
            - kibana
        volumes:
            - ./containers/logstash/logstash.conf:/usr/share/logstash/pipeline/logstash.conf

    kibana:
        image: kibana:7.9.1
        restart: unless-stopped
        links:
            - elasticsearch
        environment:
            - LOGSPOUT=ignore
            - ELASTICSEARCH_URL=http://elasticsearch:9200
        ports:
            - 5601:5601
        depends_on:
            - elasticsearch

    elasticsearch:
        image: elasticsearch:7.9.1
        restart: unless-stopped
        ports:
        - 9200:9200
        - 9300:9300
        environment:
            - LOGSPOUT=ignore
            - node.name=elasticsearch
            - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
            - cluster.initial_master_nodes=elasticsearch

 

Community Discussions

Trending Discussions on logspout
  • Errors seen when setting up logspout in Hyperledger fabric 2.2
  • HyperLedger Fabric v2.3 Endorsement Policy did not come into action
  • docker-compose type: volume persist in external folder
  • Docker-compose elastic stack no container tags
Trending Discussions on logspout

QUESTION

Errors seen when setting up logspout in Hyperledger fabric 2.2

Asked 2021-Apr-15 at 09:14

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 refused

xxx@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:

  1. there is no process running in default port 8000. So connection refused error is expected. Do we need to use any other port ?
  2. 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:14

Ok, found the issue. The network name is fabric_test. So I issued command like ./monitordocker.sh fabric_test

This resolved the problem.

Source https://stackoverflow.com/questions/67086093

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

Vulnerabilities

No vulnerabilities reported

Install logspout

You can download it from GitHub.

Support

Use logspout to stream your docker logs to Loggly via the Loggly syslog endpoint.

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases
Explore Kits

Save this library and start creating your kit

Share this Page

share link
Reuse Pre-built Kits with logspout
Consider Popular Continuous Deployment Libraries
Try Top Libraries by gliderlabs
Compare Continuous Deployment Libraries with Highest Support
Compare Continuous Deployment Libraries with Highest Quality
Compare Continuous Deployment Libraries with Highest Security
Compare Continuous Deployment Libraries with Permissive License
Compare Continuous Deployment Libraries with Highest Reuse
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases
Explore Kits

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.