<html><head><style type='text/css'>body { font-family: 'Times New Roman'; font-size: 12pt; color: #000000}</style></head><body>Database has to be checked because there are instances (testing only fortunately) when we could lose the db and MogileFS::Backend will keep trying to connect either causing an NRPE plugin timeout or and exit code of '82' which Nagios would read as an 'UNKNOWN'. Mogile is doing exactly what it was supposed to be doing, but sometimes that doesn't work for Nagios plugins and I needed to find a way to "short circuit" the check for these cases. :) <br><br>I do also monitor DB separately, but if this catches something earlier, then I'd want to know.<br><br>Yeah, I was just using the config because I felt that's something everyone would have on their setup. Just something quick that came to mind, but dumping in a garbage file is definitely something that can be added and much more secure. <br><br>It is using a new key each time. Sorry about not commenting up that part, but I'm adding the hostname and a timestamp onto the key each time. It's also deleting the key right after we do the comparison in the 'cleanup' function. <br><br>--Justin<br><br>----- Original Message -----<br>From: "Mark Smith" <smitty@gmail.com><br>To: "Justin Brehm" <jbrehm@icontact.com><br>Cc: "Frieder Kundel" <frieder.kundel@gmail.com>, mogilefs@lists.danga.com<br>Sent: Wednesday, May 7, 2008 3:00:05 PM (GMT-0500) America/New_York<br>Subject: Re: Nagios plugin?<br><br>> Alright, here's what I have.<br><br>Why do you check the database? You don't seem to do anything with<br>this data. I don't know that you need to check it anyway because<br>that's sort of implied by checking MogileFS - if you can't insert/get<br>files, then something is broken. (And you should monitor the database<br>separately anyway, IMO.)<br><br>Also, I would suggest using something other than the config file. You<br>can just generate raw content yourself, maybe 1000 bytes of random<br>noise. Then you're not dependent on this file existing on the machine<br>that is doing the Nagios check.<br><br>Third point, use a different key, include the pid or the time or<br>something, so that you can be sure you have a valid check from start<br>to finish. (And then have something that cleans out those files after<br>some time?)<br><br><br>-- <br>Mark Smith / xb95<br>smitty@gmail.com<br></body></html>