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.
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.
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.
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" ]
#echo "#### NO mail send required for $MNAME $AID $DATE $TIME"
elif [ "$RCVRS" -a "$RCVRS" != " " ]
instead of the line
if [ "$RCVRS" -a "$RCVRS" != " " ]
this gives me what i need for now.