VMware Cloud Community
jtataGP
Contributor
Contributor

Managing HQ Agent through Script Control Plugin

I've created a plugin which basically tells agents to check my Hyperic server for other plugins via a simple shell script. The script itself works fine, as does the control plugin, with one catch: the last part of the script attempts to restart the hyperic agent, which fails. The agent stops, but never restarts. I'm guessing that once the agent process dies there's nothing left to send the 'start' command.

Any advice on a workaround? I thought of maybe using cron to schedule a 1 time 'start' job 1 minute after the 'stop' job completes but perhaps someone here thought of something more elegant.

Maybe I'm approaching this wrong? How are others managing custom plugins on their agents? I have over 300 servers and will need to deploy at least 1 or 2 custom plugins to all of them, I'd really hate to have to redeploy my plugin files by hand if I fix/improve them.
Reply
0 Kudos
3 Replies
admin
Immortal
Immortal

Hi,

Well the "best" way to do this would be to use the EE version of HQ as it has features to make this process easy. However, I do understand that this isn't an option for everyone.

You would need to wrap the agent with something that will automatically restart it once it stops. The best way would depend on your OS. I'm sure there's some others on here that have done this. I personally used DJBs daemontools once to have the agent automatically restarted if it stopped.
Reply
0 Kudos
jtataGP
Contributor
Contributor

Cool, I didn't realize EE had automated plugin deployment functionality. I am pushing for it, but unfortunately I'm not the one who writes the checks. At least this gives me another point to argue with.
Reply
0 Kudos
admin
Immortal
Immortal

The EE version has a lot of nice features which are especially useful for large deployments. A good list is at http://www.hyperic.com/products/monitoring-comparison-chart

Useful additions are:

* Resource Type alerts
* Group Alerting
* Recovery Alerts
* Roles
* Support subscription
(there's a lot more)

If that helps sell your check writer.
Reply
0 Kudos