Skip to main content

Graphite-dashgen automates the creation of Graphite dashboards

Project description

Overview

Graphite-dashgen automates the creation of Graphite dashboards. It creates per-host or per-group dashboards based on YAML configuration files. The per-host host dashboards are designed to create dashboards on existing collectd metrics. Unlike most of the alternatives below, this project seeks to use existing Graphite 0.9.9+ code.

Example

# Graphite Maintenance
# Delete stale Graphite data
0   22  *   *   *   find /opt/graphite/storage/log/ -type f -mtime +180 -delete
0   22  *   *   *   find /opt/graphite/storage/whisper/collectd/ -type f -mtime +90 -delete
0   22  *   *   *   find /opt/graphite/storage/whisper/statsd/ -type f -mtime +90 -delete
# Delete empty directories
0   23  *   *   *   find /opt/graphite/storage/log/ -type d -empty -delete
0   23  *   *   *   find /opt/graphite/storage/whisper/collectd/ -type d -empty -delete
0   23  *   *   *   find /opt/graphite/storage/whisper/statsd/ -type d -empty -delete
# Regenerate all dashboards
@daily /usr/local/sbin/dashgen.py -q -f /usr/local/etc/dashgen/dashconf.yml -f /usr/local/etc/dashgen/all_*.yml -H '*'

The crontab example above:

  1. Cleans-up old graphite logs

  2. Cleans-up old whisper databases

  3. Regenerates per-host dashboards using the following configuration files

    1. dashconf.yml: base configuration values

    2. all_dash.yml: per-host dashboard configuration (HOST_all dashboards)

    3. all_graphs.yml: per-host graph defintions for collectd metrics

Notes

  • YAML Configuration Files

    • Target entries are as close to web GUI as possible to make it easier to go back and forth

  • Dashboard Types

    1. Per-Host

    2. Per-Group

  • Per-Host Graphs

    • Types

      1. Host Metrics: identified by glob_verify and may contain glob_metrics

      2. Carbon Metrics: identified by carbon_match and host

    • The combination of glob_metrics and glob_verify should result in a single filesystem glob match

  • String Templates

    • Named substitutions draw from target_vars. Graph definitions that contain named substitutions not in target_vars are skipped.

    • Common target_vars include:

      • ${color_combined}

      • ${color_free}

      • ${host}

      • ${metric}

  • Graphite Graph Tips and Tricks

    • Lines drawn by graphite obscure the lines drawn before them. Z order is important. Consequently, many of the graphs’ metrics change color depending on their values.

    • For graphs that feature a free metric (ex. memory), that free metric is always green (green should not be included in the template’s lineColor)

Requirements

  • Graphite 0.9.9+

  • PyYAML (Ubuntu package: python-yaml)

To Do

  • More documentation!

  • Use templates with different colorList to easily differentiate graphs

  • (?) should graphs be sorted by parent instead of children (ex. all disk vda graphs before any vdb graphs)

Alternatives

A slightly different (and refreshing) take on Graphite dashboards:

The following projects existed before Graphite included a dashboard view:

The Graphite 0.9.12 documentation includes a good list of related software:

Contributors

License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-graphite-dashgen-1.tar.gz (11.1 kB view details)

Uploaded Source

File details

Details for the file python-graphite-dashgen-1.tar.gz.

File metadata

File hashes

Hashes for python-graphite-dashgen-1.tar.gz
Algorithm Hash digest
SHA256 4a0e4ec1caefcd592e2893b9ad4d593af8c23376c8665201545a668030e88a8f
MD5 227b607a2c87b83ba020c637849c5396
BLAKE2b-256 97a6c471fea43825deaf2c761d657f189548dd91eb8bddf7d46cd0c624bce099

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page