Ad Widget

Collapse

Expression working in 5.2 not working in 6.0

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • gwynll
    Junior Member
    • Apr 2021
    • 19

    #1

    Expression working in 5.2 not working in 6.0

    In Zabbix 5.2 I have an External Check Item with the following Key:

    flexlm.sh["27002","{HOST.NAME}"]

    And then I have a Trigger in the same template that's based on the following expression:

    {Template - FlexLM licence status 27002:flexlm.sh["27002","{HOST.NAME}"].last()}=0


    Then there is a flexlm.sh file in the externalscripts folder of the server that carries out one command. The above all works fine.

    However, I try to replicate the exact settings of the above on a new Zabbix v6 installation that I'm currently testing and am having issues. The creation of the Item seems to have gone OK, but when I try to create the Trigger I get the following error:

    Cannot add trigger
    Invalid parameter "/1/expression": incorrect expression starting from "{Template - FlexLM licence status 27002:flexlm.sh["27002","{HOST.NAME}"].last()}=0".

    Has anything changed in the expression syntax between 5.2 and 6.0?

    Thanks.
  • Answer selected by gwynll at 18-07-2022, 17:53.
    Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1781

    Originally posted by gwynll
    OK thanks. Do you know how I would convert the my syntax to the current format?
    By doing a Zabbix server upgrade: it will convert all triggers automatically.

    So, take a copy of your 5.2 database, install Zabbix 6.0 server package on a new server, and point it to the database copy. Start the new Zabbix server, and it will convert the database automatically.

    New syntax should be last(/Template - FlexLM licence status 27002/flexlm.sh["27002","{HOST.NAME}"])=0 but verify that yourself.

    Markku

    Comment

    • Atsushi
      Senior Member
      • Aug 2013
      • 2028

      #2
      The format of the trigger expression has changed from Zabbix 5.4.

      Comment

      • gwynll
        Junior Member
        • Apr 2021
        • 19

        #3
        OK thanks. Do you know how I would convert the my syntax to the current format?

        I'm reading through the docs but it's not making a great deal of sense to me at the moment

        Comment

        • Markku
          Senior Member
          Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
          • Sep 2018
          • 1781

          #4
          Originally posted by gwynll
          OK thanks. Do you know how I would convert the my syntax to the current format?
          By doing a Zabbix server upgrade: it will convert all triggers automatically.

          So, take a copy of your 5.2 database, install Zabbix 6.0 server package on a new server, and point it to the database copy. Start the new Zabbix server, and it will convert the database automatically.

          New syntax should be last(/Template - FlexLM licence status 27002/flexlm.sh["27002","{HOST.NAME}"])=0 but verify that yourself.

          Markku

          Comment

          • gwynll
            Junior Member
            • Apr 2021
            • 19

            #5
            Hello. I was unable to do the upgrade-convert on this occasion because they were two separate Zabbix installations (of different versions), where I was simply copying the config. But thanks a lot for the updated syntax - that's worked great.

            Comment

            Working...