How to Monitor locally attached storage disks

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: How to Monitor locally attached storage disks

Post by rkennedy »

Check your services and look for NSClient++ to see if it's running or not.

Additionally, is a firewall running on the Windows server?
Former Nagios Employee
bsivavani
Posts: 339
Joined: Tue Oct 06, 2015 9:17 am

Re: How to Monitor locally attached storage disks

Post by bsivavani »

NSClient++ service is running.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: How to Monitor locally attached storage disks

Post by lmiltchev »

Is a firewall running on the Windows server? Run the following commands on the Nagios XI server from the command line and show the output:

Code: Select all

ip addr
nmap <client ip> -p 5666
Be sure to check out our Knowledgebase for helpful articles and solutions!
bsivavani
Posts: 339
Joined: Tue Oct 06, 2015 9:17 am

Re: How to Monitor locally attached storage disks

Post by bsivavani »

[root@irv-monprd001 libexec]# nmap 10.105.0.176 -p 5666
nmap: error while loading shared libraries: libsvn_client-1.so.0: cannot open shared object file: No such file or directory
[root@irv-monprd001 libexec]#


I have checked with network team and found there is no firewall between Nagios and client.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: How to Monitor locally attached storage disks

Post by rkennedy »

Is there one running on the exchange machine?

Can you run the following on your windows machine and post the output -

Code: Select all

netstat -na | find ":5666"
Former Nagios Employee
bsivavani
Posts: 339
Joined: Tue Oct 06, 2015 9:17 am

Re: How to Monitor locally attached storage disks

Post by bsivavani »

C:\Program Files\NSClient++>netstat -na | find ":5666"
TCP 10.105.0.176:443 10.105.0.221:56665 ESTABLISHED
TCP 10.105.0.176:56565 10.11.3.146:56668 ESTABLISHED
TCP 10.105.0.176:56817 10.11.3.146:56669 ESTABLISHED
TCP 10.105.0.176:56817 10.52.142.49:56664 ESTABLISHED
C:\Program Files\NSClient++>
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: How to Monitor locally attached storage disks

Post by rkennedy »

It does not look like your NSClient is running. Can you navigate to your services and start the NSClient++ service?
Former Nagios Employee
bsivavani
Posts: 339
Joined: Tue Oct 06, 2015 9:17 am

Re: How to Monitor locally attached storage disks

Post by bsivavani »

NSClient service is running. It is listening on port 12489


C:\Program Files\NSClient++>netstat -na | find ":12489"
TCP 0.0.0.0:12489 0.0.0.0:0 LISTENING
TCP 0.0.0.0:12489 0.0.0.0:0 LISTENING
TCP 10.105.0.176:12489 10.105.9.180:45568 TIME_WAIT
TCP 10.105.0.176:12489 10.105.9.180:45699 TIME_WAIT
TCP 10.105.0.176:12489 10.105.9.180:45704 TIME_WAIT
TCP 10.105.0.176:12489 10.105.9.180:45708 TIME_WAIT
TCP 10.105.0.176:12489 10.105.9.180:45727 TIME_WAIT
TCP 10.105.0.176:12489 10.105.9.180:45736 TIME_WAIT
TCP 10.105.0.176:12489 10.105.9.180:45810 TIME_WAIT
TCP 10.105.0.176:12489 10.105.9.180:45838 TIME_WAIT
TCP 10.105.0.176:12489 10.105.9.180:45931 TIME_WAIT
TCP [::]:12489 [::]:0 LISTENING

C:\Program Files\NSClient++>

I would like to know why it is not listening on 5666 and what are the steps I have to take for make it is listening.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: How to Monitor locally attached storage disks

Post by hsmith »

Can you try this nsclient.ini instead of yours?

Code: Select all

# If you want to fill this file with all avalible 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


; Undocumented section
[/settings/default]

; ALLOWED HOSTS - A comaseparated list of allowed hosts. You can use netmasks (/ syntax) or * to create ranges.
allowed hosts = 10.105.90.180


; Undocumented section
[/modules]

; CheckSystem - Various system related checks, such as CPU load, process state, service state memory usage and PDH counters.
CheckSystem = 1

; NSClientServer - A server that listens for incoming check_nt connection and processes incoming requests.
NSClientServer = 1

; CheckExternalScripts - Execute external scripts
CheckExternalScripts = 1

; CheckHelpers - Various helper function to extend other checks.
CheckHelpers = 1

; CheckEventLog - Check for errors and warnings in the event log.
CheckEventLog = 1

NRPEServer = 1


; CheckNSCP - Use this module to check the healt and status of NSClient++ it self
CheckNSCP = 1

; CheckDisk - CheckDisk can check various file and disk related things.
CheckDisk = 1


; A list of templates for wrapped scripts.
[/settings/external scripts/wrappings]

; WRAPPING - An external script wrapping
vbs = cscript.exe //T:30 //NoLogo scripts\\lib\\wrapper.vbs %SCRIPT% %ARGS%

