Page 1 of 3

Check number of files on a directory

Posted: Thu May 11, 2017 8:03 am
by cocoyanouck
Hello,

One year ago, I asked your helped in order to monitor a directory and send me a notification if there is too many files.
(https://support.nagios.com/forum/viewto ... =7&t=37972)

Today, I need to implement the same thing in a nagios 4 server on our site in China. But I have another problem :
https://img4.hostingpics.net/pics/31971 ... 160956.png

On commands.cfg :
# 'check_nrpe' command definition
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$
}


On windows .cfg under others services :
define service{
use generic-service
host_name wamp03.snfchina.com
notification_interval 20 ; Resend notifications every 20 minutes
service_description Number of files on faxin
check_command check_nrpe!check_files!path='D:\\import\\faxin' pattern=*.* 'warning=count>100' 'critical=count>150' top-syntax='${status}:${problem_count}/$(count} files' 'empty-state=ok'
}

# Configuration file /usr/local/nagios/etc/objects/windows.cfg
# Edited by PyNag on Mon Feb 20 09:08:47 2017

define service{
use generic-service
host_name wamp03.snfchina.com
notification_interval 20 ; Resend notifications every 20 minutes
service_description Number of files on faxout
check_command check_nrpe!check_files!path='D:\\import\\faxout' pattern=*.* 'warning=count>100' 'critical=count>150' top-syntax='${status}:${problem_count}/$(count} files' 'empty-state=ok'
}

# Configuration file /usr/local/nagios/etc/objects/windows.cfg
# Edited by PyNag on Mon Feb 20 09:11:47 2017

define service{
use generic-service
host_name wamp03.snfchina.com
notification_interval 20 ; Resend notifications every 20 minutes
service_description Number of files on cmds
check_command check_nrpe!check_files!path='D:\\import\\cmds' pattern=*.* 'warning=count>100' 'critical=count>150' 'empty-state=ok' top-syntax='${status}:${problem_count}/$(count} files'
}


Kind regards,

Re: Check number of files on a directory

Posted: Thu May 11, 2017 11:51 am
by tgriep
It looks line the check_nrpe command is corrupted and to find out, can you run the following commands as root and post the output?

Code: Select all

ls -l /usr/local/nagios/libexec/check_nrpe
/usr/local/nagios/libexec/check_nrpe -V
Run this as well but change the xxx.xxx.xxx.xxx to the IP address if the Windows System.

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H xxx.xxx.xxx.xxx -c check_files -a path='D:\\import\\faxin' pattern=*.* 'warning=count>100' 'critical=count>150' 

Re: Check number of files on a directory

Posted: Fri May 12, 2017 1:47 am
by cocoyanouck

Code: Select all

-rwxrwxr-x 1 nagios nagios 110220 mai   11 15:48 /usr/local/nagios/libexec/check_nrpe

Code: Select all

NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad (nagios@nagios.org)
Version: 3.1.0-rc1
Last Modified: 2017-04-06
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: OpenSSL 0.9.6 or higher required

Code: Select all

root@nagios-debian:/home/nagios# /usr/local/nagios/libexec/check_nrpe -H 10.20.2.12 -c check_files -a path='D:\\import\\faxin' pattern=*.* 'warning=count>100' 'critical=count>150'
Erreur de segmentation

Re: Check number of files on a directory

Posted: Fri May 12, 2017 9:21 am
by tgriep
It looks like the plugins permissions are correct and it can run without any command line options without segfaulting.
It could be that the NSClient++ service on the Windows system is returning something that is causing the plugin to crash so if you can post the nsclient.ini and the nsclient.log file here, we can check the settings and also any errors.

Re: Check number of files on a directory

Posted: Mon May 15, 2017 4:04 am
by cocoyanouck
For sure,

Code: Select all

# If you want to fill this file with all available options run the following command:
#   nscp settings --generate --add-defaults --load-all
# If you want to activate a module and bring in all its options use:
#   nscp settings --activate-module <MODULE NAME> --add-defaults
# For details run: nscp settings --help


; TODO
[/settings/default]

; Undocumented key
password = XXXXX

; Undocumented key
allowed hosts = nagios-debian

; TIMEOUT - Timeout when reading packets on incoming sockets. If the data has not arrived within this time we will bail out.
timeout = 30

; CACHE ALLOWED HOSTS - If host names (DNS entries) should be cached, improves speed and security somewhat but won't allow you to have dynamic IPs for your Nagios server.
cache allowed hosts = 1


; TODO
[/settings/NRPE/server]

; Undocumented key
insecure = true

