LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-10-2006, 02:15 AM   #1
ddales
LQ Newbie
 
Registered: Jan 2006
Posts: 23

Rep: Reputation: 15
Fetchmail monitoring service?


Hi all,

I have a help desk ticketing system that depends on fetchmail. I would like to know if there is a monitoring service that would be able to alert admins when fetchmail fails?

I have fetchmail set to run from cron which works pretty well. However, and it's not very often, fetchmail will sometimes fail for various reasons. I was thinking that I could scan the logs on a regular basis for fetchmail failures, and if the script finds one, let the admins know. The only problem with this is that fetchmail can fail with a whole bunch of different log entry descriptions or even for other reasons not directly related to fetchmail.

Has anyone written an effective script to watch for fetchmail failures? Or is there maybe another service available that might be helpful in this situation?

Thanks in advance!

Environment:
OpenSuse 10
Fetchmail 6.2
 
Old 04-10-2006, 05:51 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
If you look at "man fetchmail" you'll see under "EXIT CODES" there are two exit codes you should not react to. The rest you could use. Just use a case statement with the exit code. Stupid example:
Code:
/path/to/fetchmail --flags -f /some/config 2>&1>/dev/null; case "$?" in
0|1) ;;
14) true | mail -s "Fetchmail on $(hostname) sez \"server busy\" on $(date)" addressees@somedoma.in;;
*) ;;
esac; exit 0
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Making a service as a system service Dakkar SUSE / openSUSE 2 07-13-2005 07:36 AM
/sbin/service is empty every weekend and changed to service.1 LineS Linux - General 0 05-24-2004 02:08 AM
what do you think of this monitoring service? ziggie216 Linux - Software 2 12-23-2003 08:18 AM
Problem when Nagios Monitoring runs ping service sanfran49 Linux - Software 0 08-22-2003 12:12 PM
Service Monitoring Daemon (MON) PokerFace Programming 1 12-04-2002 11:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration