Check_http to monitor an AWS ELB with target group and URL rules

**CMK version:1.5.0p19 (Raw edition)
**OS version:CentOS release 6.10

**Error message:HTTP/1.1 503 Service Temporarily Unavailable

Output of “cmk --debug -vvn hostname”: (If it is a problem with checks or plugins)

[cpu_tracking] Start with phase ‘busy’
Check_MK version 1.5.0p19

  • FETCHING DATA
    [cpu_tracking] Push phase ‘agent’ (Stack: [‘busy’])
    [piggyback] No persisted sections loaded
    [piggyback] Execute data source
    [cpu_tracking] Pop phase ‘agent’ (Stack: [‘busy’, ‘agent’])
    [cpu_tracking] End
    OK - execution time 0.0 sec | execution_time=0.002 user_time=0.010 system_time=0.000 children_user_time=0.000 children_system_time=0.000 cmk_time_agent=0.000

Hi there,

I have two web-based applications in an AWS VPC, both behind an application load balancer and both sharing an external IP address. There are target groups configured in AWS so if you come in via url1.aws.com it directs you to one application, and url2.aws.com directs you to the other. However, if you hit just the external IP address you’ll get the 503 error because no target group is configured for that.

My issue is that when trying to do standard HTTP URL check monitoring via CheckMK, it seems to me like it’s converting the URL to the IP address and so as far as it can tell the application is unavailable.

Am I correct in this assumption and, if so, am I missing something to force it to go to the actual URL/hostname?

Many thanks,

IanM

Hi @ianmurphy

Welcome to the forum! You are on a pretty ancient checkmk version, which is also not being maintained anymore.

Newer versions do have out of the box checks for AWS ELB and AWS Application ELB. See here: Check Plug-Ins Catalog

Wouldn’t a Checkmk update to a newer version be a better first step here?

Best
Elias

Hi Elias,

Thanks for your response. Yes, yes it would :slight_smile: Unfortunately that’s not possible in our current situation, but we are in the process of replacing a lot of our internal infrastructure with cloud-based stuff. However, we still need to use the version we’re on just now for monitoring of some of the AWS-based infrastructure, until we’ve got everything else set up (arse-about-face I’ll admit but that’s where we are).

So with that said, any advice/recommendations (outside of upgrading)?

Cheers,

Ian

You can configure the VirtualHostname in the check_http ruleset.

Hi Robert,

Thanks for your reply. Will that not set it for any service that uses check_http? Does that therefore not mean I’ll need to create a new ruleset for each host/URL?

Many thanks,

IanM

Yes, you need one rule per service check. The check_http ruleset usually has quite a few rules in it.

You can try to use $HOSTNAME$ as value for the virtual host name. This macro expands to the actual host name.

Thanks Robert, I’ll see what I can do!

Many thanks,

IanM

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.