diff --git a/src/write_sensu.c b/src/write_sensu.c
index 268d9e44bb3d4da256b1a6b8390cd56e1578003e..791acb307c54612f3e78de98f322f7c48e6b0458 100644 (file)
--- a/src/write_sensu.c
+++ b/src/write_sensu.c
{
char name_buffer[5 * DATA_MAX_NAME_LEN];
char service_buffer[6 * DATA_MAX_NAME_LEN];
- int i;
+ size_t i;
char *ret_str;
char *temp_str;
char *value_str;
char *ret_str;
char *temp_str;
int status;
- int i;
+ size_t i;
int res;
// add the severity/status
switch (n->severity) {
int statuses[vl->values_len];
struct sensu_host *host = ud->data;
gauge_t *rates = NULL;
- int i;
+ size_t i;
char *msg;
pthread_mutex_lock(&host->lock);
return -1;
}
}
- for (i = 0; i < (size_t) vl->values_len; i++) {
+ for (i = 0; i < vl->values_len; i++) {
msg = sensu_value_to_json(host, ds, vl, (int) i, rates, statuses[i]);
if (msg == NULL) {
sfree(rates);
continue;
}
if (child->values[0].type != OCONFIG_TYPE_STRING ||
- child->values[1].type != OCONFIG_TYPE_STRING) {
+ child->values[1].type != OCONFIG_TYPE_STRING) {
WARNING("sensu attribute needs string arguments.");
continue;
}
strarray_add(&sensu_attrs, &sensu_attrs_num, child->values[0].value.string);
strarray_add(&sensu_attrs, &sensu_attrs_num, child->values[1].value.string);
- DEBUG("write_sensu: got attr: %s => %s", key, val);
+ DEBUG("write_sensu plugin: New attribute: %s => %s",
+ child->values[0].value.string,
+ child->values[1].value.string);
} else if (strcasecmp(child->key, "tag") == 0) {
char *tmp = NULL;
status = cf_util_get_string(child, &tmp);