Splunk Search

Help with below query

chandankr
Path Finder

100 * sum([x]) / sum([y] - [z])

 

Labels (1)
Tags (1)
0 Karma

yuanliu
SplunkTrust
SplunkTrust

Pro tip: When asking a question in a forum about data analytics, first explain your data, with anonymized sample if possible, explain what you are trying to achieve and, if you illustrate sample code, also illustrate the output and explain why the output doesn't meet your requirements.  "Help with" is not a question without other qualifiers.

0 Karma

chandankr
Path Finder

trying to fetch some values and apply this athematic to get some relevant info for dashboard.

100 * sum([M8020C3]) / sum([M8020C6] - [M8020C4])

using the below splunk query 

index=* "M8020C3" AND "M8020C6" AND "M8020C4"
| rex field=_raw "<measResults>\d+\s\d+\s\d+\s+(?<cell_avl3>\d+)\s(?<cell_avl4>\d)\s\d+\s+(?<cell_avl6>\d+)"
| stats sum(cell_avl3) as cell_avl3 sum(cell_avl6) as cell_avl6 sum(cell_avl4) as cell_acl4
| eval cell_avl5 = cell_avl6-cell_avl4
| eval cell_avl10=cell_avl3/cell_avl5
| eval cell_avl=100*cell_avl10
| stats count by date_month,cell_avl

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

Data Management Digest – May 2026

Welcome to the May 2026 edition of Data Management Digest!   As your trusted partner in data innovation, the ...