Your inputs will be of great help
Might I suggest swatch? Why create your own script, when someone's
already created a powerful tool to do this.
http://swatch.sourceforge.net/
There's lots of good articles on using it out there:
/location/of/script
Cheers,
Eddy
- Message d'origine -
De : Agnello George
À : Matt Kettler
Cc : Spamassassin
Envoyé : 7 mars 2008 07:27
Objet : Re: script to send mail when error detected in log file
Your inputs will be of great help
Might I suggest
On 3/7/08, Eddy Beliveau [EMAIL PROTECTED] wrote:
Hi!
You said
then i add a crontab to run for ever 10 min
crontab -e
10 * * * * /your/location/of/script
Please note that your syntax said to execute once per hour at the 10th
minute of the hour
To execute at interval of 10 minutes,
Agnello George wrote:
#!/bin/sh -x
if [ $(tac /var/log |grep -e error: syswrite() | wc -l ) = 0 ] ; then
This can be improved. Let's walk through it.
On my system /var/log is a directory of log files and not an actual
log file. The typical log file is /var/log/syslog one many systems
and
Bob Proulx wrote:
if grep -q error: syswrite() /var/log/spamd.log; then
echo your mailserver is down | mail -s pls check server ip
216.185.xxx.xxx [EMAIL PROTECTED]
exit 1
fi
exit 0
Oh, and after I sent that previous message I realized I should have
asked another question.
On 3/4/08, Matt Kettler [EMAIL PROTECTED] wrote:
Agnello George wrote:
HI
I have a small query !! I need to write a script whenever there is an
error generated in the spamd.log or any general log file to send me a
mail only once, the bellow script is what i came u with but i doubt it
this link works just fine :-
http://mesh.dl.sourceforge.net/sourceforge/swatch/swatch-3.2.2.tar.gz
Regards,
--
--[ UxBoD ]--
// PGP Key: curl -s http://www.splatnix.net/uxbod.asc | gpg --import
// Fingerprint: F57A 0CBD DD19 79E9 1FCC A612 CB36 D89D 2C5A 3A84
// Keyserver: www.keyserver.net
Agnello George wrote:
HI
I have a small query !! I need to write a script whenever there is an
error generated in the spamd.log or any general log file to send me a
mail only once, the bellow script is what i came u with but i doubt it
would work.
if [ $(grep -e unable to start service
HI
I have a small query !! I need to write a script whenever there is an
error generated in the spamd.log or any general log file to send me a
mail only once, the bellow script is what i came u with but i doubt it
would work.
if [ $(grep -e unable to start service /var/log/spamd.log) = 1 ] ;
Agnello George wrote:
HI
I have a small query !! I need to write a script whenever there is an
error generated in the spamd.log or any general log file to send me a
mail only once, the bellow script is what i came u with but i doubt it
would work.
if [ $(grep -e unable to start service
Agnello George wrote:
I have a small query !! I need to write a script whenever there is an
error generated in the spamd.log or any general log file to send me a
mail only once, the bellow script is what i came u with but i doubt it
would work.
if [ $(grep -e unable to start service
11 matches
Mail list logo