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!

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