Merge pull request #1136 from chakflying/fix/prometheus-on-delete

Fix: Remove prometheus metrics on delete [Test needed]
This commit is contained in:
Louis Lam
2022-03-27 11:05:50 +08:00
committed by GitHub
3 changed files with 19 additions and 0 deletions

View File

@@ -86,6 +86,16 @@ class Prometheus {
}
}
remove() {
try {
monitor_cert_days_remaining.remove(this.monitorLabelValues);
monitor_cert_is_valid.remove(this.monitorLabelValues);
monitor_response_time.remove(this.monitorLabelValues);
monitor_status.remove(this.monitorLabelValues);
} catch (e) {
console.error(e);
}
}
}
module.exports = {