From 0a9987a51de832d2bac21cc6bdac24347bc18204 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 4 Apr 2008 11:02:38 +0200 Subject: [PATCH] ipmi plugin: Improve error messages when removing a sensor. Don't tell the user to file a bug report, when a sensor is removed because IPMI reported an error. Tell him to file a bug report, though, if collectd doesn't know how to handle the value. --- src/ipmi.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ipmi.c b/src/ipmi.c index bba4599e..516dd7ff 100644 --- a/src/ipmi.c +++ b/src/ipmi.c @@ -114,8 +114,7 @@ static void sensor_read_handler (ipmi_sensor_t *sensor, if (err != 0) { INFO ("ipmi plugin: sensor_read_handler: Removing sensor %s, " - "because it failed with status %#x. If you need this sensor, " - "please file a bug report.", + "because it failed with status %#x.", sensor_name_ptr, err); sensor_list_remove (sensor); return; @@ -124,7 +123,8 @@ static void sensor_read_handler (ipmi_sensor_t *sensor, if (value_present != IPMI_BOTH_VALUES_PRESENT) { INFO ("ipmi plugin: sensor_read_handler: Removing sensor %s, " - "because it provides %s.", + "because it provides %s. If you need this sensor, " + "please file a bug report.", sensor_name_ptr, (value_present == IPMI_RAW_VALUE_PRESENT) ? "only the raw value" @@ -160,7 +160,8 @@ static void sensor_read_handler (ipmi_sensor_t *sensor, sensor_type_str = ipmi_sensor_get_sensor_type_string (sensor); INFO ("ipmi plugin: sensor_read_handler: Removing sensor %s, " - "because I don't know how to handle its type (%#x, %s).", + "because I don't know how to handle its type (%#x, %s). " + "If you need this sensor, please file a bug report.", sensor_name_ptr, sensor_type, sensor_type_str); sensor_list_remove (sensor); return; -- 2.30.2