VMware Cloud Community
admin
Immortal
Immortal

Control Action: Execute a local script on the system running an agent?

Hi all,

I have a requirement for a control action that requires to run a
script on a node monitored with an HQ agent.

Is is possible to run a script locally as a control action,
which then can be triggered by an alert? If so, how?

Cheers,

Peter.


0 Kudos
2 Replies
admin
Immortal
Immortal

Hi Peter,

You can create a "FileServer File" service for the platform. Make the path to the script you want to execute. This will then allow it to be executed as a control action for any alert def.

This is covered in more detail at http://support.hyperic.com/display/DOC/User-defined+Control+Actions

Please let me know if you need me to go into more detail.

Cheers,
-Wes
0 Kudos
admin
Immortal
Immortal

Hi Wes,

>You can create a "FileServer File" service for the platform. Make the
>path to the script you want to execute. This will then allow it to be
>executed as a control action for any alert def.

thanks, that will work for us.

Is there any way to get a reasonable amount of script output
back to the server? The 'command status' field in the GUI just
reports about four lines of output, losing line endings. What
exactly is the limit on the amount of data sent back to the server?

The background is that in order to examine some resource problem
on one of our server, we need some process information that can
best be collected immediately when the alarm occurs. Should that
not be possible, a workaround would be to write it to a file
that then has to be fetched manually, but we'd prefer to display
the textual process status information in the GUI.

Regards,

Peter.


0 Kudos