Software Development Kit (SDK) and API Discussions

How to query fan information for monitoring? (NETAPP 8.1.2)

bernhards
4,210 Views

I want to make a perl or pyhton programm for nagios that can query the fan information from the netapp. I tried a normal SNMP walk and was able to get the information with the number .1.3.6.1.4.1.789.1.21.1.2.1.62

So I downloaded the SDK but there is no sample to get the fan info. My other idea is to write a bash script with a simple snmpwalk but I have read that you should prefer the SDK way because of the performance.

3 REPLIES 3

asulliva
4,184 Views

For clustered Data ONTAP (8.3.1) you'll need to invoke the "environment-sensors-get-iter" API and specify a sensor type of "fan".  Here is an example using PowerShell:

 

$fans = Invoke-NcSystemApi '<environment-sensors-get-iter><sensor-type>fan</sensor-type></environment-sensors-get-iter>'
$fans.results.'attributes-list'.'environment-sensors-info' | ?{ $_.'threshold-sensor-state' -ne "normal" }

I can't find an API for 7-mode, so you may have to use SNMP.  There is a large number of Nagios examples on their site, which is a mixed bag of SNMP and API based checks and may be a good template to get started with.

 

Hope that helps!

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

bernhards
4,180 Views

Hi Andrew,

 

thanks for your hint. I already tried 3 netapp plugins but unfortunataly they didn't work. I looked the nagios exchange and found this plugin.

It does work very well even if it should be for nagios 3. 🙂

 

Thanks for your help,

Bernhard

asulliva
4,176 Views

If it works, use it!  There's no real harm in using SNMP unless you're doing many, many queries simultaneously, which will result in a spike in CPU utilization.

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
Public