Ad Widget

Collapse

Zabbix API always resturns empty results

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jasonw
    Junior Member
    • Oct 2013
    • 25

    #1

    Zabbix API always resturns empty results

    Okay, I have configured 15+ hosts for monitoring, and I am trying to learn the API. I've tried several commands and literally cut-and-paste the JSON from the examples. Why do I always get an empty result set???

    Sent this:
    {
    "jsonrpc": "2.0",
    "method": "hostgroup.get",
    "params": {
    "output": "extend",
    "sortfield": "name"
    },
    "id": 1,
    "auth": "7a5cf735d66a8c20b0f9b6d25fc3d200"
    }


    I always get this back no matter what command I send across:

    {"jsonrpc":"2.0","result":[],"id":1}
  • jasonw
    Junior Member
    • Oct 2013
    • 25

    #2
    Figured this one out. Evidently, the "api_user" that I created did not have enough permissions. I had to make him a "Super Admin" to see anything.

    Comment


    • beretests
      beretests commented
      Editing a comment
      Thank you! I'd already spent a couple of days trying to figure out what was wrong here
  • w00tburger
    Junior Member
    • Mar 2018
    • 21

    #3
    Thanks, this saved me a headache.

    Comment

    Working...