Ad Widget

Collapse

Action not called on trigger status change

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • carl
    Junior Member
    • Aug 2006
    • 28

    #1

    Action not called on trigger status change

    Hi,
    Quick rundown on the issue:

    Setup triggers, all confirmed to be working by taking up and down various services and checking the 'status colour', the action never seems to appear under the Monitoring->Actions tab and no email is generate (I'm not bothered about email just yet, want to get the action working first).

    So.. Is there any obvious configuration issue with the below?

    Typical trigger:
    Name: HTTP
    Expression: {Unix_t:net.tcp.port[,80].last(0)}<1
    The trigger depends on: No dependences defined
    Severity: High
    Comments: <blank>
    URL: <blank>

    Tested Action (one of many):
    Action type: Send Message
    Source: Trigger
    Conditions: Host = "Unix_t" AND Trigger value = "ON"
    Send message to: Single User
    User: Admin
    Subject: {TRIGGER.NAME}: {STATUS}
    Message: {TRIGGER.NAME}: {STATUS}
    Repeat: No Repeats
    Status: Enabled
  • schneck
    Member
    • May 2006
    • 62

    #2
    Originally posted by carl
    Action type: Send Message
    Source: Trigger
    Conditions: Host = "Unix_t" AND Trigger value = "ON"
    Send message to: Single User
    User: Admin
    Subject: {TRIGGER.NAME}: {STATUS}
    Message: {TRIGGER.NAME}: {STATUS}
    Repeat: No Repeats
    Status: Enabled
    In Admin's Media profile, make sure severity high is checked.

    Run zabbix_server with DebugLevel = 4 to figure out what's going on (but be careful, the default logfile size is limited to 1MB, with my setup it rolls over in less than 5 minutes at DebugLevel 4!)

    \B.

    Comment

    • carl
      Junior Member
      • Aug 2006
      • 28

      #3
      Thank you very much for that, didn't see the option hidden away or in the documentation. Still doesn't seem to work, do you have any tips on what to grep for in the zabbix_server.log with debug level 4 on? There is far too much info flowing through to manually check it all.

      Thanks again.

      Comment

      • schneck
        Member
        • May 2006
        • 62

        #4
        action

        Originally posted by carl
        do you have any tips on what to grep for in the zabbix_server.log with debug level 4 on?
        well, I think I grepped for action and that helped me to figure out what was wrong.

        \B.

        Comment

        • carl
          Junior Member
          • Aug 2006
          • 28

          #5
          I think i've got it now. I was getting:


          HTML Code:
          002985:20060806:173107 Condition is FALSE
          002985:20060806:173107 Conditions are FALSE
          002985:20060806:173107 Conditions do not match our trigger. Do not apply actions.
          I removed the Unix_t, changed it to the hostname of box I was testing it on and also removed the Trigger value = "ON" which seemed to generate an error for me.

          Now just to debug if its the Unix_t causing the problem or the Trigger value.

          Thanks!

          Comment

          • Alexei
            Founder, CEO
            Zabbix Certified Trainer
            Zabbix Certified SpecialistZabbix Certified Professional
            • Sep 2004
            • 5654

            #6
            It makes no sense to define actions for templates. ZABBIX does not link templated hosts to a template while processing action's conditions.

            A better approach could be grouping hosts and use condition Host group="Your group".
            Alexei Vladishev
            Creator of Zabbix, Product manager
            New York | Tokyo | Riga
            My Twitter

            Comment

            • carl
              Junior Member
              • Aug 2006
              • 28

              #7
              Cheers Alexei, that's the route I discovered works well for us in the end

              Comment

              • cstackpole
                Senior Member
                Zabbix Certified Specialist
                • Oct 2006
                • 225

                #8
                I know I am late to this conversation, but I have run into this several times and now its a problem for me.

                I understand that setting up a trigger on a template is silly, but would it be possible to link to all of the items that template is applied to? Basically, link to a trigger regardless of what host, host group, or template?

                For example: I have several Linux boxes in different host groupings. The one thing in common is that they all have the Unix_t template applied to them. If I wanted to run a command that flushes out all the log files when /tmp got full I could set it up with a simple:
                Trigger=Low free disk space on Unix_t\'s volume /tmp
                Trigger=ON
                Remote Command: {HOSTNAME}:rm -rf /tmp/*.log

                I could set up all of the host groups in the trigger, but not all the computers in all of the host groups are from the template Unix_t. Plus I may not want this trigger firing unless /tmp is full and because you can't link that trigger to a grouping it probably wont work anyway.

                I could define the trigger to be "Low free disk space on Computer[1-n]\'s volume /tmp" but that would be a lot of entries!

                I have run into this issue a couple of times where I have several computers who seemingly only have the template in common (meaning they all share the exact same trigger). In some cases I figured out I could apply the Host Group ="" because others in the host group didn't have that trigger. In some cases I just defined a Trigger="Low free disk space on Computer[1-n]\'s volume /tmp" for each host.

                Why can I not have an action that says whenever this trigger occurs regardless of what host, host group, template, or other do some action? Most of the time I don't care about what host or host group a trigger is on, just that an action is taken whenever a certain trigger is fired.

                Any suggestions or ideas? BTW, I am running server 1.4.2.

                Thanks,
                cstackpole

                Comment

                • cstackpole
                  Senior Member
                  Zabbix Certified Specialist
                  • Oct 2006
                  • 225

                  #9
                  Not sure I explained myself as well as I would have liked, so I think I am going to try again with pictures.
                  I made an item that checks that NTP is running. If it is not, a trigger goes off. The action I have is a remote command that starts NTP.

                  If I configure the action like below, then ONLY LX-CStackpole will have its NTP restarted with this action. No other computer with that trigger will work (which makes sense).


                  If I wanted a second computer to have this trigger, I have to do this.

                  and I have to keep doing it for every computer. I can do that for 5 computers, but more?

                  What I really want to do is this:

                  and have this action occur on that trigger on every computer that is linked to that template.

                  There is probably a way of doing this that I have not figured out. If so someone please let me know.

                  Thanks,
                  cstackpole

                  Comment

                  • kloczek
                    Senior Member
                    • Jun 2006
                    • 1771

                    #10
                    Originally posted by Alexei
                    It makes no sense to define actions for templates. ZABBIX does not link templated hosts to a template while processing action's conditions.

                    A better approach could be grouping hosts and use condition Host group="Your group".
                    IMO it will better extend tempates to not only this are like action. Screens, slides, graphs, scenarios, SLA comes next to mind and not only for keep this consitient but also for example for moving all configuration definition or parts between servers.
                    Yes I know now is possible use <template_name> in gaphs definition sot is is now graphs now are "like templated" but I don't see why not make this straight part of template (?).
                    Grouping in this case (actions) is IMO nothing more like equivalent of tempates .. on manageability level. Below this layer I don't care how it is it is tied but on presentation level IMO better will be use the same schema on UI for make this easier on using/thinking about this.
                    Now we have situation where on items and triggers are used templates, graphs are "like templated", actions have grouping and few weeks ago IIRc you wrote something like "sreeens will probably have some king of generators" and other parts have nothing.

                    Please look on this problem from this point .. why not make/name this as templates ?

                    And next about grouping in actions. Now I can't use group=all in actions but .. I'm using some common template for all my hosts in four groups.
                    Even if it is bug better will be name this on presentation level as "part of template" (definitely not grouping).
                    Using grouping I must define the same action in four copies. Don't get me wrong but for me it is unlogical
                    IMO template is very good idea and IMO it will be good use this in any possible zabbix area

                    Next unlogical point in current zabbix actions: you wrote "It makes no sense to define actions for templates". OK .. but why in avalaible trigger list on define action are listed not all this host specified but also all defined in templates ?
                    My firts impression was "wow .. excelent I can use 'template like' way for actions too".
                    I was very disapointed when it was not true and instead (simpler IMO) "<template_foo>: trigger name=bar and trigger value=on" I must use "trigger description=bar and trigger value=on and host group=foo"

                    Please separete your developer thinkig of view .. start thinking about this in some common way on UI level
                    Last edited by kloczek; 29-11-2007, 06:07.
                    http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
                    https://kloczek.wordpress.com/
                    zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
                    My zabbix templates https://github.com/kloczek/zabbix-templates

                    Comment

                    Working...