Don't like ads? PRO users don't see any ads ;-)
Guest

Zabbix-api problem

By: Hertell on Jul 10th, 2012  |  syntax: Perl  |  size: 1.09 KB  |  hits: 22  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. my $appid = $zabbix->query(method => 'application.get',
  2.                            params => {
  3.                                         filter => {
  4.                                                      name   => $appname,
  5.                                                      hosts  => [ 10096 ],
  6.                                                   },
  7.                                       output => 'extend',
  8.                                      }
  9.                            );
  10. print Dumper $appid;
  11.  
  12. $VAR1 = [
  13.           {
  14.             'hosts' => [
  15.                          {
  16.                            'hostid' => '10096'
  17.                          }
  18.                        ],
  19.             'templateid' => '0',
  20.             'name' => 'App Foo Live',
  21.             'applicationid' => '706'
  22.           },
  23.           {
  24.             'hosts' => [
  25.                          {
  26.                            'hostid' => '10095'
  27.                          }
  28.                        ],
  29.             'templateid' => '0',
  30.             'name' => 'App Foo Live',
  31.             'applicationid' => '713'
  32.           }
  33.         ];