Elastic Query Functions
PrefixKey
用来筛选不同的的es集群,默认default
escount(indexRoot ESIndexer, keyString string, filter ESQuery, bucketDuration string, startDuration string, endDuration string) seriesSet
返回es匹配文档的总数的时间序列集合,用keystring, indexRoot, interval, and durations这些参数创建es时间直方图的聚合表达式。
esstat(indexRoot ESIndexer, keyString string, filter ESQuery, field string, rStat string, bucketDuration string, startDuration string, endDuration string) seriesSet
返回对应字段的各种计算值
Elastic Index Functions
获取索引的方法
esdaily (timeField string, indexRoot string, layout string) ESIndexer
获取某天的索引
esmonthly (timeField string, indexRoot string, layout string) ESIndexer
获取某月的索引
esindices(timeField string, index string…) ESIndexer
获取指定的索引
esls(indexRoot string) ESIndexer
获取省略日期后缀的的index,如esls(apiaccess)相当于 apiaccess- + 日期
Elastic Query Generating Functions (for filtering)
Es查询方法(一般用来做过滤器)
esall() ESQuery
返回所有的es数据
esregexp(field string, regexp string)
返回字段匹配正则表达式的es数据
esquery(field string, querystring string)
创建es全文搜索
esand(queries… ESQuery) ESQuery
与运算
esor(queries… ESQuery) ESQuery
或运算
esnot(query ESQuery) ESQuery
非运算
参考:官方bosun表达式语法