Installation

CLI help

magnuscowie80
Explorer

Hi everyone, does anyone know a way of running splunk admin commands via a script. I need to run ./splunk reload deploy-server via cron job

Labels (1)

vikramyadav
Contributor

Hi @magnuscowie80 , you can automate Splunk deployment by using ansible. You can integrate ansible and Splunk that will be much efficient and easier than the script.

--------------------------------------------------------

If this helps your like will be appreciated😀



richgalloway
SplunkTrust
SplunkTrust

If you can type it on the command line then you should be able to put it in a script.  Just be sure to include credentials with commands that need them.

/opt/splunk/bin/splunk reload deploy-server -auth user:password
---
If this reply helps you, Karma would be appreciated.

isoutamo
SplunkTrust
SplunkTrust
The biggest issue would be, how to secure your credentials, so other cannot see those and use later on.
One way to do this is e.g. use ansible tower with callback on source node and then use ansible vault to store/crypt credentials. I suppose that there are some other ways too to do it.
r. Ismo
0 Karma

magnuscowie80
Explorer

That is the issue, securing my your credentials, I am guessing am going to be learning ansible.. thanks for the reply

0 Karma

isoutamo
SplunkTrust
SplunkTrust
Just look ansible attribute no_log and use ansible vault to secure your credentials and passwords on your repositories.
0 Karma
Get Updates on the Splunk Community!

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

 Prepare to elevate your security operations with the powerful upgrade to Splunk Enterprise Security 8.x! This ...

Get Early Access to AI Playbook Authoring: Apply for the Alpha Private Preview ...

Passionate about security automation? Apply now to our AI Playbook Authoring Alpha private preview ...

Reduce and Transform Your Firewall Data with Splunk Data Management

Managing high-volume firewall data has always been a challenge. Noisy events and verbose traffic logs often ...