Hi,
I'm trying to get all alarms from nas with get_alarms callback. Apparently this callback only returns max. 500 alarms at a time and needs to be repeated until the callback returns NIME_NOENT, which is also return code 4.
With the probe utility I can replicate this behaviour, but seem to be missing something when trying the same through APIs.
I've tried with Perl, .NET and nsa but couldn't figure it out. I've tried opening session explicitly and by letting the API do it.
Here's an example Perl script that I tried:
#!/opt/nimsoft/perl/bin/perl use strict; use Nimbus::API; use Nimbus:ession; use Nimbus::CFG; use Data:umper; my ($rc, $pds); nimLogin("administrator", "password"); while ($rc != NIME_NOENT) { ($rc, $pds) = nimNamedRequest("/Dev/Main/fihkinim01/nas", "get_alarms"); print "$rc\n"; }
I have around 17 alerts in this environment and it just gives me output:
[root@fihkicen02 scripts]# ./get_alarms.pl 0 0 0 0 0 0 0
etc.
Would be a big help if someone knows how to do this.
-jon