Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在查询后打印 Splunk 中某个事件的行数
例如:index=* host=* source=*application*此查询提供所有事件,但我想打印/获取每个事件的行数。我尝试了len()Splunk 查询,但它对我不起作用
index=* host=* source=*application*
len()
实际上每个事件只包含 1 行。
即使事件的大小很大,但它只是 1 个 json 响应,因此它将完整响应视为 1 行响应。
我们可以根据字符查询
index=index-source host=hs* source=*appname* "TXNEnd" "SUCCESS" NOT "truncated" |where len(_raw) > 3000 |stats count by methodPath