All Apps and Add-ons

Sorting hosts in *nix app

Blu3fish
Path Finder

I've been using the *nix app since I've been using splunk and one thing that always bothered me was the random order of hosts in various dropdowns throughout the app. I've corrected this in the past but always forgot to document my changes and thus they'd be blown away during app upgrades.

0 Karma
1 Solution

Blu3fish
Path Finder

If you want this change to persist you'll need to copy the $SPLUNK_HOME/etc/apps/unix/default/data dir to $SPLUNK_HOME/etc/apps/unix/local/data and then edit the ones under local.

To get your hosts sorted alphabetically (I assume most will find this appealing) I did the following to the xml's of the applicable dashboards:

Line in question (line 25 I believe):

<param name="search">| metadata type=hosts index=os</param>

Changed to:

<param name="search">| metadata type=hosts index=os | sort host</param>

Booyah! A host list that doesn't make your eyes bleed when you look at it.

View solution in original post

Blu3fish
Path Finder

If you want this change to persist you'll need to copy the $SPLUNK_HOME/etc/apps/unix/default/data dir to $SPLUNK_HOME/etc/apps/unix/local/data and then edit the ones under local.

To get your hosts sorted alphabetically (I assume most will find this appealing) I did the following to the xml's of the applicable dashboards:

Line in question (line 25 I believe):

<param name="search">| metadata type=hosts index=os</param>

Changed to:

<param name="search">| metadata type=hosts index=os | sort host</param>

Booyah! A host list that doesn't make your eyes bleed when you look at it.

Get Updates on the Splunk Community!

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

Splunk Decoded: Business Transactions vs Business IQ

It’s the morning of Black Friday, and your e-commerce site is handling 10x normal traffic. Orders are flowing, ...

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...