I'm pulling the list of current events using perl and the API. I can get a list of events and I can filter the list using some of the documented parameters.
('include-deleted-objects','FALSE','is-acknowledged','FALSE','is-deleted','FALSE', etc...)
But if I try to use
$output = $s->invoke("event-list-iter-start",'event-severities','critical');
I get the same number of events reguardless of what severity level I try (normal, information, warning, critical, etc...) I can put any string as a value
to the event-severities parameter and I get no errors and the same list of events.
NetApp.pm from netap-manageability-sdk-5.2.1R1
dfm 5.2p2 (one is 7-mode, the other cluster, same behaviour)
There are only normal and information events on my servers so I should get 0 events from the API call, but I get hundreds of normal and information
events. The check would be much more efficient if I could only get warning and above events, but I can't get the filter to work as documented.
sample code:
---
#!/usr/bin/perl
my $VERSION = '1.0'; # Controls the SDK release.
use strict;
use lib '/usr/local/share/perl5/NetApp'; #<====change to match locaion of your NaServer.pm file
use NaServer;
our $port=<port>; #<==============insert your port here
our $filer="<dfmserver>"; #<==============insert your DFM server ip or fqdn here
our $s = NaServer->new($filer, 1, 0);
$s->set_admin_user($user, $password);
$s->set_server_type('DFM');
$s->set_transport_type('HTTPS');
$s->set_port($port);
$output = $s->invoke("event-list-iter-start",'include-deleted-objects','FALSE','is-acknowledged','FALSE','is-deleted','FALSE','event-severities','error');
if ($output->results_errno != 0) {
our $r = $output->results_reason();
print "Failed: $r\n";
} else {
my $tag = $output->child_get_string("tag");
my $records = $output->child_get_string("records");
print "$records available...next tag is $tag\n";
}
---