PDA

View Full Version : Exec command on trigger activation


phpkid
06-01-2005, 00:18
First I would like to say "Great Job" to Alexei for this system. I have used alot of mon proggies in the past and this one rocks! Ok, now with that said, here is my question.

Is there a way to execute a command on the remote host when a trigger for the same host is activated?

Example:
----------
Server A activates the trigger "Load is too high on A", upon activation a script is executed on server "A" to capture the current processes for notification/email.
----------

This way a bad program could found that is causing a high load, especially if its intermittent, or is this fuctionality builtin already.

All ideas welcome..... TIA

phpkid
18-01-2005, 01:06
Has anyone run into this or know a way to produce this functionality? Hmmm, did I state my question improperly, or am I in wrong section? I would gladly re ask it.

Thanks,
Phpkid

cooper
18-01-2005, 04:12
pk,
I havent done anything like this myself, and I am constructing this idea as i type, so bear with me.

You could add a new media of type script. Add that media type to your user account. Set up a trigger that uses that script to alert you instead of email.

Zabbix will pass a couple of things to the script, Recipient, Subject and Message. You could probably grab the hostname from that. In the script you could ssh to the remote computer and execute a ps or whatever you want. Then take the output of the script and email that to you, or your pager, or whatever. If you set up ssh with private keys and forced commands, it would be pretty secure. It might take a little tweaking, but it should get you what you are looking for.

HTH

cooper

Balaji Krishnamoorthy
02-04-2007, 18:06
Dear PK and cooper

How can I set this up i.e "Zabbix will pass a couple of things to the script, Recipient, Subject and Message".

Please do let me know if you have made a progress on this.

Thx
Balaji.k

Balaji Krishnamoorthy
02-04-2007, 20:22
Dear PK and cooper

I just figured it out. Thanks.

apiero
10-01-2008, 17:13
Hi Balaji Krishnamoorthy,

please can you share with me your findings?
I have the same problem.

Thanks
Bye
Piero