{"id":13585945,"url":"https://github.com/devopsmakers/python-grafannotate","last_synced_at":"2025-05-02T06:30:36.401Z","repository":{"id":51602302,"uuid":"185179920","full_name":"devopsmakers/python-grafannotate","owner":"devopsmakers","description":"A CLI tool to add annotations to Grafana","archived":false,"fork":false,"pushed_at":"2023-05-22T22:28:18.000Z","size":66,"stargazers_count":18,"open_issues_count":3,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-14T11:59:28.387Z","etag":null,"topics":["annotations","events","grafana","grafana-annotations","grafana-dashboard","influxdb","metrics","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devopsmakers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-06T11:04:15.000Z","updated_at":"2024-08-01T16:31:53.002Z","dependencies_parsed_at":"2024-08-01T16:31:52.070Z","dependency_job_id":"58d50c1c-e2a3-4f46-814d-794e553ee701","html_url":"https://github.com/devopsmakers/python-grafannotate","commit_stats":{"total_commits":55,"total_committers":5,"mean_commits":11.0,"dds":"0.23636363636363633","last_synced_commit":"ef09dc74dc97b30a8bcb2eb362f6346d539b918a"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devopsmakers%2Fpython-grafannotate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devopsmakers%2Fpython-grafannotate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devopsmakers%2Fpython-grafannotate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devopsmakers%2Fpython-grafannotate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devopsmakers","download_url":"https://codeload.github.com/devopsmakers/python-grafannotate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251998040,"owners_count":21677913,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["annotations","events","grafana","grafana-annotations","grafana-dashboard","influxdb","metrics","python"],"created_at":"2024-08-01T15:05:14.252Z","updated_at":"2025-05-02T06:30:36.151Z","avatar_url":"https://github.com/devopsmakers.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# `grafannotate`\n\n[![Build Status](https://travis-ci.org/devopsmakers/python-grafannotate.svg?branch=master)](https://travis-ci.org/devopsmakers/python-grafannotate)\n[![Coverage Status](https://coveralls.io/repos/github/devopsmakers/python-grafannotate/badge.svg?branch=master)](https://coveralls.io/github/devopsmakers/python-grafannotate?branch=master)\n[![PyPI version](https://badge.fury.io/py/grafannotate.svg)](https://badge.fury.io/py/grafannotate)\n\nA CLI tool to send Grafana annotations to various destinations.\n\n## Installation\n```\npip install grafannotate\n```\n\n## Usage\n\n```\ngrafannotate --help\nUsage: grafannotate [OPTIONS]\n\n  Send Grafana annotations to various endpoints\n\nOptions:\n  -u, --uri TEXT          URI to send annotation to. Default:\n                          \"http://localhost:3000/api/annotations\".\n  -k, --api-key TEXT      Grafana API key to pass in Authorisation header\n  -T, --title TEXT        Event title. Default: \"event\".\n  -t, --tag TEXT          Event tags (can be used multiple times).\n  -d, --description TEXT  Event description body. Optional.\n  -s, --start INTEGER     Start timestamp (unix secs). Default: current\n                          timestamp.\n  -e, --end INTEGER       End timestamp (unix secs). Optional.\n  --help                  Show this message and exit.\n  ```\n\n### Examples\n- Send an annotation to Grafana API for current time\n```\ngrafannotate --uri http://user:password@grafana:3000/api/annotations --tag my_tag --title \"Event Title\"\n```\n\n- Send an annotation to Grafana API for a time region\n```\ngrafannotate --uri http://user:password@grafana:3000/api/annotations --tag my_tag --title \"Event Title\" --start 1557222057 --end 1557222259\n```\n\n- Send an annotation to Grafana API with an extended description\n```\ngrafannotate --uri http://user:password@grafana:3000/api/annotations --tag my_tag --title \"Event Title\" --description \"Some longer description\u003cbr /\u003ewith newlines\u003cbr /\u003eand \u003ca href=\\\"https://something.com/\\\"\u003elinks\u003c/a\u003e\"\n```\n\n- Pipe output to an annotation description\n```\nSTART_TIME=`date +%s`\ncommand_with_output | grafannotate --uri http://user:password@grafana:3000/api/annotations --tag my_tag --title \"Event Title\" --start $START_TIME\n```\n\n- Send an annotation to Grafana API using Authorization header\n```\nGRAFANA_API_TOKEN=\"some_generated_api_token\"\ngrafannotate --uri http://grafana:3000/api/annotations --tag my_tag --title \"Event Title\" --api-key $GRAFANA_API_TOKEN\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevopsmakers%2Fpython-grafannotate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevopsmakers%2Fpython-grafannotate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevopsmakers%2Fpython-grafannotate/lists"}