Hi,
i got an windows shared folder that i would like to monitor, if file in folder is not created in x hours i would like to get an warning.
any ideas?
Alert if new file is not created after x hours.
-
- Posts: 22
- Joined: Wed Aug 27, 2014 7:29 am
Re: Alert if new file is not created after x hours.
You may want to look at this plugin:
http://exchange.nagios.org/directory/Pl ... in/details
You could do something like:
The following may interest you:
share-file-check.sh
check_file_present
http://exchange.nagios.org/directory/Pl ... in/details
You could do something like:
If that does not work for you, I suggest taking a look at the following plugins to see if any of them might work: http://exchange.nagios.org/directory/Pl ... ile-Systemcscript.exe //NoLogo check_files.vbs -p D:Logs -f "AgeCreated:>7*60*60*24" -f "RegEx:.*.log$" -w 5 -c 5
Count files in D:Logs, and look only for log (*.log) files that are
created at least 7 days ago, return CRITICAL if more than 5 was found.
The following may interest you:
share-file-check.sh
check_file_present
-
- Posts: 22
- Joined: Wed Aug 27, 2014 7:29 am
Re: Alert if new file is not created after x hours.
I tried this VBS script on the windows machine
http://exchange.nagios.org/directory/Pl ... le/details
and it works, but I'm not sure what I should do next or how i can add it to nagios.
http://exchange.nagios.org/directory/Pl ... le/details
and it works, but I'm not sure what I should do next or how i can add it to nagios.
-
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Alert if new file is not created after x hours.
Here is the ticket for you:
http://nsclient.org/nscp/wiki/guides/na ... al_scripts
nsclient documentation really does make it seem harder than it is. Basically you're going to:
That's a wildly simplified version, but should get you going.
http://nsclient.org/nscp/wiki/guides/na ... al_scripts
nsclient documentation really does make it seem harder than it is. Basically you're going to:
- install nsclient++
copy your vbs to your scripts
add a line to a section of your nsclient.ini:
Code: Select all
check_something=cscript.exe //T:30 //NoLogo scripts\check_something.vbs //someargument
- add a Nagios service that runs the command
Code: Select all
check_nrpe -H mywindowshost -c check_something