categraf的数据推送接口/api/push/remotewrite,有没有接口文档或调用示例?

Viewed 71

categraf的数据推送接口/api/push/remotewrite,有没有接口文档或调用示例?

2 Answers

/api/push/remotewrite 走的是 Prometheus RemoteWrite 的传输协议,使用 Protobuf 编码。go 代码有例子,其实参考 categraf 向服务端发送数据的逻辑就可以了,因为那个也是走的 Prometheus RemoteWrite https://github.com/flashcatcloud/categraf/blob/main/writer/writer.go#L71 或者直接Google,关键字:prometheus remote write api example