Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Monitoring errors

Status
Not open for further replies.

lalli1

Technical User
Aug 10, 2006
1
DE
Can someone help me, I need to monitor the errors I might get from our systems, I need the system to foward any errors to my email account. Does any one know of any tried and trusted software.

Need HP-UX systems to send notification of any errors to my exchange email account.

Thanks in advance
Lalli1
 
we are running some type of do-it-yourself script which monitors some logfiles such as syslog.log

this script is called via cron every few minutes. You need to mail the output to your mailaccount

Code:
# cat /home/root/check_syslog.sh
#!/sbin/sh

# Script to check new entries in syslog.log

if [ -f /var/adm/crash/syslog_check.log ]
then
        comm -23 /var/adm/syslog/syslog.log /var/adm/crash/syslog_check.log| \
        grep -vE -f /home/root/check_syslog_pattern
        ERROR=$?
        if [ $ERROR -ne 0 ]
        then
                exit 1
        fi
else
        echo "your errormessage" |/usr/bin/mailx -s "Missing Check File on `uname -n`"  youremailaacount
        exit 1
fi

# Copy syslog to check log

cp /var/adm/syslog/syslog.log /var/adm/crash/syslog_check.log

this is the drop pattern file
Code:
# cat /home/root/check_syslog_pattern
tcp: Connection from
udp: Connection from
Could not reverse map address
ftpd\[[0-9]*\]: allowed connection from
ftpd\[[0-9]*\]: exiting on signal 14
telnet
above message repeats
subsystem request for sftp
xntpd\[[0-9]*\]: synchronisation lost
xntpd\[[0-9]*\]: time reset \(slew\)
xntpd\[[0-9]*\]: time reset \(step\)
please add all the stuff you are not interested in

Best Regards, Franz
--
UNIX System Manager from Munich, Germany
 
As deFranze explained you can use a file for your systems to get the output out and write a cron job to monitor the same, whatever time interval you want, use the sendmail or mailx to send you emails.

We are using one such process.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top