Monitor Folder/Files Counts for NCPA Windows Clients

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jstormshak
Posts: 27
Joined: Mon May 04, 2020 11:41 am

Monitor Folder/Files Counts for NCPA Windows Clients

Post by jstormshak »

Hello everyone!
I'm asking if any one has use/found a native XI solution for being able to use the Windows NCPA agent to monitor a windows folder for its existence as well as checking if the number of files are in a defined threshold? I see an XI plugin called "folder_watch.pl" but looks non-windows use. I've glanced around, but don't see a native way to do this outside of using a event handler to call on a service check to another custom script in the NCPA agent's /plugins/ directory. I rather not have to write scripts if it can be avoided. Has anyone in the community solved this item? All feedback/suggestions greatly appreciated. Thanks!
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Monitor Folder/Files Counts for NCPA Windows Clients

Post by ssax »

There is no built-in file/folder checks at this time in NCPA. You can submit a feature request here if you would like that functionality to be built-in:

https://github.com/NagiosEnterprises/ncpa/issues

Technically, folder_watch.pl is meant for linux/unix systems but you can run plugins of any language the remote system supports. (meaning you can install perl/python/go/whatever support on the remote system to run perl/python/go/whatever) but it's up to the plugin if it supports windows or not.

You also don't use an event handler for this, you just call the plugins API endpoint to call the plugin on the system:

https://www.nagios.org/ncpa/help.php#ap ... es-plugins

One of the best parts of NCPA is if you go to https://YOURNCPAHOST:5693 and click the API it will show you what options are available and can help you construct the commands you need. Once you get one setup if you click the Run as a nagios check box another button on the bottom left shows up, if you click that View in alternative format button and click Active or Passive it will show you what command you should use.

See here as well:

https://www.nagios.org/ncpa/help.php

This should do it:

https://exchange.nagios.org/directory/P ... s1/details

Or this one:

https://exchange.nagios.org/directory/P ... in/details

Let us know if you have any questions.
jstormshak
Posts: 27
Joined: Mon May 04, 2020 11:41 am

Re: Monitor Folder/Files Counts for NCPA Windows Clients

Post by jstormshak »

Thanks for the reply and feedback. I ended up pulling the "check_windows_files" and put it through some testing. This will meet my needs nicely. Thanks again!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Monitor Folder/Files Counts for NCPA Windows Clients

Post by scottwilkerson »

jstormshak wrote:Thanks for the reply and feedback. I ended up pulling the "check_windows_files" and put it through some testing. This will meet my needs nicely. Thanks again!
Great!

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked