Data Infrastructure Management Software Discussions

DFM Script

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.


Re: DFM Script

Re: DFM Script

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 "" 



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

View solution in original post

Cloud Volumes ONTAP
Review Banner
All Community Forums