getting all alarms from NAS

Discussion created by jonhcw on Dec 16, 2013
Latest reply on Mar 21, 2016 by Sandeep Bhutani



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::smileyfrustrated:ession; use Nimbus::CFG; use Data::smileyvery-happy: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]# ./ 0 0 0 0 0 0 0



Would be a big help if someone knows how to do this.