Ad Widget

Collapse

API usage to get CPU, Memory, and Disk Usage

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gremash
    Junior Member
    • May 2014
    • 2

    #1

    API usage to get CPU, Memory, and Disk Usage

    I am creating a JAVA web application to create a quick dashboard to show data for over a hundred different servers that are all monitored by Zabbix. I am trying to use the 2.2 API to get information about CPU, memory, and hard disk utilization but can't seem to find good documentation to do so. I have read about using history.get but am only getting random values that make no sense. Can someone please give me some information?
  • gremash
    Junior Member
    • May 2014
    • 2

    #2
    Worst documentation ever!

    The API documentation is horrid. I was finally able to get it to work with this JSON:

    {
    "jsonrpc": "2.0",
    "id": "1400175934496",
    "auth": "MyAuthToken",
    "method": "host.get",
    "params": {
    "selectInventory": true,
    "selectItems": [
    "name",
    "lastvalue",
    "units",
    "itemid",
    "lastclock",
    "value_type",
    "itemid"
    ],
    "output": "extend",
    "hostids": "TheHostID",
    "expandDescription": 1,
    "expandData": 1
    }
    }

    Comment

    • arun
      Junior Member
      • Aug 2014
      • 2

      #3
      HI,
      Can you please share the source code of your API usage ? I have a similar requirement in my project for getting the cpu, memory usage of a particular machine monitored by zabbix

      Regards,
      Arun

      Comment

      • Daniyar771992
        Junior Member
        • Dec 2017
        • 1

        #4
        API usage

        HI Gremash,
        Can you please share the source code of your API usage? I have a similar requirement in my project.

        Comment

        Working...