@cryptotaxi247 / netdata-1 / commits / 928d4c50f

Integrate patches from freeipmi and set set paramters (#4993)

Florian Ströger committed Dec 17, 2018 at 12:09 UTC 928d4c50f6174a170318625ec69bcbfe968797c0
1 file changed +11 -9
collectors/freeipmi.plugin/freeipmi_plugin.c
+11 -9
@@ -102,11 +102,11 @@ char *sensor_config_file = NULL;
102 * - See ipmi_monitoring.h for descriptions of these flags.
103 */
104 int reread_sdr_cache = 0;
105 -int ignore_non_interpretable_sensors = 1;
105 +int ignore_non_interpretable_sensors = 0;
106 int bridge_sensors = 0;
107 int interpret_oem_data = 0;
108 int shared_sensors = 0;
109 -int discrete_reading = 0;
109 +int discrete_reading = 1;
110 int ignore_scanning_disabled = 0;
111 int assume_bmc_owner = 0;
112 int entity_sensor_names = 0;
@@ -972,12 +972,13 @@ _ipmimonitoring_sensors (struct ipmi_monitoring_ipmi_config *ipmi_config)
972 goto cleanup;
973 }
974
975 - if (!(sensor_bitmask_strings = ipmi_monitoring_sensor_read_sensor_bitmask_strings (ctx)))
976 - {
977 - error( "ipmi_monitoring_sensor_read_sensor_bitmask_strings(): %s",
978 - ipmi_monitoring_ctx_errormsg (ctx));
979 - goto cleanup;
980 - }
975 + /* it's ok for this to be NULL, i.e. sensor_bitmask ==
976 + * IPMI_MONITORING_SENSOR_BITMASK_TYPE_UNKNOWN
977 + */
978 + sensor_bitmask_strings = ipmi_monitoring_sensor_read_sensor_bitmask_strings (ctx);
979 +
980 +
981 +
982 #endif // NETDATA_COMMENTED
983
984 if ((sensor_reading_type = ipmi_monitoring_sensor_read_sensor_reading_type (ctx)) < 0)
@@ -1084,7 +1085,8 @@ _ipmimonitoring_sensors (struct ipmi_monitoring_ipmi_config *ipmi_config)
1085 else
1086 printf (", N/A");
1087
1087 - if (sensor_bitmask_type != IPMI_MONITORING_SENSOR_BITMASK_TYPE_UNKNOWN)
1088 + if (sensor_bitmask_type != IPMI_MONITORING_SENSOR_BITMASK_TYPE_UNKNOWN
1089 + && sensor_bitmask_strings)
1090 {
1091 unsigned int i = 0;
1092