Gateway Status Events



  • Just a quick question, does anyone know of how to pull the information from the Gateway Status of pfSense? I would like to have a script that responded to "Online" and "Offline" accordingly, I see pfSense is aware of this because of the dashboard status widget.

    Is there some sort of gateway_status() function using PHP? Is there any way to tell VIA shell? Using ping and default gateway detection (netstat -r -n | grep ^default | awk '{print $2}'
    ) is unreliable since when the link goes down, the default gateway goes to nothing and the my ping script fails. :(

    Any help would be appreciated! Thanks!


  • Rebel Alliance Developer Netgate

    Check the gateway status widget and the gateway status page. You could lift some code from there for your script.


Locked