Giter Club home page Giter Club logo

prometheus2honeycomb's Introduction

Prometheus metrics to Honeycomb

Build Status Docker Cloud Automated build

Tool to pull prometheus metrics from a url or file, and dump to a honeycomb dataset

Getting started

With docker

Just run the built docker image like so:

docker run --rm hcaptcha/prometheus2honeycomb \
  python3 prometheus2honeycomb.py \
  --url http://my-metrics-server:8000/metrics \
  --ship

Without docker

First you'll need the prom2json go tool installed via the following:

# via GO
go get github.com/prometheus/prom2json/cmd/prom2json

# via HTTP / github releases (only for linux 386 at the moment)
# or install from https://github.com/prometheus/prom2json/releases
./bin/get_prom2json

Then configure the dataset name and honeycomb write key that you want to use to send your data to:

export DATASET_NAME=myDataset
export HONEYCOMB_WRITEKEY=myHoneycombWriteKey

Finally point the tool at a URL and it'll submit all the metrics it finds there. You can also just print the results to screen without the --ship option:

pipenv run python3 prometheus2honeycomb.py --url http://my-metrics-server:8000/metrics --ship

You can also additional fields to the output of each event that gets sent to honeycomb by adding a --extra-args key1=value1 key2=value2

Contributing

Building

Currently this repo is manually built via the following steps:

docker build -t hcaptcha/prometheus2honeycomb:latest .

It gets deployed to dockerhub via the dockerhub cloud build system.

Lint

To run the linter, run ./bin/lint.

If CI is set to true, then it will fail if there are lint issues. Otherwise, if it is not set, you can run this and it will reformat your code to match the standards

Testing

To test the whole workflow, run:

./bin/ci

prometheus2honeycomb's People

Contributors

gaieges avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

prometheus2honeycomb's Issues

Replace prom2json with a native python parser

Using prom2json tool was a quick way to get up and running with the metrics in the proper format to be parsed by python. However we can probably use a python lib or make a custom one to handle the incoming prometheus metrics and parse it properly, and more efficiently, and with no binaries required.

Document honeycomb_send function

Two things that we should capture there at a minimum:

  • Description as to why we send the events BATCHED and not combined (reason being: the key values by which prometheus metrics are batched are abstract and not always consistent)
  • A little more detail about what the structure of the input is for future developers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.