向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第三方库


热门话题
通过@Repository保存时出现java neo4j空指针异常   java为什么我会遇到与NONC相关的长时间应用程序暂停?   java ArrayList比array慢2倍   java Spring安全性无法将未登录用户从主页重定向到登录   java我可以使用CDI将资源注入JAXRS应用程序/ResourceConfig吗?   AngularJs和Javaservlet技术   java Microsoft异步会话转录问题:SLF4J问题+连接问题错误11001   设计模式Java产品交易商规范类?   java如何查找包含两个唯一重复字符的最长子字符串   如何在JAR文件中正确地修补Java类?   java从配置加载凭据   Java视图模板库   Android Java:用彩色动画突出显示新的ListViewItems   如果必须转到“else”语句,java将重复“if”语句   lotusscript使用Java/Lotus脚本确定设备是否为触摸屏   intellij idea Java命令错误。无法找到或加载主类   Java中的多线程重写进程类   Java设计二维数组