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!

Deep Dive: Accelerate threat investigation with Splunk’s AI Assistant in Security

AI is one of the biggest topics in the market today, and for security teams, its value goes far beyond the ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Detection Engineering Office Hours: Real-World Troubleshooting & Q&A

[REGISTER HERE] This thread is for the Community Office Hours session on Detection Engineering Office Hours: ...