district09 / check_netapp_ontap

:four_leaf_clover: Check NetApp Ontap :four_leaf_clover:
https://outsideit.net/monitoring-netapp-ontap/
GNU General Public License v3.0
39 stars 28 forks source link

Unable to find API #5

Closed BrianWong1019 closed 8 years ago

BrianWong1019 commented 9 years ago

We have already downloaded the nagios plugin for checking netapp ontap and installed it in our Centreon server,but found that there is "Unable to find API" error.Only result of disk_health is ok.May I know how to solve these kind of problems?

[root@lxapan04 check_netapp_ontap-2.5.10]# ./check_netapp_ontap.pl -H 10.95.6.6 -u root -p P@ssw0rd -o disk_health OK - No problems found (28 checked) [root@lxapan04 check_netapp_ontap-2.5.10]# ./check_netapp_ontap.pl -H 10.95.6.6 -u root -p P@ssw0rd -o volume_health Failed volume query: Unable to find API: volume-get-iter [root@lxapan04 check_netapp_ontap-2.5.10]# ./check_netapp_ontap.pl -H 10.95.6.6 -u root -p P@ssw0rd -o aggregate_health Failed volume query: Unable to find API: aggr-get-iter [root@lxapan04 check_netapp_ontap-2.5.10]# ./check_netapp_ontap.pl -H 10.95.6.6 -u root -p P@ssw0rd -o snapshot_health Failed volume query: Unable to find API: volume-get-iter [root@lxapan04 check_netapp_ontap-2.5.10]# ./check_netapp_ontap.pl -H 10.95.6.6 -u root -p P@ssw0rd -o quota_health Failed volume query: Unable to find API: quota-report-iter [root@lxapan04 check_netapp_ontap-2.5.10]# ./check_netapp_ontap.pl -H 10.95.6.6 -u root -p P@ssw0rd -o snapmirror_health Failed volume query: Unable to find API: snapmirror-get-iter [root@lxapan04 check_netapp_ontap-2.5.10]# ./check_netapp_ontap.pl -H 10.95.6.6 -u root -p P@ssw0rd -o filer_hardware_health Failed filer health query: Unable to find API: system-node-get-iter [root@lxapan04 check_netapp_ontap-2.5.10]# ./check_netapp_ontap.pl -H 10.95.6.6 -u root -p P@ssw0rd -o port_health Failed filer health query: Unable to find API: net-port-get-iter [root@lxapan04 check_netapp_ontap-2.5.10]# ./check_netapp_ontap.pl -H 10.95.6.6 -u root -p P@ssw0rd -o interface_health Failed filer health query: Unable to find API: net-interface-get-iter [root@lxapan04 check_netapp_ontap-2.5.10]# ./check_netapp_ontap.pl -H 10.95.6.6 -u root -p P@ssw0rd -o netapp_alarms Failed filer health query: Unable to find API: dashboard-alarm-get-iter [root@lxapan04 check_netapp_ontap-2.5.10]# ./check_netapp_ontap.pl -H 10.95.6.6 -u root -p P@ssw0rd -o cluster_health Failed filer health query: Unable to find API: cluster-peer-health-info-get-iter

willemdh commented 9 years ago

Seem like the plugin is unable to find the SDK 5.2? Did you put it in the right place?

BrianWong1019 commented 9 years ago

I use the version of SDK is 5.2.2 and should be put in right place .But Official web page is only available for 5.2.2 and 5.3.1.

willemdh commented 9 years ago

Hey, You could try the SDK incuded in the NetApp folder of this GitHub project? I think it is 5.1 or 5.2.

Muellerflo commented 9 years ago

I have the same problem. All files in the Netapp Folder are in the following path "/usr/lib/perl/Netapp"

sandipok commented 9 years ago

You need to set path for PERL5LIB, export PERL5LIB=/usr/lib64/perl5

Muellerflo commented 9 years ago

I have set the env path to /usr/lib/perl5 because i don't have a /usr/lib64 folder:

%ENV: PERL5LIB="/usr/lib/perl5" @INC: /usr/lib/perl5 /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl

sandipok commented 9 years ago

That's perfectly alright, hope it works for you!

Muellerflo commented 9 years ago

No, it doesn't work. Same Problem as described

sandipok commented 9 years ago

Please check if you have added sdk on that path Have you added below files to that pathe ?

[kumbhasa@sknag1 NetApp]$ ls -l total 8976 -rw-rw-r-- 1 kumbhasa kumbhasa 18828 Aug 17 10:38 DfmErrno.pm -rw-rw-r-- 1 kumbhasa kumbhasa 16413 Aug 17 10:38 NaElement.pm -rw-rw-r-- 1 kumbhasa kumbhasa 81816 Aug 17 10:38 NaErrno.pm -rw-rw-r-- 1 kumbhasa kumbhasa 52935 Aug 17 10:38 NaServer.pm -rw-rw-r-- 1 kumbhasa kumbhasa 383513 Aug 17 10:38 OCUMAPI.pm -rw-rw-r-- 1 kumbhasa kumbhasa 2107602 Aug 17 10:38 OCUMClassicAPI.pm -rw-rw-r-- 1 kumbhasa kumbhasa 2216407 Aug 17 10:38 Ontap7ModeAPI.pm -rw-rw-r-- 1 kumbhasa kumbhasa 4208788 Aug 17 10:38 OntapClusterAPI.pm -rw-rw-r-- 1 kumbhasa kumbhasa 3310 Aug 17 10:38 ONTAPILogParser.pm -rw-rw-r-- 1 kumbhasa kumbhasa 5669 Aug 17 10:38 ONTAPITestContainer.pm -rw-rw-r-- 1 kumbhasa kumbhasa 3658 Aug 17 10:38 SdkEnv.pm -rw-rw-r-- 1 kumbhasa kumbhasa 2986 Aug 17 10:38 Test.pm -rw-rw-r-- 1 kumbhasa kumbhasa 69632 Aug 17 10:38 Thumbs.db

Muellerflo commented 9 years ago

What do you mean with "added sdks to that path". I thought, that the files in the Netapp Folder is the sdk

sandipok commented 9 years ago

You can directly copy those file to above mentioned path, that worked for me every time

Muellerflo commented 9 years ago

root@test:/# ls -l /usr/lib/perl5/ total 9396 drwxr-xr-x 3 root root 4096 Aug 3 11:06 Attribute drwxr-xr-x 16 root root 4096 Aug 18 08:41 auto drwxr-xr-x 2 root root 4096 Aug 3 10:42 Bundle drwxr-xr-x 5 root root 4096 Aug 3 10:42 DBD drwxr-xr-x 8 root root 4096 Aug 3 10:42 DBI -rwxr-xr-x 1 root root 310992 Jun 6 2012 DBI.pm -rwxr-xr-x 1 root root 1533 Jul 16 2007 dbixs_rev.pl -rwxr-xr-x 1 root root 18828 May 10 03:39 DfmErrno.pm drwxr-xr-x 2 root root 4096 Aug 3 11:06 HTML drwxr-xr-x 3 root root 4096 Aug 3 11:06 JSON drwxr-xr-x 2 root root 4096 Jul 17 2014 Locale -rwxr-xr-x 1 root root 16413 May 10 03:39 NaElement.pm -rwxr-xr-x 1 root root 81816 May 10 03:39 NaErrno.pm -rwxr-xr-x 1 root root 52935 May 10 03:39 NaServer.pm drwxr-xr-x 3 root root 4096 Aug 3 11:06 Net drwxr-xr-x 2 root root 4096 Aug 18 09:14 NetApp drwxr-xr-x 3 root root 4096 Aug 3 10:42 NetSNMP -rwxr-xr-x 1 root root 383513 May 10 03:39 OCUMAPI.pm -rwxr-xr-x 1 root root 2107602 May 10 03:39 OCUMClassicAPI.pm -rwxr-xr-x 1 root root 2216407 May 10 03:39 Ontap7ModeAPI.pm -rwxr-xr-x 1 root root 4208788 May 10 03:39 OntapClusterAPI.pm -rwxr-xr-x 1 root root 3310 May 10 03:39 ONTAPILogParser.pm -rwxr-xr-x 1 root root 5669 May 10 03:39 ONTAPITestContainer.pm drwxr-xr-x 3 root root 4096 Aug 3 11:06 Params -rwxr-xr-x 1 root root 3658 May 10 03:39 SdkEnv.pm -rwxr-xr-x 1 root root 75562 Oct 29 2009 SNMP.pm -rwxr-xr-x 1 root root 35267 Jun 6 2012 Socket.pm drwxr-xr-x 2 root root 4096 Aug 3 11:06 Sub -rwxr-xr-x 1 root root 2986 May 10 03:39 Test.pm drwxr-xr-x 2 root root 4096 Aug 3 11:06 Text -rwxr-xr-x 1 root root 1072 Mar 1 2001 UUID.pm drwxr-xr-x 2 root root 4096 Aug 3 10:42 Win32 drwxr-xr-x 3 root root 4096 Aug 18 08:41 YAML

