NCPA to monitor files on client server

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Post Reply
Cneazu
Posts: 3
Joined: Fri Jan 30, 2026 8:34 pm

NCPA to monitor files on client server

Post 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.
cdietsch
Posts: 55
Joined: Wed Aug 06, 2025 9:12 am

Re: NCPA to monitor files on client server

Post 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!
Cheers,
- Cole
Cneazu
Posts: 3
Joined: Fri Jan 30, 2026 8:34 pm

Re: NCPA to monitor files on client server

Post 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"
kg2857
Posts: 490
Joined: Wed Apr 12, 2023 5:48 pm

Re: NCPA to monitor files on client server

Post 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.
Cneazu
Posts: 3
Joined: Fri Jan 30, 2026 8:34 pm

Re: NCPA to monitor files on client server

Post by Cneazu »

How do I do this? Sorry for my ignorance.
cdietsch
Posts: 55
Joined: Wed Aug 06, 2025 9:12 am

Re: NCPA to monitor files on client server

Post 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/
Cheers,
- Cole
kg2857
Posts: 490
Joined: Wed Apr 12, 2023 5:48 pm

Re: NCPA to monitor files on client server

Post 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.
Post Reply