Ad Widget

Collapse

Can not correctly configure trigger to fire only in specific time

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • link0876543
    Junior Member
    • Oct 2015
    • 3

    #1

    Can not correctly configure trigger to fire only in specific time

    I want to configure this trigger to fire only on specific time. When I use .time trigger function zabbix report `Incorrect trigger expression`.

    Check Example 10


    The trigger is used to report when 192.168.1.5 becomes unavailable.

    HTML Code:
    {host1.mydomain.com:fping[192.168.1.5].nodata(1m)}=1&{host1.mydomain.com:fping[192.168.1.5].nodata(1m).time(0)}>000000&{host1.mydomain.com:fping[192.168.1.5].nodata(1m).time(0)}<060000
  • ingus.vilnis
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Mar 2014
    • 908

    #2
    Hello and welcome to Zabbix forums!

    There is a problem in the expression part where functions are used. Don't use two functions in a row like this: .nodata(1m).time(0)

    Try the following expression:
    Code:
    {host1.mydomain.com:fping[192.168.1.5].nodata(1m)}=1&{host1.mydomain.com:fping[192.168.1.5].time(0)}>000000&{host1.mydomain.com:fping[192.168.1.5].time(0)}<060000
    Hope this helps!

    Best Regards,
    Ingus

    Comment

    • link0876543
      Junior Member
      • Oct 2015
      • 3

      #3
      When I enter this code I receive error from Zabbix:

      Code:
      Incorrect trigger expression. Check expression part starting from "1&{host1.mydomain.com:fping[192.168.1.5].time(0)}>000000&{host1.mydomain.com:fping[192.168.1.5].time(0)}<060000".

      Comment

      • ingus.vilnis
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Mar 2014
        • 908

        #4
        What version of Zabbix are you using?

        If 2.4.x then try the following:
        Code:
        {host1.mydomain.com:fping[192.168.1.5].nodata(1m)}=1 and {host1.mydomain.com:fping[192.168.1.5].time()}>000000 and {host1.mydomain.com:fping[192.168.1.5].time()}<060000
        Expression syntax was changed a bit there.

        Best Regards,
        Ingus

        Comment

        • link0876543
          Junior Member
          • Oct 2015
          • 3

          #5
          That worked.

          So what was the cause of the problem? Was it new sytax of triggers in new version of Zabbix?

          Comment

          • ingus.vilnis
            Senior Member
            Zabbix Certified Trainer
            Zabbix Certified SpecialistZabbix Certified Professional
            • Mar 2014
            • 908

            #6
            Seems you are using 2.4 then but was referring to documentation of 2.2.

            The problem in your case was that you were using trigger expressions with logical AND "&" but starting from 2.4. you have to use "and" for this.


            Best Regards,
            Ingus

            Comment

            Working...