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.

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!

A Four-Part Event Series: Full Stack Observability For the AI Era

As AI reshapes applications, infrastructure, and the way teams operate, the traditional boundaries of ...

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Event Series: Level up your SOC: Advancing with Splunk Enterprise Security

AI has fundamentally raised the stakes for security operations, and this three-part series is your guide to ...