Ad Widget

Collapse

Run a program based on trigger?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bbrendon
    Senior Member
    • Sep 2005
    • 870

    #1

    Run a program based on trigger?

    Is there a way to run a ps aux or top -n1 if the load is high on a system with an active agent?

    I know I can capture the results of the above commands every 5 minutes or so, but that would be tons of useless data.

    I realize this is kind of a trick question, (don't answer remote command action) and probably not possible, but would be very useful!
    Unofficial Zabbix Expert
    Blog, Corporate Site
  • noxis
    Senior Member
    • Aug 2007
    • 145

    #2
    Originally posted by infinity005
    Is there a way to run a ps aux or top -n1 if the load is high on a system with an active agent?

    I know I can capture the results of the above commands every 5 minutes or so, but that would be tons of useless data.

    I realize this is kind of a trick question, (don't answer remote command action) and probably not possible, but would be very useful!
    I am sure I read somewhere you could do this, something along the lines of restarting apache if its triggered as down etc....

    Edit: Yes! Set it up as an "action". You use the Remote Command feature (which means it has to be enabled on the server).

    Comment

    • bbrendon
      Senior Member
      • Sep 2005
      • 870

      #3
      Originally posted by noxis
      Edit: Yes! Set it up as an "action". You use the Remote Command feature (which means it has to be enabled on the server).
      Like I said, its partially a trick question and thats what I said not to answer. I actually haven't tried in 1.4.2, but I expect it won't work.

      Hmm, as a side note, maybe we should have monthly Zabbix puzzlers. That would be fun. Somewhere in this thread you'll hear why it doesn't work.
      Unofficial Zabbix Expert
      Blog, Corporate Site

      Comment

      • bbrendon
        Senior Member
        • Sep 2005
        • 870

        #4
        Anyway, I haven't thought of a way to do this. The reason this doesn't work for active agents is because the server has to be able to open a connection to the agent. If an active agent is behind firewalls, this isn't possible.
        Unofficial Zabbix Expert
        Blog, Corporate Site

        Comment

        Working...