All Apps and Add-ons

How do I specify more than one host in the Percent_CPU_by_Host function?

eboniebutler
New Member

I am utilizing the built-in search function "Percent_CPU_by_Host(*)" but I would like to only display 2 host and the following search string is not working:

Percent_CPU_by_Host( Host_A OR Host_B)

How do I specify more than one hosts?

0 Karma

kiyoshi_miyake
Explorer

I did it by like below.
Percent_CPU_by_Host("Host_A OR host=HOST_B")

This macro define like below.

args = host
definition = `os_index` `cpu_sourcetype` host=$host$ | eval Percent_CPU_Load = 100 - pctIdle | timechart avg(Percent_CPU_Load) by host
0 Karma

woodcock
Esteemed Legend
0 Karma

stephanefotso
Motivator

can you be more specific? what is the Percent_CPU_by_Host function?

SGF
0 Karma

woodcock
Esteemed Legend

It is part of the Splunk App for Unix and Linux (I have retagged).

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...