Page 2 of 2

Re: Monitor mapped network drives

Posted: Wed Feb 24, 2016 2:28 pm
by lmiltchev
Yes, thanks WillemDH I'll give that a try.
We will keep the thread open.

Re: Monitor mapped network drives

Posted: Thu Mar 31, 2016 9:57 am
by jkinning
Sorry for the delay. I had thought I already replied but noticed I had not.

Changing the NSClient++ to run as the service account worked out but now I am faced with a similar dilemma. I have a few other servers that users want drive mappings monitored and on these each drive mapping would have a different service account. Since the NSClient++ can only run as one account I am looking at the PowerShell route. If I create a PowerShell script to run every 5 or 10 minutes via the Windows Scheduler or something like that how does Nagios get the results? Do I create an output file and read those results or what is the best method to check the PowerShell script results to have Nagios notify when one is missing?

Re: Monitor mapped network drives

Posted: Thu Mar 31, 2016 10:45 am
by lmiltchev
If your PS script works as expected (shows all of the mapped network drives), you could probably set up a passive check in NSClient++, and run it this way.
Once the results are sent to Nagios XI, you can go to Unconfigured Objects, and run the wizard to configure the check.

Re: Monitor mapped network drives

Posted: Thu Mar 31, 2016 11:09 am
by WillemDH
Easiest way would be to just give the user NSClient is running with permissions on all the shares you want to monitor. Other options are to indeed make several scheduled tasks, each with a different user and use send_nsca.exe https://exchange.nagios.org/directory/A ... nt/details to send the data over NSCA to Nagios or psnrdp https://github.com/jsmroshamboot/psnrdp to send to Nagios over NRDP.

Re: Monitor mapped network drives

Posted: Thu Mar 31, 2016 1:11 pm
by rkennedy
Thanks Willem!

@jkinning - let us know if you run into issues with either of these solutions.