Monday, May 13, 2024

May 13 (Mon) – Network Monitoring #2

I made some progress.

Last night I created an outline of what I want the script to do. This morning I tweaked it a bit. It checks to see if a few required utilities are installed and if they are it goes to work. The outline should be fairly easy to follow. This new script is an improvement over the current script in two important ways.

.

First - My current script starts checking the network as soon as the workstation boots up. It keeps checking continuously after that. It’s not easy to disable and enable if I ever want to do that. The new script will run once, then exit. The operating system has a feature that can be set up to run programs automatically either once or periodically. I’ll use that feature to run the script periodically.

.

I’ll create another small script that’ll write a small file to the computer that says “stop checkin’”. The first thing the new script will do is check for that file and if it exists the script won’t check anything. You get the idea.

.

Second - Checking the network and the vpn requires a few ‘helper utilities’. They’re named ‘curl’ and ‘ping’. If they aren’t installed, the current script tosses notifications (over and over) and does nothing more than that. The new script will install the utilities if necessary, then start checking the network and the vpn.

.

As for the json parser… I found a few on the internet, free for all to use. I’m sure one of those will work fine for me so I won’t recreate the wheel and make my own. Cheers.

Last 8 comments

Admin