Ad Widget

Collapse

zabbix api query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hakanozanlagan
    Member
    • Nov 2021
    • 35

    #1

    zabbix api query


    hi, I want to get latest value of an item via zabbix api. i am using below query but it's responds empty. can you help me abou this query? i cant find what is wrong.

    curl -k --header "Content-Type: application/json" \
    --request POST \
    --data '{"jsonrpc": "2.0", "method": "history.get", "params": {"output": "extend", "history": 1, "itemids": "107510", "sortfield": "clock", "sortorder": "DESC", "limit": 1}, "id": 1, "auth": "xxxxxxxxx"}}' \
    "https://myserver.com/api_jsonrpc.php"​
  • hakanozanlagan
    Member
    • Nov 2021
    • 35

    #2

    ok

    item value is json. and "history": 1 parameter is for the character. so iI changed it to 4 and it's works now.


    Comment

    Working...