Which script can help me monitor the Map Network Drive ?

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
wangyu
Posts: 41
Joined: Tue Aug 25, 2015 2:41 am

Which script can help me monitor the Map Network Drive ?

Post by wangyu »

Sometimes the Map Network Drive was cut off from the server ?
Which script can help me monitor the Map Network Drive ?
The version of nagios server is 3.5.0
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Which script can help me monitor the Map Network Drive ?

Post by tmcdonald »

I'm not entirely sure what you are asking. Do you just want to see if a network-attached drive is available? If so you should be able to use check_disk or check_disk_smb depending on how it is set up.

http://nagios-plugins.org/doc/man/check_disk.html
http://nagios-plugins.org/doc/man/check_disk_smb.html
Former Nagios employee
wangyu
Posts: 41
Joined: Tue Aug 25, 2015 2:41 am

Re: Which script can help me monitor the Map Network Drive ?

Post by wangyu »

The picture 64 show the Map Network Drive.
The picture 65 show the config of Map Network Drive in services.cfg.
The picture 66 show the status of the Y Drive .
So what's the problem with my configuration in services.cfg ?
How can I solve this problem to monitor the Y Drive ?
Attachments
66.png
65.png
65.png (6.43 KiB) Viewed 4291 times
64.png
64.png (9.64 KiB) Viewed 4291 times
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Which script can help me monitor the Map Network Drive ?

Post by tmcdonald »

Are your C:\ and E:\ services set up the same, except using different letters?
Former Nagios employee
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Which script can help me monitor the Map Network Drive ?

Post by tgriep »

Everything I found says that you can not check mapped network drives using the NSClient software. It is a limitation of the NSClient software.
The suggestions that tmcdonald said in the earlier post would be a few ways to do this.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Which script can help me monitor the Map Network Drive ?

Post by Box293 »

To provide some additional insight, this network drive will be shared from a specific server. You should monitor the free space of the drive from the server that hosts this share.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
wangyu
Posts: 41
Joined: Tue Aug 25, 2015 2:41 am

Re: Which script can help me monitor the Map Network Drive ?

Post by wangyu »

The real I want to monitor is the network driver whether mount on other servers .
Could any method solve this problem ?
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Which script can help me monitor the Map Network Drive ?

Post by Box293 »

wangyu wrote:network driver whether mount on other servers
Can you be a bit more specific? Elaborate more about it, give us a detailed example.

A network drive is only mapped when a user logs onto a server. Unless you have your server always logged on, the drive will not be mapped after a server reboot or when a user logs out.

NSClient++ runs as the local service, you could configure the service to run as a specific user, that may work.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
wangyu
Posts: 41
Joined: Tue Aug 25, 2015 2:41 am

Re: Which script can help me monitor the Map Network Drive ?

Post by wangyu »

Box293, you said right

##########################################################################################################
A network drive is only mapped when a user logs onto a server. Unless you have your server always logged on, the drive will not be mapped after a server reboot or when a user logs out.

NSClient++ runs as the local service, you could configure the service to run as a specific user, that may work.
##########################################################################################################

I agree with you.

The AP server I monitor is product environment.
The user I log on is devadmin .
You said configure the service to run as a specific user, that may work.
Then I choose the log on as "devadmin" ,please see the picture 16.

After I do this operation,the status of Y drive is continue Unknown,please see the picture 17.
Attachments
17.png
16.png
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Which script can help me monitor the Map Network Drive ?

Post by Box293 »

I've never tried what you said and I based on your tests I think you need to ask this question in the NSClient++ forums:
https://forums.nsclient.org/
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked