Some plugins' RC was != 0 and started to fail due to
stricter verification introduced by
3b9c7b2.
This commit fixes those return values.
For some plugins, fix verbosity of error message: non-zero rc
should be error, not warning.
Change-Id: I9a3f1f80e266858b6744fd9d9d99b352b8d94306
Change-Id: Ibf6ebc6cdc93c6e105d488e4a131dcb6e8eea19b
Change-Id: I35bac15fa0a89b068575739ac1cff0115c9d3a40
s
Change-Id: I992002c56763fbdea5347e5b6e176cc86f5a08ce
(cherry picked from commit
a07f44c9cd5828a84545dcfe22544bfed2ea8812)
} else if (strcasecmp(key, "Normalization") == 0) {
int normalize_tmp = atoi(value);
if (normalize_tmp < 0 || normalize_tmp > 2) {
- WARNING("barometer: collectd_barometer_config: invalid normalization: %d",
+ ERROR("barometer: collectd_barometer_config: invalid normalization: %d",
normalize_tmp);
return 1;
}
static int config_keys_num = STATIC_ARRAY_SIZE(config_keys);
static int load_config(const char *key, const char *value) {
- if (strcasecmp(key, "ReportRelative") == 0)
+ if (strcasecmp(key, "ReportRelative") == 0) {
#ifdef _SC_NPROCESSORS_ONLN
report_relative_load = IS_TRUE(value);
#else
"is not available, because I can't determine the "
"number of CPUS on this system. Sorry.");
#endif
+ return 0;
+ }
return -1;
}
static void load_submit(gauge_t snum, gauge_t mnum, gauge_t lnum) {
log_level = parse_log_severity(value);
if (log_level < 0) {
log_level = LOG_INFO;
- ERROR("logfile: invalid loglevel [%s] defaulting to 'info'", value);
- return 1;
+ WARNING("logfile: invalid loglevel [%s] defaulting to 'info'", value);
+ return 0;
}
} else if (0 == strcasecmp(key, "File")) {
sfree(log_file);
});
if (status == EINVAL) {
- WARNING("openvpn plugin: status filename \"%s\" "
+ ERROR("openvpn plugin: status filename \"%s\" "
"already used, please choose a "
"different one.",
status_name);
} else if (strcasecmp(key, "NotifyLevel") == 0) {
notif_severity = parse_notif_severity(value);
if (notif_severity < 0)
+ ERROR("syslog: invalid notification severity [%s]", value);
return 1;
}
tmp = atoi(value);
if (tmp < 0) {
- WARNING("ted plugin: Invalid retry count: %i", tmp);
+ ERROR("ted plugin: Invalid retry count: %i", tmp);
return 1;
}
conf_retries = tmp;