I have written a servic plugin as follows:
<plugin>
<service name="AM_Service_test">
<config>
<option name="script"
description="Test script"
default="/home/hyperic/agent/bundles/agent-4.5.1/pdk/scripts/test.sh"/>
</config>
<filter name="template"
value="exec:exec=sudo,file=%script%"/>
<metric name="Availability"
template="${template}:Availability"
indicator="true"/>
<metric name="Metric1"
category="PERFORMANCE"
template="${template}:x"
indicator="true"/>
</service>
</plugin>
I want just to test any value.
How the Shell Script has to look like?
How it can be written for Windows as Batch File?
Thanks for help.
Just found out how it works on Windows with Batch script:
e.g. script countains:
echo x=2
Then the hyperic will show for Metric1 allways a 2.
Now I need to find out how it works with a shell script under Linux.
It works the same on All OSes in all scripting languages.
The key=value being 'echo-ed' must match the metric being requested.
Thanks for posting your conclusion!