Heartbeat auto-discover not working for AWS ELB

Hello, I am trying to set up heartbeat for AWS autodiscover ELB in 2 accounts (1 I did succesffully) and on the second with the exact same configuration I am getting the following errors. I configured everything as a fargate container.

|6/29/2023, 1:38:45 PM GMT+2|panic: runtime error: invalid memory address or nil pointer dereference|7ee9d383e0be40419da90920492a7302|elastic-heartbeat-container| |---|---|---|---| |6/29/2023, 1:38:45 PM GMT+2|[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x56143203dd50]|7ee9d383e0be40419da90920492a7302|elastic-heartbeat-container| |6/29/2023, 1:38:45 PM GMT+2|goroutine 1194 [running]:|7ee9d383e0be40419da90920492a7302|elastic-heartbeat-container| |6/29/2023, 1:38:45 PM GMT+2|github.com/elastic/beats/v7/x-pack/libbeat/autodiscover/providers/aws/elb.(*fetchRequest).fetchListeners(0xc000322b00, {{0xc000cda7e0, 0x4, 0x4}, 0xc001069590, 0xc000b89548, 0x0, 0xc001069560, {0xc00005ab84, 0x4}, ...})|7ee9d383e0be40419da90920492a7302|elastic-heartbeat-container| |6/29/2023, 1:38:45 PM GMT+2|github.com/elastic/beats/v7/x-pack/libbeat/autodiscover/providers/aws/elb/fetch.go:204 +0x150|7ee9d383e0be40419da90920492a7302|elastic-heartbeat-container| |6/29/2023, 1:38:45 PM GMT+2|github.com/elastic/beats/v7/x-pack/libbeat/autodiscover/providers/aws/elb.(*fetchRequest).fetchNextPage.func1()|7ee9d383e0be40419da90920492a7302|elastic-heartbeat-container| |6/29/2023, 1:38:45 PM GMT+2|github.com/elastic/beats/v7/x-pack/libbeat/autodiscover/providers/aws/elb/fetch.go:168 +0x58|7ee9d383e0be40419da90920492a7302|elastic-heartbeat-container| |6/29/2023, 1:38:45 PM GMT+2|github.com/elastic/beats/v7/x-pack/libbeat/autodiscover/providers/aws/elb.(*fetchRequest).dispatch.func1()|7ee9d383e0be40419da90920492a7302|elastic-heartbeat-container| |6/29/2023, 1:38:45 PM GMT+2|github.com/elastic/beats/v7/x-pack/libbeat/autodiscover/providers/aws/elb/fetch.go:183 +0xb9|7ee9d383e0be40419da90920492a7302|elastic-heartbeat-container| |6/29/2023, 1:38:45 PM GMT+2|created by github.com/elastic/beats/v7/x-pack/libbeat/autodiscover/providers/aws/elb.(*fetchRequest).dispatch|7ee9d383e0be40419da90920492a7302|elastic-heartbeat-container| |6/29/2023, 1:38:45 PM GMT+2|github.com/elastic/beats/v7/x-pack/libbeat/autodiscover/providers/aws/elb/fetch.go:178 +0x8d|7ee9d383e0be40419da90920492a7302|elastic-heartbeat-container| |6/29/2023, 1:38:44 PM GMT+2|{log.level:debug,@timestamp:2023-06-29T11:38:44.495Z,log.logger:autodiscover-elb-fetch,log.origin:{file.name:elb/fetch.go,file.line:156},message:fetched ELB page,service.name:heartbeat,ecs.version:1.6.0}|7ee9d383e0be40419da90920492a7302|elastic-heartbeat-container| |6/29/2023, 1:38:44 PM GMT+2|{log.level:debug,@timestamp:2023-06-29T11:38:44.003Z,log.logger:autodiscover-elb-fetch,log.origin:{file.name:elb/fetch.go,file.line:156},message:fetched ELB page,service.name:heartbeat,ecs.version:1.6.0}|7ee9d383e0be40419da90920492a7302|elastic-heartbeat-container| |6/29/2023, 1:38:43 PM GMT+2|{log.level:debug,@timestamp:2023-06-29T11:38:43.656Z,log.logger:autodiscover-elb-fetch,log.origin:{file.name:elb/fetch.go,file.line:156},message:fetched ELB page,service.name:heartbeat,ecs.version:1.6.0}|7ee9d383e0be40419da90920492a7302|elastic-heartbeat-container|

Hi @michael31,

We have identified a nil pointer de-reference inside the ELB provider. There's probably a difference between the two accounts that is causing one of the api calls to return an empty response.

As this provider is still considered in experimental status, I can't really tell if or when it will get addressed.

Sorry for the inconvenience.

@michael31 this probably isn't the answer you were hoping for, but we're probably going to go ahead with [Heartbeat] Remove AWS ELB autodiscovery · Issue #29782 · elastic/beats · GitHub and deprecate the ELB autodiscover provider. We may fix this bug along with that, but it's just not seen much uptake since launching.

Check back on that issue to see what we decide in terms of how long to leave it in as deprecated. Since it's an experimental feature it doesn't have any formal guidelines around deprecation windows.

I hope you can find an alternative solution for your use case of AWS ELB monitoring.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.