Operating System - HP-UX
1848067 Members
6104 Online
104022 Solutions
New Discussion

syslog.conf syntax for email...

 
SOLVED
Go to solution
Sally  Devine
Frequent Advisor

syslog.conf syntax for email...

Hello,

I would like to setup my syslog.conf to email me when there are any critical errors (like one of the mirrored disks dies, etc). I am just not sure of the syntax.

Thank you,
Sally
5 REPLIES 5
Sanjay_6
Honored Contributor

Re: syslog.conf syntax for email...

Hi Sally,

You cand configure a cron job to grep a error message in the log file. If it finds that it will email a notification to the user/admin.

Hope this helps.

Regds
Sally  Devine
Frequent Advisor

Re: syslog.conf syntax for email...

Yes, I was thinking of that if there was no way of just emailing *.err *.crit etc to an email address.
Mark Greene_1
Honored Contributor
Solution

Re: syslog.conf syntax for email...

add this line to /etc/syslog.conf and then hup syslogd:

*.crit root,user1,user2


where user1 and user2 are login ID's you want the e-mail to go to. You can add as many or few as you want. You may be able to reference an alias that has been setup for a remote e-mail address in /etc/mail/aliases (i.e., your outlook or groupwise e-mail address), but I've not tried this on HP-UX so I cannot say for sure if it will work.

HTH
mark
the future will be a lot like now, only later
James R. Ferguson
Acclaimed Contributor

Re: syslog.conf syntax for email...

Hi Sally:

Have a look at the man pages (1M) for 'syslogd'. Use the tab key (character) to separate the fields in /etc/syslog.conf below:

*.crit root

Regards!

...JRF...
Sanjay_6
Honored Contributor

Re: syslog.conf syntax for email...

Hi Sally,

You can also modify the /etc/syslog.conf file to forward the type of alert you want to moify to a userid / alias on the system and then configure the /etc/mail/aliases to forward the mail for the user/alias on the system to your email address. Also do a "man syslogd" to find more info on how to configure the /etc/syslog.conf file.

Hope this helps.

Regds