Page 1 of 3

How to Monitor locally attached storage disks

Posted: Mon Oct 26, 2015 9:56 am
by jyoti22
In My current environment, I have few exchange physical servers with local attached storage disks. I need to monitor these disks which are configured as mount volumes. Can anyone please suggest how can I monitor these mount volumes

Re: How to Monitor locally attached storage disks

Posted: Mon Oct 26, 2015 11:03 am
by jdalrymple
Hi jyoti22,

Are these disks mounted at an NTFS path or are they mounted with drive letters? If drive letters the easy way to monitor all of your local disks is with a command such as the following:

Code: Select all

$USER1$/check_nrpe -H $HOSTADDRESS$ -c check_drivesize -a "filter=type = 'fixed' and drive regexp '.*[C-Z].*'"

Re: How to Monitor locally attached storage disks

Posted: Wed Oct 28, 2015 7:36 pm
by jyoti22
Hi,
I am using check_nt and not check_nrpe. With Check_nt I have tried given command but its not working.
Kindly provide the solution for check_nt

COMMAND: /usr/local/nagios/libexec/check_nt -H xx.xx.xx.xx -c "check_drivesize" -p 12489 -a "filter=type = \'fixed\' and drive regexp \'.\*\[C-Z\].\*\'"
OUTPUT: Usage:
check_nt -H host -v variable [-p port] [-w warning] [-c critical]
[-l params] [-d SHOWALL] [-u] [-t timeout]

Re: How to Monitor locally attached storage disks

Posted: Wed Oct 28, 2015 8:44 pm
by Box293
check_nt has limitations and cannot perform these more complicated checks.

These commands will enable nrpe checks in NSClient++

Code: Select all

Open a command prompt
cd "\Program Files\NSClient++\"
nscp settings --activate-module NRPEServer --add-defaults
nscp settings --path /settings/NRPE/server --key "allow arguments" --set true
nscp settings --path /settings/NRPE/server --key "allow nasty characters" --set true

IF this is NSClient++ 0.4.3 onwards
nscp settings --path /settings/NRPE/server --key insecure --set true

Re: How to Monitor locally attached storage disks

Posted: Thu Oct 29, 2015 4:27 pm
by jyoti22
On few servers, Disks are mounted as an NTFS path. How we can monitor it?

Re: How to Monitor locally attached storage disks

Posted: Thu Oct 29, 2015 4:55 pm
by lmiltchev
You can do this via a powershell script and NSClient++. Check out the link below - it may do the job for you. I haven't tested it though, so I don't guarantee it will work.

https://deangrant.wordpress.com/2013/09 ... in-nagios/

Re: How to Monitor locally attached storage disks

Posted: Thu Oct 29, 2015 5:54 pm
by jyoti22
Thanks. I'll try to test monitoring be referring provided URL

Re: How to Monitor locally attached storage disks

Posted: Thu Oct 29, 2015 7:10 pm
by Box293
NSClient++ natively supports disk mounts, no need for extra scripts:

Code: Select all

Command:
check_nrpe -H win2008r2-01 -c CheckDriveSize -a ShowAll MaxWarn=5G MaxCrit=10G Drive='C:\Mounted Disks\A Mounted Disk'

Output:
OK C:\Mounted Disks\A Mounted Disk: Total: 17.997GB - Used: 90.285MB (1%) - Free: 17.909GB (99%)|'C:\Mounted Disks\A Mounted Disk used'=0.08816GB;5;10;0;17.99706 'C:\Mounted Disks\A Mounted Disk used %'=0%;27;55;0;100

Re: How to Monitor locally attached storage disks

Posted: Mon Nov 30, 2015 2:54 pm
by bsivavani
Hi,

We have ran below command to make connection from Nagios management server to NSClient++ deployed in windows exchange server using command prompt from exchange server .

nscp settings --path /settings/NRPE/server --key insecure --set true

Attached nsclient.ini file for reference.

Below is output from management server
[root@irv-monprd001 libexec]# ./check_nrpe -H 10.105.10.176
connect to address 10.105.10.176 port 5666: Connection refused
connect to host 10.105.10.176 port 5666: Connection refused[root@irv-monprd001 libexec]#
[root@irv-monprd001 libexec]#

Windows server version - Windows Server 2008 R2 Enterprise.

Please let us know how can I make connection from Management server.

Re: How to Monitor locally attached storage disks

Posted: Mon Nov 30, 2015 2:59 pm
by hsmith
What is the IP of your Nagios server?