All Apps and Add-ons

How can I change the index for data from Splunk Add-on for Unix and Linux

mwcooley
Explorer

Hi,

Data generated from the app is being forwarded with index = "os" but that doesn't exist on our corporate splunk instance. I edited indexes.conf, replacing "os" with the name of my index, and when that didn't work, I edited inputs.conf and added index = "myIndex", but the data still shows up with index = "os".

Here's what the files look like now.

$ cat ~/etc/apps/Splunk_TA_nix/default/indexes.conf
# Copyright (C) 2005-2016 Splunk Inc. All Rights Reserved.
[myIndex]
homePath = $SPLUNK_DB/os/db
coldPath = $SPLUNK_DB/os/colddb
thawedPath = $SPLUNK_DB/os/thaweddb

[firedalerts]
coldPath = $SPLUNK_DB/firedalerts/colddb
homePath = $SPLUNK_DB/firedalerts/db
thawedPath = $SPLUNK_DB/firedalerts/thaweddb

$ cat ~/etc/apps/Splunk_TA_nix/local/inputs.conf
[script://./bin/cpu.sh]
disabled = 0

[script://./bin/df.sh]
disabled = 0

[script://./bin/uptime.sh]
disabled = 0

[script://./bin/vmstat.sh]
disabled = 0

index = myIndex

0 Karma
1 Solution

hardikJsheth
Motivator

You need to add index = myIndex for each input stanza if you want to use index other than default , i.e

[script://./bin/cpu.sh]
disabled = 0
index = myIndex

[script://./bin/df.sh]
disabled = 0
index = myIndex

[script://./bin/uptime.sh]
disabled = 0
index = myIndex

[script://./bin/vmstat.sh]
disabled = 0
index = myIndex

View solution in original post

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi,
To correctly address Your inputs, you have to insert index=my_Index in every room of inputs.conf.
In addition, you displayed inputs.conf of local folder, probably there are other rooms in default inputs.conf.
In this case copy these rooms in Local inputs.conf.
Bye.
Giuseppe

0 Karma

hardikJsheth
Motivator

You need to add index = myIndex for each input stanza if you want to use index other than default , i.e

[script://./bin/cpu.sh]
disabled = 0
index = myIndex

[script://./bin/df.sh]
disabled = 0
index = myIndex

[script://./bin/uptime.sh]
disabled = 0
index = myIndex

[script://./bin/vmstat.sh]
disabled = 0
index = myIndex
0 Karma

mwcooley
Explorer

thanks! works like a charm.

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 ...