Ad Widget

Collapse

Problem with triggering sql value duplicate - Zabbix 5.0.1

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lgasiewski
    Junior Member
    • Jul 2020
    • 7

    #1

    Problem with triggering sql value duplicate - Zabbix 5.0.1

    Hello, (I made mistake on topic, version on Zabbix is 4.2.8

    I've got problem with setup trigger for SQL Always On Replication

    SQL Server provide from query to Zabbix value in text of date and time of last replication when was done, its updating every minute like this:

    ​s

    What i want to achive is when the updated value will be this same for 5 updates interval it will start Trigger, like here:

    Click image for larger version  Name:	asdas.PNG Views:	3 Size:	4.7 KB ID:	404446

    I've created a Trigger with this settings:

    Click image for larger version  Name:	image1.png Views:	2 Size:	28.4 KB ID:	404447

    But eventiualy is sending problem all the time, can someone help me with this situation ?
    Last edited by lgasiewski; 02-07-2020, 14:24.
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    First: the diff function does not have parameters.
    Due to the fact that the value you have in the form of text, you can not apply many trigger functions...
    Try the expression "last()=last(#1) and last (#1)=last(#2) and last(#2)=last(#3) " and so on....

    Comment

    • lgasiewski
      Junior Member
      • Jul 2020
      • 7

      #3
      I'm sorry can you write this for expression for 2 last, rest i will add, cause i don't accually know right now how to triggering,

      Comment

      • Hamardaban
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • May 2019
        • 2713

        #4
        {item.last()}={item.last(#1)} and {item.last(#1)}={item.last(#2)} and {item.last(#2)}={item.last(#3)} .........
        the last value is equal to the previous value And the previous value is equal to the value 2 times back And the value 2 times back is equal to the value 3 times back and so on

        Comment

        • lgasiewski
          Junior Member
          • Jul 2020
          • 7

          #5
          Something went wrong

          Click image for larger version

Name:	xsd.PNG
Views:	247
Size:	28.8 KB
ID:	404499
          Click image for larger version

Name:	dsadsx.PNG
Views:	251
Size:	7.7 KB
ID:	404500

          Comment

          • Hamardaban
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • May 2019
            • 2713

            #6
            The last equality (=1) is not necessary - remove it!

            Comment

            • lgasiewski
              Junior Member
              • Jul 2020
              • 7

              #7
              Still nothing, even when i remove =1

              Comment

              • Hamardaban
                Senior Member
                Zabbix Certified SpecialistZabbix Certified Professional
                • May 2019
                • 2713

                #8
                Wait for the data item to update and get at least five new values. If the problem persists, publish an error message.

                Comment

                • lgasiewski
                  Junior Member
                  • Jul 2020
                  • 7

                  #9
                  Still nothing

                  Click image for larger version

Name:	;kskdasd.PNG
Views:	237
Size:	7.3 KB
ID:	404606

                  Comment

                  • Hamardaban
                    Senior Member
                    Zabbix Certified SpecialistZabbix Certified Professional
                    • May 2019
                    • 2713

                    #10
                    Are you sure that the item Type of information = text or character? Not a log type?
                    The problem is that the system doesn't like the space in the value when comparing.
                    And for some reason the values are in brackets and not in quotes.

                    Comment

                    • Hamardaban
                      Senior Member
                      Zabbix Certified SpecialistZabbix Certified Professional
                      • May 2019
                      • 2713

                      #11
                      Yes-indeed! Let's see what type of data the data element receives and whether it is possible to change the system that returns the data?

                      Comment

                      Working...