Hello-
Did anyone face this problem? I did this by following the headgeek video, but i got this error
almarri,
Can you give me a link to that headgeek video?
I see the problem. In the APM Linux Script monitor, you typed a script into Script Body. But you are not actually running this script as part of the monitor because you changed the command line. Instead of running the script, you hardcoded a different command to be run: perl check_sun_hardware -c cpu.
The result of that command, "OK: Checked 2 cpu's", is not compatible with the APM Linux/Unix script monitor.
APM Linux/Unix script monitor requires the output of any script to end with "Statistic: x" where x is a number.
http://www.solarwinds.com/geek/videos.aspx?video=19
Replace the "perl" in your Command Line field with "${Script}"
It should be:
{$Script} /usr/local/nagios/libexec/check_sun_hardware -c cpu
You can read some more information about this in the ScriptProcessorForNagios(tm).pl section of the APM help.