Ad Widget

Collapse

v1.4.2 New operator parameter for count() fail

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • testos
    Member
    • Apr 2007
    • 85

    #1

    v1.4.2 New operator parameter for count() fail

    Hi

    I don't get to work new operator parameter for function count(period,value,operator) for a UINT64 or FLOAT value item.


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

    #2
    Originally posted by testos
    Any suggestions?
    Please be more specific! What is your trigger expression?
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • testos
      Member
      • Apr 2007
      • 85

      #3
      History items:
      2007.Aug.21 13:36:33 7
      2007.Aug.21 13:36:22 7
      2007.Aug.21 13:36:13 7
      2007.Aug.21 13:36:03 7
      2007.Aug.21 13:35:52 7
      2007.Aug.21 13:35:43 7
      2007.Aug.21 13:35:32 7
      2007.Aug.21 13:35:22 7
      2007.Aug.21 13:35:13 7
      2007.Aug.21 13:35:02 7

      Trigger expression: {Equipos Windows:vfs.fs.size[c:,pfree].count(60,7,"gt")}>3
      Trigger status returned: TRUE

      Item configuration: attached file


      Regards
      Attached Files

      Comment

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

        #4
        Unfortunately I cannot reproduce this. Tested with your data, it works absolutely fine.
        Alexei Vladishev
        Creator of Zabbix, Product manager
        New York | Tokyo | Riga
        My Twitter

        Comment

        • Palmertree
          Senior Member
          • Sep 2005
          • 746

          #5
          I am using the new operator and it is working fine for something like
          {Hostname:key.(count,0,"gt")}>2.

          It actually allows me to setup alerts and to avoid trigger flapping. Nice job to the developers. Great function! Keep up the good work.

          Comment

          • jean
            Member
            • Apr 2006
            • 85

            #6
            Hello,

            If I set an item as follow : {Unix_t:http.count(90,0,"eq")}>2, when the server web don't answer 3 times or more in 90 seconds the trigger will go TRUE, It's wright ?

            It is possible to have the same trigger for the last values stored in DB and not in the last 90 seconds ?

            Regards

            Jean

            Comment

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

              #7
              Originally posted by jean
              It is possible to have the same trigger for the last values stored in DB and not in the last 90 seconds ?
              No, it is not supported currently.
              Alexei Vladishev
              Creator of Zabbix, Product manager
              New York | Tokyo | Riga
              My Twitter

              Comment

              • jean
                Member
                • Apr 2006
                • 85

                #8
                Thank you. I hope this functionality will be available soon.

                Comment

                • testos
                  Member
                  • Apr 2007
                  • 85

                  #9
                  My frustation
                  Any operator parameter is ignored for count(period,value,operator) function.


                  Probes bank:
                  Restart zabbix server: it don't work for me
                  Delete history item: it don't work for me
                  Delete and then create same trigger: it don't work for me
                  Delete item (involve trigger deleted) an then create same item and trigger: it don't work for me
                  Export items, triggers and host from zabbix, backup only data for mysql database with phpmyadmin, drop mysql database, create database, create zabbix database schema and finally import only data above backed fro phpmyadmin: it don't work for me

                  where is the trick?
                  which is the externally mysql query for the zabbix data base to read {Equipos Windows:vfs.fs.size[c:,pfree].count(60,7,"lt")}>3 ?

                  Comment

                  • testos
                    Member
                    • Apr 2007
                    • 85

                    #10
                    Trigger expresion is: {Equipos Windows:vfs.fs.size[c:,pfree].count(60,11,"le")}>3

                    DebugLevel parameter set to 4 in zabbix_server.conf and I can see these log entries:

                    Code:
                     13954:20070823:182824 ItemId:25820 Evaluating count(60,11,"le")
                     13954:20070823:182824 In evaluate_function(count)
                     13954:20070823:182824 In evaluate_COUNT(param:60,11,"le")
                     13954:20070823:182824 Query [select count(value) from history_uint where clock>1187893644 and value=11 and itemid=25820]
                     13954:20070823:182824 End evaluate_COUNT
                     13954:20070823:182824 End of evaluate_function(result:6)
                    If operator is "le" why query build with "value=11"
                    Last edited by testos; 23-08-2007, 19:07.

                    Comment

                    • testos
                      Member
                      • Apr 2007
                      • 85

                      #11
                      Trying other operator an setting trigger expresion to:
                      {Equipos Windows:vfs.fs.size[c:,pfree].count(60,11,"gt")}>3

                      And the log entries:

                      Code:
                       14668:20070823:183606 Query [select distinct function,parameter,itemid,lastvalue from functions where itemid=25820]
                       14668:20070823:183606 ItemId:25820 Evaluating count(60,11,"gt")
                       14668:20070823:183606 In evaluate_function(count)
                       14668:20070823:183606 In evaluate_COUNT(param:60,11,"gt")
                       14668:20070823:183606 Query [select count(value) from history_uint where clock>1187894106 and value=11 and itemid=25820]
                       14668:20070823:183606 End evaluate_COUNT
                       14668:20070823:183606 End of evaluate_function(result:3)
                       14668:20070823:183606 Query [update functions set lastvalue='3' where itemid=25820 and function='count' and parameter='60,11,"gt"']
                       14668:20070823:183606 End update_functions()

                      Comment

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

                        #12
                        Here is debug result from my test system:

                        Code:
                        26562:20070823:215048 ItemId:100000000018539 Evaluating count(60,11,"le")
                         26562:20070823:215048 In evaluate_function(count)
                         26562:20070823:215048 In evaluate_COUNT(param:60,11,"le")
                         26562:20070823:215048 Query [select count(value) from history_uint where clock>1187894988 and value<=11 and itemid=100000000018539]
                         26562:20070823:215048 End evaluate_COUNT
                         26562:20070823:215048 End of evaluate_function(result:1)
                        As you may see, the SQL statement is different. Are you using ZABBIX 1.4.2?
                        Alexei Vladishev
                        Creator of Zabbix, Product manager
                        New York | Tokyo | Riga
                        My Twitter

                        Comment

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

                          #13
                          Also:

                          Code:
                          zabbix_server.log.old: 26986:20070823:220140 ItemId:100000000018539 Evaluating count(60,11,"gt")
                          zabbix_server.log.old: 26986:20070823:220140 In evaluate_function(count)
                          zabbix_server.log.old: 26986:20070823:220140 In evaluate_COUNT(param:60,11,"gt")
                          zabbix_server.log.old: 26986:20070823:220140 Query [select count(value) from history_uint where clock>1187895640 and value>11 and itemid=100000000018539]
                          zabbix_server.log.old: 26986:20070823:220140 End evaluate_COUNT
                          Alexei Vladishev
                          Creator of Zabbix, Product manager
                          New York | Tokyo | Riga
                          My Twitter

                          Comment

                          • testos
                            Member
                            • Apr 2007
                            • 85

                            #14
                            As you may see, the SQL statement is different. Are you using ZABBIX 1.4.2?
                            Nooooooooooooo

                            Code:
                             [root@CentOS-5 src]# zabbix_server -V
                            ZABBIX Server (daemon) v1.4.2 (20 August 2007)
                            Compilation time:  Aug 21 2007 11:16:57
                            
                            [root@CentOS-5 src]# /usr/local/bin/zabbix_server -V
                            ZABBIX Server (daemon) v1.4.2 (20 August 2007)
                            Compilation time:  Aug 21 2007 11:16:57
                            But zabbix log file say:
                            Code:
                             13934:20070823:182842 ZABBIX Server stopped
                             14576:20070823:183500 Starting zabbix_server. ZABBIX 1.4.1.
                             14576:20070823:183500 **** Enabled features ****
                             14576:20070823:183500 SNMP monitoring:       YES
                             14576:20070823:183500 WEB monitoring:        YES
                             14576:20070823:183500 Jabber notifications:   NO
                             14576:20070823:183500 **************************

                            Here's the explanation.

                            From the ZABBIX Manual v1.4 rev9:
                            "By default, make install will install all the files in /usr/local/bin, /usr/local/lib etc. You can specify an installation prefix other than /usr/local using --prefix"

                            Each time, I configure sources with this command line:
                            ./configure --enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurl --prefix=/usr/local/zabbix
                            Reason why I suppose that zabbix server binary is moved to /usr/local/zabbix/bin
                            But when try
                            Code:
                             [root@CentOS-5 src]# /usr/local/zabbix/bin/zabbix_server -V
                            ZABBIX Server (daemon) v1.4.1 (29 June 2007)
                            Compilation time:  Jul  2 2007 09:35:38
                            From the 29 June has not updated the server!!!

                            Is it necessary manually copy zabbix server binary from sources compilation directory to prefix binary directory?

                            Comment

                            • testos
                              Member
                              • Apr 2007
                              • 85

                              #15
                              Now count function work absolutely fine.

                              Zabbix now provide a mechanism for similar Tivoli ocurrences number and holes (see this thread )

                              For an item with an interval update of 60 s, only you need create a trigger expression same "{Equipos Windows:vfs.fs.size[c:,pfree].count(240,15,"lt")}>2"
                              so that trigger change to ON only if 4 consecutives checks obtain <15, including one possible hole, for example:

                              20 15 13 14 -> trigger OFF
                              15 13 14 13 -> trigger ON (15 is the hole)
                              13 16 14 14 -> trigger ON (16 is the hole)

                              Zabbix is a very great product. EVERY DAY I LIKE MORE
                              Thanks Alexei and company
                              .

                              Comment

                              Working...