Here you will find scripts for monitoring various things. I currently have 4 different monitoring scripts. The most recent is to let you know when new POP accounts are added. It was added March 15, 2006.
These scripts are run by a cron job and can be placed just about anywhere. I usually place mine in a subdirectory of the servers /scripts directory. The scripts themselves include full instructions.
Scroll down the page or use these links to go to the one you want.
- monitor changes - watch for changes anywhere you want on the server
be sure to upload scripts in ascii mode
Monitor Changes script
Script to notify you of changes in specified directories: PWSmonitorchanges V2.0
This script allows you to monitor changes to any directories on your server.
You specify the directories to watch, and the file extensions you want to watch for, and you are emailed whenever there is a change. The uses for this script are only limited by you. It was originally to watch the activity of new customers, but can be used for much more.
Save the following files to wherever you prefer on your server. I use /scripts/custom. Rename the PWSmonitorchanges.txt file to PWSmonitorchanges.cgi.
Monitor Changes script V2.0 (free version) - rename to PWSmonitorchanges.cgi
Read the instructions at the beginning of the script, then start watching for new emails.
Watch wwwacct script
Script to monitor wwwacct script customizations: PWSwatchwwwacct V1.1
If you make any customizations to the wwwacct script, you need this to monitor it.
What this script does is compare your custom wwwacct script to a copy of it. If a cpanel update changes the wwwacct script, this script will notice the change. Many upgrades only change the wwwacct script back to what it was originally. If it's changed, this script compares the new wwwacct to a copy of the original one. If the update merely wrote the original one back, it would match the copy. This script would then take the copy of your custom one and reuse it. If the update altered the script, you would be emailed and told that your customizations are lost and that you will need to redo them. The script does tell you where changes were made to help with reapplying your customizations. I customized my wwwacct script over a year ago and have only had to redo the changes maybe half a dozen times.
Save the following file to wherever you prefer on your server. I use /scripts/custom. Rename the PWSwatchwwwacct.txt file to PWSwatchwwwacct.cgi.
Watch wwwacct script - rename to PWSwatchwwwacct.cgi
Read the instructions at the beginning of the script, then relax. You won't need to redo your customizations every time cpanel updates.
Monitor Server Load script
Script to monitor server load automatically: PWSservermonitor V5.1
This script monitors your server load and emails you when it goes over a point you set.
Save the following file to wherever you prefer on your server. I use /scripts/custom. Rename the PWSservermonitor.txt file to PWSservermonitor, set some variables, and set a cron job to run it.
Server Monitor script V5.1 (free version) - rename to PWSservermonitor
Read the instructions at the beginning of the script, then sit back and relax.
Monitor POP accounts
Script to notify you of new POP accounts: PWSmonitorPOPs V1.0
This script is quite simple. It gets a list of current POP accounts, then at whatever frequency you specify, it gets a new list and compares the 2 to see if any new POP accounts have been created since the last check. If so, it emails you the new POP email address and the path to its folder.
Save the following file to wherever you prefer on your server. I use /scripts/custom. Rename the PWSmonitorPOPs.txt file to PWSmonitorPOPs.cgi.
Watch wwwacct script - rename to PWSmonitorPOPs.cgi
Read the instructions at the beginning of the script, set a couple variables, then set the cron job for your desired frequency.