Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-8551

The ability to use jsonpath/xmlpath functionality in the trigger fields like name, expression, recovery or description if a text item contains a 'set' of data like json/xml

XMLWordPrintable

    • Icon: New Feature Request New Feature Request
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • None
    • Frontend (F)
    • None
    • Any Zabbix

      When text item data is in the form of JSON or XML it would be really handy to be able to access individual key/value pairs where every you can access {ITEM.VALUE} or {ITEM.LASTVALUE} such as the trigger name expression/recovery or trigger description.

      When it comes to the Trigger name or Trigger description the only way I can do this is by using the regsub() like this which is kinda nasty:

      _"Timestamp: {

      {ITEM.VALUE1}.regsub("^.\"Timestamp\"\s:\s*\"(.?(?=\",|\"})).$",\1)}"_

      What would be nicer is:

      _"Timestamp: {{ITEM.VALUE1}

      .jsonPath($.Timestamp)}"_

      When it comes to trigger expression/recovery functions it would be nice to be able to use the value of a specific JSON key from within the text item like:

      "last(/host/key.JsonPath($.Timestamp))"

      The reason being is you may collect a whole bunch of stats from a specific point in time as a record set in the format of JSON or XML.

      I have found a bit of a timing issue when the approach taken was to split out the json into dependant items and use these dependant items in a trigger expression along with the trigger name and trigger description.

      When values came in super quick and the trigger used multiple of these dependant items the information used was a mix of perhaps two JSON record sets recieved in the same second (especially if the trigger was set to 'create multiple events').

      Being able to use the functionality requested above in the trigger expression will enable you to evaluate multiple conditions for that at the exact same time from the same JSON record set as it will come from one item only.

      Its almost like you could create an additional item data type for complex 'JSON' or 'XML' on top of the existing ones and have functionality that helps people use this data.

       

       

            vmurzins Valdis Murzins
            james.cook000@gmail.com James Cook
            Votes:
            5 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: