Categorygithub.com/clivern/penguin
modulepackage
0.0.2
Repository: https://github.com/clivern/penguin.git
Documentation: pkg.go.dev

# README

Penguin

Daemon for fast and flexible stats aggregation and collection


Penguin daemon listens for statistics like counters, gauges, histogram ... etc, sent over HTTP, UDP, TCP or observe log files and send them to a pluggable backend services like graphite or expose them to prometheus. Penguin is inspired by statsd and this article but still it is pretty different from statsd.

Documentation

Download the latest penguin binary. Make it executable from everywhere.

$ curl -sL https://github.com/Clivern/Penguin/releases/download/vx.x.x/penguin_x.x.x_OS.tar.gz | tar xz

Create a config file from config.dist.yml

# Metrics Input
inputs:
    # HTTP endpoint for metrics collection
    http:
        enabled: on
        mode: prod
        port: 8000
        tls:
            status: off
            pemPath: cert/server.pem
            keyPath: cert/server.key
        path: /
        api_key: ""

    # Log files to watch
    log:
        enabled: off
        paths:
            - /app/logs/metrics_1.log
            - /app/logs/metrics_2.log

# Metrics Cache Driver
cache:
    type: memory
    enabled: off

    drivers:
        memory:
            buffer_size: 10

# Metrics Output
output:
    # Output metrics to console
    console:
        enabled: on

    # Expose to prometheus
    prometheus:
        enabled: on
        endpoint: /metrics

    # TODO: Support Graphite
    graphite:
        enabled: off

# Log configs
log:
    # Log level, it can be debug, info, warn, error, panic, fatal
    level: info
    # output can be stdout or abs path to log file /var/logs/penguin.log
    output: stdout
    # Format can be json
    format: json

Run Penguin

$ penguin run -c /absolute/path/to/config.yml

Send metrics to log files that penguin observes

for ((i=1;i<=100000;i++)); echo '{"type":"counter","name":"penguin_orders","help":"the amount of orders.","method":"inc","value":1,"labels":{"type":"shirts"}}' >> /app/logs/metrics_1.log

for ((i=1;i<=100000;i++)); echo '{"type":"counter","name":"penguin_orders","help":"the amount of orders.","method":"inc","value":1,"labels":{"type":"pants"}}' >> /app/logs/metrics_2.log

Send metrics to penguin HTTP endpoint

curl -X POST \
    -d '{"type":"counter","name":"penguin_orders","help":"the amount of orders.","method":"inc","value":1,"labels":{"type":"trousers"}}' \
    http://127.0.0.1:8000

Configure prometheus to scrape this URL http://127.0.0.1:8000/metrics

Versioning

For transparency into our release cycle and in striving to maintain backward compatibility, Penguin is maintained under the Semantic Versioning guidelines and release process is predictable and business-friendly.

See the Releases section of our GitHub project for changelogs for each release version of Penguin. It contains summaries of the most noteworthy changes made in each release.

Bug tracker

If you have any suggestions, bug reports, or annoyances please report them to our issue tracker at https://github.com/clivern/penguin/issues

Security Issues

If you discover a security vulnerability within Penguin, please send an email to [email protected]

Contributing

We are an open source, community-driven project so please feel free to join us. see the contributing guidelines for more details.

License

© 2020, Clivern. Released under MIT License.

Penguin is authored and maintained by @clivern.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author