All Projects → qvl → Promplot

qvl / Promplot

Licence: mit
Create plots from Prometheus metrics and send them to you

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Promplot

Ttyplot
a realtime plotting utility for terminal/console with data input from stdin
Stars: ✭ 532 (+325.6%)
Mutual labels:  cli, graph, plot
Pingprom
Prometheus uptime monitoring quickstart
Stars: ✭ 107 (-14.4%)
Mutual labels:  metrics, prometheus
Prometheus Boshrelease
Prometheus BOSH Release
Stars: ✭ 99 (-20.8%)
Mutual labels:  metrics, prometheus
Rabbitmq Prometheus
A minimalistic Prometheus exporter of core RabbitMQ metrics
Stars: ✭ 124 (-0.8%)
Mutual labels:  metrics, prometheus
Dart Code Metrics
Software analytics tool that helps developers analyse and improve software quality.
Stars: ✭ 96 (-23.2%)
Mutual labels:  cli, metrics
Highcharts Chart
Polymer Element wrapper for highcharts library. Seamlessly create various types of charts from one element.
Stars: ✭ 97 (-22.4%)
Mutual labels:  graph, plot
Grafana
The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
Stars: ✭ 45,930 (+36644%)
Mutual labels:  metrics, prometheus
Systemd exporter
Exporter for systemd unit metrics
Stars: ✭ 82 (-34.4%)
Mutual labels:  metrics, prometheus
Memcached exporter
Exports metrics from memcached servers for consumption by Prometheus.
Stars: ✭ 109 (-12.8%)
Mutual labels:  metrics, prometheus
Heplify Server
HEP Capture Server
Stars: ✭ 110 (-12%)
Mutual labels:  metrics, prometheus
Client java
Prometheus instrumentation library for JVM applications
Stars: ✭ 1,644 (+1215.2%)
Mutual labels:  metrics, prometheus
Filodb
Distributed Prometheus time series database
Stars: ✭ 1,286 (+928.8%)
Mutual labels:  metrics, prometheus
Homer App
HOMER 7.x Front-End and API Server
Stars: ✭ 88 (-29.6%)
Mutual labels:  metrics, prometheus
Tomcat exporter
A Prometheus exporter for Apache Tomcat
Stars: ✭ 99 (-20.8%)
Mutual labels:  metrics, prometheus
Nginx Prometheus Metrics
A production demo to collect prometheus metrics for nginx with lua embedded.
Stars: ✭ 84 (-32.8%)
Mutual labels:  metrics, prometheus
Prometheus
The Prometheus monitoring system and time series database.
Stars: ✭ 40,114 (+31991.2%)
Mutual labels:  metrics, prometheus
Pokevision Cli
PokéVision has shutdown (for now). Follow @PokeVisionGo on Twitter for updates.
Stars: ✭ 118 (-5.6%)
Mutual labels:  cli, slack
Beamium
Prometheus to Warp10 metrics forwarder
Stars: ✭ 82 (-34.4%)
Mutual labels:  metrics, prometheus
Python Prometheus Demo
Demo of using Prometheus for monitoring Python web applications
Stars: ✭ 83 (-33.6%)
Mutual labels:  metrics, prometheus
Protodot
transforming your .proto files into .dot files (and .svg, .png if you happen to have graphviz installed)
Stars: ✭ 107 (-14.4%)
Mutual labels:  cli, graph

📈 promplot

GoDoc Build Status Go Report Card

promplot is an opinionated tool to create plots from your Prometheus metrics and automatically sends them to you.

Slack example:

promplot -title "Open File Descriptors" -query "process_open_fds" -range "7d" -url $promurl -slack $slacktoken -channel stats

Demo Screenshot

Currently the only implemented transport is Slack. But feel free to add a new one!

Usage: promplot [flags...]

Create and deliver plots from your Prometheus metrics.

Save plot to file or send it right to a slack channel.
One of -slack or -file must be set.


Flags:
  -channel string
        Required when -slack is set. Slack channel to post to.
  -file string
        File to save image to. Should have same extension as specified -format. Set -file to - to write to stdout.
  -format string
        Optional. Image format. For possible values see: https://godoc.org/github.com/gonum/plot/vg/draw#NewFormattedCanvas (default "png")
  -query string
        Required. PQL query.
  -range value
        Required. Time to look back to. Format: 5d12h34m56s
  -silent
        Optional. Suppress all output.
  -slack string
        Slack API token (https://api.slack.com/docs/oauth-test-tokens). Set to post plot to Slack.
  -time value
        Time for query (default is now). Format like the default format of the Unix date command.
  -title string
        Optional. Title of graph. (default "Prometheus metrics")
  -url string
        Required. URL of Prometheus server.
  -version
        Print binary version.

Install

  • With Go:
go get qvl.io/promplot
brew install qvl/tap/promplot

Examples

It's simple to create a shell script for multiple plots:

Slack

common="-url $promurl -channel stats -slack $slacktoken -range 24h"

promplot $common \
  -title "Free memory in MB" \
  -query "node_memory_MemFree /1024 /1024"

promplot $common \
  -title "Free disk space in GB" \
  -query "node_filesystem_free /1024 /1024 /1024"

promplot $common \
  -title "Open file descriptors" \
  -query "process_open_fds"

Mailing results

There is no mail transport built into promplot but you can use the Linux mail utility instead:

tmp="$(mktemp -d)"
common="-url $promurl -range 24h"

promplot $common \
  -title "Free memory in MB" \
  -query "node_memory_MemFree /1024 /1024" \
  -file ${tmp}/memory.png

promplot $common \
  -title "Open file descriptors" \
  -query "process_open_fds" \
  -file ${tmp}/fds.png

echo "Your daily report is here." | mail \
  -s "Daily server stats" \
  -a ${tmp}/memory.png \
  -a ${tmp}/fds.png \
  [email protected]

And with a scheduler like sleepto you can easily automate this script to run every day or once a week.

Development

Make sure to use gofmt and create a Pull Request.

When changing external dependencies please use dep to vendor them.

Releasing

Push a new Git tag and GoReleaser will automatically create a release.

Thank you

to these helpful open source projects promplot is built on top of:

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].