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!

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...

Stay Connected: Your Guide to October Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...