Hi,
i am new to perl so need you help alot i try to create perl plugin using this link,
http://itwarriors.com/?p=1
i have created file name check_test.pl in (/usr/local/nagios/libexec),
#! /usr/bin/perl
use strict;
use Getopt::Long qw(:config no_ignore_case);
my ($host, $server, $instances);
my $result = GetOptions(
“H|host=s” => \$host,
“s|server=s” => \$server,
“i|instances=s” => \$instances,
);
print “My host IP is $host\n”;
print “My Server IP is $server\n”;
print “Times Server found are $instances\n”;
and after getting this error,
[root@localhost libexec]# ./check_test.pl -h 192.168.1.101 -s 192.168.1.110 -i 2
bash: ./check_test.pl: Permission denied
i try to add ,
# 'check_test' command definition
define command{
command_name check_test
command_line $USER1$/check_test.pl -H $HOSTADDRESS$ -s 12489
}
command in command.cfg
instead of that i am getting error permission denied please hekp for this error that what actually error is???
Thanks in advance
Error In Custom Creatd Perl Plugin ?? Permission Denied
-
- Posts: 63
- Joined: Fri Sep 09, 2011 1:14 am
Re: Error In Custom Creatd Perl Plugin ?? Permission Denied
If you do an ls -l on the directory containing the script and take a look at the owner/permissions... the owner should be nagios (chown nagios:nagios <script>) and the script will need execute permissions (chmod +x <script>)
-
- Posts: 63
- Joined: Fri Sep 09, 2011 1:14 am
Re: Error In Custom Creatd Perl Plugin ?? Permission Denied
i am trying to execute "check_imap -H IP" but it is giving error permission refused i have given permission to it by using command " chmode +x <script>" but it still giving the same error when i do ls -l on the directory having plugins it results for check_imap,
lrwxrwxrwx 1 root root 9 Oct 19 10:16 check_imap -> check_tcp
how do i enable this pliugin to run and show result at the application UI ???
Hopes to listen from you soon !
Best Regards,
lrwxrwxrwx 1 root root 9 Oct 19 10:16 check_imap -> check_tcp
how do i enable this pliugin to run and show result at the application UI ???
Hopes to listen from you soon !
Best Regards,
Re: Error In Custom Creatd Perl Plugin ?? Permission Denied
Is permission refused executing the script or permission refused by the target host? Can you post what you execute on the command line and the resulting output?