; WRAPPING - An external script wrapping
bat = scripts\\%SCRIPT% %ARGS%

; WRAPPING - An external script wrapping
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)

; WRAPPING - An external script wrapping
ps1 = cmd /c echo scripts\\%SCRIPT% %ARGS%; exit($lastexitcode) | powershell.exe -command -


[/settings/external scripts/alias]

; ALIAS - Query alias
alias_volumes = check_drivesize

; ALIAS - Query alias
alias_up = check_uptime

; ALIAS - Query alias
alias_sched_all = check_tasksched show-all "syntax=${title}: ${exit_code}" "crit=exit_code ne 0"

; ALIAS - Query alias
alias_process_hung = check_process "filter=is_hung" "crit=count>0"

; ALIAS - Query alias
alias_process = check_process "process=$ARG1$" "crit=state != 'started'"

; ALIAS - Query alias
alias_file_size = check_files "path=$ARG1$" "crit=size > $ARG2$" "top-syntax=${list}" "detail-syntax=${filename] ${size}" max-dir-depth=10

; ALIAS - Query alias
alias_event_log = check_eventlog

; ALIAS - Query alias
alias_service_ex = check_service "exclude=Net Driver HPZ12" "exclude=Pml Driver HPZ12" exclude=stisvc

; ALIAS - Query alias
alias_cpu_ex = check_cpu "warn=load > $ARG1$" "crit=load > $ARG2$" time=5m time=1m time=30s

; ALIAS - Query alias
alias_file_age = check_files "path=$ARG1$" "crit=written > $ARG2$" "top-syntax=${list}" "detail-syntax=${filename] ${written}" max-dir-depth=10

; ALIAS - Query alias
alias_process_stopped = check_process "process=$ARG1$" "crit=state != 'stopped'"

; ALIAS - Query alias
alias_service = check_service

; default - Alias for default. To configure this item add a section called: /settings/external scripts/alias/default
default = 

; ALIAS - Query alias
alias_cpu = check_cpu

; ALIAS - Query alias
alias_mem = check_memory

; ALIAS - Query alias
alias_volumes_loose = check_drivesize

; ALIAS - Query alias
alias_disk = check_drivesize

; ALIAS - Query alias
alias_process_count = check_process "process=$ARG1$" "warn=count > $ARG2$" "crit=count > $ARG3$"

; ALIAS - Query alias
alias_disk_loose = check_drivesize

; ALIAS - Query alias
alias_sched_task = check_tasksched show-all "filter=title eq '$ARG1$'" "detail-syntax=${title} (${exit_code})" "crit=exit_code ne 0"

; ALIAS - Query alias
alias_sched_long = check_tasksched "filter=status = 'running'" "detail-syntax=${title} (${most_recent_run_time})" "crit=most_recent_run_time < -$ARG1$"


; Undocumented section
[/settings/NRPE/server]

; VERIFY MODE - Comma separated list of verification flags to set on the SSL socket.  default-workarounds	Various workarounds for what I understand to be broken ssl implementations no-sslv2	Do not use the SSLv2 protocol. no-sslv3	Do not use the SSLv3 protocol. no-tlsv1	Do not use the TLSv1 protocol. single-dh-use	Always create a new key when using temporary/ephemeral DH parameters. This option must be used to prevent small subgroup attacks, when the DH parameters were not generated using "strong" primes (e.g. when using DSA-parameters).   
ssl options = 
allow arguments = true
; VERIFY MODE - Comma separated list of verification flags to set on the SSL socket.  none	The server will not send a client certificate request to the client, so the client will not send a certificate. peer	The server sends a client certificate request to the client and the certificate returned (if any) is checked. fail-if-no-cert	if the client did not return a certificate, the TLS/SSL handshake is immediately terminated. This flag must be used together with peer. peer-cert	Alias for peer and fail-if-no-cert. workarounds	Various bug workarounds. single	Always create a new key when using tmp_dh parameters. client-once	Only request a client certificate on the initial TLS/SSL handshake. This flag must be used together with verify-peer   
verify mode = none
; ALLOW INSECURE CHIPHERS and ENCRYPTION - Only enable this if you are using legacy check_nrpe client.
insecure = true
allow nasty characters=true


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

; default - Alias for default. To configure this item add a section called: /settings/external scripts/scripts/default
default = 


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

; default - Filter for default. To configure this item add a section called: /settings/eventlog/real-time/filters/default
default = 
Reload the NSClient service after changing your file:

Code: Select all

net stop nscp
net start nscp
Former Nagios Employee.
me.
bsivavani
Posts: 339
Joined: Tue Oct 06, 2015 9:17 am

Re: How to Monitor locally attached storage disks

Post by bsivavani »

I am able to connect client server with port 5666 from Nagios. Thanks for your help.

I am going to monitor mount volume and will reach you if I face any issues.
Locked