Page 1 of 2
Configuring First Plugin - New to Nagios
Posted: Tue Jun 16, 2015 1:56 pm
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.
Re: Configuring First Plugin - New to Nagios
Posted: Tue Jun 16, 2015 2:31 pm
by jolson
To test the command, the first thing you'll need to do is enter the directory of the plugins.
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.
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!
Re: Configuring First Plugin - New to Nagios
Posted: Tue Jun 16, 2015 3:37 pm
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
Re: Configuring First Plugin - New to Nagios
Posted: Tue Jun 16, 2015 3:42 pm
by ssax
Edit the check_netapp3.pl file and at the top change:
To:
Then it should work.
Re: Configuring First Plugin - New to Nagios
Posted: Tue Jun 16, 2015 3:43 pm
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.
Re: Configuring First Plugin - New to Nagios
Posted: Tue Jun 16, 2015 3:55 pm
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?
Re: Configuring First Plugin - New to Nagios
Posted: Tue Jun 16, 2015 3:57 pm
by ssax
What is the output of this command:
Re: Configuring First Plugin - New to Nagios
Posted: Wed Jun 17, 2015 7:39 am
by angus
Below are the results of "Which Perl"
/usr/bin/perl
Thanks!
Re: Configuring First Plugin - New to Nagios
Posted: Wed Jun 17, 2015 12:58 pm
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/
Re: Configuring First Plugin - New to Nagios
Posted: Wed Jun 17, 2015 1:30 pm
by angus
After running that I can successfully execute ./check_netapp3.pl -h