Help with plugins download from Exchange

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
hussaingany
Posts: 7
Joined: Mon Jan 09, 2017 1:51 am

Help with plugins download from Exchange

Post 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.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Help with plugins download from Exchange

Post 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.
hussaingany
Posts: 7
Joined: Mon Jan 09, 2017 1:51 am

Re: Help with plugins download from Exchange

Post by hussaingany »

Thanks for your Valuable response..I am using centos 6.6.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Help with plugins download from Exchange

Post 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.
Former Nagios Employee
hussaingany
Posts: 7
Joined: Mon Jan 09, 2017 1:51 am

Re: Help with plugins download from Exchange

Post 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.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Help with plugins download from Exchange

Post 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.
Former Nagios Employee
hussaingany
Posts: 7
Joined: Mon Jan 09, 2017 1:51 am

Re: Help with plugins download from Exchange

Post 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.
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Help with plugins download from Exchange

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
hussaingany
Posts: 7
Joined: Mon Jan 09, 2017 1:51 am

Re: Help with plugins download from Exchange

Post 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.
Last edited by tmcdonald on Tue Feb 21, 2017 10:49 am, edited 1 time in total.
Reason: Please use [code][/code] tags around long output
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Help with plugins download from Exchange

Post 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/
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked