Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-15832

HTTP Agent json path doesn't allow to get keys with dots

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Won't fix
    • Icon: Trivial Trivial
    • None
    • 4.0.5
    • Server (S)
    • None

      I'm using HTTP agent to get the our Rundeck health state throught its dedicated endpoint. As a code, this is

      }}{{➜  ~ curl -sL 'https://rundeck.company.com/api/27/metrics/healthcheck?authtoken=MYUSERTPOKEN'{{                                              }}
      {"dataSource.connection.time":{"healthy":true,"message":"Datasource connection healthy with timeout 5 seconds"},"quartz.scheduler.threadPool":{"healthy":true%  }}

       

      As you can see, there are two keys with dots, dataSource.connection.time to begin with. As per JSON path spec, I should be able to get the sub key healthy with

       

         $.['{{dataSource.connection.time'].healthy}}

       

      And some peoples in QAs reported being successful (outside of zabbix context) with

       

         $.\"dataSource.connection.time\".healthy

       

      Zabbix refuses that, made some tests despecializing characters :  [ and ' and " and \ seems to be illegal for the jsonpath field.

       

      Workaround, use an ugly regexpr.

            ArtursL Arturs Lontons
            rrrrrrrr RG
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: