Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

Metric last_state persists after ExternalSecret deleted #399

Closed
EricHorst opened this issue Jun 4, 2020 · 12 comments
Closed

Metric last_state persists after ExternalSecret deleted #399

EricHorst opened this issue Jun 4, 2020 · 12 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed Stale

Comments

@EricHorst
Copy link
Contributor

Great new metric last_state, thanks!

We now have a monitoring rule is in place to watch for failed sync. A sync was failing so I deleted the ExternalSecret. However, last_state does not forget and continues to report -1 on the ExternalSecret that no longer exists. It continues to report success on deleted objects as well.

Clearly this is bad and last_state should stop reporting ExternalSecrets status when they go away.

@Flydiverny Flydiverny added the bug Something isn't working label Jun 4, 2020
@cep21
Copy link
Contributor

cep21 commented Aug 30, 2020

Would love a fix for this too :)

The line is here:

https://github.com/godaddy/kubernetes-external-secrets/blob/af9147548147a011230850f57c98555c0bbd9325/lib/metrics.js#L33

Once the gauge is set, it needs to be explicitly unset or removed when the external secret is removed. I think observeSync needs a similar "not monitored anymore" callback. I think prom-client remove will cause the metric to stop being reported https://github.com/siimon/prom-client/blob/8d69d1f615bd0f82518292720168c368937fb0dc/lib/gauge.js#L114

One workaround is to restart the external secret daemon when you see the bad gauge.

@github-actions
Copy link

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions
Copy link

github-actions bot commented Mar 1, 2021

This issue was closed because it has been stalled for 30 days with no activity.

@github-actions github-actions bot closed this as completed Mar 1, 2021
@cep21
Copy link
Contributor

cep21 commented Mar 1, 2021

This bug is still around

@loreleimccollum-work
Copy link

Yeah would love to see a fix for this, its impacting the monitoring of our secrets

@moolen moolen added good first issue Good for newcomers help wanted Extra attention is needed labels May 3, 2021
@github-actions
Copy link

github-actions bot commented Aug 2, 2021

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Aug 2, 2021
@github-actions
Copy link

github-actions bot commented Sep 1, 2021

This issue was closed because it has been stalled for 30 days with no activity.

@github-actions github-actions bot closed this as completed Sep 1, 2021
@druesendieb
Copy link

This still haunts our monitoring checks - could you please look into this?

@Flydiverny Flydiverny removed the Stale label Sep 14, 2021
@Flydiverny Flydiverny reopened this Sep 14, 2021
@github-actions
Copy link

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Dec 14, 2021
@Flydiverny
Copy link
Member

While this is still unfortunate please see #864

@github-actions github-actions bot removed the Stale label Dec 15, 2021
@github-actions
Copy link

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions
Copy link

This issue was closed because it has been stalled for 30 days with no activity.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed Stale
Projects
None yet
Development

No branches or pull requests

6 participants