Ad Widget

Collapse

ZABBIX API not returning Hash...perl API error.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bostonmacosx
    Junior Member
    • Mar 2013
    • 11

    #1

    ZABBIX API not returning Hash...perl API error.

    I'm sending in the following to acknowlege an event....

    Code:
    my $json = '{"jsonrpc" => "2.0","method" => "event.acknowledge","params" => {"eventids" => "$eventid","message"=> "'.$message.'"},"auth" => "'.$authid.'","id"=> "1"}';
    
    open(FILE, '>> /var/tmp/result.tallinn.out');
    print FILE "||||||||||||\\n";
    print FILE $json;
    
    my $client = new JSON::RPC::Client;
    my $result = $client->call($uri,$json); <<<<<---LINE 71
    print FILE Dumper($result);
    print FILE 'result';
    print FILE $result;
    print FILE "||||||||||||\\n";
    close(FILE);
    What I'm seeing in the perl response is that :

    Code:
    not hashref. at /home/dkfjdk/read_email_robert.pl line 71.
    I'm not sure what this means and how can I see what ZABBIX is actually returning?

    Thanks
    R
Working...