DX NetOps

 View Only
  • 1.  Spectrum SANM filters. How to pass the name of the filter triggered to the setscript?

    Posted Sep 21, 2015 06:05 AM

    We use SANM filters to send email about specific criteria to various groups. We also use it trigger logging and auto-ticketing actions.

     

    You may have seen the message in Notifier.out coming from the setscript saying-

     

    *****************************************************

    NO NotificationData/RepairPerson assigned - no mail sent

    *****************************************************

    We need to keep this in the script for the filters that are supposed to send email, but not for the logging actions.

    I thought a good way would be to pass the filter that is triggered, the just filter that out in the setscript.

     

    Of course, if there there is a "no mail" setting for the notification data field or another simpler option, I'd be happy to hear it.

     

    Thanks,



  • 2.  Re: Spectrum SANM filters. How to pass the name of the filter triggered to the setscript?

    Posted Sep 21, 2015 12:46 PM

    Hi,

    I believe, there is no way to do this.

    We mostly create more than one Notifiers and multiple filters.

    We use multiple instances of different Notifiers to be able to use one fpr "only logging", the next for "Emailing" and another for SQL-Logging into other databases.

    Mostly we have installed a Notifier per Landscape  to be able to disabled this Notifier in the case of a planned downtime of this landscape. ... then we only switch off this Notifier via a #-sign in front of the Mail-Command.

     

    Finally we use the field "Notifydata" to forward Email-Adresses or a combination of Variables and Adresses. This works fine so far.

     

    Every Notifier-Instance uses its own SETSCRIPT and CLEARSCRIPT.

     

    It´s hard to manage this matrix of Notifier-Instances and Policies and Filter but it works very good... in small installations and in very big ones with many landscapes.

     

    Hopefully this helps.

     

    Best Regards

    Erich



  • 3.  Re: Spectrum SANM filters. How to pass the name of the filter triggered to the setscript?

    Posted Sep 22, 2015 02:25 AM

    You can send the name of the filter (or an internal code or ...) as part of the "Notification  Data" string and work with this in your SANM scripts.

    It would  be helpful, if this name has always the same position in the string.

    Regards, Frank




  • 4.  Re: Spectrum SANM filters. How to pass the name of the filter triggered to the setscript?
    Best Answer

    Posted Sep 22, 2015 11:39 AM

    Ok, you gave me an idea. I've just used added "#NOMAIL" in the notification data in the SANM filter and edited the setscript to include the below-

     

       if [ "$RCVRS" = "#NOMAIL" ]

       then

          #echo "#### NO mail send required for $MNAME $AID $DATE $TIME"

          break

       elif [ "$RCVRS" -a "$RCVRS" != " " ]

     

    instead of the line

    if [ "$RCVRS" -a "$RCVRS" != " " ]

     

    this gives me what i need for now.

    thanks