Skip to content

Autodiscover based on services doesn't stop monitors when service is deleted #20544

Closed

Description

In 7.7 and 7.8, when a service is deleted, no autodiscover event seems to happen, so the monitor keeps running.

Since 7.9, the autodiscover event happens, and the monitor seems to be stopped, but something keeps running:

2020-08-11T12:06:57.646Z	DEBUG	[scheduler]	scheduler/scheduler.go:195	Job 'auto-http-0XADF69AB61E75FE7F' returned at 2020-08-11 12:06:57.646943114 +0000 UTC m=+15.631587534

They seem to be two different issues:

For confirmed bugs, please report:

  • Version: At least since 7.7.
  • Steps to Reproduce:
    • Enable kubernetes autodiscover based on services on Heartbeat.
    • Create a service, wait for a monitor to be started.
    • Delete the service, some things keep running.

A configuration like this one can be used to reproduce this:

  heartbeat.autodiscover:
    providers:
      - type: kubernetes
        resource: service
        scope: cluster
        cleanup_timeout: 0s
        templates:
          - condition:
              equals:
                kubernetes.service.name: test
            config:
              - type: http
                urls: ["https://${data.host}:${data.port}"]
                schedule: "@every 30s"
                check.response.status: 200
                timeout: 10s
                wait: 1s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions