Active IQ Unified Manager Discussions

DFM Script

aselvan
4,284 Views

Hi ,

 

I trying to retrive/get the DFM environment variables via script when an alarm is been trigerred , for some reason it isn't working . Any thoughts ?

 

dfm alarm list 142


Alarm                142
Group                Global
Event Severity       All
Event Name           aggregate-almost-full
Time From            00:00
Time To              23:59
Email Addresses      XXX
Script Name          /bin/sh /tmp/testing_alarm_script

 

 

cat /tmp/testing_alarm_script
echo "Hello world" > /tmp/alarm_script
$DFM_ALARM_ID >> /tmp/alarm_script
$DFM_SOURCE_TYPE >> /tmp/alarm_script
echo "$(date) $*" >> /tmp/alarm_script

 

I can confirm both script and event are being triggered when test alarm is triggered.

1 ACCEPTED SOLUTION

aselvan
4,149 Views

Thanks Adai, I had the page for reference , I was able to sort it out with Perl using KB.

KB link if someone is interested "https://kb.netapp.com/support/index?page=content&id=3012180" 

 

 

foreach $key (sort(keys %ENV)) {
 if ($key =~ /^DFM_/) {
  print "$key: $ENV{$key}\n";
 }
}

View solution in original post

2 REPLIES 2

AdaikkappanArumugam
4,227 Views

aselvan
4,150 Views

Thanks Adai, I had the page for reference , I was able to sort it out with Perl using KB.

KB link if someone is interested "https://kb.netapp.com/support/index?page=content&id=3012180" 

 

 

foreach $key (sort(keys %ENV)) {
 if ($key =~ /^DFM_/) {
  print "$key: $ENV{$key}\n";
 }
}

Public