Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-1963

API <trigger.update> return "System error"

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Won't fix
    • Icon: Major Major
    • 1.8.2
    • 1.8.1
    • API (A)
    • None
    • Centos 5.4
      mysql-5.0.77-3.el5
      Zabbix 1.8.1

      API function trigger.update return "System error"

      I use perl-script which use JSON::API to access to Zabbix (BTW calls <item.update> and <graph.update> works fine).

      1. call <trigger.get> to get triggers for specified host
      2. modify description and comments attribute of one trigger
      3. try to update the trigger using <trigger.update>
      ------------------------------------------------------------
      dump of <trigger.update> request and reply
      -----------------------------------------------------------
      JSON-Request = {
      'params' => [
      {
      'priority' => '4',
      'hosts' => [

      { 'hostid' => '10051' }

      ],
      'value' => '2',
      'status' => '1',
      'templateid' => '0',
      'comments' => 'Port speed 80000 bps',
      'description' => '[Port FastEthernet0/0.102-802.1Q vLAN subif OutOctets] 009 — TEST QOS int OutOctets Threshold Exceeded',
      'lastchange' => '1265182838',
      'triggerid' => '18627',
      'expression' => '

      {19071}>0.75*{19070} & {19070}#0',
      'error' => 'Host is unavailable.',
      'url' => '',
      'type' => '0',
      'dep_level' => '0'
      }
      ],
      'auth' => 'c5cb68b8d22d2c27402f5a5b1b170360',
      'jsonrpc' => '2.0',
      'version' => '1.1',
      'id' => 7,
      'method' => 'trigger.update'
      };


      JSON-Reply = bless( {
      'version' => 0,
      'content' => {
      'jsonrpc' => '2.0',
      'error' => { 'data' => 'JSON-rpc error generation failed. No such error: ', 'message' => 'System error.', 'code' => -32400 },
      'id' => 7
      },
      'jsontext' => '{"jsonrpc":"2.0","error":{"code":-32400,"message":"System error.","data":"JSON-rpc error generation failed. No such error: "},"id":7}',
      'is_success' => 0
      }, 'JSON::RPC::ReturnObject' );

      --------- select from mysql ---------------------------------------

      mysql> select * from triggers where triggerid=18627\G
      *************************** 1. row ***************************
      triggerid: 18627
      expression: {19071}

      >0.75*

      {19070} & {19070}

      #0
      description: [Port FastEthernet0/0.102-802.1Q vLAN subif OutOctets] 009 OutOctets Threshold Exceeded
      url:
      status: 1
      value: 2
      priority: 4
      lastchange: 1265182838
      dep_level: 0
      comments: Port speed 100000000 bps
      error: Host is unavailable.
      templateid: 0
      type: 0
      1 row in set (0.00 sec)

            Unassigned Unassigned
            s.ivlenkov Sergey Ivlenkov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: