Ad Widget

Collapse

Trigger for Agent Version

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • maruscya
    Senior Member
    Zabbix Certified Specialist
    • Jul 2007
    • 129

    #1

    Trigger for Agent Version

    Hello Guys..

    I need create a simple trigger that check the agent version.

    Trigger Like this "If agent version < 1.4.4 alert me !!!"

    I try create trigger with this parameters ..

    {gutta-dc2:agent.version.last(0)}<1.4.4

    But i received an error message about syntax expression.

    Where is my error ??

    AndreA
  • qix
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2006
    • 423

    #2
    Try this:
    Code:
    {Hostname:agent.version.str(1.4.4)}<1
    Make sure you read the "agent.version" item from your host.
    With kind regards,

    Raymond

    Comment

    • maruscya
      Senior Member
      Zabbix Certified Specialist
      • Jul 2007
      • 129

      #3
      Originally posted by qix
      Try this:
      Code:
      {Hostname:agent.version.str(1.4.4)}<1
      Make sure you read the "agent.version" item from your host.

      Thanks a lot for your help about my problem.

      Now, i try create an action in this way :

      NAME: TEST
      EVENT SOURCES : Triggers
      CONDITION : Trigger name = <trigger> AND trigger value = TRUE;
      OPERATION : Send message to user

      Is the action correct ??

      Maruscya !

      Comment

      • cesarsj
        Senior Member
        • Dec 2018
        • 154

        #4
        Originally posted by qix
        Try this:
        Code:
        {Hostname:agent.version.str(1.4.4)}<1
        Make sure you read the "agent.version" item from your host.
        Does this code work in version 4.0.5?

        I tried:
        Code:
         {hostname:agent.version.str(4.0.0)}<1
        but it did not work.

        Comment

        • cesarsj
          Senior Member
          • Dec 2018
          • 154

          #5
          I wanted to check if the version is less than 4.00, for example, if I return the string 4.0.5, convert to float: 4.05 and there is no alert, but if I find 3.0.2, convert to 3.02 and trigger an alarm. How could I do this in the self expression of the trigger, and not by script?

          Comment

          • Semiadmin
            Senior Member
            • Oct 2014
            • 1625

            #6
            If you convert, for example, 4.0.10 to float you'll get 4.01, and it 'll less then 4.05 (i.e. 4.0.5). Better try to create 3 dependent integer items for major, minor and patch.

            Comment

            • cesarsj
              Senior Member
              • Dec 2018
              • 154

              #7
              Your idea helped me find an alternative solution, which would be:

              {Template App Zabbix Agent:agent.version.str(4.0.0)}<1 and
              {Template App Zabbix Agent:agent.version.str(4.0.1)}<1 and
              {Template App Zabbix Agent:agent.version.str(4.0.2)}<1 and
              {Template App Zabbix Agent:agent.version.str(4.0.4)}<1 and
              {Template App Zabbix Agent:agent.version.str(4.0.5)}<1 and
              {Template App Zabbix Agent:agent.version.str(4.0.6)}<1

              However, it would be kind of annoying to have to update the trigger with every update of Zabbix Server, if somebody has another idea.

              I wanted this trigger to be in the templates. That is, it would involve many hosts at once with each Zabbix Server update.

              Comment

              Working...