[syslog-ng]Sending a log line via e-mail
Stefan Schluppeck
syslog-ng@lists.balabit.hu
Wed, 27 Oct 2004 13:35:42 +0200
This is a multi-part message in MIME format.
--------------050404000705040409060205
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Andras,
I wirte the Loglines that have to be mailed to a own logfile and then
put this line to your crontab
*/1 * * * * root test -s /var/log/logfile && \
$(mail -s "Message from Logserver" emailuser@domain.de \
< /var/log/logfile ; cat /dev/null > /var/log/logfile)
So every minute a email will be send if the File "/var/log/logfile" is
greater than zero bytes, otherwise no email will be send.
And the other nice thing is, you can say cron only to look every 15
minuts for the size of the file.
- --
Mit freundlichen Grüßen / With regards
Stefan Schluppeck
Bauer Publishinggroup - Brieffach 6200 - Burchard.11 - D-20077 Hamburg
Publishing Support Center - Server & Development - Stefan Schluppeck
Fon:+49-40-3019-5519 - Fax:+49-40-3019-5668 - eMail:sschluppeck@hbv.de
~ <°)))))>< ><)))))°> <°)))))>< ><)))))°> <°)))))>< ><)))))°>
PGP-Fingerabdruck = 7DC1 E4B4 056C 5380 8C68 4B5F 5E87 227D 5632 E45F
Key-ID = 81B7CD29
Csehi Andras wrote:
| Hi!
|
| I try it (based on the documentation), but it isn't working. The
destination
| line look like this:
|
| destination d_ups { program("mail -s UPSlog acsehi@qsoft.hu"); };
|
| the syslog-ng try to send the line(s), but the bsd mailer waits
something. If I
| try it in command line (with pipe-line), the command works perfectly.
|
| The environment: Debian 3.0r2, Kernel: 2.4.18, syslog-ng: 1.5.15.
|
| Sincerelly,
| András, Csehi
| Csehi András
| acsehi@freemail.hu, acsehi@qsoft.hu
| (1) 209-6651, (20) 410-5343
|
|
| _______________________________________________
| syslog-ng maillist - syslog-ng@lists.balabit.hu
| https://lists.balabit.hu/mailman/listinfo/syslog-ng
| Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBf4gOXocifVYy5F8RAuPsAJ9mW8RUgMZoqOemrfq8U8FpMlJidQCffq53
O6Si2AjAsue+GMerFRUuwSI=
=Va4Y
-----END PGP SIGNATURE-----
--------------050404000705040409060205
Content-Type: text/x-vcard; charset=utf-8;
name="sschluppeck.vcf"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="sschluppeck.vcf"
begin:vcard
fn:Stefan Schluppeck
n:Schluppeck;Stefan
org:Bauer Produktions KG;Server & Entwicklung
adr:Brieffach 6200;;Burchardstr. 11;Hamburg;Hamburg;20077;Germany
email;internet:sschluppeck@hbv.de
title:IT-Systemadministrator
tel;work:+49 40 3019 5519
tel;fax:+49 40 3019 5668
tel;cell:+49 160 58 00 636
note;quoted-printable:-----BEGIN PGP PUBLIC KEY BLOCK-----=0D=0A=
Version: GnuPG v1.2.2 (GNU/Linux)=0D=0A=
=0D=0A=
mQGiBEAaIywRBACmy/zCiO+eAspFgY/+IElF0eceglut92NOaVAhuZ7JYRPq5T0/=0D=0A=
42qv3CuBe7itxHI317/ZulB2tqZP1XsNFhLaqlETDSlguZSuWRUmOuh2jHzAYFbY=0D=0A=
xVN5wFW/TP57jyEBQn+6UuNOH8SjoTHc6s80NB+q25BPknawQwumUnXhmwCgrgVF=0D=0A=
r6vZAEAOTDaraHx9O686dv0D/ReLiZ614KxoqhamrbkZTrF/9l7RvovIRFGWLKty=0D=0A=
Yn+ZE2JXZTMh9Z3DxMTq9xH5GofX0m6RFE4lVSmn+M8wGC0zZLQ3GKMkfNm0cx4c=0D=0A=
6b1+8TREYJdSvZismlv0fGiZWFuKNpTFHQDjtYBUue6YqFljTAMjPJj1oAgPyEi6=0D=0A=
hvEAA/9xIdDRhEJ6+DmCXhDNEzzFpR8b00Daad5b+ipLjHSgf19Hhzzu3PRBhptj=0D=0A=
WrjC1q8WeSe8S2q99p/kxzklKbOlVMDUB86z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jYJXQuXs8irbqLTsPhIh14jAXsvTRxvHKGwllSL=0D=0A=
cNEBzd6QwYcSrnzlVhttGNpWNwvi8D0NVumEYXsqGCHM05KEEFz85sGrO8Buh9n6=0D=0A=
rk7VGem5kc153xh2TDdbOXI3s4M/1Olis2E55TGMwvXvR99x1xqks7lMpohGBBgR=0D=0A=
AgAGBQJAGiNFAAoJEF6HIn1WMuRf0/wAoJoRZuB1r6dmwBcHFD/NgYkOrRerAJwO=0D=0A=
qBfTZ1Dk9Obz1F7D5+weZxuN9w=3D=3D=0D=0A=
=3DTlRs=0D=0A=
-----END PGP PUBLIC KEY BLOCK-----=0D=0A=
x-mozilla-html:FALSE
url:http://www.hbv.de
version:2.1
end:vcard
--------------050404000705040409060205--