Advertisement
maxhq

Retrieving Zabbix LLD items that are "not supported" via API

May 8th, 2013
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.45 KB | None | 0 0
  1. # This is incomplete code!
  2. use Modern::Perl '2012'; # strict, warnings, 5.010_000;
  3. use Zabbix::API;
  4. use Zabbix::API::Item qw/:status_types/;
  5.  
  6. my $api = Zabbix::API->new(...);
  7. ...
  8. $api->fetch(
  9.     'Item',
  10.     params => {
  11.         filter => { status => ITEM_STATUS_NOTSUPPORTED },
  12.         selectItemDiscovery => 'extend',
  13.     },
  14. );
  15.  
  16. for my $item (@{$items}) {
  17.     next unless $item->data()->{itemDiscovery}; # only process lld items
  18.     print $item->data()->{name}, "\n";
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement