@cryptotaxi247 / netdata-1 / commits / 29c9d8c48

renamed states family

Costa Tsaousis (ktsaou) committed Mar 7, 2017 at 00:13 UTC 29c9d8c485ea931dc9c3907b0490f3446c079554
1 file changed +17 -17
src/freeipmi_plugin.c
+17 -17
@@ -249,9 +249,9 @@ static int netdata_do_sel = 1;
249 static size_t netdata_sensors_updated = 0;
250 static size_t netdata_sensors_collected = 0;
251 static size_t netdata_sel_events = 0;
252 -static size_t netdata_sensors_state_nominal = 0;
253 -static size_t netdata_sensors_state_warning = 0;
254 -static size_t netdata_sensors_state_critical = 0;
252 +static size_t netdata_sensors_states_nominal = 0;
253 +static size_t netdata_sensors_states_warning = 0;
254 +static size_t netdata_sensors_states_critical = 0;
255
256 struct sensor {
257 int record_id;
@@ -284,9 +284,9 @@ static void netdata_mark_as_not_updated() {
284 netdata_sensors_collected = 0;
285 netdata_sel_events = 0;
286
287 - netdata_sensors_state_nominal = 0;
288 - netdata_sensors_state_warning = 0;
289 - netdata_sensors_state_critical = 0;
287 + netdata_sensors_states_nominal = 0;
288 + netdata_sensors_states_warning = 0;
289 + netdata_sensors_states_critical = 0;
290 }
291
292 static void send_chart_to_netdata_for_units(int units) {
@@ -467,7 +467,7 @@ static void send_metrics_to_netdata_for_units(int units) {
467 }
468
469 static void send_metrics_to_netdata() {
470 - static int sel_chart_generated = 0, sensors_state_chart_generated = 0;
470 + static int sel_chart_generated = 0, sensors_states_chart_generated = 0;
471 struct sensor *sn;
472
473 if(netdata_do_sel && !sel_chart_generated) {
@@ -479,9 +479,9 @@ static void send_metrics_to_netdata() {
479 printf("DIMENSION events '' absolute 1 1\n");
480 }
481
482 - if(!sensors_state_chart_generated) {
483 - sensors_state_chart_generated = 1;
484 - printf("CHART ipmi.sensors_state '' 'IPMI Sensors State' 'sensors' 'sensors' ipmi.sensors_state stacked %d %d\n"
482 + if(!sensors_states_chart_generated) {
483 + sensors_states_chart_generated = 1;
484 + printf("CHART ipmi.sensors_states '' 'IPMI Sensors State' 'sensors' 'states' ipmi.sensors_states stacked %d %d\n"
485 , netdata_priority + 1
486 , netdata_update_every
487 );
@@ -505,14 +505,14 @@ static void send_metrics_to_netdata() {
505 }
506
507 printf(
508 - "BEGIN ipmi.sensors_state\n"
508 + "BEGIN ipmi.sensors_states\n"
509 "SET nominal = %zu\n"
510 "SET warning = %zu\n"
511 "SET critical = %zu\n"
512 "END\n"
513 - , netdata_sensors_state_nominal
514 - , netdata_sensors_state_warning
515 - , netdata_sensors_state_critical
513 + , netdata_sensors_states_nominal
514 + , netdata_sensors_states_warning
515 + , netdata_sensors_states_critical
516 );
517
518 // send metrics to netdata
@@ -592,15 +592,15 @@ static void netdata_get_sensor(
592
593 switch(sensor_state) {
594 case IPMI_MONITORING_STATE_NOMINAL:
595 - netdata_sensors_state_nominal++;
595 + netdata_sensors_states_nominal++;
596 break;
597
598 case IPMI_MONITORING_STATE_WARNING:
599 - netdata_sensors_state_warning++;
599 + netdata_sensors_states_warning++;
600 break;
601
602 case IPMI_MONITORING_STATE_CRITICAL:
603 - netdata_sensors_state_critical++;
603 + netdata_sensors_states_critical++;
604 break;
605
606 default: