Ad Widget

Collapse

Get host data with API

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Eddxp
    Junior Member
    • Oct 2021
    • 1

    #1

    Get host data with API

    Can i get host data using zabbix API (CPU usage, Temperature, etc)?
  • niveastn
    Member
    • Oct 2021
    • 82

    #2
    Hi there!

    Yes you can! You are going to use the method "history.get"
    This link has the full explanation https://www.zabbix.com/documentation...ce/history/get
    But here is a example of a request getting the last 10 values of an item ("itemids": "23296")


    {
    "jsonrpc": "2.0",
    "method": "history.get",
    "params": {
    "output": "extend",
    "history": 0,
    "itemids": "23296",
    "sortfield": "clock",
    "sortorder": "DESC",
    "limit": 10
    },
    "auth": "038e1d7b1735c6a5436ee9eae095879e",
    "id": 1
    }

    Comment

    Working...