Ad Widget

Collapse

Zabbix API In Distributed Environment

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bcarpio
    Member
    • Jun 2008
    • 96

    #1

    Zabbix API In Distributed Environment

    If I have a distributed setup and I want to make API calls for host 2 to master host 1 it doesn't seem to work. Is that "known"?

    For instance Host1 is my Master Node, Host2 is child node to Host1. When I run api calls against hosts defined in Host1 to Host1 it works fine, however when I try and run API calls to hosts defined on Host2 via Host1 I get a mysql error?
  • ke_sheng_jie
    Member
    • Aug 2011
    • 40

    #2
    Same here

    Seeing the same issue with 1.8.10 when I connect to the master node (node 1).

    Node 1
    JSON Request
    {
    "jsonrpc":"2.0",
    "method":"host.get",
    "output":"shorten",
    "params":{
    "nodeids":["1"]
    },
    "auth": "******************",
    "id": *
    }

    JSON response (shortened for post): {"jsonrpc":"2.0","result":[{"hostid":"100100000010053"},{"hostid":"1001000000 10054"},[... ...]{"hostid":"100100000011646"}],"id":*}

    Node 2
    {
    "jsonrpc":"2.0",
    "method":"host.get",
    "output":"shorten",
    "params":{
    "nodeids":["2"]
    },
    "auth": "******************",
    "id": *
    }
    Received response: {"jsonrpc":"2.0","result":[],"id":*}

    I don't get any hostids for node 2.

    Note: The auth and id have been replaced with *.

    Comment

    • ke_sheng_jie
      Member
      • Aug 2011
      • 40

      #3
      Nevermind

      Double check that your Zabbix api user has access to hosts on both nodes. This was what was causing my issue.

      Comment

      Working...