SoFiMaN
05-30-2007, 02:25 PM
Hello,
I am searching for a load monitoring script, so it can alert me via Email/SMS if the load goes high more than X ? I just found portsensor till now and it costs a $99 one time fee to accept custom sensors.
Any other better scripts ?
PS. I am not asking for a script to show my CPU, RAM usage, ..etc. as I will not publicy any results, I just need to be alerted -and my staff- when the load on any of the servers goes high.
Thanks.
Adam H
05-30-2007, 02:45 PM
Status2k does that.
You could just put the public display stats in a passworded area.
gregh100
05-30-2007, 03:06 PM
I think this could be done pretty easily with a perl script and cron. Setup a perl script to run every 1, 2, or 3 minutes. Have the script execute the uptime command and look at the load average. If the load average is over X, send the e-mail, or do whatever.
For example,
#! /usr/bin/perl
$uptime = `uptime`;
($j1,$j2) = split / load average: /, $uptime;
($j3,$j4) = split /,/, $j2;
if ( $j3 > .1 ) {
print "LOAD AVERAGE IS HIGHER THAN .1";
# EMAIL sys admins, txt message, whatver
}
This real basic script checks the uptime and executes the code in the if-block if it's over .1. E.g:
greg@phi ~ $ uptime
15:04:55 up 6:29, 7 users, load average: 0.24, 0.21, 0.26
greg@phi ~ $
greg@phi ~ $ ./example
LOAD AVERAGE IS HIGHER THAN .1
greg@phi ~ $
This is an easy way to get a good solution for what you're looking for, without having to pay for external software. Hope this helps you out!
[JSH]John
05-30-2007, 05:56 PM
You could try System Integrity Monitor (SIM).
SIM is a system and services monitor for ‘SysVinit’ systems. It is designed to be intuitive and modular in nature, and to provide a clean and informative status system.
It does this by consistently verifying that services are online, load averages are in check, and log files are at reasonable sizes. Many other SIM modules sport different and in-depth features to bring a well rounded tool to your disposal to stop otherwise common issues daunting internet hosts. Features:
- Service monitoring of HTTP, FTP, DNS, SSH, MYSQL & more
- Event tracking and alert system
- Auto restart ability for downed services
- Checks against network sockets & process list to ensure services are online
- Advanced HTTP service monitoring, to prevent commonly encountered issues
- System load monitor with customizable warnings & actions
- Ability to auto restart system with definable critical load level
- Priority change configurable for services, at warning or critical load level
- Informative command line status display
- Easily customizable configuration file
- Auto configuration script
- Auto cronjob setup feature
- Simple & Informative installation script
- Integrated auto-update feature
- And more...
http://www.rfxnetworks.com/sim.php