VMware Cloud Community
zee_hyperic
Contributor
Contributor

Custom script not executing

Greetings,

I am having a problem with a custom script being executed on the machine where I have HQ agent running. Same script runs fine on the machine where hyperic server is installed.

Can I run my custom scripts on the machines where only HQ agents are deployed? Do I need to have exact same copy of the script on the hyperic server? (I tried this, didn't make a difference)

Here are the steps that I use to create the custom script in hyperic:

Resources->Platforms->xx host->New Platform Service and select Script for the service type.
After setting up full path to the script (custom written perl script), I change the metric collections to run every 2 minutes for example.

This works fine on the platform where hyperic server is running on. After two minutes I start to see the results from the script. Same results that I would see by executing it on the shell.

If I repeat this exact process on the platform that has only the HQ agent, script never executes. Permissions, path, script, etc. are exactly same. The metrics never start being collected for some reason.

Also, I am wondering, can a custom script return text values or just the integers? If I do want to return text values, is there a way in Hyperic to do alerting based on those values?

Thanks
Reply
0 Kudos
2 Replies
jvalkeal_hyperi

Check page http://support.hyperic.com/display/DOC/Script+Plugin

It pretty much tells how scripting works. Notice that script service and script plugin is a bit different thing. With script service you track script return value, like what is exit() value. If you want to collect metrics, output key=value pairs to stdout and map those values when you create custom script plugin.
Reply
0 Kudos
zee_hyperic
Contributor
Contributor

Thanks, I did not look enough at the documentation.
Reply
0 Kudos