#include "collectd.h"
#include "common.h"
#include "plugin.h"
+#include "utils_complain.h"
#include <pthread.h>
char *community;
int version;
void *sess_handle;
+ c_complain_t complaint;
uint32_t interval;
time_t next_update;
data_definition_t **data_list;
return (-1);
memset (hd, '\0', sizeof (host_definition_t));
hd->version = 2;
+ C_COMPLAIN_INIT (&hd->complaint);
hd->name = strdup (ci->values[0].value.string);
if (hd->name == NULL)
char *errstr = NULL;
snmp_sess_error (host->sess_handle, NULL, NULL, &errstr);
- ERROR ("snmp plugin: host %s: snmp_sess_synch_response failed: %s",
+
+ c_complain (LOG_ERR, &host->complaint,
+ "snmp plugin: host %s: snmp_sess_synch_response failed: %s",
host->name, (errstr == NULL) ? "Unknown problem" : errstr);
if (res != NULL)
}
status = 0;
assert (res != NULL);
+ c_release (LOG_INFO, &host->complaint,
+ "snmp plugin: host %s: snmp_sess_synch_response successful.",
+ host->name);
vb = res->variables;
if (vb == NULL)