openTSDB/Bosun报警语法 介绍/学习笔记

本文介绍了openTSDB的查询语法,包括/api/query接口的使用、过滤器选项以及度量查询字符串格式。同时,也探讨了Bosun的表达式,包括运算优先级和常见函数。是学习openTSDB和Bosun报警语法的重要参考资料。
摘要由CSDN通过智能技术生成

openTSDB表达式概述

/api/query, 内含rate options, filters

m=sum:rate{counter,,1000}:if.octets.in
Name Data Type Required Description Default Example
counter Boolean Optional Whether or not the underlying data is a monotonically increasing counter that may roll over false true
counterMax Integer Optional A positive integer representing the maximum value for the counter. Java Long.MaxValue 65535
resetValue Integer Optional An optional value that, when exceeded, will cause the aggregator to return a 0 instead of the calculated rate. Useful when data sources are frequently reset to avoid spurious spikes. 0 65000
dropResets Boolean Optional Whether or not to simply drop rolled-over or reset data points. false true

Filters

Whether or not results are grouped depends on which curly bracket the filter is in. Two curly braces are now supported per metric query. The first set is the group by filter and the second is a non group by filter, e.g. {host=wildcard(web*)}{colo=regexp(sjc.*)}. This specifies any metrics where the colo matches the regex expression "sjc.*" and the host tag value starts with "web" and the results are grouped by host. If you only want to filter without grouping then the first curly set must be empty, e.g. {}{host=wildcard(web*),colo=regexp(sjc.*)}.

Metric Query String Format

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值