Installation Steps

Most of the plugins code is in Perl. To free our customers from the hazels when installing Perl modules we have included both a Perl interpreter and all required modules inside of the docker container. So all you need is a running docker application on the monitoring server. In case you have docker not installed yet, we have prepared a few hints on how to get it running.

So all you need is the docker-image (check_netapp_pro.tar.gz), the customizable run.sh and a license file. (You get all these files from your distributor.)

Prepare

Install docker or podman if not already present on your system. Please consult our Docker Installation Guide for OS and plugin-specific hints.

CentOS 7 and 8 use podman instead of docker - replace “docker” with “podman” in the following examples and in run.sh.

Folder Sharing

Background

The docker-image requires some files and folders from the host (monitoring server):

  • License files must be present on the host in /usr/local/check_netapp_pro/etc/

  • The optional (but recommend) authfile must be stored on the host as /usr/local/check_netapp_pro/etc/netapp_credentials

  • The storedir on the host is /usr/local/check_netapp_pro/var/store/

If you are not happy with the above defaults, you can change the paths in run.sh.

  1. If not already present create the storedir and the etc/ folder:

    mkdir -p /usr/local/check_netapp_pro/var/store/
    chown -R nagios:nagios /usr/local/check_netapp_pro/var/store/
    mkdir -p /usr/local/check_netapp_pro/etc
    
  2. Copy the license file to its place:

    cp CNR-00000-00000_check_netapp_pro.dat /usr/local/check_netapp_pro/etc
    
  3. Copy your authfile (or create a new one)

    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.

    The following command-example assumes that you are upgrading from a pre-6.x version, where the authfile’s name and path was (by default) /usr/local/nagios/etc/netapp_credentials. Adapt the commandline to your situation or create a new authfile in case of a new installation.

    cp /usr/local/nagios/etc/netapp_credentials /usr/local/check_netapp_pro/etc/
    
    

Import

Copy the tar archive you received from your distributor to the monitoring server and extract the files to /usr/local/check_netapp_pro.

cp check_netapp_pro-6.0.0.tar.gz /usr/local/check_netapp_pro
tar -xzf check_netapp_pro-6.0.0.tar.gz

The original tar-archive (check_netapp_pro-6.0.0.tar.gz) can be deleted now.

The user can load the image via docker load < check_netapp_pro.tar.gz. This command imports the image to the local docker directories ready to use.

Important: The import is user-specific. So do not forget to import the image as the nagios user (as well):

[root]$ su - nagios
[nagios]$ cd /usr/local/check_netapp_pro
[nagios]$ docker load < check_netapp_pro.tar.gz

If you prefer a permanent running docker instance executing the check-commands sent to it instead of starting and closing a docker instance for every check, check out the exec.sh configuration.

Run

The run.sh script wraps the docker run command with all the necessary parameters and directory mappings. So it’s time to give the plugins a first try. We have some example for you.

You may have to change the path to your local docker-binary in run.sh. If your system uses podman instead of docker edit the run.sh script (replace docker with podman and uncomment a few lines).

Examples


# change into run.sh's dir
cd /usr/local/check_netapp_pro/

# show version
$ ./run.sh get_netapp --version
get_netapp version 6.0.0-beta.1

# getting volume data using the universal getter
$ ./run.sh get_netapp volume -H sim96
Data for object 'volume' collected within 0.083795s. Number of instances stored: 5
| 'total_duration'=0.084s;45;55;0;

# checking the volumes usage w/ new universal check
$ ./run.sh check_netapp Usage -H sim96 -o volume
NETAPP_PRO USAGE OK - 5 volumes checked
vserv_b.vol0: 0.0GiB
vserv_a.vol0: 0.0GiB
vserv_a.vol1: 0.0GiB
vserv_b.vol1: 0.0GiB
vserv_b.vol2: 0.0GiB
 | vserv_a.vol0=1290240B;13946060.8;17930649.6;0;19922944 vserv_a.vol1=1273856B;13946060.8;17930649.6;0;19922944 vserv_b.vol0=1527808B;13946060.8;17930649.6;0;19922944 vserv_b.vol1=1261568B;13946060.8;17930649.6;0;19922944 vserv_b.vol2=1060864B;13946060.8;17930649.6;0;19922944

# same as above using the legacy Perl-script (not recommended for new cfg)
$ ./run.sh check_netapp_pro.pl Usage -H sim96 -o volume
NETAPP_PRO USAGE OK - 5 volumes checked
vserv_b.vol0: 0.0GiB
vserv_a.vol0: 0.0GiB
vserv_a.vol1: 0.0GiB
vserv_b.vol1: 0.0GiB
vserv_b.vol2: 0.0GiB
 | vserv_a.vol0=1290240B;13946060.8;17930649.6;0;19922944 vserv_a.vol1=1273856B;13946060.8;17930649.6;0;19922944 vserv_b.vol0=1527808B;13946060.8;17930649.6;0;19922944 vserv_b.vol1=1261568B;13946060.8;17930649.6;0;19922944 vserv_b.vol2=1060864B;13946060.8;17930649.6;0;19922944

# Problem: collecting disk data
$ ./run.sh get_netapp disk -H sim96 --api=zapi
The getter for the disk object has been moved into its own getter-script (get_netapp_disk.pl).

# Workaround: call 
$ ./run.sh get_netapp_disk.pl -H sim96
Data for object 'disk' collected within 0.294s. Number of instances stored: 28
 | total_duration=0.294s;45;55;0; collect_duration=0.222s;;;0; store_duration=0.072s;;;0; total_instances=28;;;0;