; Undocumented key
verify mode = none
allow arguments = true
allow nasty characters = 1
allowed host = nagios-debian

; EXTENDED RESPONSE - Send more then 1 return packet to allow response to go beyond payload size (requires modified client if legacy is true this defaults to false).
extended response = 0

; ENABLE SSL ENCRYPTION - This option controls if SSL should be enabled.
use ssl = 1

; PORT NUMBER - Port to use for NRPE.
port = 5666


; TODO
[/modules]

; Undocumented key
CheckExternalScripts = 1

; Undocumented key
CheckHelpers = 1

; Undocumented key
CheckNSCP = 1

; Undocumented key
CheckEventLog = 1

; Undocumented key
CheckDisk = 1

; Undocumented key
CheckSystem = 1

; Undocumented key
NSClientServer = 1

; Undocumented key
NRPEServer = 1
CheckTaskSched = 1

[/settings/external scripts]
allow nasty characters = 1
allow arguments = 1

; COMMAND TIMEOUT - The maximum time in seconds that a command can execute. (if more then this execution will be aborted). NOTICE this only affects external commands not internal ones.
timeout = 60


; A set of filters to use in real-time mode
[/settings/system/windows/real-time/checks]


; A set of options to configure the real time checks
[/settings/system/windows/real-time]


; TODO
[/settings/system/windows/counters]


; A list of wrapped scripts (ie. scruts using a template mechanism). The template used will be defined by the extension of the script.
[/settings/external scripts/wrapped scripts]


; TODO
[/settings/system/windows/counters/default]


; TODO
[/settings/log]

; LOG LEVEL - Log level to use. Available levels are error,warning,info,debug,trace
level = info

; DATEMASK - The size of the buffer to use when getting messages this affects the speed and maximum size of messages you can recieve.
date format = %Y-%m-%d %H:%M:%S

; FILENAME - The file to write log data to. Set this to none to disable log to file.
file name = ${exe-path}/nsclient.log


; TODO
[/settings/NSClient/server]

; ENABLE SSL ENCRYPTION - This option controls if SSL should be enabled.
use ssl = 0

; PERFORMANCE DATA - Send performance data back to Nagios (set this to 0 to remove all performance data).
performance data = 1

; PORT NUMBER - Port to use for check_nt.
port = 12489


; TODO
[/settings/external scripts/scripts/default]

; IGNORE PERF DATA - Do not parse performance data from the output
ignore perfdata = 0


; TODO
[/settings/system/windows]

; DEFAULT LENGTH - Used to define the default interval for range buffer checks (ie. CPU).
default buffer length = 1h


; Files to be included in the configuration
[/includes]


; TODO
[/settings/external scripts/alias/default]


; TODO
[/settings/crash]

; SUBMISSION URL - The url to submit crash reports to
submit url = https://crash.nsclient.org/post

; CRASH ARCHIVE LOCATION - The folder to archive crash dumps in
archive folder = ${crash-folder}

; RESTART - Submit crash reports to nsclient.org (or your configured submission server)
restart = true

; ARCHIVE CRASHREPORTS - Archive crash reports in the archive folder
archive = true

; RESTART SERVICE NAME - The url to submit crash reports to
restart target = NSCP


; TODO
[/settings/external scripts/alias]


; TODO
[/settings/eventlog]

; LOOKUP NAMES - Lookup the names of eventlog files
lookup names = 1

; BUFFER_SIZE - The size of the buffer to use when getting messages this affects the speed and maximum size of messages you can recieve.
buffer size = 131072

; DEBUG - Log more information when filtering (useful to detect issues with filters) not useful in production as it is a bit of a resource hog.
debug = 0


; TODO
[/settings/shared session]


; A list of scripts available to run from the CheckExternalScripts module. Syntax is: <command>=<script> <arguments>
[/settings/external scripts/scripts]


; TODO
[/paths]

; Path for module-path - 
module-path = ${shared-path}/modules

; Path for certificate-path - 
certificate-path = ${shared-path}/security

; Path for shared-path - 
shared-path = C:\Program Files\NSClient++

; Path for exe-path - 
exe-path = C:\Program Files\NSClient++

; Path for crash-folder - 
crash-folder = ${shared-path}/crash-dumps

; Path for base-path - 
base-path = C:\Program Files\NSClient++


; TODO
[/settings/eventlog/real-time/filters/default]

; MAGIMUM AGE - How long before reporting "ok". If this is set to "false" no periodic ok messages will be reported only errors.
maximum age = 5m

