Configuring First Plugin - New to Nagios

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
angus
Posts: 125
Joined: Thu May 28, 2015 8:17 am

Configuring First Plugin - New to Nagios

Post by angus »

I am looking to setup monitoring on my Netapp appliances. I would like to try Check_netapp3.pl located @ https://exchange.nagios.org/directory/P ... p3/details

I have installed the plugin via the web gui and I see the plugin via a SSH connection to the nagios host. I am trying to test the commands but I have no idea how to go about this. Attached is a screen shot of my test. Please help walk me through this.

Thanks.
You do not have the required permissions to view the files attached to this post.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Configuring First Plugin - New to Nagios

Post by jolson »

To test the command, the first thing you'll need to do is enter the directory of the plugins.

Code: Select all

cd /usr/local/nagios/libexec
Next, run the appropriate plugin with the '-h' flag - this will typically display a help menu. Please post the output of that help menu here.

Code: Select all

./check_netapp3.pl -h
If the above command doesn't run properly, you may need to give the file 'execute permissions.'

Code: Select all

chmod +x check_netapp3.pl
./check_netapp3.pl -h
Once you have returned us the help menu, we'll move forward. Thanks!
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
angus
Posts: 125
Joined: Thu May 28, 2015 8:17 am

Re: Configuring First Plugin - New to Nagios

Post by angus »

I ran each line in the order your posted them and I received the error below. The plugin is in libexec, I ran an ls Check_Netapp3.pl is listed.

[@ ~]# cd /usr/local/nagios/libexec
[@libexec]# ./check_netapp3.pl -h
-bash: ./check_netapp3.pl: /usr/local/bin/perl: bad interpreter: No such file or directory
[@libexec]# chmod +x check_netapp3.pl
[@libexec]# ./check_netapp3.pl -h
-bash: ./check_netapp3.pl: /usr/local/bin/perl: bad interpreter: No such file or directory
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Configuring First Plugin - New to Nagios

Post by ssax »

Edit the check_netapp3.pl file and at the top change:

Code: Select all

#!/usr/local/bin/perl
To:

Code: Select all

#!/usr/bin/perl
Then it should work.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Configuring First Plugin - New to Nagios

Post by jolson »

Let's give the following a shot.

Code: Select all

cd /usr/local/nagios/libexec
perl check_netapp3.pl -h
The script is likely trying to call perl incorrectly, we can call it manually to reprimand that situation. Let me know if the above works for you.

EDIT: ssax's fix should work as well.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
angus
Posts: 125
Joined: Thu May 28, 2015 8:17 am

Re: Configuring First Plugin - New to Nagios

Post by angus »

@ ssax - that change did not help, thanks though

@Jolson - "perl check_netapp3.pl -h" successfully brought up the help file. What is the issue?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Configuring First Plugin - New to Nagios

Post by ssax »

What is the output of this command:

Code: Select all

which perl
angus
Posts: 125
Joined: Thu May 28, 2015 8:17 am

Re: Configuring First Plugin - New to Nagios

Post by angus »

Below are the results of "Which Perl"

/usr/bin/perl

Thanks!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Configuring First Plugin - New to Nagios

Post by tmcdonald »

Code: Select all

yum install dos2unix -y
dos2unix /usr/local/nagios/libexec/check_netapp3.pl
http://www.liquidweb.com/kb/dos2unix-re ... rom-files/
Former Nagios employee
angus
Posts: 125
Joined: Thu May 28, 2015 8:17 am

Re: Configuring First Plugin - New to Nagios

Post by angus »

After running that I can successfully execute ./check_netapp3.pl -h
Locked