Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jsoriano opened this issue Aug 11, 2020 · 5 comments · Fixed by #20570
Closed

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

jsoriano opened this issue Aug 11, 2020 · 5 comments · Fixed by #20570
Assignees
Labels
bug Heartbeat Team:obs-ds-hosted-services Label for the Observability Hosted Services team Team:Platforms Label for the Integrations - Platforms team

Comments

@jsoriano
Copy link
Member

jsoriano commented Aug 11, 2020

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
@jsoriano jsoriano added bug Team:Platforms Label for the Integrations - Platforms team labels Aug 11, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-platforms (Team:Platforms)

@jsoriano jsoriano added the Team:obs-ds-hosted-services Label for the Observability Hosted Services team label Aug 11, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/uptime (Team:Uptime)

@ChrsMark
Copy link
Member

🤔 I cannot recall any change that could fix sth like this in 7.x.

@ChrsMark
Copy link
Member

ChrsMark commented Aug 12, 2020

@jsoriano it should be #18882 and more specifically https://github.com/elastic/beats/pull/18882/files#diff-becb7cd8554f76895e450cdb5557331aR208.

This one was back-ported to 7.8.2 but it seems that 7.8.2 never happened.

@jsoriano
Copy link
Member Author

@ChrsMark thanks for the investigation! I guess we are covered then, I will update the description.

We would still need to confirm if the running scheduler is expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Heartbeat Team:obs-ds-hosted-services Label for the Observability Hosted Services team Team:Platforms Label for the Integrations - Platforms team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants