Forum Discussion

Shane_Hickey's avatar
Shane_Hickey
Icon for Nimbostratus rankNimbostratus
Oct 04, 2019
Solved

Regular expressions in user_alert.conf

I was wondering how fancy I can get with regex in the user_alert.conf file for alerting?

 

I had this configuration:

alert vip_down "Virtual (.*) has become unavailable" {

email toaddress="email@domain.com"

fromaddress="bigip@bigip.com"

body="BIGIP: VIP Down"

}

 

But I want to ignore a single VIP that has some troublesome nodes. To that end, I changed the match string to this:

"Virtual ((?!\/Common\/VIPNAME).)+ has become unavailable"

 

I'm by no means a regex wizard but that seems to work based on my testing. However, if I configure that in the user_alert.conf file the alertd service constantly restarts, complaining about this line.