X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fsensors.c;h=a30549fea5ebf1b8dcbde4447632b9c8261aa3f1;hb=03b13552b2e9b4b19d3120d8dbb2ff8fc4ecf481;hp=3e1d4f9aa6ba9d78997c4574b679670de2b5b9e3;hpb=e4080f7aea79ffa3ad21fb2c8e6be311b1a404b9;p=collectd.git diff --git a/src/sensors.c b/src/sensors.c index 3e1d4f9a..a30549fe 100644 --- a/src/sensors.c +++ b/src/sensors.c @@ -338,12 +338,24 @@ static void sensors_submit (const char *plugin_instance, const char *type, const char *type_instance, double val) { + char match_key[1024]; + int status; + value_t values[1]; value_list_t vl = VALUE_LIST_INIT; - if ((sensor_list != NULL) - && (ignorelist_match (sensor_list, type_instance))) + status = snprintf (match_key, sizeof (match_key), "%s/%s-%s", + plugin_instance, type, type_instance); + if ((status < 1) || (status >= sizeof (match_key))) return; + match_key[sizeof (match_key) - 1] = '\0'; + + if (sensor_list != NULL) + { + DEBUG ("sensors plugin: Checking ignorelist for `%s'", match_key); + if (ignorelist_match (sensor_list, match_key)) + return; + } values[0].gauge = val;