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


热门话题
java如何在删除后修复recyclerView中的项目重复?   java如何在Android中使用Handle而不增加内存   java(i>>>距离)是如何工作的   java如何在菜单项操作之后删除JTabbedPane的内容   springintermediatejavax。ejb。EJBException:java。Jboss应用程序中的lang.NullPointerException   Java:派生类中的方法链接   java InputListener不适用于正交摄影机和角色   java不能写这个方法吗?   java为什么Apache Kafka消费者不使用来自主题的消息?   使用scanner Java从文本文件填充二维数组   爪哇在会场内放置标记   maven合并了2个Java web应用程序   Java中注释处理的缺点是什么?   java创建在JFrame中绘制矩形和圆形的方法?   java LibGDX应用程序挂起在initializeglfw()上   唯一包含密钥但在不同字段上排序的java集   jboss在使用Infinispan中的共享文件存储时获取“java.io.IOException:不支持的协议版本22”   JavaEclipse似乎不想编译我的类的新版本。即使在(我认为)修复它之后,我也会遇到同样的错误