<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'.&nbsp; 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. :)&nbsp; <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.&nbsp; 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.&nbsp; Sorry about not commenting up that part, but I'm adding the hostname and a timestamp onto the key each time.&nbsp; It's also deleting the key right after we do the comparison in the 'cleanup' function.&nbsp; <br><br>--Justin<br><br>----- Original Message -----<br>From: "Mark Smith" &lt;smitty@gmail.com&gt;<br>To: "Justin Brehm" &lt;jbrehm@icontact.com&gt;<br>Cc: "Frieder Kundel" &lt;frieder.kundel@gmail.com&gt;, 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>&gt; Alright, here's what I have.<br><br>Why do you check the database? &nbsp;You don't seem to do anything with<br>this data. &nbsp;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. &nbsp;(And you should monitor the database<br>separately anyway, IMO.)<br><br>Also, I would suggest using something other than the config file. &nbsp;You<br>can just generate raw content yourself, maybe 1000 bytes of random<br>noise. &nbsp;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. &nbsp;(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>