NetApp NAS

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

NetApp NAS

Post by jkinning »

I was contacted to have Nagios check once a day, 7am, to see if there are any files in a folder. The folder should be empty and notifications need to be dispatched if it is not. There is no NSclient++ or any agent installed. It is a NetApp NAS for our Bloomberg application. The directories are nas1p\bloomberg\dead and nas1p\bloomberg\queue.

I am not that familiar with NetApp nor SNMP monitoring but anyone have any thoughts on how I would go about doing this and what syntax I would need to use for XI?
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: NetApp NAS

Post by WillemDH »

You could use a Windows gateway where NSClient runs. Create a user with permissions on the NetApp folder. Configure the nscp service to run with this user and create the command which monitors the folder for files. I can't immediately come up with the command, but I know I've done it somewhere.
Nagios XI 5.8.1
https://outsideit.net
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Re: NetApp NAS

Post by jkinning »

WillemDH wrote:You could use a Windows gateway where NSClient runs. Create a user with permissions on the NetApp folder. Configure the nscp service to run with this user and create the command which monitors the folder for files. I can't immediately come up with the command, but I know I've done it somewhere.
Is it possible to have multiple NSClient agents running on one host? I have the NSClient running a Windows host associated with this process but it is running under the System account. Just to make sure I am following you, you suggesting having the NAS mounted on the Windows server and using that user ID to have Nagios monitor the directories that should be empty?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: NetApp NAS

Post by rkennedy »

jkinning wrote:
WillemDH wrote:You could use a Windows gateway where NSClient runs. Create a user with permissions on the NetApp folder. Configure the nscp service to run with this user and create the command which monitors the folder for files. I can't immediately come up with the command, but I know I've done it somewhere.
Is it possible to have multiple NSClient agents running on one host? I have the NSClient running a Windows host associated with this process but it is running under the System account. Just to make sure I am following you, you suggesting having the NAS mounted on the Windows server and using that user ID to have Nagios monitor the directories that should be empty?
I believe that is what Willem what is talking about. I don't believe you can run two NSClients together, but it may work with some modifications.

Another option is deploying a NFS mount from the netapp (if this is a possibility in your environment?) and have the local XI machine check the mount.

OR, there are also quite a few SNMP plugins on the exchange if you'd like to go that route. Take a look over at https://exchange.nagios.org/index.php?o ... ord=netapp
Former Nagios Employee
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: NetApp NAS

Post by WillemDH »

you suggesting having the NAS mounted on the Windows server and using that user ID to have Nagios monitor the directories that should be empty?
I'm not suggesting to mount the NAS share on the server, as that would not work. You should have a direct or a DFS path to the SVM on your NetApp? For example \\svm01\share. Give the user you make the nsclient service run as permissions on this share and make nsclient monitor files on \\svm01\share
Nagios XI 5.8.1
https://outsideit.net
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Re: NetApp NAS

Post by jkinning »

Will changing the NSClient to run as the user who has access to these shares change the current server checks, RAM, CPU, Disk Space, etc?
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Re: NetApp NAS

Post by jkinning »

I just received some additional information pertaining to the monitoring this Business Unit is requesting.

They have MoveIt, which is an internal application that moves files delivered by Bloomberg to our external SFTP servers back internally to this NetApp NAS. MoveIt is moving the files using a service account to nas1p\bloomberg\queue. A job then processes the files in this directory and if anything fails it goes to nas1p\bloomberg\dead. Today, they are manually monitoring these two directories once a day around 9 or 10 o'clock EST.

So, I am needing to figure out how to monitor these directories once a day and send out notifications if any files are in them around 9 or 10. I'll check at 9:30am EST to make it easier but not sure how Nagios would do that since it constantly checks. Would I need to wait until 9:30 to start the check and then set the check interval for 1440 minutes? Whenever I add a new host or service check and Nagios restarts would that mess up the "internal clock" in which Nagios uses as a timer for the check intervals? In this case would it be easier to give a Nagios service account access to the NetApp NAS and provide permissions to these directories and then could check_ssh be used? I have no clue on syntax or would a PowerShell command setup to run from a Windows server once a day during the specified time interval be best? It all sounds easy enough if you know how to do this, I do not, at least not yet. Today, they are manually checking these directories once a day and we would like to leverage the power of Nagios to remove this manual checking. If directories are not empty notifications need to be sent out to the Contact Groups.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: NetApp NAS

Post by WillemDH »

I looked up the config for you how to check for non empty directories:

Make a command check_nrpe_clean:

Code: Select all

$USER1$/check_nrpe $ARG1$
THen set this as ARG1:

Code: Select all

-H <name of the Windows Server where nsclient runs with a user that has access to the shared folder> -t 60 -c check_files -a path='\\svm\share' pattern=*.* 'critical=count>0' 'empty-state=ok'
This way you link the service to any host you want.

Theoretically it might also work if you give the computer object of the Windows host checking the DFS path permissions on the share, but I never tried that, so I'm not 100 % sure it works that way.

About only needing to check at certain hours, I guess you'll need to configure a timeperiod for this check then, but maybe Nagios support knows a better way.
Nagios XI 5.8.1
https://outsideit.net
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: NetApp NAS

Post by tmcdonald »

If you have ever needed to run something on an exact time once a day, I always recommend running it on a cron and submitting it as a passive result. This doesn't precisely scale well, but it works better than trying to get a time period just right.
Former Nagios employee
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Re: NetApp NAS

Post by jkinning »

So, is this the results I should expect?

Code: Select all

check_nrpe -H cinzl01p -t 60 -c check_files -a path='\\cinnas1p\bloomberg\queue' pattern=*.* 'critical=count>0' 'empty-state=ok'
No drives found|'count'=0;0;0
check_nrpe -H cinzl01p -t 60 -c check_files -a path='\\cinnas1p\bloomberg\dead' pattern=*.* 'critical=count>0' 'empty-state=ok'
No drives found|'count'=0;0;0
Locked