Ad Widget

Collapse

How to use: Count function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • predatorz
    Senior Member
    • Mar 2007
    • 109

    #1

    How to use: Count function

    Hi,

    Using now Zabbix v1.3.8. trying to use the count function but doesn't seem to be working/cannot get it to be working.. i follow the example in the manual
    For example,
    count(600,12) will return exact number of values equal to ‘12’ stored in the history.

    Item: icmpping, Numeric Integer, interval: 120s

    i write the expression as below
    {Template:icmpping.count(600,0)}=5, it will return error [600,0] is not a float ???
    i change icmpping to Numeric float, same expression as above, and still the same error?

    Anyone can give an example on how to use count function or point out my error? thanks!
  • predatorz
    Senior Member
    • Mar 2007
    • 109

    #2
    Anyone can help ?

    Comment

    • predatorz
      Senior Member
      • Mar 2007
      • 109

      #3
      Now Using Zabbix v1.4,

      Still not sure on how the count function is to be used in expression.
      Icmpping interval=120s, type=integer, so i want the trigger to triggered zabbix gets 5 '0' value over the last 10 mins to alert me.
      Changed the type to float, also the same problem

      Tried {Template:icmpping.count(600,0)}=5, error [600,0] is not a float
      {Template:icmpping.count(#5, 0)}=5, error [#5, 0] is not a float.

      Any idea on how count function works or any example on count function?
      Thanks!

      Comment

      • predatorz
        Senior Member
        • Mar 2007
        • 109

        #4
        Anyone? Bump..

        Comment

        • predatorz
          Senior Member
          • Mar 2007
          • 109

          #5
          Anyone can give an idea? Thanks!

          Comment

          • bbrendon
            Senior Member
            • Sep 2005
            • 870

            #6
            I'm pretty sure this has been bumped enough.
            Unofficial Zabbix Expert
            Blog, Corporate Site

            Comment

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

              #7
              I confirm this problem. It will be fixed soon.

              Please don't make excessive postings.
              Alexei Vladishev
              Creator of Zabbix, Product manager
              New York | Tokyo | Riga
              My Twitter

              Comment

              • treyh
                Member
                • May 2007
                • 64

                #8
                temporary fix

                Hey,

                I found this expression, that doesn't use the count item but is similiar:

                The Expression:
                ===========
                No connect within 10 minutes: {meliorat_lrt:icmppingsec.max(600)}=0

                Ten recents checks failed: {meliorat_lrt:icmppingsec.max(#10)}=0
                ===========

                What the person wanted:
                ===========
                Hello,
                I have problems with WEB Zabbix >> Configuration >> Triggers >> Expression >> {meliorat_lrt:icmppingsec.last(0)}=0
                The connection with remote object "meliorat_lrt" is very bad and "{meliorat_lrt:icmppingsec.last(0)}=0" is triggered very often.
                Is it possible to do somehow so that "{meliorat_lrt:icmppingsec.last(0)}=0" would trigger if there is not connection with an object within 10 minutes.

                I tried the expression ({meliorat_lrt:icmppingsec.last(0)}=0)&({meliorat_ lrt:icmppingsec.count(600)) but it doesn’t work.
                I also tried the expression {meliorat_lrt:icmppingsec.last(0).count(600)}=0 - it writes an error:
                "ERROR:Cannot update trigger. No such host (meliorat_lrt) or monitored parameter (icmppingsec.last(0))"
                ===========

                Here is the link where I found it:

                Comment

                • predatorz
                  Senior Member
                  • Mar 2007
                  • 109

                  #9
                  Sorry if i bump too much,
                  Thanks for the info, Alexei

                  Comment

                  • testos
                    Member
                    • Apr 2007
                    • 85

                    #10
                    fixed in zabbix 1.4.1 release?

                    Comment

                    • predatorz
                      Senior Member
                      • Mar 2007
                      • 109

                      #11
                      The function count is working in zabbix 1.4.1, at least i can update the trigger without any problem. For further testing..

                      Comment

                      • predatorz
                        Senior Member
                        • Mar 2007
                        • 109

                        #12
                        Count function doesn't work for items like: tcp,3306?
                        I tried {Template:tcp,3306.count(600,0)}=5 but zabbix throws Incorrect trigger expression?

                        How do i write the expression for such simple checks?

                        Comment

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

                          #13
                          We have an issue with processing of ',' in item keys in 1.4.1. It is fixed. You may try to use pre1.4.2 which is available at http://www.zabbix.com/developers.php.
                          Alexei Vladishev
                          Creator of Zabbix, Product manager
                          New York | Tokyo | Riga
                          My Twitter

                          Comment

                          • predatorz
                            Senior Member
                            • Mar 2007
                            • 109

                            #14
                            Thanks Alexei!

                            Comment

                            • predatorz
                              Senior Member
                              • Mar 2007
                              • 109

                              #15
                              I have downloaded pre-zabbix-1.4.2.tar.gz and recompile zabbix and copr the frontend files to /var/wwww/html, but when i try to change the trigger expression(items with ,), i still get Incorrect trigger expression. [{template:tcp,53.count(600,0)}=5]

                              Comment

                              Working...