file existence check

Neil neil-on-nagios at restricted.dyndns.org
Thu Jul 8 07:06:48 CEST 2004


I forgot guys that I should have mentioned NRPE here too. The file that I 
was checking resides on a windows machine. 

I just finished writing a WMI program that checks the uploaded file from the 
vendor. The format of the filename is Daily_Interface_Omni_20040707.txt. I 
then created 2 checks which will check the file with the most current date 
and the other check which will check yesterday's file. This file gets 
uploaded to us at around 8PM PST. I have put it in production and is now 
working. I have to play around with the notification period so that it won't 
send any emails during saturday nights. 

But, all your inputs are also welcome since I will also be creating a check 
for other Unix machines. 


Paul L. Allen writes: 

> Neil writes:  
> 
>> I would like to know guys how you would implement it
> 
> I'd check the modification time was not greater than 1 day.  
> 
>> and what you think  about my approach.
> 
> Borked.  Hey, it's late here and I've had a lot of wine, so deep thought
> is beyond me.  But your explanation of how you were going to do it was
> a hell of a lot more complex than checking the mtime of the file.  A bit
> of perl that uses -M will fix your problem for you.  
> 
> -- 
> Paul Allen
> Softflare Support  
> 
> 
 


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list