Ad Widget

Collapse

Zabbix API search (item.get) by lastvalue

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • localbuyer
    Junior Member
    • Sep 2020
    • 1

    #1

    Zabbix API search (item.get) by lastvalue

    Hi All:

    I am having trouble search item/hostid using API.

    I am trying to get the hostid by the lastvalue. But I all I get is everything for the key_:

    Example :

    {
    "jsonrpc": "2.0",
    "method": "item.get",
    "params": {
    "filter": {
    "key_": "console.userid",
    "lastvalue": ["myuserid"]
    }
    },
    "auth": "***************************",
    "id": 1
    }

    Is the lastvalue field searchable?


    Thanks.

  • smakedonski
    Junior Member
    • Sep 2023
    • 2

    #2
    I think you need history.get in order for the api to return values: https://www.zabbix.com/documentation...ce/history/get

    Comment

    Working...