cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to configure Generic Execution Plugin to write in a log

sgaragoneses
Inactive

Hi,

I have read we can use the generic execution plugin to write in a log as an action when a incident is raised.

I have installed the plugin and don´t know how to do the configuration. I have found how to run a command but nothing to push my incident into a log file.

Can anyone help give me some suggestion?

Thanks in advance,

Sergio

3 REPLIES 3

kyle_kowalski
Dynatrace Pro
Dynatrace Pro

If you know how to execute a command, then I would script out a small piece of code to write out to the log file you are looking for.
Best,
Kyle

sgaragoneses
Inactive

Thanks Kyle,

I have created a script that is triggered when a incident is open. That script writes in a log file. The problem is how to use the multiline command definition to send the value of the arguments from the plugin to the script.

We get the log with the arguments but without value (I have done some tests with the syntax)

sgaragoneses
Inactive

Finally we found how to configure the plugin. There is no need to use the command multiline. Just passing the parameters after the script name in the command line.

Example:

/products/dynatrace/logs/pruebaScript.sh ${AGENT_HOST} ${SERVER_NAME} ${APPLICATION} ${IS_OPEN} ${IS_CLOSED} ${SEVERITY} ${VIOLATED_MEASURE_NAME} ${VIOLATED_MEASURE_VALUE} ${VIOLATED_MEASURE_UNIT}