Ad Widget

Collapse

Zabbix API 1.8.5

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • paszczak000
    Junior Member
    • May 2011
    • 10

    #1

    Zabbix API 1.8.5

    Hi,
    I'm using API to get item history. This item is "webitem".

    Code:
    $data = array(
     'jsonrpc' => '2.0',
     'method' => 'history.get',
     'params' => array(
      'history' => array(
       '9',
      ),
      'itemids' => array(
       '22988',
      ),
         "time_from" => '1305026717',
         "time_till" => '1305113117',
         "output" => "extend",
     ),
     'auth' => $auth,
     'id' => 2,
    );
    Any other item history I can get as Zabbix User. But if I want get webitem I must be Zabbix Super Admin. Why?
  • nelsonab
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2006
    • 1233

    #2
    Does the user in question have read permission to the host?
    RHCE, author of zbxapi
    Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
    Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

    Comment

    • paszczak000
      Junior Member
      • May 2011
      • 10

      #3
      Yes. In Monitoring -> OVERVIEW I see these items. In Monitoring -> Web too. Api user can get info about webitem but not history.

      This JSON request get empty result. But I catch SQL from this request. SQL is fine and getting data.

      Comment

      • xandl
        Junior Member
        • Aug 2011
        • 1

        #4
        Same problem 1.8.4

        Hi

        I have the same problem in 1.8.4.
        Everything works file except a history.get for webitems.

        The user HAS TO BE a "super admin" to get a result.
        Even if i grant all read-write permission (not just read) to that user, the api will not return any data.

        Is this fixed in 1.8.6 or 1.8.7?

        Comment

        • paszczak000
          Junior Member
          • May 2011
          • 10

          #5
          In 1.8.6 sitll is Super Admin needed.

          Comment

          Working...