Ad Widget

Collapse

Create Trigger License Fortigate.. Help!!!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Shadowroot
    Junior Member
    • Jan 2022
    • 19

    #1

    Create Trigger License Fortigate.. Help!!!


    Dear all, good afternoon!!

    I'm having trouble creating a trigger to notify me when a fortigate license is about to end. I verified that the IOD (1.3.6.1.4.1.12356.101.4.6.3.1.2.1.2) of the item responsible for collecting information about the duration of the license is in the character type, but when I create a trigger, for example, to notify in given number of days it returns an error message stating that the item is of type character and the trigger has an unknown status, as shown in the image below. Can you please tell me if there is any way to create a trigger on this item?

    Click image for larger version

Name:	image.png
Views:	184
Size:	7.8 KB
ID:	495224​​
    Click image for larger version

Name:	image.png
Views:	178
Size:	13.7 KB
ID:	495223
    Attached Files
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    You are leaving the most important part out... and your trigger expression is? It seems already now, that you are trying to compare apples and oranges... "left operand is not numeric value for operator"...

    Comment

    • Shadowroot
      Junior Member
      • Jan 2022
      • 19

      #3
      Originally posted by cyber
      You are leaving the most important part out... and your trigger expression is? It seems already now, that you are trying to compare apples and oranges... "left operand is not numeric value for operator"...

      Goodnight!! Do you know how I can create this expression, I've already tried converting the string item to timestemp and added the expression, but the trigger doesn't work correctly


      (last(/FortiGate by SNMP -TESTE/lic.version.expiry[fgLicVersionExpiry.{#SNMPINDEX}]) - now()) / 86400 < {$LIC.EXPIRY.WARN}
      Attached Files

      Comment

      • cyber
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2006
        • 4807

        #4
        So the actual data that comes out of it is "Thu Dec 21 21:00:00 2028" ??
        So you try to to do .. "(String minus unix timestamp) divided by number< something"..
        Really, there is no built-in magicians in Zabbix, who would just guess, whats written in text and convert it magically to something usable... It is still your job to make data compatible, so you can actually do math. I really do not know how to make that "text" into timestamp... Never been good on code writing, but there is probably a way to do it JavaScript preprocessing.. Maybe they have anoter OID, which gives out same data but in "timestamp" or something more "machine friendly"?

        Comment

        • Shadowroot
          Junior Member
          • Jan 2022
          • 19

          #5
          Originally posted by cyber
          So the actual data that comes out of it is "Thu Dec 21 21:00:00 2028" ??
          So you try to to do .. "(String minus unix timestamp) divided by number< something"..
          Really, there is no built-in magicians in Zabbix, who would just guess, whats written in text and convert it magically to something usable... It is still your job to make data compatible, so you can actually do math. I really do not know how to make that "text" into timestamp... Never been good on code writing, but there is probably a way to do it JavaScript preprocessing.. Maybe they have anoter OID, which gives out same data but in "timestamp" or something more "machine friendly"?


          Good afternoon!! What I want to create is an item (in this case it would be a calculated item) on top of the item which is a string that returns the value “Thu Dec 21 21:00:00 2028” that shows the remaining days from today's date until date returned by the item and thus be able to create a trigger to alert when the license is about to expire. the help would be on how to create this calculated item
          Attached Files

          Comment

          Working...