[RESOLVED]How to define custom plugin "check_http"

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.
Locked
nagios1_1
Posts: 14
Joined: Thu Jan 26, 2017 12:25 pm

[RESOLVED]How to define custom plugin "check_http"

Post by nagios1_1 »

Hello, I wanted to ask you help.
I want using the plugin "check_http". I tried to use it with the following command:

./check_http -I 10.20.30.2 -p 80 -u http://10.20.30.2/mywiki

and it works.

Now I don't use it inside "definition service"

I wrote this:

Code: Select all

define service {
        host_name               NAS
        service_description     Wiki (HTTP)
        check_command           check_http
        max_check_attempts      5
        check_period            24x7
        #contacts               admins
        #contact_groups         admins
        notification_interval   30
        notification_period     24x7
}

define command {
        commnad_name            check_http
        command_line            $USER1$/check_http -H $HOSTADDRESS$ ?????????????
}

I don't writing the command_line
Last edited by nagios1_1 on Wed Mar 15, 2017 5:07 pm, edited 1 time in total.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: How to define custom plugin "check_http"

Post by tmcdonald »

Code: Select all

define service {
        host_name               NAS
        service_description     Wiki (HTTP)
        check_command           check_http!80!http://10.20.30.2/mywiki
        max_check_attempts      5
        check_period            24x7
        #contacts               admins
        #contact_groups         admins
        notification_interval   30
        notification_period     24x7
}

define command {
        commnad_name            check_http
        command_line            $USER1$/check_http -I $HOSTADDRESS$ -p $ARG1$ -u $ARG2$
}

Former Nagios employee
nagios1_1
Posts: 14
Joined: Thu Jan 26, 2017 12:25 pm

Re: How to define custom plugin "check_http"

Post by nagios1_1 »

tmcdonald wrote:

Code: Select all

define service {
        host_name               NAS
        service_description     Wiki (HTTP)
        check_command           check_http!80!http://10.20.30.2/mywiki
        max_check_attempts      5
        check_period            24x7
        #contacts               admins
        #contact_groups         admins
        notification_interval   30
        notification_period     24x7
}

define command {
        commnad_name            check_http
        command_line            $USER1$/check_http -I $HOSTADDRESS$ -p $ARG1$ -u $ARG2$
}


Now I understand, thanks, It works.
I defined it in this way;

Code: Select all

define service {
        host_name               NAS
        service_description     Wiki
        check_command           check_http!80!http://10.10.10.11/wiki/
        max_check_attempts      5
        check_period            24x7
        contact_groups          admins
        notification_interval   30
        notification_period     24x7

}
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: [RESOLVED]How to define custom plugin "check_http"

Post by cdienger »

Thanks for the update! Are we okay to close this?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked