Instalation Steps

Installation of the Checks

To unpack and install the checks you can follow the description in

  1. Steps to create the required folders

  2. Extracting the tar-file as explained in Import (but do not try to import the docker-image of course)

  3. Link the perl lib/ path:

    # cd /usr/local/check_netapp_pro
    # ln -s perl/lib/
    
    Explanation of the command ...
  4. Edit the Authfile

Now all the checks (and getters) are where they should be. If you exactly followed our installation guide they are located in /usr/local/check_netapp_pro/perl/.

Installation of required Perl Modules

The Perl scripts need several Perl-modules (libraries) to be present on the local system. This step can probably be skipped if you are upgrading from a previous version.

See Perl Modules Installation Guide

Adapting the configuration

Fortunately the example-configuration files have a single place where to change the path to the Perl interpreter: In .../check-netapp-zapi/etc/commands_cm.cfg (and commands_7m.cfg if you have 7-Mode filers to check) change any occurrence of /usr/local/check_netapp_pro/run.sh to the system Perl interpreter’s path, e.g. /bin/perl followed by the full path to the Perl script (e.g. /usr/local/check_netapp_pro/perl/get_netapp_cm.pl).

Example:

define command {
  command_name  get_netapp
  command_line  /bin/perl /usr/local/check_netapp_pro/perl/get_netapp_cm.pl $ARG1$ -H $HOSTADDRESS$ 
}

Edit the Authfile

Although an authfile is not strictly required (you can pass the credentials with --user and --pass as well) it is highly recommended to have one.

You will find an example authfile in the etc.example/ folder. We recommend to copy this file to its default location /usr/local/check_netapp_pro/etc/.

cd /usr/local/check_netapp_pro/
cp etc.example/netapp_credentials etc/netapp_credentials
vi etc/netapp_credentials
...

Both Check NetApp-ZAPI and Check NetApp-REST use the same syntax for their authfiles. You can therefore share the same file between both products either by symlinking them or by setting them explicitly on the commandline with --authfile=<filename>.

Do not leave blanks (or tabs) at the end of passwords and user-names! Take extra care when editing the user- and password-field in the authfile: Check NetApp ZAPI getter and checks will not stripe of trailing whitespace.

Examples


# change into plugin dir
cd /usr/local/check_netapp_pro/

# show version
$ perl get_netapp_cm.pl --version
VERSION: v7.0.0

# getting volume data using the ZAPI/cm getter
$ perl get_netapp_cm.pl -H sim97 -o volume
Data for object 'volume' collected within 0.523s. Number of instances stored: 6
...

# checking the volumes usage 
$ perl check_netapp_pro.pl Usage -H sim97 -o volume
NETAPP_PRO USAGE OK - 6 volumes checked
first check
sim97-01.vol0: 0.7GiB
vserv_a.vol0: 0.0GiB
vserv_b.vol2: 0.0GiB
vserv_b.vol1: 0.0GiB
vserv_b.vol0: 0.0GiB
vserv_a.vol1: 0.0GiB
 | sim97-01.vol0=777412608B;2273414348.8;2922961305.6;0;3247734784 vserv_a.vol0=909312B;13946060.8;17930649.6;0;19922944 vserv_a.vol1=880640B;13946060.8;17930649.6;0;19922944 vserv_b.vol0=897024B;13946060.8;17930649.6;0;19922944 vserv_b.vol1=901120B;13946060.8;17930649.6;0;19922944 vserv_b.vol2=905216B;13946060.8;17930649.6;0;19922944


# Getting help 
$ perl check_netapp_pro.pl Usage --help
USAGE: check_netapp_pro.pl Usage -H <host> -o volume|aggregate [...] [--help]
VERSION: v7.0.0

Checks used space on aggregates or volumes.
...
SIMPLE EXAMPLES:

...


# getting  net-interfaces data
$ perl get_netapp_cm.pl -H sim97 -o net-interface
Data for object 'net-interface' collected within 0.222s. Number of instances stored: 2
...

# Checking if net-interfaces are at home
$ perl check_netapp_pro.pl NetInterface -H sim97 
NETAPP_PRO NETINTERFACE OK - 2 net-interfaces checked
first check
sim97.sim97-01_mgmt: is at home (current=sim97-01:e0c, home=sim97-01:-)
sim97.sim97-01_mgmt_auto: is at home (current=sim97-01:e0c, home=sim97-01:-)

# Checking if net-interfaces are up
$ perl check_netapp_pro.pl NetInterface -H sim97 --aspect=is-up
NETAPP_PRO NETINTERFACE OK - 2 net-interfaces checked
sim97.sim97-01_mgmt: is up
sim97.sim97-01_mgmt_auto: is up