@cryptotaxi247 / netdata-1 / commits / c367788fc

Delay removed event for 60 seconds after the chart's last collected time (#12388)

* delay removed event for 60 seconds * change check

Emmanuel Vasilakis committed Mar 14, 2022 at 15:48 UTC c367788fc027a2696ea712f85aebb5db9d158de8
1 file changed +4 -1
health/health.c
+4 -1
@@ -747,8 +747,11 @@ void *health_main(void *ptr) {
747 if (update_disabled_silenced(host, rc))
748 continue;
749
750 + // create an alert removed event if the chart is obsolete and
751 + // has stopped being collected for 60 seconds
752 if (unlikely(rc->rrdset && rc->status != RRDCALC_STATUS_REMOVED &&
751 - rrdset_flag_check(rc->rrdset, RRDSET_FLAG_OBSOLETE))) {
753 + rrdset_flag_check(rc->rrdset, RRDSET_FLAG_OBSOLETE) &&
754 + now > (rc->rrdset->last_collected_time.tv_sec + 60))) {
755 if (!rrdcalc_isrepeating(rc)) {
756 time_t now = now_realtime_sec();
757 ALARM_ENTRY *ae = health_create_alarm_entry(