[Check_mk (english)] adding legacy checks to OMD

Marcel Schulte schulte.marcel at gmail.com
Fri Sep 13 22:48:29 CEST 2013


Hi Penny,

I'm really interested in the thrown errors...

Do you have cmk host tagged "web"? Could you provide such a host
config from main.mk?
Assumed your url to be checked is simply "/" (no explicit file, just
what the webserver provides by default), then the first config line in
legacy_checks variable would be this:

( ( "check-http!/", "Homepage", True), [ "web" ], ALL_HOSTS ),

if the url is "/foobar.php"... guess what it would loook like ;-)

Second line assumes you've two cmk host named "VSFTPINCLDEGV01" and
"TPA1-FTP-001", right?

Still waiting for the errors...

Regards,
Marcel

2013/9/13 Penny Rand <penrand at gmail.com>:
> Hi Marcel,
> Funny you should mention it, was just reading up on WATO, have not used it
> at all.
> Yes I use the mk files.
>
> Obviously I am not understanding the documentation or something...
>
> In main.mk I added this (without really knowing what I am doing):
>
> extra_nagios_conf += r"""
>
> #ARG1: URL to get
> define command {
>         command_name    check-http
>         command_name    $USER1$/check_http -I $HOSTADDRESS$ -u $ARG1$
> }
>
> define command {
>         command_name    check-smtp
>         command_name    $USER1$/check_smtp -H $HOSTADDRESS$
> }
>
> """
> legacy_checks = [
>   # On all hosts with the tag 'web' check fetching index.html via HTTP,
>   # service description "Homepage", process performance data
>   ( ( "check-http!/index.html", "Homepage", True), [ "web" ], ALL_HOSTS ),
>
>   # Check two specific hosts via SMTP, service description "SMTP",
>   # do not process performance data
>   ( ( "check-smtp", "SMTP", False ), [ "VSFTPINCLDEGV01", "TPA1-FTP-001"] ),
> ]
>
> I use host groups and I want to check all machines labeled "web" (but we
> don't even use html pages). Do I need to insert the actual url?
>
> I had an old Nagios box, now deceased, that did check Web sites for us using
> specifically written checks for each site. I'm hoping this will be easier.
>
> thanks!
>
>
> On Fri, Sep 13, 2013 at 12:07 PM, Marcel Schulte <schulte.marcel at gmail.com>
> wrote:
>>
>> Hi Penny,
>>
>> could you please provide more/real data:
>>
>> * your real main.mk section(s) - the copied data from documentation do
>> not really help analysing
>> * thrown errors as-is
>> * information where/when the errors occurred
>>
>> One question left: you do all configuration in mk files, don't you?
>> Ever thought about using WATO? Very easy, also for legacy checks like
>> check_http/smtp/etc.
>>
>> Regards,
>> Marcel
>>
>> 2013/9/13 Penny Rand <penrand at gmail.com>:
>> > Server is Ubuntu 12.04, OMD 1.0
>> >
>> > I need to add http checks to my OMD instance. Following the
>> > documentation at
>> > http://mathias-kettner.com/checkmk_legacy_checks.html I added the
>> > following
>> > to main.mk;
>> >
>> > extra_nagios_conf += r"""
>> >
>> > # ARG1: URL to get
>> > define command {
>> >     command_name    check-http
>> >     command_line    $USER1$/check_http -I $HOSTADDRESS$ -u $ARG1$
>> > }
>> >
>> > define command {
>> >     command_name    check-smtp
>> >     command_line    $USER1$/check_smtp -H $HOSTADDRESS$
>> > }
>> >
>> > """
>> >
>> >
>> > where do I add the service definitions? I tried adding this bit to
>> > main.mk
>> > but it throws errors on compile:
>> >
>> > legacy_checks = [
>> >   # On all hosts with the tag 'web' check fetching index.html via HTTP,
>> >   # service description "Homepage", process performance data
>> >   ( ( "check-http!/index.html", "Homepage", True), [ "web" ], ALL_HOSTS
>> > ),
>> >
>> >   # Check two specific hosts via SMTP, service description "SMTP",
>> >   # do not process performance data
>> >   ( ( "check-smtp", "SMTP", False ), [ "mailsrv01", "mailsrv02"] ),
>> > ]
>> >
>> >
>> > _______________________________________________
>> > checkmk-en mailing list
>> > checkmk-en at lists.mathias-kettner.de
>> > http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en
>> >
>
>


More information about the checkmk-en mailing list