Page 1 of 2

Help with plugins download from Exchange

Posted: Fri Jan 27, 2017 1:01 am
by hussaingany
Moderator Edit: This thread has been split from another - https://support.nagios.com/forum/viewto ... =7&t=30075
In the future, please create a new thread and link to the old one instead of adding on.


Hi,

How to download check_url.pl plugin? I am new to Linux Field so I am not sure how to download that plugin. Can anyone explain? thanks in advance.

Re: Help with plugins download from Exchange

Posted: Fri Jan 27, 2017 11:37 am
by dwhitfield
You could download it on your desktop OS and then use something like FileZilla to move it to Linux. I think it'll be easiest if you transfer it over sftp. Here are instructions: https://www.one.com/en/support/faq/how- ... -filezilla

What version of Linux are you running? Basically, you'll need to install openssh-server on Linux, but it might be named something different on your version of Linux.

Re: Help with plugins download from Exchange

Posted: Mon Jan 30, 2017 12:01 am
by hussaingany
Thanks for your Valuable response..I am using centos 6.6.

Re: Help with plugins download from Exchange

Posted: Mon Jan 30, 2017 11:33 am
by rkennedy
You'll want to run yum install openssh-server on the Core machine, and then use the instructions @dwhitfield posted above to connect to your machine.

Re: Help with plugins download from Exchange

Posted: Mon Feb 06, 2017 1:11 am
by hussaingany
Hi,

I have downloaded check_url.pl to my desktop and from there I have copied to nagios server. But still I am getting following eror.

[root@hosting~]# perl /usr/lib64/nagios/plugins/check_url.pl www.google.com
ERROR: check_url Time-Out 20 s

Kindly advise how to proceed further. Thanks in advance.

Re: Help with plugins download from Exchange

Posted: Mon Feb 06, 2017 10:51 am
by rkennedy
The plugin looks pretty basic, and it looks like you're using it properly. As it's a third party plugin, we're limited on the support we can provide.

Is there a reason you cannot use one of the nagios-plugins, check_http? This generally covers most use cases.

Re: Help with plugins download from Exchange

Posted: Mon Feb 20, 2017 3:21 am
by hussaingany
Hello Everyone,

My Organization wants to download only check_url rather than Check_http so I need to download check_url.

I have downloaded check_url plugin. It gives following output when I run the command
[root@hosting1 ~]# /usr/lib64/nagios/plugins/check_url www.google.com
URL www.google.com state is : OK: Response is: 200 OK:

But in the browser it gives error as

koi CRITICAL 02-20-2017 13:35:32 3d 2h 51m 27s 7/7 (Return code of -1 is out of bounds)

Anyone can rectify the issue? Thanks in advance.

Re: Help with plugins download from Exchange

Posted: Mon Feb 20, 2017 1:41 pm
by tgriep
We would have to see how the command is defined in the commands.cfg file and also how the service check is defined to help out any further so can you post them so we can view how they are configured?

Re: Help with plugins download from Exchange

Posted: Tue Feb 21, 2017 6:46 am
by hussaingany
Hi,

Here are my service and command definition.

Code: Select all

define service{
        name                            app-service
        use                             generic-service
        max_check_attempts              7
        normal_check_interval           25
        retry_check_interval            1
        process_perf_data               0
        notification_options            w,c,r
        notification_interval           30
        notification_period             24x7
        contact_groups                  admins
        register                        0
}

define command{
        command_name    check_local_url
        command_line    $USER1$/check_url $ARG1$
}

define service{
        use                             app-service
        host_name                       hostingdb
        service_description             koi
        check_command                   check_local_url!http://www.kitchen.com
        notifications_enabled           1
        }

define service{
        use                             app-service
        host_name                       hostingdb
        service_description             mycandymanclub
        check_command                   check_local_url!www.mycandy.com
        notifications_enabled           1
        }
Thanks in advance.

Re: Help with plugins download from Exchange

Posted: Tue Feb 21, 2017 2:21 pm
by tgriep
In one of your examples from before, the plugin ended with a .pl and the other example did not so if the plugin is named check_url.pl then the command has to be changed from

Code: Select all

define command{
        command_name    check_local_url
        command_line    $USER1$/check_url $ARG1$
}
to

Code: Select all

define command{
        command_name    check_local_url
        command_line    $USER1$/check_url.pl $ARG1$
}
Save the file and restart nagios by running the following for the changes to take effect.

Code: Select all

service nagios restart
Also, the permissions for the plugin has to have the executable bit set and that can be done by running the following command as root.

Code: Select all

chmod a+x /usr/lib64/nagios/plugins/check_url*
If the GUI still has the error, please run the following command and post the output.

Code: Select all

ls -l /usr/lib64/nagios/plugins/