; EMPTY MESSAGE - The message to display if nothing matches the filter (generally considered the ok state).
empty message = eventlog found no records


; A set of filters to use in real-time mode
[/settings/eventlog/real-time/filters]


; Configure which services has to be in which state
[/settings/system/windows/service mapping]


; TODO
[/settings/log/file]


; TODO
[/settings/eventlog/real-time]

; REAL TIME CHECKING - Spawns a background thread which detects issues and reports them back instantly.
enabled = 0

; DEBUG - Log missed records (useful to detect issues with filters) not useful in production as it is a bit of a resource hog.
debug = 0

; STARTUP AGE - The initial age to scan when starting NSClient++
startup age = 30m

; LOGS TO CHECK - Comma separated list of logs to check
log = application,system


; TODO
[/settings/external scripts/wrappings]

; VISUAL BASIC WRAPPING - 
vbs = cscript.exe //T:30 //NoLogo scripts\\lib\\wrapper.vbs %SCRIPT% %ARGS%

; POWERSHELL WRAPPING - 
ps1 = cmd /c echo If (-Not (Test-Path "scripts\%SCRIPT%") ) { Write-Host "UNKNOWN: Script `"%SCRIPT%`" not found."; exit(3) }; scripts\%SCRIPT% $ARGS$; exit($lastexitcode) | powershell.exe /noprofile -command -

; BATCH FILE WRAPPING - 
bat = scripts\\%SCRIPT% %ARGS%
nsclient.log (only last days) :

Code: Select all

2017-05-10 21:24:37: error:c:\source\master\modules\NRPEServer\NRPEServer.cpp:127: Failed to parse host nagios-debian: resolve: No such host is known
2017-05-10 21:24:40: error:c:\source\master\modules\NSClientServer\NSClientServer.cpp:86: Failed to parse host nagios-debian: resolve: No such host is known
2017-05-10 22:23:09: error:c:\source\master\modules\NRPEServer\NRPEServer.cpp:127: Failed to parse host nagios-debian: resolve: No such host is known
2017-05-10 22:23:12: error:c:\source\master\modules\NSClientServer\NSClientServer.cpp:86: Failed to parse host nagios-debian: resolve: No such host is known
2017-05-12 00:01:08: error:c:\source\master\modules\CheckSystem\pdh_thread.cpp:247: Failed to query performance counters: disk_queue_length__Total Failed to poll counter \\WAMP03\PhysicalDisk(_Total)\% Disk Time: 800007d8: A counter with a negative value was detected.

2017-05-13 00:01:08: error:c:\source\master\modules\CheckSystem\pdh_thread.cpp:247: Failed to query performance counters: disk_queue_length__Total Failed to poll counter \\WAMP03\PhysicalDisk(_Total)\% Disk Time: 800007d8: A counter with a negative value was detected.

2017-05-14 00:01:07: error:c:\source\master\modules\CheckSystem\pdh_thread.cpp:247: Failed to query performance counters: disk_queue_length__Total Failed to poll counter \\WAMP03\PhysicalDisk(_Total)\% Disk Time: 800007d8: A counter with a negative value was detected.

2017-05-15 00:01:08: error:c:\source\master\modules\CheckSystem\pdh_thread.cpp:247: Failed to query performance counters: disk_queue_length__Total Failed to poll counter \\WAMP03\PhysicalDisk(_Total)\% Disk Time: 800007d8: A counter with a negative value was detected.

Re: Check number of files on a directory

Posted: Mon May 15, 2017 10:38 am
by tgriep
In this folder on the Windows host D:\import\faxin what do the names of the files look like?
If they have any special characters in them, that could cause the NSClient++ service send bad information when the check_nrpe command is run causing the segfault.

Lets raise the log level for the NSClient log file.
Edit the nsclient.ini file and under this section

Code: Select all

[/settings/log]
Change this option from

Code: Select all

level = info
to

Code: Select all

level = debug
Save the file and restart the NSClient++ service.

Then run the following commands on the Nagios server but change the xxx.xxx.xxx.xxx to the IP address if the Windows System. Post the output.

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H xxx.xxx.xxx.xxx
/usr/local/nagios/libexec/check_nrpe -H xxx.xxx.xxx.xxx -c check_files -a path='D:\\import\\faxin' pattern=*.* 'warning=count>100' 'critical=count>150' top-syntax='${status}:${problem_count}/$(count} files' 'empty-state=ok'
Then attach the nsclient.log file here so we can view it for any errors.

Re: Check number of files on a directory

Posted: Tue May 16, 2017 2:21 am
by cocoyanouck
The files looks like : RR08A00C.tif and RR08A00A.tif.dat

Thanks for your help and the time that you spend on this issue... :oops:

Re: Check number of files on a directory

Posted: Tue May 16, 2017 11:49 am
by tgriep
I am seeing a lot of these errors on the log file.
Failed to parse host nagios-debian: resolve: No such host is known
Failed to query performance counters:
But no details on why the check_files command is failing.
My suggestion id to remove the NSClient Agent and delete the folders and reinstall.
If that fails, remove the client again and install the latest stable 4.x.x version.
There could be bugs in the newer version so lets rule that out.

Re: Check number of files on a directory

Posted: Wed May 17, 2017 8:38 am
by cocoyanouck
Ok today I've installed NSclient++ 0.4.4 but same issue.
Then I have upgraded the Nsclient on 0.5.0.64 (instead of 0.5.0.43). Same issue too.

You can find the content of nsclient.log after I have launched the command /usr/local/nagios/libexec/check_nrpe -H xxx.xxx.xxx.xxx on my nagios server.

Code: Select all

2017-05-17 21:25:56: error:c:\source\master\modules\NRPEServer\NRPEServer.cpp:123: CA not found: C:\Program Files\NSClient++/security/ca.pem (generating a default CA)
2017-05-17 21:25:58: error:c:\source\master\modules\NRPEServer\NRPEServer.cpp:127: Failed to parse host nagios-debian: resolve: No such host is known
2017-05-17 21:26:00: error:c:\source\master\modules\NSClientServer\NSClientServer.cpp:86: Failed to parse host nagios-debian: resolve: No such host is known
2017-05-17 21:27:23: error:c:\source\master\modules\NRPEServer\NRPEServer.cpp:127: Failed to parse host nagios-debian: resolve: No such host is known
2017-05-17 21:27:26: error:c:\source\master\modules\NSClientServer\NSClientServer.cpp:86: Failed to parse host nagios-debian: resolve: No such host is known
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:328: On crash: restart: NSCP
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:340: Archiving crash dumps in: C:\Program Files\NSClient++/crash-dumps
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:405: booting::loading plugins
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:173: Found: CheckDisk
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:173: Found: CheckEventLog
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:173: Found: CheckExternalScripts
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:173: Found: CheckHelpers
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:173: Found: CheckNSCP
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:173: Found: CheckSystem
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:173: Found: CheckTaskSched
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:173: Found: NRPEServer
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:173: Found: NSClientServer
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:777: C:\Program Files\NSClient++/modules\CheckDisk.dll.dll
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:779: adding C:\Program Files\NSClient++/modules\CheckDisk.dll
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:777: C:\Program Files\NSClient++/modules\CheckEventLog.dll.dll
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:779: adding C:\Program Files\NSClient++/modules\CheckEventLog.dll
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:777: C:\Program Files\NSClient++/modules\CheckExternalScripts.dll.dll
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:779: adding C:\Program Files\NSClient++/modules\CheckExternalScripts.dll
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:777: C:\Program Files\NSClient++/modules\CheckHelpers.dll.dll
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:779: adding C:\Program Files\NSClient++/modules\CheckHelpers.dll
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:777: C:\Program Files\NSClient++/modules\CheckNSCP.dll.dll
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:779: adding C:\Program Files\NSClient++/modules\CheckNSCP.dll
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:777: C:\Program Files\NSClient++/modules\CheckSystem.dll.dll
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:779: adding C:\Program Files\NSClient++/modules\CheckSystem.dll
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:777: C:\Program Files\NSClient++/modules\CheckTaskSched.dll.dll
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:779: adding C:\Program Files\NSClient++/modules\CheckTaskSched.dll
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:777: C:\Program Files\NSClient++/modules\NRPEServer.dll.dll
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:779: adding C:\Program Files\NSClient++/modules\NRPEServer.dll
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:777: C:\Program Files\NSClient++/modules\NSClientServer.dll.dll
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:779: adding C:\Program Files\NSClient++/modules\NSClientServer.dll
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:738: Loading plugin: CheckDisk
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:738: Loading plugin: CheckEventLog
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:738: Loading plugin: CheckExternalScripts
2017-05-17 21:29:23: debug:c:\source\master\modules\CheckExternalScripts\CheckExternalScripts.cpp:130: No aliases found (adding default)
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:738: Loading plugin: CheckHelpers
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:738: Loading plugin: CheckNSCP
2017-05-17 21:29:23: debug:c:\source\master\modules\CheckNSCP\CheckNSCP.cpp:55: Crash folder is: C:\Program Files\NSClient++/crash-dumps
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:738: Loading plugin: CheckSystem
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:738: Loading plugin: CheckTaskSched
2017-05-17 21:29:23: debug:c:\source\master\service\NSClient++.cpp:738: Loading plugin: NRPEServer
2017-05-17 21:29:24: debug:c:\source\master\modules\CheckSystem\pdh_thread.cpp:166: Loading counter: disk_queue_length_0 C: = \\WAMP03\PhysicalDisk(0 C:)\% Disk Time
2017-05-17 21:29:24: debug:c:\source\master\modules\CheckSystem\pdh_thread.cpp:166: Loading counter: disk_queue_length_1 D: = \\WAMP03\PhysicalDisk(1 D:)\% Disk Time
2017-05-17 21:29:24: debug:c:\source\master\modules\CheckSystem\pdh_thread.cpp:166: Loading counter: disk_queue_length__Total = \\WAMP03\PhysicalDisk(_Total)\% Disk Time
2017-05-17 21:29:26: error:c:\source\master\modules\NRPEServer\NRPEServer.cpp:127: Failed to parse host nagios-debian: resolve: No such host is known
2017-05-17 21:29:26: debug:c:\source\master\modules\NRPEServer\NRPEServer.cpp:128: Allowed hosts definition: 
2017-05-17 21:29:26: debug:c:\source\master\modules\NRPEServer\NRPEServer.cpp:129: Server config: address: :5666, ssl enabled: none, no certificate, dh: C:\Program Files\NSClient++/security/nrpe_dh_512.pem, ciphers: ADH, ca: C:\Program Files\NSClient++/security/ca.pem, options: 
2017-05-17 21:29:26: debug:c:\source\master\include\socket/server.hpp:92: Binding to: [::]:5666(ipv6)
2017-05-17 21:29:26: debug:c:\source\master\include\socket/server.hpp:195: Attempting to bind to: [::]:5666(ipv6)
2017-05-17 21:29:26: debug:c:\source\master\include\socket/server.hpp:88: Binding to: 0.0.0.0:5666(ipv4), reopen: true, reuse: true
2017-05-17 21:29:26: debug:c:\source\master\include\socket/server.hpp:195: Attempting to bind to: 0.0.0.0:5666(ipv4)
2017-05-17 21:29:26: debug:c:\source\master\service\NSClient++.cpp:738: Loading plugin: NSClientServer
2017-05-17 21:29:28: error:c:\source\master\modules\NSClientServer\NSClientServer.cpp:86: Failed to parse host nagios-debian: resolve: No such host is known
2017-05-17 21:29:28: debug:c:\source\master\modules\NSClientServer\NSClientServer.cpp:88: Allowed hosts definition: 
2017-05-17 21:29:28: debug:c:\source\master\include\socket/server.hpp:92: Binding to: [::]:12489(ipv6)
2017-05-17 21:29:28: debug:c:\source\master\include\socket/server.hpp:195: Attempting to bind to: [::]:12489(ipv6)
2017-05-17 21:29:28: debug:c:\source\master\include\socket/server.hpp:88: Binding to: 0.0.0.0:12489(ipv4), reopen: true, reuse: true
2017-05-17 21:29:28: debug:c:\source\master\include\socket/server.hpp:195: Attempting to bind to: 0.0.0.0:12489(ipv4)
2017-05-17 21:29:28: debug:c:\source\master\service\NSClient++.cpp:503: NSClient++ - 0.5.0.62 2016-09-14 Started!
2017-05-17 21:29:28: debug:c:\source\master\service\NSClient++.cpp:1385: Starting: DONE
2017-05-17 21:29:58: debug:c:\source\master\include\nrpe/server/protocol.hpp:72: Accepting connection from: 10.20.2.33, count=1
2017-05-17 21:29:58: debug:c:\source\master\include\nrpe/server/protocol.hpp:72: Accepting connection from: 10.20.2.33, count=1
What's the mean of this sentence : Failed to parse host nagios-debian: resolve: No such host is known ?

Re: Check number of files on a directory

Posted: Wed May 17, 2017 9:43 am
by tgriep
That error is telling you that the windows server cannot file the IP address for the nagios-debian setting in the nsclient.ini file.

Code: Select all

allowed hosts = nagios-debian
Instead of using the hostname, replace it with the IP address of the nagios server and restart the NSClient++ service and that should fix that error.

Try running the command but select a different folder and to see if it works or fails the same.

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H 10.20.2.12 -c check_files -a path='C:\\Windows'