Alerting

Append column to timechart, that is a function of existing columns.

wlbaird
Engager

I have a timechart with columns A and B, I would like to add a third column C, where C=A/B

My timechart is created by:

index=...

| timechart span=10m count(_raw) AS A

| appendcols [ index= ....

| timechart span=10m count(_raw) AS B]

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@wlbaird 

You can try some thing like this also.

index="..." OR index="...." | timechart span=10m sum(eval(if(index="...",1,0))) as A  sum(eval(if(index="....",1,0))) as B | eval C=A/B

 

My Sample Search :

index="_internal" OR index="_introspection" | timechart span=10m sum(eval(if(index="_internal",1,0))) as A  sum(eval(if(index="_introspection",1,0))) as B | eval C=A/B

 

Thanks
KV
▄︻̷̿┻̿═━一

If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.
 

0 Karma

wlbaird
Engager

Thanks that worked. 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
index=...
| timechart span=10m count(_raw) AS A
| appendcols [ index= ....
| timechart span=10m count(_raw) AS B]
| eval C=A/B
Get Updates on the Splunk Community!

Splunk Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...