Ad Widget

Collapse

Exec command on trigger activation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • phpkid
    Junior Member
    • Sep 2004
    • 14

    #1

    Exec command on trigger activation

    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
    Junior Member
    • Sep 2004
    • 14

    #2
    Re: Exec command on trigger activation

    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

    Comment

    • cooper
      Senior Member
      • Sep 2004
      • 110

      #3
      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
      Last edited by cooper; 18-01-2005, 04:17.

      Comment

      • Balaji Krishnamoorthy
        Junior Member
        • Apr 2007
        • 11

        #4
        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

        Comment

        • Balaji Krishnamoorthy
          Junior Member
          • Apr 2007
          • 11

          #5
          Dear PK and cooper

          I just figured it out. Thanks.

          Comment

          • apiero
            Junior Member
            • Dec 2007
            • 3

            #6
            Hi Balaji Krishnamoorthy,

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

            Thanks
            Bye
            Piero

            Comment

            Working...