水手长添加外部收藏家

使用 scollector 在 bosun 中定义新的外部收集器的程序是什么?
我们可以编写python或shell脚本来收集数据吗?

忽然笑
浏览 191回答 2
2回答

泛舟湖上清波郎朗

除了 Kyle 所说的之外,您还可以查看一些现有的外部收集器以了解它们的输出。这是我们的一位同事编写的用于监控 jvm 内容的 Java 代码。它使用文本格式,它很简单:metricname timestamp value tag1=foo tag2=bar如果您想使用 JSON 格式,以下是我们收集器之一的示例:{"metric":"exceptional.exceptions.count","timestamp":1438788720,"value":0,"tags":{"application":"AdServer","machine":"ny-web03","source":"NY_Status"}}您还可以发送元数据:{"Metric":"exceptional.exceptions.count","Name":"rate","Value":"counter"}{"Metric":"exceptional.exceptions.count","Name":"unit","Value":"errors"}{"Metric":"exceptional.exceptions.count","Name":"desc","Value":"The number of exceptions thrown per second by applications and machines. Data is queried from multiple sources. See status instances for details on exceptions."}`或者向 stderror 发送错误信息:2015/08/05 15:32:00 lookup OR-SQL03: no such host
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Go