Ad Widget

Collapse

Complex Condition for an Action

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jammann
    Junior Member
    • Jan 2009
    • 4

    #1

    Complex Condition for an Action

    Hi everybody

    I tried to figure out (with Zabbix 1.6.4) if I could make an Action depend on the following condition

    (Trigger Description not like "Test") AND
    (NOT (Host == "A" AND Time period in 1-7,22:45-23:15))


    Reason: Host A automatically reboots every night at 23:00 and I want to suppress alerts. And we have some triggers defined with "Test" in the name, which we don't want alerts for either.

    I did not succeed in specifying the above condition in one single action. As workaround, I created 2 action, so the problem is solved.

    I just want to know if the above could have been done in one single action?

    PS: Logic says I can rewrite the above as

    (Trigger Description not like "Test") AND
    (Host <> "A" OR Time period not in 1-7,22:45-23:15)


    but I didn't succeed with this either :-/
  • Andreas Bollhalder
    Senior Member
    Zabbix Certified Specialist
    • Apr 2007
    • 144

    #2
    Hi

    I use the zabbix-sender in the restart script to inform the ZABBIX server about the restart.

    In my case, this will enable a trigger named "Host restart by script initiated" which will stay TRUE (by help of the nodata() function) for a while to allow the server to completely restart. The trigger has the severity of "Information" which is configured in the media to not start any actions. Then I make all needed dependencies to this trigger so ZABBIX won't send alerts in this case. With this, you never have to change a trigger if the restart time changes.

    The only thing I haven't done is the use of escalation if some service/item didn't come up after the restart.

    Andreas
    Zabbix statistics
    Total hosts: 380 - Total items: 12190 - Total triggers: 4530 - Required server performance: 224.2

    Comment

    • jammann
      Junior Member
      • Jan 2009
      • 4

      #3
      Great idea, it works smoothly! I'd never have thought of this

      Still many tricks to learn with Zabbix ...

      Comment

      • bashman
        Senior Member
        • Dec 2009
        • 432

        #4
        Originally posted by jammann

        (Trigger Description not like "Test") AND
        (Host <> "A" OR Time period not in 1-7,22:45-23:15)


        but I didn't succeed with this either :-/
        It seems that Trigger Description refers to trigger comment field, so add Test to comment.

        978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

        Comment

        • bashman
          Senior Member
          • Dec 2009
          • 432

          #5
          Originally posted by Andreas Bollhalder
          Hi

          I use the zabbix-sender in the restart script to inform the ZABBIX server about the restart.

          In my case, this will enable a trigger named "Host restart by script initiated" which will stay TRUE (by help of the nodata() function) for a while to allow the server to completely restart. The trigger has the severity of "Information" which is configured in the media to not start any actions. Then I make all needed dependencies to this trigger so ZABBIX won't send alerts in this case. With this, you never have to change a trigger if the restart time changes.

          The only thing I haven't done is the use of escalation if some service/item didn't come up after the restart.

          Andreas
          I have a complex scenario:

          A Java application sending trappers to Zabbix Server from a tomcat.

          In tomcat init script, I have zabbix_sender telling Zabbix Server that service has manually stopped.

          I have defined dependencies like this: "Java application trapper" depends on "Tomcat manual stop", so when I stop the tomcat, the java trapper won't notify by email.

          Well, this doesn't work, I can see that zabbix_sender was received before java trapper and I got both email notifications.

          If I send the zabbix_sender manually, instead of using tomcat init script, and stop tomcat, it works great.

          The curious thing is that I have the same results in the "Tomcat manual stop" and "Java application trapper", "lastest 500 values".

          Does anybody know what's going on?.
          978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

          Comment

          • bashman
            Senior Member
            • Dec 2009
            • 432

            #6
            Originally posted by bashman
            I have a complex scenario:

            A Java application sending trappers to Zabbix Server from a tomcat.

            In tomcat init script, I have zabbix_sender telling Zabbix Server that service has manually stopped.

            I have defined dependencies like this: "Java application trapper" depends on "Tomcat manual stop", so when I stop the tomcat, the java trapper won't notify by email.

            Well, this doesn't work, I can see that zabbix_sender was received before java trapper and I got both email notifications.

            If I send the zabbix_sender manually, instead of using tomcat init script, and stop tomcat, it works great.

            The curious thing is that I have the same results in the "Tomcat manual stop" and "Java application trapper", "lastest 500 values".

            Does anybody know what's going on?.
            Reported as: https://support.zabbix.com/browse/ZBX-3164
            978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

            Comment

            • subba5678
              Senior Member
              • May 2010
              • 132

              #7
              Hi Bashman,
              I have a problem with my trigger , If i get one trigger stating " Zabbix Agent is Down " or " Ping Availability is Zero
              " for that i am getting nearly 10 Resolve alerts for the same . Please find the details of Trigger description as well as Action Description please help me out

              {Toko - cesl tot657:icmpping[100.100.3.90,5,300,32,100].min(300)}=0

              Thanks,
              Subbu
              Attached Files

              Comment

              • bashman
                Senior Member
                • Dec 2009
                • 432

                #8
                Try to modify your item to icmpping only.
                978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

                Comment

                • subba5678
                  Senior Member
                  • May 2010
                  • 132

                  #9
                  Hi Bashman,
                  Thanks for the reply. I tried with the ICMPING also but not able to fix this. Please help me how to stop the Recovery alerts i am getting more for 1 Severity Problem . Please help me out

                  Thanks,
                  Subbu

                  Comment

                  • bashman
                    Senior Member
                    • Dec 2009
                    • 432

                    #10
                    I don't know if I understood, are you saying that you're getting more than one alert per trigger (the one you showed) for one action (the one you showed)?.
                    978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

                    Comment

                    • subba5678
                      Senior Member
                      • May 2010
                      • 132

                      #11
                      Hi,
                      Thanks for the quick reply , I will explain in clear way that i created a trigger to send an alert if the agent is down , whenever agent goes down i got 1 trigger saying that agent goes down . Whenever the agent start i need to get only one resolved alert but i am getting more than 5 resolved alerts . Also i checked the action was configured only one time Please find the attchment of my action configuration .Please help me out.

                      {Toko - cesl tot657:status.min(900)}=2


                      Thanks,
                      Subbu
                      Attached Files

                      Comment

                      • bashman
                        Senior Member
                        • Dec 2009
                        • 432

                        #12
                        That's strange, if you get one alert about zabbix agent is down, you should get only one recovery message about zabbix agent is down.

                        The action seems fine, but I don't understand your trigger:

                        {Toko - cesl tot657:status.min(900)}=2
                        978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

                        Comment

                        • subba5678
                          Senior Member
                          • May 2010
                          • 132

                          #13
                          HI Bashman,
                          Thanks for the reply . I am monitoring totally 50 Servers in Zabbix . In that nearly about 10 servers I am getting multilple recover alerts . for all the servers i am using the same Trigger . please find the my trigger details . Please help me out , I am using this in the production

                          Template_Windows:svs- Rosse TAL765 Zabbix Agent is down {svs - Rosse TAL765:status.min(900)}=2




                          Thanks,
                          Subbu

                          Comment

                          Working...