Reply
Emerging Member
Posts: 54
Registered: ‎01-14-2014
Kudos: 6

Alert On Failover And Disable Wifi On Failover

Hi everyone, I have done an installation in a sportsbar where we are using a USG pro and providing a separate WAP just for guests. The customer is having a lot of issues with him primary ISP so he has a 4G ISP as a failover. The concept is if the primary ISP fails, then he can still run his point of sale on the 4G network.

 

The issue is we need to provide notificiation to the customer when the failover happens, and we need to disable the guest WAP during that period.

 

Can anyone think of a way to handle this within Unifi? If not within Unifi, I have access to IP controlled power conditioners, network scanners, etc that I could potentially use, but I would like to use the Unifi.

 

Thanks for your help.

Emerging Member
Posts: 55
Registered: ‎03-19-2017
Kudos: 9
Solutions: 4

Re: Alert On Failover And Disable Wifi On Failover

@Smarthomes, The notification for WAN failover can be set inside most 4G Modem GUI. To disable the WAP on failover is a whole different ball game, i don't believe it's possible without being done manually.

Emerging Member
Posts: 54
Registered: ‎01-14-2014
Kudos: 6

Re: Alert On Failover And Disable Wifi On Failover

Is the port with the failover modem always live even when not in fail over mode?

 

In other words, could I ping that 4G modem from inside the LAN and not get a response until it is being used for WAN?

 

If so, that can help...... if it is still "live', the gateway just isnt routing all traffic through it, then that doesnt help me much.

Regular Member
Posts: 623
Registered: ‎01-29-2015
Kudos: 90
Solutions: 30

Re: Alert On Failover And Disable Wifi On Failover

I would also like to receive an alert when a failover occurs. Right now it's all guesswork.

Ubiquiti Employee
Posts: 950
Registered: ‎02-28-2017
Kudos: 286
Solutions: 100

Re: Alert On Failover And Disable Wifi On Failover

Wan failover's show in the "alerts" button in the bottom right of the UniFi Controller, it will say something like:
Test-USG1 event: { "Group wan_failover" : "Interface eth2 to state failover"} 4:42 am 08/31/2018
Test-USG1 event: { "Group wan_failover" : "Interface pppoe0 to state active"} 4:42 am 08/31/2018

In Settings > Notifications > Gateway events, you should be able to set "gateway event" to email.
Brandon Jaffe | UniFi Routing & Switching | Austin, TX
Regular Member
Posts: 623
Registered: ‎01-29-2015
Kudos: 90
Solutions: 30

Re: Alert On Failover And Disable Wifi On Failover

[ Edited ]

Clarification - I'd like EMAIL alerts. Man Happy I don't see a way to set them, and there's nothing going to my email when it fails over.

Regular Member
Posts: 623
Registered: ‎01-29-2015
Kudos: 90
Solutions: 30

Re: Alert On Failover And Disable Wifi On Failover

To be clear, gateway events is checked for email alerts in my config.

 

 

gateway even.png
Highlighted
Ubiquiti Employee
Posts: 950
Registered: ‎02-28-2017
Kudos: 286
Solutions: 100

Re: Alert On Failover And Disable Wifi On Failover

They definitely come through via email, have you setup your SMTP server in the controller Settings > Controller > Mail server?

There's an article on how to set it up through gmail here:
https://help.ubnt.com/hc/en-us/articles/226590847-UniFi-How-To-Use-a-Free-Email-Service-as-SMTP-Serv...
Brandon Jaffe | UniFi Routing & Switching | Austin, TX
Regular Member
Posts: 623
Registered: ‎01-29-2015
Kudos: 90
Solutions: 30

Re: Alert On Failover And Disable Wifi On Failover

[ Edited ]

Yes and I just did an email test and the test email came through. Later today when I'm not working, I'll pull a cable and test it again.

 

It could be that I'm on firmware 4.4.18. I had issues with .28 so I'm stuck here for the time being.

New Member
Posts: 49
Registered: ‎10-11-2015
Kudos: 8
Solutions: 1

Re: Alert On Failover And Disable Wifi On Failover

Hi @UBNT-jaffe  

 

since i have updated severals sites/controllers, i don't have WAN notifications any more

 

Gateway events are checked ( event + alert + mail ), but :

 

nothing in controller UI

nothing by mail ( and SMTP via controller is working well with test mail )

 

but appear in USG log files

 

https://community.ubnt.com/t5/UniFi-Routing-Switching/No-more-WAN-alert-event-5-8-28-CK-and-4-4-22-5...

 

Thank you

 

Ubiquiti Employee
Posts: 950
Registered: ‎02-28-2017
Kudos: 286
Solutions: 100

Re: Alert On Failover And Disable Wifi On Failover

In UniFi Settings > Networks > edit WAN2 > is "Report Interface Events" checked?
Brandon Jaffe | UniFi Routing & Switching | Austin, TX
New Member
Posts: 49
Registered: ‎10-11-2015
Kudos: 8
Solutions: 1

Re: Alert On Failover And Disable Wifi On Failover

@UBNT-jaffe For me, i do not have this check box 

 

no in WAN2, no in WAN1

 

neither in cloudkey controller, neither in controller under debian

Capture d’écran 2018-09-17 à 18.14.36.png
Ubiquiti Employee
Posts: 462
Registered: ‎02-13-2018
Kudos: 141
Solutions: 74

Re: Alert On Failover And Disable Wifi On Failover

Hi @GB_fr I'm working with @UBNT-jaffe on this and would like to help you guys track down what is causing this issue.

 

I noticed that you said the logs were showing up on the USG so I would like to move onto the controller to see what we can pick apart. 

 

 

The following instructions will show you how to get output from the MongoDB shell on your cloud key/ 

  1. SSH into the CK
  2. Type command: mongo localhost:27117/ace
  3. Type command: db.alarm.find({"key":"EVT_GW_Notification"})
  4. Copy this output to a .json formatter like this one or another of your choice. This will help with readability. 
  5. Do you see object entries listed here that correspond to your logs on the USG?

Have you ever had database issues in the past? I'm wondering if something may not be sitting right and need a repair on that database. If you want to find out if a repair would help you follow these instructions.

  1. SSH into the CK
  2. Type command: mongo localhost:27117/ace
  3. Type command: db.repairDatabase()
  4. Let this finish. Report back whether errors occur or not. 
  5. Type command: service unifi restart

If you would try to do a failover again and let me know how it goes that would be helpful. 

Adam Dipple | UniFi Support Team
New Member
Posts: 49
Registered: ‎10-11-2015
Kudos: 8
Solutions: 1

Re: Alert On Failover And Disable Wifi On Failover

Hi @UBNT-AdamD

 

The last entry in the DB is the same in UI / Alert

Last event date is 8/28/2018 : the day i made CK firmware and USG firmware update

 

I confirm the log in USG contain WAN event

 

 

 

Sep  9 00:18:30 USG wlb: group wan_failover, interface pppoe2 going Inactive
Sep  9 00:18:30 USG wlb: group wan_failover, interface eth3 going Active
Sep  9 00:19:22 USG wlb: group wan_failover, interface pppoe2 going Active

 

 

 

As you propose, i made a db repair but nothing change.  

Note, i never had db issue in the past.

 

 

> db.repairDatabase()
{ "ok" : 1 }

 

 

I have 3 controllers  / 5 sites with the same issue  ( 2 CK + 1 docker )  since this update (see msg)

 

Reply