Simple IP monitor script that posts to Slack when IP address is first reachable or unreachable #1085
ebzimny01
started this conversation in
Show and tell
Replies: 3 comments
|
Nice! |
0 replies
|
I also created a "companion" script that runs on my Genmon pi device through a cronjob. The purpose of this script is for the pi to check its network connectivity. If it can't ping my local router, the pi will attempt to reset its wifi connection and try to ping again. If that works, then great, problem solved. However, if resetting wifi does not solve the problem, the script will then reboot the pi. So far, this has helped keep my Genmon pi device reconnected to my network without manual intervention. |
0 replies
|
Thanks! I updated the wiki with a link to this thread: https://github.com/jgyates/genmon/wiki/Appendix-M-Tips-and-Tricks-useful-for-Genmon#setting-up-a-script-to-check-the-wifi-connection-and-reconnect-if-needed |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
In case anyone finds it useful, I created a simple script that monitors a single IP address (via basic ping command) and then posts a message to a Slack channel via a Slack webhook upon first successful ping or first failed ping. It will then post the next message to Slack only upon a state change, going from success to failed or from failed to success.
In my case, my Genmon is running on a Pi that runs off my generator's battery and is connected to my network via wifi with a static IP address. I don't have a strong wifi signal, and I've noticed my Pi goes offline from time to time. I want to know when my Pi device goes offline and for how long, so I use this script to monitor its IP address. I have another Pi on my network that runs this script as a service.
All reactions