View Single Post
Old 2nd July 2018
PapaParrot's Avatar
PapaParrot PapaParrot is offline
parrot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 472
Default

I have been looking at this, https://serverfault.com/questions/32...messages-to-me

But there is some things I am not understanding:
Quote:
Notifications via syslogd(8)

On my OpenBSD server, I log and email important messages from my web applications, which use facility local1. Here is my /etc/syslog.conf to make it happen:
Code:
local1.err    /var/log/example.com
local1.err    |while read log; do echo "$log" | /usr/bin/mail -s SYSLOG me@example.com; done
I am not sure what the facility is, does that need to be created, or for example, using localhost, would it be "local0.err" ? The other thing :/var/log/example.com
What should "example.com" be, is that a file I create, using my host name as the file name ?
If it was me, I would want it to only send me the "authlog", and nothing else.
The "authlog" shows when ever anyone/anything succeeds logging in, so it seems like that would be a good one to receive by e-mail, to see when someone logged in.
How ever based on the example in the above link, it does not work for me.
__________________
My best friends are parrots

Last edited by PapaParrot; 2nd July 2018 at 03:08 PM.
Reply With Quote