npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

eavesdocker

v0.0.13

Published

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

Downloads

35

Readme

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.12
  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: '[email protected]' # Required. A mail recipient.
        from: '[email protected]' # 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.

Contribute

In order to contribute you can: