Little update for this shell script in case You have MULTIPLE WAN (and need testing each uplink connection):
THIS SCRIPT SENDS HEARTBEAT ON ONE (1) CERTAIN TEST ID.
So, if You need really monitoring all WANS and receiving SEPARATE ALERT on EACH WAN,- You may create several Tests on StatusCake and USING V.2 OF THIS SCRIPT
#!/bin/sh # HEARTBEAT to StatusCake external monitoring and alerting service # Examples and additional information # https://www.statuscake.com/kb/knowledge-base/what-is-push-monitoring/ # Successfully working on pfSense CE 2.7.X # List of network interfaces INTERFACES="igb10 igb11 igb12 igb13" # StatusCake URL URL="https://push.statuscake.com/?PK=123456764226&TestID=7347942&time=0"" # Loop through each interface and send a curl request for INTERFACE in $INTERFACES do echo "Sending request through interface $INTERFACE" /usr/local/bin/curl --interface "$INTERFACE" "$URL" echo "" # Print a newline for better readability doneYOU MAY TEST exactly script from Diagnostic / Command Shell TO ENSURE THAT ALL ARE WORKING as expected!
The result MUST be looks like this:
Sending request through interface igb0 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 7 100 7 0 0 12 0 --:--:-- --:--:-- --:--:-- 12 success Sending request through interface igb1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 7 100 7 0 0 13 0 --:--:-- --:--:-- --:--:-- 13 success Sending request through interface igb2 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 7 100 7 0 0 13 0 --:--:-- --:--:-- --:--:-- 13 success Sending request through interface igb3 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 7 100 7 0 0 13 0 --:--:-- --:--:-- --:--:-- 13 successP.S.
1.
After testing on exactly Your setup, You MUST comment both ‘echo’ command to avoid unnecessary output to terminal.
2.
logger’ command not using also: because of a lot of calling (1 time / min, 1 time / 5 min,…) system log would be filled by unnecessary records that not helping You even when You have automatic log aggregator & analyser like Splunk, ELK, Graylog,….