To perform file count monitoring, I have copied check_files on client machine under path C:\Program Files\NSClient++\scripts
and updated nsclient.ini file as
Code: Select all
[/settings/NRPE/server]
NRPEServer = 1
allow arguments = 1
allow nasty meta chars = 1
port = 5666
use SSL = 1
[/settings/external scripts/wrappings]
; Undocumented key
CheckExternalScripts = 1
check_files = cscript.exe //T:30 //NoLogo scripts\\lib\\wrapper check_files.vbs %SCRIPT% %ARGS%
Code: Select all
define service {
host_name DMSAZTWDAS01
service_description Number of files on folder FTP
check_command check_nrpe!check_files!/path:"F:\\FTP_Data" /searchdepth:1 /selage:ignore /warning:20 /critical:25
servicegroups SPS_WIN_SERVICE_MON
initial_state u
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
notification_period 24x7
notification_options w,c,r,
register 1
}
Code: Select all
Nagios Core 4.3.2
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2017-05-09
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Error: Service check command 'check_nrpe!check_files!/path:"F:\\FTP_Data" /searchdepth:1 /selage:ignore /warning:20 /critical:25' specified in service 'Number of files on folder FTP' for host 'DMSAZTWDAS01' not defined anywhere!
Checked 93 services.
Checked 23 hosts.
Checked 4 host groups.
Checked 2 service groups.
Checked 1 contacts.
Checked 1 contact groups.
Checked 25 commands.
Checked 5 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 23 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 5 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 1
***> One or more problems was encountered while running the pre-flight check...
Check your configuration file(s) to ensure that they contain valid
directives and data definitions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
[root@DMSAZPLMON01 system]# service nagios start
Starting nagios (via systemctl): Job for nagios.service failed because the control process exited with error code. See "systemctl status nagios.service" and "journalctl -xe" for details.
[FAILED]
[root@DMSAZPLMON01 system]#
Can you please help e how can I configure filecount monitoring. Thanks a lot.