tag:blogger.com,1999:blog-8438338898890661836.comments2008-07-12T18:32:28.780+01:00Yamon, Yet Another Monitoring scriptBjarni R. E.http://www.blogger.com/profile/07409296389395181848noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-8438338898890661836.post-67920951023499160332008-07-12T18:32:00.000+01:002008-07-12T18:32:00.000+01:00In crontab entries I tend to add a> /dev/null 2>&1...In crontab entries I tend to add a<BR/>> /dev/null 2>&1<BR/><BR/>The confusing part was, that even with -v, not all the tests appeared in the subject line and it changed from mail to mail whether these listed the SSH or the HTTP tests.<BR/><BR/>Another thing: are white space characters allowed in the names of tests (with respect to the fail-* files)?<BR/><BR/>I presume the fail-* files are the only way to really test whether it works, because the -v switch sends a mail anyway, so that confused me a bit.<BR/><BR/>Thanks for your help.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8438338898890661836.post-61340022787084364142008-07-12T11:01:00.000+01:002008-07-12T11:01:00.000+01:00The -v flag makes it verbose, it repots all the th...The -v flag makes it verbose, it repots all the things it tests.<BR/><BR/>So if you have the -v flag on the crontab entry, that will cause it to generate an e-mail every time it runs - not an e-mail from Yamon, but from crond.<BR/><BR/>Is that what you're seeing? Otherwise it should only e-mail you on state changes (or periodically based on alert_interval, when things are broken).Bjarni RĂșnarhttp://bre.klaki.net/noreply@blogger.comtag:blogger.com,1999:blog-8438338898890661836.post-41421062259593170982008-07-12T03:02:00.000+01:002008-07-12T03:02:00.000+01:00Hi again Bjarni,having a bit of a trouble with Yam...Hi again Bjarni,<BR/><BR/>having a bit of a trouble with Yamon. Perl says the syntax is fine. Whenever I run the script with "-v" I get a mail with the subject:<BR/><BR/>"0 OK spamcop:OK / "<BR/><BR/>Then after running it a few times (without -v) to get the .state file updated, nothing gets mailed or logged (presumably the right behavior as it is only supposed to mail on failure). However, when I use -v again, I get a mail (almost empty) with the subject of either all my SSH or all my HTTPD tests stating OK.<BR/><BR/>Is that normal and expected behavior? I skipped pop3 and the smtp-relay test as well as the whitebox test. Otherwise I just added more rules to match my servers.<BR/><BR/>Thanks.<BR/><BR/>BTW: you can also reach me as oliver *at* (domain of your previous employer) in case you prefer email.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8438338898890661836.post-59051061025716550982008-07-10T23:01:00.000+01:002008-07-10T23:01:00.000+01:00Nice stuff. Going to try that on my dom0. I am alr...Nice stuff. Going to try that on my dom0. I am already running a pretty simplistic shell script in order to check RBLs (using the rblcheck tool), but the other monitoring features may come in handy.<BR/><BR/>Thanks for publishing it!<BR/><BR/>Greetings from an alien (terrestrial, though) in Reykjavik ;)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8438338898890661836.post-85801937498776168192007-10-01T12:53:00.000+01:002007-10-01T12:53:00.000+01:00You can tell the script to not alert unless the st...You can tell the script to not alert unless the state has been consistant for the past N tests. So "flapping" won't cause an alert at all in many cases.<BR/><BR/>Generally my alert criteria are "alert if state changes and stays consistent for 3 tests in a row. If it's broken, remind me once every hour until it's fixed".<BR/><BR/>I want to know when the system recovers as well as knowing when it breaks, so I can stop panicing. :-)<BR/><BR/>There is one potential problem with this strategy for suppressing "flaps" - if a system flaps once or twice, you probably don't care. If it's flapping for hours, you want to know.Bjarni R. E.http://www.blogger.com/profile/07409296389395181848noreply@blogger.comtag:blogger.com,1999:blog-8438338898890661836.post-75457577703124189082007-10-01T11:57:00.000+01:002007-10-01T11:57:00.000+01:00Looks interesting! I have been considering writin...Looks interesting! I have been considering writing something similar, able to monitor my web server from my home wireless router (which runs OpenWRT). Unfortunately this doesn't have enough flash for Perl, so shell-script is about the only option. So I may write "yet another yet another monitoring script"....<BR/><BR/>I see you have a "sanity check" of pinging google.com before doing anything else. Good plan. The other thing that I was considering was doing some sort of exponential back-off: imagine if the server goes down/up/down/up every 5 minutes while you're on holiday, and you're paying $$$ for each SMS. So ideally you'd get an SMS on the first "down", and then another message after n mins, and another after 2n, 4n, 8n etc. etc. Have you considered something like this?Anonymousnoreply@blogger.com