1847488 Members
3550 Online
110265 Solutions
New Discussion

Re: syslog.conf

 
SOLVED
Go to solution
Juan Manuel López
Valued Contributor

syslog.conf

Hi !
I want to config syslogd to send messages to an email address.
My syslog.conf file is like this:

mail.debug /var/adm/syslog/mail.log
*.info;mail.none /var/adm/syslog/syslog.log
*.alert /dev/console
*.alert root
*.emerg *

What I should change to do this ?.

Thanks.
Juanma.
I would like to be lie on a beautiful beach spending my life doing nothing, so someboby has to make this job.
9 REPLIES 9
Christopher McCray_1
Honored Contributor

Re: syslog.conf

Hello,

For any and/or all entries, just append it with a comma and email address.

Hope this helps

Chris
It wasn't me!!!!
Juan Manuel López
Valued Contributor

Re: syslog.conf

Could you please put an example of it on my syslog.conf file attached on first post ?
Thanks.
Juanma.
I would like to be lie on a beautiful beach spending my life doing nothing, so someboby has to make this job.
S.K. Chan
Honored Contributor

Re: syslog.conf

Do a "man syslogd" and it has the example of how you can do this.
....
*.alert root,skchan,jimb
....
After the changes are made restart syslogd.
Bill Hassell
Honored Contributor

Re: syslog.conf

Not possible. The syslog.sonf file allows:

Facilities:
kern, mail, lpr, daemon, auth, local0...local7, mark

Levels:
debug, info, notice, warning, err, alert, emerg, crit, none

Destinations:
pathname/file: (such as /var/adm/mylogfile)
device: (such as /dev/console)
user1,user2,... (logged in users)
* (every user)

There could be dozens of messages per minute under some conditions. It's much easier to scan syslog with a script on a periodic basis and grep for error, failures, warnings, critical etc. Something like this:

grep -i -e err -e fail -e warn -e crit /var/adm/syslog/syslog.log

Do this before you trim your syslog file and mail the result.




Bill Hassell, sysadmin
Christopher McCray_1
Honored Contributor

Re: syslog.conf

Hello,

You can also set up a .forward file to forward your *.alert and *.emerg to an email address.

Hoe this helps

Chris
It wasn't me!!!!
Martin Johnson
Honored Contributor

Re: syslog.conf

If you have OVO (VPO/ITO - whatever it is called now) you can monitor syslog an alert on specific messages. The alerts can be configured to send emails and/or pages.

Marty
Juan Manuel López
Valued Contributor

Re: syslog.conf

For example, if I want to send a message to ppe@???.com every time there are a error level alert ?
I would like to be lie on a beautiful beach spending my life doing nothing, so someboby has to make this job.
Christopher McCray_1
Honored Contributor
Solution

Re: syslog.conf

Hello,

Create a file .forward in root's home.

add the entry ppe@???.com , save and exit.

Chris
It wasn't me!!!!
Juan Manuel López
Valued Contributor

Re: syslog.conf

Thank you christopher, that??s what I??ve been looking for.
Juanma.
I would like to be lie on a beautiful beach spending my life doing nothing, so someboby has to make this job.