Forum Discussion

klepalle_51548's avatar
klepalle_51548
Icon for Nimbostratus rankNimbostratus
Jul 16, 2010

using variable in user_alert.conf

Hi

 

 

I have a couple of bigip acting as a redundant pair.

 

I configured user_alert.conf to send email when a failover occurs.

 

 

Failover Standby alert BIGIP_SOD_SODERR_SOD_STANDBY {

 

snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.14";

 

email toaddress="admin@domain.com"

 

fromaddress="bigip1@example.com"

 

body="Alert bigip became standby"

 

}

 

 

Failover Active alert BIGIP_SOD_SODERR_SOD_ACTIVE {

 

snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.15";

 

email toaddress="admin@domain.com"

 

fromaddress="bigip1@example"

 

body="Alert bigip became active"

 

}

 

 

The file user_alert.conf is synchronized via the HA so when a failover occurs, I receive 2 emails with the same fromaddress : one says active and the other says standby. I tried to insert the variable $HOSTNAME in the body to know which device really became active but the variable was not resolved.

 

 

Do you have an idea?

 

Thanks

3 Replies

  • Hi,

     

     

    I remember there being a few variables which could be used in the alert.conf and user_alert.conf files, but I can't find any record of this. Can you open a support case with F5 and see if they know what variables can be used? If you get a response, can you post back here for future reference?

     

     

    Thanks, Aaron
  • Hi

     

     

    I've received an answer from my support.

     

    They said they don't have solution for variable settings in the user_alert.conf.

     

    They suggested to use 'root' as fromaddress so that postfix will add the hostname after 'root'.

     

     

    I did that and I correctly received an email from root@bigip1.mydomain.

     

     

    Hope this will help.

     

     

    Bye

     

     

    Kevin

     

  • Hi Kevin,

     

     

    Thanks for posting back. I could have sworn that there were at least a couple of stock variables that could be referenced. Oh well, I could be wrong...

     

     

    Aaron