Shell Monitoring Script

Roland Venter lists at cits.co.nz
Tue May 11 08:22:22 UTC 2004


Hi Folks,

I'm trying to put together a shell script to monitor several Linux servers,
Redhat, SUSE and Fedora

A quick google search reveals loads of utilities, etc. I'm constrained by
the
following:

1.  I do not 'own' some of the remote servers and only perform monthly
server checks and compile a report with recommendations, etc
So I can't install, make any changes to exiting configuration, compile code
or modify core files without proper change control.

2.  Some of the remote servers are not visible from the outside, only
incoming SSH, this rules out any client/server configuration or SNMP

I've been running logwatch each night to send a consolidated log report.

Presently I'm using cron to run a shell script do give a system overview of:

last | grep reboot : check for reboots
cat /proc/mdstat : RAID Status
uptime
/proc/meminfo : Memory Usage
netstat -an | grep -c ESTABLISHED  : TCP connections
/bin/netstat -tupan
df -h  : Disk usage
/usr/sbin/smartctl -a /dev/hda : SMART Status of disks
/usr/sbin/ntpq -p : Time Sync
I'm sure there must some "Health Check" scripts either Bash or Perl on the
net,
which will save me reinventing the wheel.

Any suggestions or links would be appreciated or if you've done something
similar please let me know

Thanx,

Roland





------------------------------------------------------------------
     www.cits.net.nz  - My Projects Page
     www.secwiz.com  - Security Wizards
-----------------------------------------------------------------






More information about the fedora-list mailing list