Splunk Search

How to display all host names returned from my search as x-axis labels on a chart?

shreyasathavale
Communicator

I have a search that returns 25 hosts, but on a chart at the bottom, the legend just shows 10 hosts. I want to display all hosts.

My search is:

earliest=-1h  host=0 OR host=1 OR host=2 OR host=3 OR host=4 OR host=5 OR host=6 OR host=7 OR host=8 OR host=9 OR host=10 OR host=11 OR host=12 OR host=13 OR host=14 OR host=15 OR host=16 OR host=17 OR host=18 OR host=19 OR host=20 OR host=21 OR host=22 OR host=23 sourcetype=cpu| timechart span="1m" avg(pctSystem) as CPU by host
0 Karma
1 Solution

shreyasathavale
Communicator

Well I found the answer , used useother=f limit=25

View solution in original post

gcusello
SplunkTrust
SplunkTrust

Hi shreyasathavale,
At first, I suggest you to manage your host list in a lookup or with an eventtype.
Everyway,there are only two ways to see all the hosts in labels of x-axis:

  • change CSS, but it isn't so easy;
  • put labels in vertical or oblique, but they aren't so readable.

Maybe it could be more efficient to use a different graph like Bars so hostnames are horizontal.

When I have to show many rows, I usually use a table with numeric values in a column and a bar in another column, following the "Tables with Data Bars" ecxample of "Splunk 6.0 Dashboard Examples" App (https://splunkbase.splunk.com/app/1603/).

If instead your problem is the limit of visualization in graphics, you have to insert in your chart or timechart command the "limit=0" option.

Bye.
Giuseppe

0 Karma

shreyasathavale
Communicator

yes, thanks for your input.. I have already contacted splunk admins for lookup file to upload meanwhile this is a workaround

0 Karma

shreyasathavale
Communicator

Well I found the answer , used useother=f limit=25

shreyasathavale
Communicator

Well I found the answer , used useother=f limit=25

0 Karma
Get Updates on the Splunk Community!

Exciting News: The AppDynamics Community Joins Splunk!

Hello Splunkers,   I’d like to introduce myself—I’m Ryan, the former AppDynamics Community Manager, and I’m ...

The All New Performance Insights for Splunk

Splunk gives you amazing tools to analyze system data and make business-critical decisions, react to issues, ...

Good Sourcetype Naming

When it comes to getting data in, one of the earliest decisions made is what to use as a sourcetype. Often, ...