[Check_mk (english)] How to start a check from cli?

I configured a an aktive http-post check inside of WATO.

The http-get check worked, but since I want to test a login too, a co-worker defined a dummy loginuser, which should give a expected response.

For debugging I’d like to start that check from cli, but can’t find how to do it.

Frank Lienhard

N­eos**IT GmbH

Schachtweg 1

38440 Wolfsburg

Tel. +49 5361 83494-32

Fax +49 5361 83494-94

mailto:frank.lienhard@neos-it.de

http://www.neos-it.de/

Handelsregister: Amtsgericht Braunschweig, HRB 203557

Geschäftsführer: Sven Wosny

Hi Frank,

If you select the full view of the appropriate service in multisite (click the service’s name) the resulting command is reported. You can use that command to invoke the command on command line ($USER1$ normally expands to the default location of the nagios plugin, $USER2$ to the plugin in the local folder).

HTH,

Marcel

···

2013/2/4 Lienhard, Frank Frank.Lienhard@neos-it.de

I configured a an aktive http-post check inside of WATO.

The http-get check worked, but since I want to test a login too, a co-worker defined a dummy loginuser, which should give a expected response.

For debugging I’d like to start that check from cli, but can’t find how to do it.

Frank Lienhard

N­eos**IT GmbH

Schachtweg 1

38440 Wolfsburg

Tel. +49 5361 83494-32

Fax +49 5361 83494-94

mailto:frank.lienhard@neos-it.de

http://www.neos-it.de/

Handelsregister: Amtsgericht Braunschweig, HRB 203557

Geschäftsführer: Sven Wosny


checkmk-en mailing list

checkmk-en@lists.mathias-kettner.de

http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en

Hi Frank,

I suppose you’ve no problem with mails in German? :wink:

In this thread (http://lists.mathias-kettner.de/pipermail/checkmk-de/2012-June/001701.html) the same questions have been asked and answered by Mathias Kettner…

HTH,

Marcel

···

2013/2/4 Marcel Schulte schulte.marcel@gmail.com

Hi Frank,

If you select the full view of the appropriate service in multisite (click the service’s name) the resulting command is reported. You can use that command to invoke the command on command line ($USER1$ normally expands to the default location of the nagios plugin, $USER2$ to the plugin in the local folder).

HTH,

Marcel

2013/2/4 Lienhard, Frank Frank.Lienhard@neos-it.de

I configured a an aktive http-post check inside of WATO.

The http-get check worked, but since I want to test a login too, a co-worker defined a dummy loginuser, which should give a expected response.

For debugging I’d like to start that check from cli, but can’t find how to do it.

Frank Lienhard

N­eos**IT GmbH

Schachtweg 1

38440 Wolfsburg

Tel. +49 5361 83494-32

Fax +49 5361 83494-94

mailto:frank.lienhard@neos-it.de

http://www.neos-it.de/

Handelsregister: Amtsgericht Braunschweig, HRB 203557

Geschäftsführer: Sven Wosny


checkmk-en mailing list

checkmk-en@lists.mathias-kettner.de

http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en

Tried that (sorry for not mentioned that earlier), but that command looks like this:

check_mk_active-http! -I $HOSTADDRESS$ -u ‘/path/to/secure-login/?do=doLogin&submit=true’ -p 8443 --ssl -e ‘Abmelden’ -P ‘forwardPage=&textUsername=dummy_user&textPassword=secret_passwd_for_dummy’ -T ‘text/html’ -j POST

But there isn’t a check_mk_aktive-http command (at least non that the siteusers nows of by starting it from his homedir.). So I think I still mis
something (perhaps opvious)

Frank

···

Von: Marcel Schulte [mailto:schulte.marcel@gmail.com]
Gesendet: Montag, 4. Februar 2013 12:42
An: Lienhard, Frank
Cc: checkmk-en@lists.mathias-kettner.de
Betreff: Re: [Check_mk (english)] How to start a check from cli?

Hi Frank,

If you select the full view of the appropriate service in multisite (click the service’s name) the resulting command is reported. You can use that command to invoke the command on command line ($USER1$ normally expands to the default location
of the nagios plugin, $USER2$ to the plugin in the local folder).

HTH,

Marcel

2013/2/4 Lienhard, Frank Frank.Lienhard@neos-it.de

I configured a an aktive http-post check inside of WATO.

The http-get check worked, but since I want to test a login too, a co-worker defined a dummy loginuser, which should give a expected response.

For debugging I’d like to start that check from cli, but can’t find how to do it.

Frank Lienhard

N­eos**IT GmbH

Schachtweg 1

38440 Wolfsburg

Tel.
+49 5361 83494-32

Fax
+49 5361 83494-94

mailto:frank.lienhard@neos-it.de

http://www.neos-it.de/

Handelsregister: Amtsgericht Braunschweig, HRB 203557

Geschäftsführer: Sven Wosny


checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en

Hi Frank,

search for the nagios plugin ‘check_http’ (in OMD usually located in ~/lib/nagios/plugins/ (shipped) or ~/local/lib/nagios/plugins/ (customized)) and use this as binary.

…that’s the command defined for check_mk_active-http in ~/etc/nagios/conf.d/check_mk_objects.cfg:

define command {

command_name check_mk_active-http

command_line $USER1$/check_http $ARG1$

}

HTH,

Marcel

···

2013/2/4 Lienhard, Frank Frank.Lienhard@neos-it.de

Tried that (sorry for not mentioned that earlier), but that command looks like this:

check_mk_active-http! -I $HOSTADDRESS$ -u ‘/path/to/secure-login/?do=doLogin&submit=true’ -p 8443 --ssl -e ‘Abmelden’ -P ‘forwardPage=&textUsername=dummy_user&textPassword=secret_passwd_for_dummy’ -T ‘text/html’ -j POST

But there isn’t a check_mk_aktive-http command (at least non that the siteusers nows of by starting it from his homedir.). So I think I still mis
something (perhaps opvious)

Frank

Von: Marcel Schulte [mailto:schulte.marcel@gmail.com]
Gesendet: Montag, 4. Februar 2013 12:42

An: Lienhard, Frank
Cc: checkmk-en@lists.mathias-kettner.de
Betreff: Re: [Check_mk (english)] How to start a check from cli?

Hi Frank,

If you select the full view of the appropriate service in multisite (click the service’s name) the resulting command is reported. You can use that command to invoke the command on command line ($USER1$ normally expands to the default location
of the nagios plugin, $USER2$ to the plugin in the local folder).

HTH,

Marcel

2013/2/4 Lienhard, Frank Frank.Lienhard@neos-it.de

I configured a an aktive http-post check inside of WATO.

The http-get check worked, but since I want to test a login too, a co-worker defined a dummy loginuser, which should give a expected response.

For debugging I’d like to start that check from cli, but can’t find how to do it.

Frank Lienhard

N­eos**IT GmbH

Schachtweg 1

38440 Wolfsburg

Tel.
+49 5361 83494-32

Fax
+49 5361 83494-94

mailto:frank.lienhard@neos-it.de

http://www.neos-it.de/

Handelsregister: Amtsgericht Braunschweig, HRB 203557

Geschäftsführer: Sven Wosny


checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en