Hello Susana,
May be you can use the precedence attribute instead of hostname
1.Primary spec DB will have precedence 10 (attribute 0x12c0a in every model)
2.Assume your secondary Spectrum is precendence 20
3.On both servers add this to $specroot/Notifier/.alarmrc
EXTRA_ATTRS_AS_ENVVARS=0X12C0A
4.In setscript and clearscript in the bit just after
if [ "$SENDMAIL" = "True" ]
then
RECIPIENTS=$VARFORMAIL
........."
RECIPIENTS="NotificationData/RepairPerson"
fi
On primary add this -
if [[ "$SANM_0X12C0A" = "20" ]]
then
echo "SS Secondary is running"
echo "Precedence = $SANM_0X12C0A"
exit 0
fi
On secondary add this
if [[ "$SANM_0X12C0A" = "10" ]]
then
echo "SS Primaryis running"
echo "Precedence = $SANM_0X12C0A"
exit 0
fi
save the set script and recycle Alarm Notifier
Outcome:
whenever an alarm is generated ,the model in the DB is checked and the attribute 0x12x0a is read - if its 10 (primary server precedence) then Primary Alarm notifier sends the email and secondary will write a line to the notifier log file saying primary is running
If 0x12x0a is 20 then Seconday server Alarm notifier will send the mail and the primary would write to the notifier file saying secondary is running
HTH
Kalyan