向Grafana发送批注

grafannotate的Python项目详细描述


grafannotate

Build StatusCoverage StatusPyPI version

用于将grafana注释发送到不同目的地的cli工具。

安装

pip install grafannotate

用法

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.

示例

  1. 向Grafana API发送当前时间的批注
grafannotate --uri http://user:password@grafana:3000/api/annotations --tag my_tag --title "Event Title"
  1. 为时间区域向Grafana API发送批注
grafannotate --uri http://user:password@grafana:3000/api/annotations --tag my_tag --title "Event Title" --start 1557222057 --end 1557222259
  1. 向Grafana API发送带有扩展说明的注释
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. 管道输出到注释说明
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

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
在MATLAB中生成java格式的矩阵   java混合图片,颜色为白色   java Apache Tomcat 7域问题代理设置   java无法从资产中读取csv文件   java为SpringFramework 5中的所有控制器和方法指定一个模式   java为我的应用程序打开html帮助页面   java中的条件语句。属性文件   数组Java彩票类   javascript允许Rhino使用当前项目中的Java类   java无法将ModelMap添加到会话   Java执行命令行程序   java这个电子邮件程序是如何工作的?   java自定义listview,视图问题   java将变量从JavaFx传递到JavaScript&编写代码来触发按钮   java从csv文件中删除记录   爪哇移动蝙蝠。重新油漆   socketjava断开连接   已解析页面的java HTML