Ad Widget

Collapse

Error -32602: Invalid params., No permissions to referred object or it does not exis

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AKapoor
    Junior Member
    • Jul 2017
    • 1

    #1

    Error -32602: Invalid params., No permissions to referred object or it does not exis

    Hello All,

    I am trying to use zabex.py library to create a new item and add data value like below but I am getting Invalid params, No Permissions error:

    root@cast2:~# python zabex.py
    [u'Zabbix server', u'cast2']
    Traceback (most recent call last):
    File "zabex.py", line 20, in <module>
    zapi.item.create(name="something", key_ = 'system.cpu.num', hostid='cast2', value_type=3, type=0)
    File "/usr/local/lib/python2.7/dist-packages/pyzabbix/api.py", line 82, in fn
    args or kwargs
    File "/usr/local/lib/python2.7/dist-packages/pyzabbix/api.py", line 250, in do_request
    raise ZabbixAPIException(msg, err['code'])
    pyzabbix.api.ZabbixAPIException: ("Error -32602: Invalid params., No permissions to referred object or it does not exist! while sending {'params': {'value_type': 3, 'hostid': 'cast2', 'key_': 'system.cpu.num', 'name': 'something', 'type': 0}, 'jsonrpc': '2.0', 'method': 'item.create', 'auth': u'993b6d9be8293e8e0e502b39f1300d7d', 'id': '1'}", -32602)

    Looking for some urgent help.
  • jan.garaj
    Senior Member
    Zabbix Certified Specialist
    • Jan 2010
    • 506

    #2
    hostid='cast2' doesn't look like real hostid. Hostid is integer, not a string.
    Devops Monitoring Expert advice: Dockerize/automate/monitor all the things.
    My DevOps stack: Docker / Kubernetes / Mesos / ECS / Terraform / Elasticsearch / Zabbix / Grafana / Puppet / Ansible / Vagrant

    Comment

    Working...