Send annotations to Grafana
Project description
grafannotate
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
- Send an annotation to Grafana API for current time
grafannotate --uri http://user:password@grafana:3000/api/annotations --tag my_tag --title "Event Title"
- 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
- 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>"
- Pipe output to an annotation description
START_TIME=`date +%s`
git log -1 | grafannotate --uri http://user:password@grafana:3000/api/annotations --tag my_tag --title "Event Title" --start $START_TIME --end `date +%s`
Project details
Release history Release notifications | RSS feed
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.0.9.tar.gz
(3.8 kB
view hashes)
Built Distribution
Close
Hashes for grafannotate-0.0.9-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b07cddded389b4e40595b8fc0c99dce3e0beb74acba0bab036ab99fc0f89c777 |
|
MD5 | 7383a229e12c466f1c0b147187763882 |
|
BLAKE2b-256 | 944aed3fabcdc61fce48eb9eea7ac54dec5bbba54c2b3bcc9d18820cc4651dcf |