All Files are copied into the mentioned path

willemdh commented 8 years ago

@Muellerflo @BrianWong1019 Are you guys still having issues? What version of NetApp Ontap are you on?

kennyll commented 8 years ago

I also have this problem.My NetApp Ontap is FAS6240-1> version NetApp Release 8.1.4P1 7-Mode: Tue Feb 11 23:23:31 PST 2014.please help me to solve this problem,thank you.

joesmit commented 8 years ago

I am experiencing this same issue (1 difference volume_health states it is working, but disk_health fails). Using the SDK provided by your program. OS: CentOS 7.1 NetApp Release 8.2.2X15 Cluster-Mode [root@Prod-Nagios01 libexec]# ls -l /usr/lib64/perl5/ ... rw-r--r--. 1 root root 2216407 Oct 20 14:10 Ontap7ModeAPI.pm -rw-r--r--. 1 root root 4208788 Oct 20 14:10 OntapClusterAPI.pm -rw-r--r--. 1 root root 3310 Oct 20 14:10 ONTAPILogParser.pm -rw-r--r--. 1 root root 5669 Oct 20 14:10 ONTAPITestContainer.pm ... set shows: PERL5LIB=/usr/lib64/perl5

willemdh commented 8 years ago

Hmm well I know it works for many, so there must be something different.. Did you use the SDK in this project? Have you tried downloading the new SDK from NetApp yet?

joesmit commented 8 years ago

I was using the one in the package, I have not tried a newer version of SDK, I will give that a shot and update you. Thanks for the quick response.

On Wed, Oct 21, 2015 at 2:23 PM, willemdh notifications@github.com wrote:

Hmm well I know it works for many. Did you use the SDK in this project? Have you tried downloading the new SDK from NetApp yet?

— Reply to this email directly or view it on GitHub https://github.com/willemdh/check_netapp_ontap/issues/5#issuecomment-149984553 .

Joe Smith Systems Administrator RHCSA, RHCVA, RHCSA in OpenStack, VCP, & Security+ CloudForms Engineering - Red Hat, Inc. mobile. 919-500-1344 irc. smitty keyid. 1E36F21E

joesmit commented 8 years ago

Update: I downloaded SDK 5.4 and copied the pert/NetApp files into /usr/lib64/perl5/ and replaced all the files from the project. But no change, error still exists. When I was setting this up I had to download a few additional perl modules (like xml parser, and perl-libwww-perl), maybe I am missing something else?

willemdh commented 8 years ago

Sorry Joe, I'm not sure what might be going on. Maybe you could try some Perl related forum and ask their opinion?

joesmit commented 8 years ago

Thanks for the quick response, I will keep digging at this. I will be sure to update if I find anything.

joesmit commented 8 years ago

I have now found my problem. I was running these checks against the SVM, not the mgmt cluster. Now I need to figure out how to create a read-only netapi user (more testing to follow). Ugh.

willemdh commented 8 years ago

@joesmit Thanks for letting us know

@BrianWong1019 @Muellerflo Maybe you guys were also running the checks against the svm? Please try joesmit's solution.

joesmit commented 8 years ago

For anyone who had issues creating a netapi read-only user like I did, commandline worked easier. Here is the command: security login create -username $UsernameYouWantToUse -application ontapi -authmethod password -role readonly . After you enter this, it will prompt you to set a password.

willemdh commented 8 years ago

I'm going to close this. Try joesmit's solution if you are still experiencing issues.

@joesmit => Thanks

razaahmed commented 8 years ago

I am getting the same error. I am running NetApp Release 8.2.3P4 ### 7-Mode:, Is suppose to work with this version of netapp. please note that I am NOT using cluster on tap. I use the SDK from here.

Failed volume query: Unable to find API: volume-get-iter


note that it works for diskhealth and not for any other option. /check_netapp_ontap.pl -hostname mynetapp -u nagios -p '*****' -o disk_health OK - No problems found (72 checked)

willemdh commented 8 years ago

It' s only working wit cluster ontap.

razaahmed commented 8 years ago

Is there any plugin you recommend for mode 7?

On Wed, Feb 24, 2016 at 12:03 PM, willemdh notifications@github.com wrote:

It' s only working wit cluster ontap.

— Reply to this email directly or view it on GitHub https://github.com/willemdh/check_netapp_ontap/issues/5#issuecomment-188432858 .

willemdh commented 8 years ago

Sorry I have no experience with 7-mode.