Splunk Search

Dynamic Chart from Summary Index

mbuschle
Explorer

I'm looking to create a dynamic chart from a summary index, but I'm not sure how to go about it. Basically, I need to create a report of meetings hosted by a number of business units over 13 months. Obviously, I don't want to run that search every time. There are two challenges. First, the BU's change from time to time. So, I really don't want to hardcode them into the search. Second, the only method I can see to do a timechart max(BU_1), max(BU_2), max(BU_3). I'd like Splunk to just pick this up automatically during the search.

I have added to the summary index the values for each BU per month. Basically the search stores the data in the summary as BU_1=xxxxx BU_2=yyyyy BU_3=zzzzz, etc. Can someone suggest a method to get this data into a chart, without hardcoding the Business Units into the search?

Tags (2)
0 Karma

jtrucks
Splunk Employee
Splunk Employee

You can use wildcards so your search can simply do stuff like:

… | timechart max(BU*)

🙂

EDIT:

If the fields all have different names, there isn't much you can do unless you create a lookup table or somehow unify a naming scheme in your summary index. Perhaps when you put the data into the summary index, prepend BU or some other uniform string to each so you can use the above shortcut. if there is no pattern available in the strings to use PCRE to shortcut like above, then you will have to do them all manually listed out.

--
Jesse Trucks
Minister of Magic

somesoni2
Revered Legend

You can use "| timechart max(*)" which will return max count for all the fields and then can remove unwanted fields by using "|fields -,-"

0 Karma

mbuschle
Explorer

That's a good start and would work great if the BU names were actually that simple. Unfortunately, they all have different names. I guess I could either rename them when I put them in the summary or somehow exclude the fields like info_max_time, info_min_time, linecount, etc. Thoughts?

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!

Event Series: Splunk Observability Metrics Cost Optimization

Balancing Scale and Spend: Gaining Control Over High-Volume Metrics in Splunk Observability Cloud As ...

Kick the Tires Before You Commit: A Hands-On Tour of the Splunk Observability Cloud ...

Evaluating an enterprise observability platform usually goes like this: fill out a form, get a free trial with ...

Deep insights, no barriers: Splunk Observability Cloud Free Edition

As software delivery cycles continue to accelerate, observability shouldn’t be a luxury — it should be a ...