Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eavesdocker

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eavesdocker

Collect logs from docker containers stdout and forward to various destinations according to your configuration.

  • 0.0.12
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Eavesdocker

Collect logs from docker containers stdout and forward to various destinations according to your configuration.

Features

  • Filter which services or stacks you want to include in the processing
  • Build simple or complex processing paths for various types of log entries
  • Automatic conversion to JSON entries
  • Forwards logs to many destinations
    • Mongo Collection
    • Redis Pub/Sub Channel
    • E-mail (SMTP Server)
    • New GitLab Issue
    • GitLab Alert
    • Webhook
    • we are still adding more transports...
  • Monitor container and swarm nodes health using Redis

Get Started

  1. Create an entry on the [requestcatcher.com] website so we can test a webhook transport.
  2. Create a simple test configuration file config.yml:
pipeline:
  - webhook:
      url: yoururl.requestcatcher.com
      headers:
        X-Foo: bar
  1. Run the following command
docker run -v "/var/run/docker.sock:/var/run/docker.sock" -v "config.yml:/config.yml" gcsboss/eavesdocker -c /config.yml`
  1. Run any container that dumps something to stdout: docker run hello

Install on Swarm

  1. Create a configuration file with YAML.
  2. Add the configuration file to your swarm.
configs:
  eavesdocker.yml:
    file: ./eavesdocker.yml
  1. Add Eavesdocker service globally to your swarm
logger:
  image: gcsboss/eavesdocker:0.0.10
  volumes:
    - "/var/run/docker.sock:/var/run/docker.sock"
  configs: [ eavesdocker.yml ]
  command: -c /eavesdocker.yml
  deploy:
    mode: global
    restart_policy:
      condition: any
  1. Generate some logs and verify your destinations

Transports

In this section you can see the available transports and their settings.

  • Mongo Collection

    - mongo:
        url: 'mongodb://myDb' # Required. Your MongoDB connection URL.
        db: 'MyDB' # Optional. Defaults to `'Eavesdocker'`. Which database to connect to.
        collection: 'MyCollection' # Optional. Defaults to `'Log_Entries'`. Which collection to send log entries to.
    
  • Redis Pub/Sub

    - redispub:
        host: 'my-redis-host' # Optional. Defualts to `'localhost'`. The Domain/IP of you Redis server.
        port: 1111 # Optional. Defaults to `6379`. Redis connection port.
        password: 'mypass' # Optional. Defaults to `null`. The redis password in case auth is setup on the server.
        channel: 'redis:__channel' # Required. Redis channel where to publish messages.
    
  • Webhook

    - webhook:
        url: 'http://example.com/somePath' # Required. The URL to call.
        headers: # Optional. A set of HTTP headers in key-value format.
          x-my-header: someValue
    
  • New GitLab Issue

    - gitlab:
        url: 'https://my-gitlab.com' # Optional. Defaults to GitLab.com. The URL of your GitLab instance.
        project: 232342 # Required. Your Project ID or path string.
        token: 'glpat-aaaaaaaa' # Optional. Defaults to `null`. A token to authenticate in GitLab.
        labels: # Optional. Defaults to `[]`. A list of labels to be added to the new issue. Strings are templated.
          - label-a
          - something-{key}-cool
        title: 'some {key} title' # Optional. Defaults to `'{level} - {message}'`. A template string to generate the new issue title.
    
    
  • GitLab Alert

    - gitlabAlert:
        url: 'https://my-gitlab.com/endpoint/etc...' # Required. The Alert integration endpoint from your GitLab project.
        key: 'something' # Required. The GitLab Alert integration Authorization Key.
        title: 'some {key} title' # Optional. Defaults to `'env - {message}'`. A template string to generate the alert title.
        service: 'some {key} service' # Optional. Defaults to `null`. A template string to generate the alert service.
        env: 'my-env' # Optional. A GitLab environment name.
        fingerprintFields: # Optional. Defaults to `[]`. An array of log entry fields to be considered for fingerprinting.
          - keyA
          - keyB
    
  • SMTP

    - email:
        subject: 'some {key} subject' # Optional. Defaults to `'{level} - {message}'`. A template string to generate the subject line.
        to: 'me@example.com' # Required. A mail recipient.
        from: 'eavesdocker@my-address.com' # Required. A mail sender address.
        host: 'smtp.example.com' # Required. Your SMTP host.
        port: 465 # Required. Your SMTP port.
        secure: true # Optional. Defaults to `false`. Whether to use TLS.
    

FAQs

Package last updated on 13 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc