Page 1 of 1
NCPA to monitor files on client server
Posted: Fri Jan 30, 2026 8:49 pm
by Cneazu
Hi,
I am new to the Core version of Nagios, as I am used to having XI. I encountered an issue when migrating from a 4.4.2 installation using NRPE to a 4.5.11 installation using NCPA. On the old server, I have checks to monitor whether a file exists on a client server and whether it grows. The path also depends on date and hour, so let's say for today at 3 AM, the path will be C:\31012026\0300, and inside will be, let's say, a .waw file. Has anyone come across this? I've been trying for two weeks now with no luck. I cannot add anything but the default NCPA on the client due to hardware restrictions. Any suggestion is welcome.
Re: NCPA to monitor files on client server
Posted: Mon Feb 02, 2026 10:14 am
by cdietsch
Hi
@Cneazu,
It sounds like are going to need to write or find a custom plugin to do this. Out of curiosity, how were you accomplishing this with NRPE?
You should be able to run your custom plugins by placing them into the ncpa/plugins directory on the NCPA client server. I would do some testing on the command line from your Nagios server to make sure the arguments you are passing are returning the results you expect, for example:
/usr/local/nagios/libexec/check_ncpa.py -H 1.2.3.4 -t '<your-token>' -M 'plugins/check_process.sh' -q 'args=ncpa'
You can also test your plugin from the NCPA web interface in the API browser under the plugins API Endpoint.
https://your-ncpa-client:5693
Good luck!
Re: NCPA to monitor files on client server
Posted: Mon Feb 02, 2026 11:17 am
by Cneazu
This is the script that works with NRPE on 4.4.2:
check_nrpe! -H <IP> -c check_files -a path='<FIX PATH>'`date +%Y%m%d`'\\'`date --d '-65 min' +%H`'00' pattern=*.* 'filter= written < -1m' 'crit= count < '`date --d '-2 min' +%M`'' 'empty-state=critical' 'empty-syntax=${status}: No files found' 'top-syntax=${status}: ${count} files found in <FIX PATH>\\'"`date +%Y%m%d`"'\\'"`date +%H`00"
Re: NCPA to monitor files on client server
Posted: Mon Feb 02, 2026 2:25 pm
by kg2857
The simplest solution is to copy the original plugin used that was working to the windows servers and set up ncpa to use it.
Re: NCPA to monitor files on client server
Posted: Thu Feb 05, 2026 7:03 pm
by Cneazu
How do I do this? Sorry for my ignorance.
Re: NCPA to monitor files on client server
Posted: Fri Feb 06, 2026 10:47 am
by cdietsch
Hi
@Cneazu,
I don't think check_files is a standard NRPE plugin, but is part of NSClient++. It looks like you will probably have to write a custom plugin that accomplishes the same task.
I will send a few links to help you get started writing a custom plugin.
https://www.youtube.com/watch?v=ymVfY3wgZvc
https://library.nagios.com/training/gui ... m-plugins/
https://www.nagios.com/article/plugins- ... that-easy/
Re: NCPA to monitor files on client server
Posted: Fri Feb 06, 2026 3:07 pm
by kg2857
It looks like check_files is part of nsclient as suggested, but should still work with ncpa. Ncpa just needs to be set up to use it.