Monitoring remote drives

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
chrisyates1
Posts: 4
Joined: Thu May 28, 2015 4:18 pm

Monitoring remote drives

Post by chrisyates1 »

Hi,

I'm new to the forum and nagios.

I have entered a job where nagios is in place, we are currently monitoring local drives with check_nt although I am looking at updating all checks to nrpe.

My question is, is it possible to monitor a mapped drive on a Windows server? I have the necessary ports open and have edited the ini file for the nsclient++, however I've had no luck in getting it to work using check_nrpe!check_disk! Command.

Please can you shed some light on what is best practice in order to do this.

Thanks in advanced.
Chris
Kind Regards,

Chris Yates
Infrastructure Engineer
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Monitoring remote drives

Post by lmiltchev »

What version of NSClient++ are you currently using? I am using "0.4.3.143" and have an "alias_disk" alias defined in the "nsclient.ini":

Code: Select all

alias_disk = check_drivesize
From the Nagios XI server, I run:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H x.x.x.x -c alias_disk
OK All 5 drive(s) are ok|'C:\ used'=353.64769GB;362.36562;407.66132;0;452.95702 'C:\ used %'=78%;79;89;0;100 'D:\ used'=83.01934GB;186.30312;209.59101;0;232.8789 'D:\ used %'=35%;79;89;0;100 'E:\ used'=0B;0;0;0;0 'F:\ used'=0B;0;0;0;0 '\\?\Volume{4d36d4c6-efab-11e0-a8e7-806e6f6e6963}\ used'=7.38542GB;10.20937;11.48554;0;12.76171 '\\?\Volume{4d36d4c6-efab-11e0-a8e7-806e6f6e6963}\ used %'=57%;79;89;0;100
Is this the functionality that you are looking for?
Be sure to check out our Knowledgebase for helpful articles and solutions!
chrisyates1
Posts: 4
Joined: Thu May 28, 2015 4:18 pm

Re: Monitoring remote drives

Post by chrisyates1 »

lmiltchev wrote:What version of NSClient++ are you currently using? I am using "0.4.3.143" and have an "alias_disk" alias defined in the "nsclient.ini":

Code: Select all

alias_disk = check_drivesize
From the Nagios XI server, I run:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H x.x.x.x -c alias_disk
OK All 5 drive(s) are ok|'C:\ used'=353.64769GB;362.36562;407.66132;0;452.95702 'C:\ used %'=78%;79;89;0;100 'D:\ used'=83.01934GB;186.30312;209.59101;0;232.8789 'D:\ used %'=35%;79;89;0;100 'E:\ used'=0B;0;0;0;0 'F:\ used'=0B;0;0;0;0 '\\?\Volume{4d36d4c6-efab-11e0-a8e7-806e6f6e6963}\ used'=7.38542GB;10.20937;11.48554;0;12.76171 '\\?\Volume{4d36d4c6-efab-11e0-a8e7-806e6f6e6963}\ used %'=57%;79;89;0;100
Is this the functionality that you are looking for?
I can't remember off the top of my head what version it is but I g have a feeling we are still on version 3 - also don't know if it makes a difference but nagios is themed with something called adagios.
Kind Regards,

Chris Yates
Infrastructure Engineer
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Monitoring remote drives

Post by tmcdonald »

chrisyates1 wrote:I can't remember off the top of my head what version it is but I g have a feeling we are still on version 3 - also don't know if it makes a difference but nagios is themed with something called adagios.
So this is not a Nagios XI question? Please do not post in the Nagios XI section if you have Nagios Core questions, as we will be potentially providing incorrect troubleshooting steps. I will move this thread to the appropriate section of the forum.

To find your Core version, please run the following from the command line:

Code: Select all

/usr/local/nagios/bin/nagios --version
And just to note, Adagios is not one of our products, and is not something we can provide support for. The underlying Core engine is probably not altered, but we cannot assist with the frontend.
Former Nagios employee
chrisyates1
Posts: 4
Joined: Thu May 28, 2015 4:18 pm

Re: Monitoring remote drives

Post by chrisyates1 »

tmcdonald wrote:
chrisyates1 wrote:I can't remember off the top of my head what version it is but I g have a feeling we are still on version 3 - also don't know if it makes a difference but nagios is themed with something called adagios.
So this is not a Nagios XI question? Please do not post in the Nagios XI section if you have Nagios Core questions, as we will be potentially providing incorrect troubleshooting steps. I will move this thread to the appropriate section of the forum.

To find your Core version, please run the following from the command line:

Code: Select all

/usr/local/nagios/bin/nagios --version
And just to note, Adagios is not one of our products, and is not something we can provide support for. The underlying Core engine is probably not altered, but we cannot assist with the frontend.
Sorry I'm new to the forum and nagios so was unaware that it would cause issues. As far as I have been told the adagios is just a front end gui theme so would not alter the back end.
Kind Regards,

Chris Yates
Infrastructure Engineer
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Monitoring remote drives

Post by Box293 »

chrisyates1 wrote:is it possible to monitor a mapped drive on a Windows server?
When talking about mapped drives, they are mapped by the user who is logged on. The NSClient++ service is running under the local system account, so it does not get login scripts/mapped drives when it logs on.

What is your goal in wanting to monitor a mapped drive?
Why don't you monitor the drive in the server that is sharing the drive?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
chrisyates1
Posts: 4
Joined: Thu May 28, 2015 4:18 pm

Re: Monitoring remote drives

Post by chrisyates1 »

Box293 wrote:
chrisyates1 wrote:is it possible to monitor a mapped drive on a Windows server?
When talking about mapped drives, they are mapped by the user who is logged on. The NSClient++ service is running under the local system account, so it does not get login scripts/mapped drives when it logs on.

What is your goal in wanting to monitor a mapped drive?
Why don't you monitor the drive in the server that is sharing the drive?
I'll give an example of to see if that clears things up.

We have severs that synologys or qnap mapped to them for backup purposes - at this current moment we are not able to monitor the remaining or uses space of the drive and are frequently finding that they become full. If we had a way that nagios could monitor the space on the qnap it would therefore prevent this from occurring.


Chris
Kind Regards,

Chris Yates
Infrastructure Engineer
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Monitoring remote drives

Post by jdalrymple »

Do you have to monitor remotely? This would be better:

Code: Select all

[jdalrymple@localhost ~]$ grep cifs /etc/fstab
\\<mycifsserver>\<mycifsshare> /mnt/CIFSDRIVE cifs user,uid=500,rw,suid,username=<mycifsusername>,password=<mycifspassword> 0 0
[jdalrymple@localhost ~]$ /usr/local/nagios/libexec/check_disk -w 10% -c 5% -p /mnt/CIFSDRIVE
DISK OK - free space: /mnt/CIFSDRIVE 6768823 MB (90% inode=-);| /mnt/CIFSDRIVE=734952MB;6753398;7128587;0;7503776
bsivavani
Posts: 339
Joined: Tue Oct 06, 2015 9:17 am

Re: Monitoring remote drives

Post by bsivavani »

Hello All,

Just to add I have a urgent requirement to monitor Exchange Database (TESTDB) disk space and it is under Disk3 partition. Can you let me know what are configuration files that I need to modify.

Please suggest possible solution.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Monitoring remote drives

Post by hsmith »

I see you opened a new post. I am going to close this one.
Former Nagios Employee.
me.
Locked