@harsmarvania57 suggested to use the lovely and useful
./splunk cmd btool check command In When modifying serverclass which safeguards could help us avoid the following mistakes?
Since most of our users use Jenkins to deploy their code, is there a way to run this command via rest?
there might be something, because the old S.O.S app used it by using a custom command.
But why not use the https://splunkbase.splunk.com/app/1607/ that will provide shell access within Splunk where one can run
btool for example.
Hope this helps ...
One thing you can't do with it is pipe to something else. This would normally show all the inputs.conf stanza names but in the app it just shows you usage info. Here on *nix:
$ splunk cmd btool inputs list --debug | grep "\[" /opt/splunk/etc/apps/unix/local/inputs.conf [script:///opt/splunk/etc/apps/unix/bin/ps.sh] /opt/splunk/etc/apps/unix/local/inputs.conf [script:///opt/splunk/etc/apps/unix/bin/rlog.sh] /opt/splunk/etc/apps/unix/local/inputs.conf [script:///opt/splunk/etc/apps/unix/bin/time.sh] /opt/splunk/etc/apps/unix/local/inputs.conf [script:///opt/splunk/etc/apps/unix/bin/top.sh]
Okay, S.O.S app had a custom command called
btool in it https://answers.splunk.com/answers/104622/make-output-of-btool-some-conf-type-list-more-legible-unix... You can still download the app here https://splunkbase.splunk.com/app/748/#/overview Not sure though if you can use it to do
btool check but well worth to give it a try 😉
@MuS, is there a way to restrict this app, to run only the btool command? with the Unix
sudo command for example, we can restrict which commands can run...