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

4.0 history.get API returns incorrect history data if use both hostids and itemids parameter

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 4.0.2
    • None

      history.get API with both hostids and itemids returns history data of all items of hostids on 4.0. itemids parameter is ignored.

      • sample
          "method":"history.get",
          "params":{
                   "output":"extend",
                   "history":"4",
                   "hostids":"10092",
                   "itemids":"22871",
                   "time_till":"1545713549",
                   "time_from":"1545713528"
          }
        
      • result 3.0.23
        {
          "jsonrpc": "2.0",
          "result": [
            {
              "id": "156160",
              "itemid": "22871",
              "clock": "1545713531",
              "value": "Tue 25 Dec 2018 01:52:11 PM JST",
              "ns": "553801159"
            },
            {
              "id": "156163",
              "itemid": "22871",
              "clock": "1545713541",
              "value": "Tue 25 Dec 2018 01:52:21 PM JST",
              "ns": "576462350"
            }
          ],
          "id": 1
        }
        
      • result 4.0.2
        {
          "jsonrpc": "2.0",
          "result": [
            {
              "itemid": "28607",
              "clock": "1545713537",
              "value": "Tue 25 Dec 2018 01:52:17 PM JST",
              "ns": "537595837"
            },
            {
              "itemid": "28607",
              "clock": "1545713547",
              "value": "Tue 25 Dec 2018 01:52:27 PM JST",
              "ns": "600521757"
            },
            {
              "itemid": "28609",
              "clock": "1545713539",
              "value": "13:52:19",
              "ns": "558361440"
            },
            {
              "itemid": "28609",
              "clock": "1545713549",
              "value": "13:52:29",
              "ns": "615564961"
            }
          ],
          "id": 1
        }
        

      It works on 3.0 API as expected. history.get returns only specified itemids history data.

            zabbix.dev Zabbix Development Team
            kt_eng06 Keita Higa
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: