Having Trouble With Window Check Disk and Memory
Having Trouble With Window Check Disk and Memory
Hi all,
I have a Cent OS 6.9 Nagios server. All my Linux clients are setup correctly and working,
the Windows boxes not so much. I can get the CPU and ping to work but these two give these messages on all drives/all systems:
CPU Usage Ok 20h 28m 39s 1/5 2017-08-22 10:04:21 CPU Load 0% (5 min average)
Ping Ok 77d 20h 24m 59s 1/5 2017-08-22 10:05:45 OK - 172.16.0.125: rta 1.102ms, lost 0%
Drive C: Disk Usage Unknown 20h 27m 30s 5/5 2017-08-22 10:08:06 Free disk space : Invalid drive
Memory Usage Warning 20h 30m 8s 5/5 2017-08-22 10:17:55 No data was received from host!
So on 100% of the Windows systems I am monitoring. The Nagios Host is Cent OS 6.
Drive Usage:
Disk Space is always “Free disk space : Invalid drive”
And the command that is running: check_xi_service_nsclient!Nagi0sXI!USEDDISKSPACE!-l c -w 80 -c 95
From the command line I get this with check_nt:
[root@eng-nagiosxi etc]# /usr/local/nagios/libexec/check_nrpe -H eng-sharepoint.verdasys.com -p 12489 -c alias_disk
OK All 6 drive(s) are ok|'A:\ used'=0B;0;0;0;0 'C:\ used'=66.12741GB;119.60702;134.5579;0;149.50878 'C:\ used %'=44%;79;89;0;100 'D:\ used'=0B;0;0;0;0 'E:\ used'=0.10876GB;79.99765;89.99736;0;99.99706 'E:\ used %'=0%;79;89;0;100 'F:\ used'=0.10828GB;79.99765;89.99736;0;99.99706 'F:\ used %'=0%;79;89;0;100 '\\?\Volume{6b09fd3c-0000-0000-0000-100000000000}\ used'=346.15625MB;399.99687;449.99648;0;499.99609 '\\?\Volume{6b09fd3c-0000-0000-0000-100000000000}\ used %'=69%;79;89;0;100
[root@eng-nagiosxi etc]# /usr/local/nagios/libexec/check_nt -H eng-sharepoint.verdasys.com -p 12489 -v USEDDISKSPACE -l i -w 90 -c 95
No data was received from host!
could not fetch information from server
Memory Usage:
Always get “No data was received from host!”
Any help is greatly appreciated,
Robert
I have a Cent OS 6.9 Nagios server. All my Linux clients are setup correctly and working,
the Windows boxes not so much. I can get the CPU and ping to work but these two give these messages on all drives/all systems:
CPU Usage Ok 20h 28m 39s 1/5 2017-08-22 10:04:21 CPU Load 0% (5 min average)
Ping Ok 77d 20h 24m 59s 1/5 2017-08-22 10:05:45 OK - 172.16.0.125: rta 1.102ms, lost 0%
Drive C: Disk Usage Unknown 20h 27m 30s 5/5 2017-08-22 10:08:06 Free disk space : Invalid drive
Memory Usage Warning 20h 30m 8s 5/5 2017-08-22 10:17:55 No data was received from host!
So on 100% of the Windows systems I am monitoring. The Nagios Host is Cent OS 6.
Drive Usage:
Disk Space is always “Free disk space : Invalid drive”
And the command that is running: check_xi_service_nsclient!Nagi0sXI!USEDDISKSPACE!-l c -w 80 -c 95
From the command line I get this with check_nt:
[root@eng-nagiosxi etc]# /usr/local/nagios/libexec/check_nrpe -H eng-sharepoint.verdasys.com -p 12489 -c alias_disk
OK All 6 drive(s) are ok|'A:\ used'=0B;0;0;0;0 'C:\ used'=66.12741GB;119.60702;134.5579;0;149.50878 'C:\ used %'=44%;79;89;0;100 'D:\ used'=0B;0;0;0;0 'E:\ used'=0.10876GB;79.99765;89.99736;0;99.99706 'E:\ used %'=0%;79;89;0;100 'F:\ used'=0.10828GB;79.99765;89.99736;0;99.99706 'F:\ used %'=0%;79;89;0;100 '\\?\Volume{6b09fd3c-0000-0000-0000-100000000000}\ used'=346.15625MB;399.99687;449.99648;0;499.99609 '\\?\Volume{6b09fd3c-0000-0000-0000-100000000000}\ used %'=69%;79;89;0;100
[root@eng-nagiosxi etc]# /usr/local/nagios/libexec/check_nt -H eng-sharepoint.verdasys.com -p 12489 -v USEDDISKSPACE -l i -w 90 -c 95
No data was received from host!
could not fetch information from server
Memory Usage:
Always get “No data was received from host!”
Any help is greatly appreciated,
Robert
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Having Trouble With Window Check Disk and Memory
The command that your XI server is using for these services is the check_nt, but it looks like check_nrpe is what's configured on your windows server.
Could you post the NSClient++ configuration file from one of your hosts?
Could you post the NSClient++ configuration file from one of your hosts?
Re: Having Trouble With Window Check Disk and Memory
I am not sure what the NSCClient++ configuration file you are referring to but here is my nsclient.ini
Code: Select all
; Undocumented section
[/settings/default]
; Undocumented key
password = Nagi0sXI
; Undocumented key
allowed hosts = 127.0.0.1,::1,172.16.0.90,eng-nagiosxi.verdasys.com
; 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
; TIMEOUT - Timeout when reading packets on incoming sockets. If the data has not arrived within this time we will bail out.
timeout = 30
; Undocumented section
[/settings/NRPE/server]
; Undocumented key
;ssl options = no-sslv2,no-sslv3
; Undocumented key
;verify mode = peer-cert
verify mode = none
; Undocumented key
insecure = true
; ENABLE SSL ENCRYPTION - This option controls if SSL should be enabled.
use ssl = 1
; PORT NUMBER - Port to use for NRPE.
port = 12489
; COMMAND ALLOW NASTY META CHARS - This option determines whether or not the we will allow clients to specify nasty (as in |`&><'"\[]{}) characters in arguments.
allow nasty characters = 0
; COMMAND ARGUMENT PROCESSING - This option determines whether or not the we will allow clients to specify arguments to commands that are executed.
allow arguments = 1
; 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 = 1
; Undocumented section
[/modules]
; Undocumented key
CheckExternalScripts = 1
; Undocumented key
CheckHelpers = 1
; Undocumented key
CheckEventLog = 1
; Undocumented key
CheckNSCP = 1
; Undocumented key
CheckDisk = 1
; Undocumented key
CheckSystem = 1
; Undocumented key
NRPEServer = 1
; Configure which services has to be in which state
[/settings/system/windows/service mapping]
; 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]
; Add counters to check
[/settings/system/windows/counters]
; Section for system checks and system settings
[/settings/system/windows]
; DEFAULT LENGTH - Used to define the default interval for range buffer checks (ie. CPU).
default buffer length = 1h
; Section for configuring the log handling.
[/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
; Configure log file properties.
[/settings/log/file]
; MAXIMUM FILE SIZE - When file size reaches this it will be truncated to 50% if set to 0 (default) truncation will be disabled
max size = 0
; A set of options to configure the real time checks
[/settings/eventlog/real-time]
; REAL TIME CHECKING - Spawns a background thread which detects issues and reports them back instantly.
enabled = 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
; 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
; Section for configuring the shared session.
[/settings/shared session]
; ENABLE THE SAHRED SESSION - This is currently not added in 0.4.x
enabled = false
; Section for configuring the crash handler.
[/settings/crash]
; RESTART SERVICE NAME - The url to submit crash reports to
restart target = NSCP
; CRASH ARCHIVE LOCATION - The folder to archive crash dumps in
archive folder = ${shared-path}/crash-dumps
; SUBMIT CRASHREPORTS - Submit crash reports to nsclient.org (or your configured submission server)
submit = false
; RESTART - Submit crash reports to nsclient.org (or your configured submission server)
restart = true
; SUBMISSION URL - The url to submit crash reports to
submit url = https://crash.nsclient.org/post
; ARCHIVE CRASHREPORTS - Archive crash reports in the archive folder
archive = true
; Section for external scripts configuration options (CheckExternalScripts).
[/settings/external scripts]
; 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
; COMMAND ALLOW NASTY META CHARS - This option determines whether or not the we will allow clients to specify nasty (as in |`&><'"\[]{}) characters in arguments.
allow nasty characters = 0
; COMMAND ARGUMENT PROCESSING - This option determines whether or not the we will allow clients to specify arguments to commands that are executed.
allow arguments = 0
; Files to be included in the configuration
[/includes]
; Section for the EventLog Checker (CheckEventLog.dll).
[/settings/eventlog]
; 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
; LOOKUP NAMES - Lookup the names of eventlog files
lookup names = 1
; 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
; A list of scripts available to run from the CheckExternalScripts module. Syntax is: <command>=<script> <arguments>
[/settings/external scripts/scripts]
; A list of aliases available.
;An alias is an internal command that has been predefined to provide a single command without arguments. Be careful so you don't create loops (ie check_loop=check_a, check_a=check_loop)
[/settings/external scripts/alias]
; alias_sched_all - Alias for alias_sched_all. To configure this item add a section called: /settings/external scripts/alias/alias_sched_all
alias_sched_all = check_tasksched show-all "syntax=${title}: ${exit_code}" "crit=exit_code ne 0"
; alias_file_size - Alias for alias_file_size. To configure this item add a section called: /settings/external scripts/alias/alias_file_size
alias_file_size = check_files "path=$ARG1$" "crit=size > $ARG2$" "top-syntax=${list}" "detail-syntax=${filename] ${size}" max-dir-depth=10
; alias_process_hung - Alias for alias_process_hung. To configure this item add a section called: /settings/external scripts/alias/alias_process_hung
alias_process_hung = check_process "filter=is_hung" "crit=count>0"
; alias_process - Alias for alias_process. To configure this item add a section called: /settings/external scripts/alias/alias_process
alias_process = check_process "process=$ARG1$" "crit=state != 'started'"
; alias_service_ex - Alias for alias_service_ex. To configure this item add a section called: /settings/external scripts/alias/alias_service_ex
alias_service_ex = check_service "exclude=Net Driver HPZ12" "exclude=Pml Driver HPZ12" exclude=stisvc
; alias_event_log - Alias for alias_event_log. To configure this item add a section called: /settings/external scripts/alias/alias_event_log
alias_event_log = check_eventlog
; alias_volumes_loose - Alias for alias_volumes_loose. To configure this item add a section called: /settings/external scripts/alias/alias_volumes_loose
alias_volumes_loose = check_drivesize
; alias_volumes - Alias for alias_volumes. To configure this item add a section called: /settings/external scripts/alias/alias_volumes
alias_volumes = check_drivesize
; alias_disk - Alias for alias_disk. To configure this item add a section called: /settings/external scripts/alias/alias_disk
alias_disk = check_drivesize
; alias_up - Alias for alias_up. To configure this item add a section called: /settings/external scripts/alias/alias_up
alias_up = check_uptime
; alias_file_age - Alias for alias_file_age. To configure this item add a section called: /settings/external scripts/alias/alias_file_age
alias_file_age = check_files "path=$ARG1$" "crit=written > $ARG2$" "top-syntax=${list}" "detail-syntax=${filename] ${written}" max-dir-depth=10
; alias_cpu_ex - Alias for alias_cpu_ex. To configure this item add a section called: /settings/external scripts/alias/alias_cpu_ex
alias_cpu_ex = check_cpu "warn=load > $ARG1$" "crit=load > $ARG2$" time=5m time=1m time=30s
; alias_process_stopped - Alias for alias_process_stopped. To configure this item add a section called: /settings/external scripts/alias/alias_process_stopped
alias_process_stopped = check_process "process=$ARG1$" "crit=state != 'stopped'"
; alias_service - Alias for alias_service. To configure this item add a section called: /settings/external scripts/alias/alias_service
alias_service = check_service
; alias_cpu - Alias for alias_cpu. To configure this item add a section called: /settings/external scripts/alias/alias_cpu
alias_cpu = check_cpu
; alias_mem - Alias for alias_mem. To configure this item add a section called: /settings/external scripts/alias/alias_mem
alias_mem = check_memory
; alias_process_count - Alias for alias_process_count. To configure this item add a section called: /settings/external scripts/alias/alias_process_count
alias_process_count = check_process "process=$ARG1$" "warn=count > $ARG2$" "crit=count > $ARG3$"
; alias_sched_task - Alias for alias_sched_task. To configure this item add a section called: /settings/external scripts/alias/alias_sched_task
alias_sched_task = check_tasksched show-all "filter=title eq '$ARG1$'" "detail-syntax=${title} (${exit_code})" "crit=exit_code ne 0"
; alias_disk_loose - Alias for alias_disk_loose. To configure this item add a section called: /settings/external scripts/alias/alias_disk_loose
alias_disk_loose = check_drivesize
; alias_sched_long - Alias for alias_sched_long. To configure this item add a section called: /settings/external scripts/alias/alias_sched_long
alias_sched_long = check_tasksched "filter=status = 'running'" "detail-syntax=${title} (${most_recent_run_time})" "crit=most_recent_run_time < -$ARG1$"
; 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]
; A list of templates for wrapped scripts.
;%SCRIPT% will be replaced by the actual script an %ARGS% will be replaced by any given arguments.
[/settings/external scripts/wrappings]
; BATCH FILE WRAPPING -
bat = scripts\\%SCRIPT% %ARGS%
; VISUAL BASIC WRAPPING -
vbs = cscript.exe //T:30 //NoLogo scripts\\lib\\wrapper.vbs %SCRIPT% %ARGS%
; POWERSHELL WRAPPING -
ps1 = cmd /c echo scripts\\%SCRIPT% %ARGS%; exit($lastexitcode) | powershell.exe -command -
; A set of filters to use in real-time mode
[/settings/eventlog/real-time/filters]
[/paths]
; 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 = C:\Program Files\NSClient++
; Path for certificate-path -
certificate-path = ${shared-path}/security
; Path for base-path -
base-path = C:\Program Files\NSClient++
; Path for module-path -
module-path = ${shared-path}/modulesRe: Having Trouble With Window Check Disk and Memory
Also, I have also tried with this:
; Undocumented key
ssl options = no-sslv2,no-sslv3
IE uncommenting the ssl options, exact same result.
; Undocumented key
ssl options = no-sslv2,no-sslv3
IE uncommenting the ssl options, exact same result.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Having Trouble With Window Check Disk and Memory
you changed the port to use for NRPE to 12489 which conflicts with check_nt
The default should be 5666
This should make the check_nt commands work.
The default should be 5666
This should make the check_nt commands work.
Re: Having Trouble With Window Check Disk and Memory
Hi Scott,
Like I said, the CPU usage works, so I do not believe it is a port thing. But since I am far from an expert I went and tried it anyways and got this:
Which is why I changed it in the .ini to begin with.
I then went in and changed the command to:
After adding the -p 5666 and leaving as 5666 in the ini I am back to the exact same error on any drive I get:
Robert
Like I said, the CPU usage works, so I do not believe it is a port thing. But since I am far from an expert I went and tried it anyways and got this:
Code: Select all
connect to address 172.16.0.125 and port 12489: Connection refused
could not fetch information from serverI then went in and changed the command to:
Code: Select all
check_xi_service_nsclient!Nagi0sXI!USEDDISKSPACE!-l c -w 80 -c 95 -p 5666After adding the -p 5666 and leaving as 5666 in the ini I am back to the exact same error on any drive I get:
Code: Select all
Free disk space : Invalid driveRobert
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Having Trouble With Window Check Disk and Memory
you are mixing these commands.
Did you restart the nsclient service after making the change?
If so is port 12489 blocked by a firewall?
Finally, you shouldn't change the command and add -p 5666, the point was to make sure we are NOT mixing the check_nrpe and check_nt commands
Did you restart the nsclient service after making the change?
If so is port 12489 blocked by a firewall?
Finally, you shouldn't change the command and add -p 5666, the point was to make sure we are NOT mixing the check_nrpe and check_nt commands
Re: Having Trouble With Window Check Disk and Memory
Yes I restarted the service on the client. No neither port 12489 nor 5666 are being blocked. If either was being blocked then I could not get CPU information which is coming through. I am getting information back it is just claiming invalid drive. I was using check_nt on the command line and the system defaulted to use check_nrpe when I set up using the default monitor a Windows OS machine that was the command that xi placed.
Roberte
Roberte
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Having Trouble With Window Check Disk and Memory
I've never seen nsclient setup this way, but I'll run with it
your machine with this command
is returning
What if you change the command to this using a capital C
your machine with this command
Code: Select all
check_xi_service_nsclient!Nagi0sXI!USEDDISKSPACE!-l c -w 80 -c 95 -p 5666Code: Select all
Free disk space : Invalid driveCode: Select all
check_xi_service_nsclient!Nagi0sXI!USEDDISKSPACE!-l C -w 80 -c 95 -p 5666Re: Having Trouble With Window Check Disk and Memory
I already tried that. The Capital C gives the exact same results.