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`
command_with_output | grafannotate --uri http://user:password@grafana:3000/api/annotations --tag my_tag --title "Event Title" --start $START_TIME
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.11.tar.gz
(3.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file grafannotate-0.0.11.tar.gz.
File metadata
- Download URL: grafannotate-0.0.11.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e74a559e69c445c0f81008ce20e510ffbe535873f94cbab6745ec4b9bbf06b02
|
|
| MD5 |
e52df415b1ef225e5680a2d672724b04
|
|
| BLAKE2b-256 |
7f3add9f6623364590edd9e50fe2d4c5360b856db7beba13778e5a0f275b1c00
|
File details
Details for the file grafannotate-0.0.11-py2.py3-none-any.whl.
File metadata
- Download URL: grafannotate-0.0.11-py2.py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6d25b048471e835b3bb66b7b955c9a8ad5ff8b275e62360ba7ec61ab3fafea1
|
|
| MD5 |
48b18f0196d05461a525f09a10594eb8
|
|
| BLAKE2b-256 |
1c94c7e638ae595abdd599b6300362d7ce508448f4b2a01c5931ef96b955c64c
|