@cryptotaxi247 / netdata-1 / commits / 32ae90d58

info logs when alarms are raised

Costa Tsaousis committed Aug 15, 2016 at 03:54 UTC 32ae90d5800cfc69e959688cf87985f2e2c98306
1 file changed +16
src/health.c
+16
@@ -1600,6 +1600,14 @@ void *health_main(void *ptr) {
1600 rc->name, rc->warning->result,
1601 buffer_tostring(rc->warning->error_msg)
1602 );
1603 +
1604 + if(rc->warning->result)
1605 + info("WARNING ALARM '%s' - expression '%s' evaluated to %Lf, %s (source: %s)",
1606 + rc->name,
1607 + rc->warning->source,
1608 + rc->warning->result,
1609 + buffer_tostring(rc->warning->error_msg),
1610 + rc->source);
1611 }
1612 }
1613
@@ -1614,6 +1622,14 @@ void *health_main(void *ptr) {
1622 rc->name, rc->critical->result,
1623 buffer_tostring(rc->critical->error_msg)
1624 );
1625 +
1626 + if(rc->critical->result)
1627 + info("CRITICAL ALARM '%s' - expression '%s' evaluated to %Lf, %s (source: %s)",
1628 + rc->name,
1629 + rc->critical->source,
1630 + rc->critical->result,
1631 + buffer_tostring(rc->critical->error_msg),
1632 + rc->source);
1633 }
1634 }
1635