Soldato
- Joined
- 22 Oct 2004
- Posts
- 9,086
- Location
- Berkland
Hi Guys,
I am using my raspberry pi to act as a syslog server on my network at home to catch syslog messages from kit that I want monitoring, i.e. my router. Getting syslog up and running and getting it to capture those messages from the router is easier and am logging out to a file on disk, so no issues there.
Now I want to take it a step further and get it to trigger alerts for certain events.
I have defined a destination which is to trigger sendmail:
And I create a filter to capture any messages that I want to trigger the alert for:
This is for any incoming connections to the router that contains OpenVPN in the log line.
And I have a my log command, that uses the source, filter and destination to do the business:
Question is, the destination gets called, but is there a way to get the log message in its entirety to pass that to the destination so that I can include that in my email alert?
Any syslog-ng experts on here?
Thanks
I am using my raspberry pi to act as a syslog server on my network at home to catch syslog messages from kit that I want monitoring, i.e. my router. Getting syslog up and running and getting it to capture those messages from the router is easier and am logging out to a file on disk, so no issues there.
Now I want to take it a step further and get it to trigger alerts for certain events.
I have defined a destination which is to trigger sendmail:
destination d_alert { program("sendmail"); };
And I create a filter to capture any messages that I want to trigger the alert for:
filter f_openvpn { message("OpenVPN"); };
This is for any incoming connections to the router that contains OpenVPN in the log line.
And I have a my log command, that uses the source, filter and destination to do the business:
log { source(s_net); filter(f_openvpn); destination(d_alert); };
Question is, the destination gets called, but is there a way to get the log message in its entirety to pass that to the destination so that I can include that in my email alert?
Any syslog-ng experts on here?
Thanks