Splunk Enterprise

visualization

SN1
Path Finder

Hello I have this search
| rest splunk_server=MSE-SVSPLUNKI01 /services/server/status/resource-usage/hostwide
| eval cpu_usage = cpu_system_pct + cpu_user_pct
| where cpu_usage > 10

I want to this search to give a graph visualization of total cpu_usage every 4 hours.

0 Karma

kiran_panchavat
SplunkTrust
SplunkTrust

@SN1 

You can modify your search to aggregate cpu_usage over 4-hour intervals and visualize it. 

kiran_panchavat_0-1739429153636.png

 

Did this help? If yes, please consider giving kudos, marking it as the solution, or commenting for clarification — your feedback keeps the community going!
0 Karma

livehybrid
SplunkTrust
SplunkTrust

Hi @SN1 

You can achieve this with the following search - please see screenshot below for actual example output too.

 

index="_introspection" component=Hostwide earliest=-4h host=<yourHostname>
| eval cpu_usage = 'data.cpu_system_pct' + 'data.cpu_user_pct' 
| timechart span=5m avg(cpu_usage) as avg_cpu_usage

 

livehybrid_0-1739430120780.png

 

I dont think the other answer provided would work because the REST endpoint does not output a timeseries, its a one-time view of this data.

Please let me know how you get on and consider accepting this answer or adding karma this answer if it has helped.
Regards

Will

0 Karma

SN1
Path Finder

SO i want total cpu usage for indexer only

0 Karma

livehybrid
SplunkTrust
SplunkTrust

That is fine, just set host=<yourIndexer> after index=_introspection and you should get this.

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!

Build the Future of Agentic AI: Join the Splunk Agentic Ops Hackathon

AI is changing how teams investigate incidents, detect threats, automate workflows, and build intelligent ...

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...