Ad Widget

Collapse

PATCH: Correct group of triggers on overview screen

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Shmuma
    Member
    • Nov 2007
    • 49

    #1

    PATCH: Correct group of triggers on overview screen

    Hello,

    This patch allows to reduce amount of displayed triggers on overview screen.

    If we have several triggers with the same name but different expressions and different priorities, they grouped to one line in overview screen. Sadly, the color of trigger displayed is random (in fact it is order of trigger creation). This patch fixes this situation by performing sort of such overlapping triggers by severity. For example, we have three triggers with name 'Lack of disk space on /' and the following keys and priorities:
    1. INFORMATION: {host:vfs.fs.size[/,pfree].last(0)}<30
    2. WARNING: {host:vfs.fs.size[/,pfree].last(0)}<20
    3. HIGH: {host:vfs.fs.size[/,pfree].last(0)}<10
    4. DISASTER: {host:vfs.fs.size[/,pfree].last(0)}<5


    In overview screen we will see only one of these triggers. But when free disk space percentage drops to 30%, we will see Information's color brick. If this value drops to 20%, this brick changed color to Warning and so on.

    This patch touches only overview screen, on other parts of zabbix these triggers remain different (notification sent as usual, etc).

    Patch against 1.4.4.
    Attached Files
  • Shmuma
    Member
    • Nov 2007
    • 49

    #2
    Sorry for inconvenience, original patch have logic bugs. Correct patch atatched to this message.
    Attached Files

    Comment

    • skogan
      Member
      • Nov 2007
      • 70

      #3
      Hey man, this sounds very much like my overview screen patch.

      Here: http://www.zabbix.com/forum/showthread.php?t=8668


      BTW, Do you have any ideas about how to fix the bug (or, rather, misfeature) where the trigger appears once for every host that has items associated with that trigger?

      Comment

      • Shmuma
        Member
        • Nov 2007
        • 49

        #4
        Our patches are almost identical. Sorry, I didn't see your post.

        BTW, Do you have any ideas about how to fix the bug (or, rather, misfeature) where the trigger appears once for every host that has items associated with that trigger?
        Hmm, if I understood you right, I don't think that we can do something here. The table is square .

        Comment

        • skogan
          Member
          • Nov 2007
          • 70

          #5
          I wasn't talking about the gray cells

          The problem is that when you have a more complex trigger with a condition that mentions 2 or more items from 2 or more different hosts, the trigger appears for all the hosts in question. The reason for that is that in zabbix triggers don't belong to any hosts - only items do.

          I found this out when I was setting up a special repeated notification trigger. Here, check this out:



          I'm thinking of, maybe, changing the logic in such a way that the trigger would be shown only for host owning the first item in the condition. What do you think, is that a reasonable logic?
          Last edited by skogan; 08-02-2008, 19:45.

          Comment

          • skogan
            Member
            • Nov 2007
            • 70

            #6
            One more thing that needs to be addressed in the overview screen is the bug with the blinking inactive cells - it's freaking annoying!

            Comment

            • Shmuma
              Member
              • Nov 2007
              • 49

              #7
              I got this problem, thanks for explaination. To my mind, making such compound triggers displayed only for first host is a hack which don't solve underlying problem.

              I think, this can be solved by elimination of compund triggers as a whole (personally I don't see situation when they are really needed). I prefer make triggers atomic: check one thing and notify about this.

              The original problem (repeated triggers) can be resolved much better by implementing additional trigger attribute (repeated flag with repeat interval) with apropiate logic in zabbix_server.

              Comment

              • Shmuma
                Member
                • Nov 2007
                • 49

                #8
                Originally posted by skogan
                One more thing that needs to be addressed in the overview screen is the bug with the blinking inactive cells - it's freaking annoying!
                Yes, they are ugly, especially when we have about 20-30 hosts with 100 triggers to display. Maybe just display some character inside such cell? ('*' for example)

                Comment

                • skogan
                  Member
                  • Nov 2007
                  • 70

                  #9
                  Hah... Repeated flag is, of course, cool. But it was a big problem in Zabbix. The problem is, that zabbix triggers are data driven - that is, the trigger's status is calculated only when any of the items used by the trigger are updated. So, implementing a repeated flag turns into a pretty big deal.

                  Generally, compound triggers are very useful. For example, I routinely create compound triggers for web applications - a trigger fires if either the page doesn't return correct content or takes too long. Of course, such a trigger will not create a problem in the overview page, since both items are from the same host.

                  I could create a ticker item for every host I want repeated notifications for, but it's such a drag on the server, running all these external scripts

                  Maybe a better thing is to implement a simple internal zabbix item that will return 1 every n seconds - that will work like a charm

                  Comment

                  • skogan
                    Member
                    • Nov 2007
                    • 70

                    #10
                    Originally posted by Shmuma
                    Yes, they are ugly, especially when we have about 20-30 hosts with 100 triggers to display. Maybe just display some character inside such cell? ('*' for example)
                    This should actually be a fairly simple thing. It's probably some stupid little bug that keeps adding the "blink" class in every inactive cell after the really blinking one. Probably a one line fix - I'll look into it during the weekend

                    Comment

                    • skogan
                      Member
                      • Nov 2007
                      • 70

                      #11
                      Finally got around to fixing that blinking problem. It really was a one line fix after all:

                      Comment

                      • Aly
                        ZABBIX developer
                        • May 2007
                        • 1126

                        #12
                        Originally posted by Shmuma
                        Sorry for inconvenience, original patch have logic bugs. Correct patch atatched to this message.
                        Applied with changes.
                        Zabbix | ex GUI developer

                        Comment

                        • skogan
                          Member
                          • Nov 2007
                          • 70

                          #13
                          The patch you applied didn't fix the popup menu problem - when there are no active triggers the popup menu should refer to the highest priority trigger, not some random one.

                          I suggest you take a look at my patch I mentioned earlier in this topic - the logic there takes that into account. I know the expression there is long and hard to read, but it works beautifully.
                          Last edited by skogan; 28-03-2008, 20:12.

                          Comment

                          • Aly
                            ZABBIX developer
                            • May 2007
                            • 1126

                            #14
                            Originally posted by skogan
                            The patch you applied didn't fix the popup menu problem - when there are no active triggers the popup menu should refer to the highest priority trigger, not some random one.

                            I suggest you take a look at my patch I mentioned earlier in this topic - the logic there takes that into account. I know the expression there is long and hard to read, but it works beautifully.
                            Applied, with changes. Thank you.
                            Zabbix | ex GUI developer

                            Comment

                            Working...