Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Gateway Status Events

    Scheduled Pinned Locked Moved General pfSense Questions
    2 Posts 2 Posters 1.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      Brak
      last edited by

      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!

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

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

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.