All Apps and Add-ons

CLIAuto - Pass Variables to Remote Scripts and POST Results to Dashboard (alternate to indexing)

BainM
Communicator

Hello-

I think Cliauto has an incredible potential for automation in our use-case. We want to manually deploy deployment apps from a single deployment server in one network zone to a deployment server in another network zone using your framework.

2 questions:
1. Can we pass variables using your framework if we add in the inputs to accept this in Splunkweb. The variables would then go into a script that is already present on the target deployment server.

  1. Is it possible to post the results to the present dashboard in the cliauto app instead of indexing the results?
0 Karma
1 Solution

jeffrey_berry
Path Finder

@BainM Question #1 answer- Yes, up to 4 variables (var1, var2, var3, and var4), 3 passwords (pw1, pw2, & pw3), and special variable drop1 can be configured in a stanza of the cliauto_cmds.conf file to be passed via the custom Splunk REST API endpoint from the cliauto dashboard to the server side script engine. An example is the cli_cpfwguds stanza (CPFW Get User's Default Shell) in the cliauto_cmds.conf file of the default folder that uses variable (var1) to pass an username to get it's default shell. The var1 variable is referenced by adding @ characters (e.g. @ var1@ ) in the command line string (see key cmd04 in the stanza).
Question #2 answer- To post server script execution results to a dashboard without indexing the results is not possible without a code change and/or redesign of the app. Our use cases required the results data to be logged; so the time to add this feature cannot be justified. and it would make the app more complex to add it as a feature. Also, some of the CLI Auto Command Types (i.e. a set of CLI commands defined by a cliauto_cmds.conf file stanza) can produce a large amount result data that Splunk Web and Splunk Search helps the user analyze the results data. I would think that Splunk favors apps that ingest data due to licensing. LOL!

I have not used the app for this use case. Please let me know if it works for you.

Regards,
Jeff

View solution in original post

0 Karma

jeffrey_berry
Path Finder

@BainM Question #1 answer- Yes, up to 4 variables (var1, var2, var3, and var4), 3 passwords (pw1, pw2, & pw3), and special variable drop1 can be configured in a stanza of the cliauto_cmds.conf file to be passed via the custom Splunk REST API endpoint from the cliauto dashboard to the server side script engine. An example is the cli_cpfwguds stanza (CPFW Get User's Default Shell) in the cliauto_cmds.conf file of the default folder that uses variable (var1) to pass an username to get it's default shell. The var1 variable is referenced by adding @ characters (e.g. @ var1@ ) in the command line string (see key cmd04 in the stanza).
Question #2 answer- To post server script execution results to a dashboard without indexing the results is not possible without a code change and/or redesign of the app. Our use cases required the results data to be logged; so the time to add this feature cannot be justified. and it would make the app more complex to add it as a feature. Also, some of the CLI Auto Command Types (i.e. a set of CLI commands defined by a cliauto_cmds.conf file stanza) can produce a large amount result data that Splunk Web and Splunk Search helps the user analyze the results data. I would think that Splunk favors apps that ingest data due to licensing. LOL!

I have not used the app for this use case. Please let me know if it works for you.

Regards,
Jeff

0 Karma

BainM
Communicator

Thank you @jeffrey_berry!

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...