VMware Cloud Community
dgorman_hyperic
Enthusiast
Enthusiast

One script many monitors...

Sometimes you might need to monitor a custom app and it doesn't make sense to deploy the script to all the machines.

In this case, you can write one perl script and use the ARGV input processing taking the output from your xml plugin.

For example in your xml plugin you might have something like the following. You can then make your plugin in the HQ web GUI and point the check at the local agent.

Be careful however, to not overload your local agent. Make sure to check your agent.log to make sure it can keep up with the frequency of metric collections.

<filter name="service.template"
value="exec:file=%script%, args=${args}"/>

<config>
<option name="server.host"
description="My App Server hostname or ip address"
default="localhost"/>

<option name="server.port"
description="My App Server port"
default="1700"/>

<option name="script"
description="MyApp script"
default="/home/hyperic/scripts/myscript-plugin.pl"/>
</config>
0 Kudos
0 Replies