fixed typo the reported all warning alarms as critical and vice versa
Costa Tsaousis committed
Aug 18, 2016 at 00:11 UTC
316d0608f3ea61c487409bd12e67958c606e8466
1 file changed
+8
-8
src/health.c
+8
-8
@@ -1555,31 +1555,31 @@ static inline void health_alarm_log_process(void) {
1555
}
1556
}
1557
1558
-static inline void rrdcalc_check_critical_event(RRDCALC *rc) {
1559
- calculated_number n = rc->critical->result;
1558
+static inline void rrdcalc_check_warning_event(RRDCALC *rc) {
1559
+ calculated_number n = rc->warning->result;
1560
1561
- int old_status = rc->critical_status;
1561
+ int old_status = rc->warning_status;
1562
int new_status = rrdcalc_value2status(n);
1563
1564
if(new_status != old_status) {
1565
time_t now = time(NULL);
1566
health_alarm_log(time(NULL), ALARM_ENTRY_TYPE_WARNING, rc->name, rc->rrdset->id, rc->exec, now - rc->last_status_change, rc->old_value, rc->value, old_status, new_status, rc->source);
1567
rc->last_status_change = now;
1568
- rc->critical_status = new_status;
1568
+ rc->warning_status = new_status;
1569
}
1570
}
1571
1572
-static inline void rrdcalc_check_warning_event(RRDCALC *rc) {
1573
- calculated_number n = rc->warning->result;
1572
+static inline void rrdcalc_check_critical_event(RRDCALC *rc) {
1573
+ calculated_number n = rc->critical->result;
1574
1575
- int old_status = rc->warning_status;
1575
+ int old_status = rc->critical_status;
1576
int new_status = rrdcalc_value2status(n);
1577
1578
if(new_status != old_status) {
1579
time_t now = time(NULL);
1580
health_alarm_log(time(NULL), ALARM_ENTRY_TYPE_CRITICAL, rc->name, rc->rrdset->id, rc->exec, now - rc->last_status_change, rc->old_value, rc->value, old_status, new_status, rc->source);
1581
rc->last_status_change = now;
1582
- rc->warning_status = new_status;
1582
+ rc->critical_status = new_status;
1583
}
1584
}
1585