Skip to main content

Send annotations to Grafana

Project description

grafannotate

Build Status Coverage Status PyPI version

A CLI tool to send Grafana annotations to various destinations.

Installation

pip install grafannotate

Usage

grafannotate --help
Usage: grafannotate [OPTIONS]

  Send Grafana annotations

Options:
  -u, --uri TEXT          URI to send annotation to. Default:
                          "http://localhost:3000/api/annotations".
  -T, --title TEXT        Event title. Default: "event".
  -t, --tag TEXT          Event tags (can be used multiple times).
  -d, --description TEXT  Event description body. Optional.
  -s, --start INTEGER     Start timestamp (unix secs). Default: current
                          timestamp.
  -e, --end INTEGER       End timestamp (unix secs). Optional.
  --help                  Show this message and exit.

Examples

  1. Send an annotation to Grafana API for current time
grafannotate --uri http://user:password@grafana:3000/api/annotations --tag my_tag --title "Event Title"
  1. Send an annotation to Grafana API for a time region
grafannotate --uri http://user:password@grafana:3000/api/annotations --tag my_tag --title "Event Title" --start 1557222057 --end 1557222259
  1. Send an annotation to Grafana API with an extended description
grafannotate --uri http://user:password@grafana:3000/api/annotations --tag my_tag --title "Event Title" --description "Some longer description<br />with newlines<br />and <a href=\"https://something.com/\">links</a>"
  1. Pipe output to an annotation description
START_TIME=`date +%s`
command_with_output | grafannotate --uri http://user:password@grafana:3000/api/annotations --tag my_tag --title "Event Title" --start $START_TIME

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

grafannotate-0.1.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

grafannotate-0.1.0-py2.py3-none-any.whl (5.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file grafannotate-0.1.0.tar.gz.

File metadata

  • Download URL: grafannotate-0.1.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.1

File hashes

Hashes for grafannotate-0.1.0.tar.gz
Algorithm Hash digest
SHA256 75a76e6b2ed490c0db9d80b8647d2379f2ce6be9191a843c5fc54546575063c1
MD5 7dab1ee3fc7b36b2a05a42f496d9733e
BLAKE2b-256 93317553566bfd3a1959881fc3c92a0e5e5e24f18d53e162ae9059e83c3b9692

See more details on using hashes here.

File details

Details for the file grafannotate-0.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: grafannotate-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.1

File hashes

Hashes for grafannotate-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ab3ce6c7480568ecdf101a10e1bd274340d8e86e6c687968af5d6741f9d74df4
MD5 857fa32d6cfb4bdc0e8c6973b4c78a31
BLAKE2b-256 6b37ba19531d247fa382d55c994484eeec78f697dcea5131c884e4bf7315c734

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