7 Replies Latest reply: Feb 27, 2013 8:26 AM by matthewt RSS

How can I use "dfm event generate" to trigger a custom dfm event?

Currently Being Moderated

Dear All,


I am currently defining dfm alarms, calling the execution of a powershell script. In this script, I am parsing the DFM environment variables provided by DFM, to take conditional actions (send some nagios alerts,...) based on the nature of the event.

For some of those events, I would like to be able to call dfm inside my script to generate customized events, to which I could associate other alarms for instance.

From what I understood, I should first create a custom event (one that is not in the list of builtin events), and then use the command dfm event generate to trigger the creation of this custom event, that will then appear in DFM and execute associated alarms...

I have not been able to find any working example of such a customization. Could someone share some experience with me?


Thanks in advance



  • Re: How can I use "dfm event generate" to trigger a custom dfm event?
    Currently Being Moderated

    Hi Pierre,

         In order to first use dfm event generate you will need to define custom event first. I am pasting xml to define the same,

    Input xml.

    <?xml version="1.0" encoding="UTF-8"?>

    <netapp  xmlns="http://www.netapp.com/filer/admin" version="1.0">


        <about-message>This event is custom created</about-message>




            <event-name-pretty>Clone Space Saving Is Low </event-name-pretty>












    output xml

    <?xml version='1.0' encoding='UTF-8' ?>

    <netapp version='1.0' xmlns='http://www.netapp.com/filer/admin'>

              <results status='passed'>





    [root@ ~]# dfm eventtype list OpsMgr:CloneSavings:LowCloneSpaceSaving

    Event Name                                         Severity     Class

    -------------------------------------------------- ------------ ------------------

    OpsMgr:CloneSavings:LowCloneSpaceSaving       Error        OpsMgr:CloneSavings



    [root@vmlnx ~]# dfm event generate "OpsMgr:CloneSavings:LowCloneSpaceSaving" 258 "The clone has divluged from the parent and there is no more space savings"

    Event OpsMgr:CloneSavings:LowCloneSpaceSaving for source amir generated.

    [root@vmlnx ~]# dfm report view events 258

    Severity    Event ID Event                                     Triggered    Ack'ed By Ack'ed       Source ID Source

    ----------- -------- ----------------------------------------- ------------ --------- ------------ --------- ----------------

    Error       3861     OpsMgr:CloneSavings:CloneSpaceSavingIsLow 05 Oct 20:07                        258       mpo-vsim10:/amir

    Information 178      Scheduled Snapshots Disabled              13 Sep 09:47                        258       mpo-vsim10:/amir



    Hope this example of the alarm create.


    [root@ ~]# dfm alarm create -E "abc@xyz.com" -h "OpsMgr:CloneSavings:LowCloneSpaceSaving"

    Created alarm 1 with 1 email recipient.

    [root@ ~]# dfm alarm list

    Alarm                1

    Group                Global

    Event Severity       All

    Event Name           OpsMgr:CloneSavings:LowCloneSpaceSaving

    Email Addresses      abc@xyz.com

    [root@ ~]#