Ad Widget

Collapse

Action not being triggered as expected.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sean
    Junior Member
    • Mar 2008
    • 28

    #1

    Action not being triggered as expected.

    Hi,

    I've a problem with an NTP daemon dying now and again.
    An action has been written to restart it, but it only triggers for some servers, not others.

    For my linux servers I have a Linux-servers-Action that normally just reports problems by email. A new ntp-restart-action has been added to restart the NTP automatically and email.

    The Linux-servers-Action was modified to ignore NTP errors:
    Trigger value = "PROBLEM"
    Trigger <> "NTP daemon"
    Host group = "Linux servers"

    To be caught by ntp-restart-action:
    Trigger value = "PROBLEM"
    Trigger = "NTP daemon"

    For most systems I get the email generated by Linux-servers-Action, and just one single systems triggers ntp-restart-action.

    Now the trigger used is identical in both cases and all servers concerned belong to "Linux servers", I'm mystified about this.
    Where could one start tracing the problem?
    Is there a way to force the order of actions being matched?
    Zabbix 1.8.2.

    Thanks in advance...
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    the action condition "trigger", which trigger exactly does it refer ?
    are you using remote commands to restart ntp ?
    if you look at event details, do you see both message and remote command listed ?
    are remote commands enabled on all agents ?
    are you using sudo to restart ntp daemon ?
    is sudoers configured properly on all systems ?
    Zabbix 3.0 Network Monitoring book

    Comment

    • sean
      Junior Member
      • Mar 2008
      • 28

      #3
      Originally posted by richlv
      the action condition "trigger", which trigger exactly does it refer ?
      are you using remote commands to restart ntp ?
      if you look at event details, do you see both message and remote command listed ?
      are remote commands enabled on all agents ?
      are you using sudo to restart ntp daemon ?
      is sudoers configured properly on all systems ?
      The "ntp damon" trigger is in my linux template:
      {Template_SIS_Linuxroc.num[ntpd].last(0)}=0

      Yes, using a remote command with sudo. Thats not the issue - the remote restart works just fine, for the system that triggers the ntp-restart-action.

      Each action sends a different email, which allows me to see which of the actions was fired.

      The actions for ntp-restart-action are:
      1. Run remote commands
      2. Send message to Group "unix-core-alerts"

      The action for Linux-servers-Action is:
      1. Send message to Group "unix-core-alerts"

      Event details: I've attached two secreen shots of the event when It triggers the restart, and not.

      Both systems are linked to the same template.
      Attached Files

      Comment

      • richlv
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Oct 2005
        • 3112

        #4
        yes, but in the action conditions, did you choose trigger from a host or from the upper level template ?
        Zabbix 3.0 Network Monitoring book

        Comment

        • sean
          Junior Member
          • Mar 2008
          • 28

          #5
          Bingo!

          I removed the "Ntp daemon" trigger from both actions (since I cannot edit or view its detail), then re-added to both, being careful to select the trigger from the template and not a specific host.

          And now it works.

          thanks very much.

          Comment

          • richlv
            Senior Member
            Zabbix Certified Trainer
            Zabbix Certified SpecialistZabbix Certified Professional
            • Oct 2005
            • 3112

            #6
            additionally, zabbix 1.8.3 will always show host/template name for triggers in action conditions
            Zabbix 3.0 Network Monitoring book

            Comment

            Working...