Announcement

Collapse
No announcement yet.

pfSense WAN Monitoring via Syslog and UltraLog3 HSPI

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    pfSense WAN Monitoring via Syslog and UltraLog3 HSPI

    I thought I would share how I am able to trigger a HomeSeer event based on the dpinger output from my pfSense router. This took me less than 5 minutes to setup.

    The HomeSeer event will trigger whenever the pfSense dpinger WAN monitor sends an Alarm or Clear event. The regular expression will capture the values and place them into the HomeSeer Global Variables so they can be used in scripting or within an e-mail.

    Requirements:
    • HomeSeer3
    • UltraLog3 HSPI
    • UltraSMTP3 HSPI (optional)
    • pfSense Router configured to send syslog output to UltraLog3


    HomeSeer Event:
    Event Name: pfSense WAN Monitoring

    Trigger: UltraLog3: Syslog Match
    IF Syslog MsgTag starts with dpinger
    AND IF Syslog MsgContent Regular Expression:
    Code:
    WAN_DHCP\s+(?'ipaddress'\d+\.\d+\.\d+\.\d+):\s+(?'status'Alarm|Clear)\s(?'type'\w+)\s(?'latency'\d+).+?loss\s(?'pktloss'\d+)%
    Then:
    UltraSMTP3: Send an Email

    Message Body:
    PHP Code:
    <html>
     <
    body>
      <
    p>The pfSense dpinger reported a change in the WAN monitoring state.</p>  

      <
    table border="1">
       <
    tr>
        <
    td>IP Address:</td><td>$$GetVar:[ipaddress]</td>
       </
    tr>
       <
    tr>
         <
    td>Alarm Status:</td><td>$$GetVar:[status]</td>
       </
    tr>
       <
    tr>
        <
    td>Alarm Type:</td><td>$$GetVar:[type]</td>
       </
    tr>
       <
    tr>
        <
    td>Network Latency:</td><td>$$GetVar:[latency]us</td>
       </
    tr>
       <
    tr>
        <
    td>Packet Loss:</td><td>$$GetVar:[pktloss]%</td>
       </
    tr>
      </
    table>
     </
    body>
    </
    html
    Regards,
    Ultrajones
    Attached Files
    Last edited by Ultrajones; March 18, 2017, 10:11 AM.
    Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

    #2
    Thanks for posting this, because it reminded me that UltraLog has a syslog feature.

    I am new to PFSense and have pointed it to the UltraLog syslog server. I don't find much information on dpinger. Is there any other configuration for dpinger required other than just leaving gateway monitoring enabled?
    HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

    Comment


      #3
      No additional configured is needed. It should be enabled by default. I am able to trigger the pfSense dpinger alert by simply running speedtest.net
      Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

      Comment


        #4
        Originally posted by Ultrajones View Post
        No additional configured is needed. It should be enabled by default. I am able to trigger the pfSense dpinger alert by simply running speedtest.net
        Thanks. I'll let it log for a day or so then I'll poke around some more.
        HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

        Comment

        Working...
        X