Script to capture errors

Hello;
I'm trying to write a script to capture any hardware error from logs/syslog on my SUSE 10 servers so i can be notified if we have any hardware issues such a bad fan or battery, etc..

Thanks in advance for any help

to capture the error first you know what are the possible errors then you can grep for them in logs

i was gonna grep for the word error