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

    How to be notified if an interface is down?

    Scheduled Pinned Locked Moved General pfSense Questions
    4 Posts 2 Posters 2.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.
    • T
      torontob
      last edited by

      Hi Everyone,

      Is there a tool already built-in to notify me if an interface goes down? I want to not only be informed but I also want to know if attempts are made to reconnect again.

      1- If the PPoE interface goes down, I want an e-mail message to be put in queue to be sent to me once the connection is back up.
      2- If PPoE is down, I want the interface to continuously and repeatedly query the DSL provider for an IP and connection. I think that happens by default but for my piece of mind I want to confirm this if it happens.
      3- At a later stage, what I want to do is to actually connect to an Asterisk server which is connected to the pfsense router to place a call through the analogue lines to inform me of the down interface. I guess once I have #1 and #2 confirmed and figured out then #3 can be easily implemented.

      Thanks,
      Bruce

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

        #2 happens automatically, it reconnects as many times as it takes. It wouldn't be wise to generate an e-mail on each attempt.

        As for #1, SMTP (and Growl) notifications are in 2.0, but I don't think we have an 'interface down' notification, though it could be done.

        Not sure how you'd pull off #3, but I doubt anything that relied on Asterisk would be in the base system.

        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
        • T
          torontob
          last edited by

          Hello,

          Where should I look for the code to detect an interface down. I abandoning other ideas and will be just sending a request to Asterisk server to make a call rather than e-mail alerts. Asterisk server is on the same network so it's very unlikely that LAN port will go down.

          Any pointers are greatly appreciated.

          Thanks,
          Bruce

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

            If you are looking for a hard interface failure (e.g. the port is unplugged or CPE powered off) look into the link events in /etc/devd.conf (read the FreeBSD man page)

            As for a "soft" failure, such as a high delay or connectivity loss (no pings returned) you might be able to get that info from /tmp/apinger.status

            Or just route the system logs to another server (the system log settings page can do this) and have something that watches/parses the log and reports on failures there.

            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.