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

trend.get not show values of specific "output" query

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • None
    • 4.0.8
    • API (A)
    • None
    • Centos 7
      httpd-2.4.6-89.el7.centos.
      mariadb-5.5.60-1.el7_5.

      Hi,

      while request trends data and query via "output":"value_max", it show no data.

      The doc https://www.zabbix.com/documentation/4.0/manual/api/reference/trend/get say:

      "

      output query Set fields to output.

      "

      So, I want get "value_max" data only. Is it bug or feature?

      Thanks

      Steps to reproduce:

      1. [localhost ~]$ json='{"jsonrpc":"2.0","method":"trend.get","params":{"itemids":"230188","time_from":"1554066000","time_till":"1556658000","output":"extend", "limit":1},"id":"1","auth":"da4cbc142231d9f062a1e3f0a08d158d"}'
        [localhost ~]$ curl -w '\n' -s -X POST -H 'Content-Type: application/json-rpc' -d "$json"  http://localhost/zabbix/api_jsonrpc.php
        {"jsonrpc":"2.0","result":[\{"itemid":"230188","clock":"1554066000","num":"60","value_min":"3.5717","value_avg":"6.7835","value_max":"14.2263"}],"id":"1"}

      [localhost ~]$ json='{"jsonrpc":"2.0","method":"trend.get","params":{"itemids":"230188","time_from":"1554066000","time_till":"1556658000","output":"value_max", "limit":1},"id":"1","auth":"da4cbc142231d9f062a1e3f0a08d158d"}'
      [localhost ~]$ curl -w '\n' -s -X POST -H 'Content-Type: application/json-rpc' -d "$json"  http://localhost/zabbix/api_jsonrpc.php                                                                                     {"jsonrpc":"2.0","result":[[]],"id":"1"}
      [localhost ~]$

      Result:

      empty response

      Expected:
      value in response

            agavrilovs Aleksandrs Petrovs-Gavrilovs
            romale romale
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: