X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Ftail.c;h=3904f1be201acb31c089057bfe189d78e7e8c5ed;hb=26314b8c3fb08e1f0017ee9a6277b7fe370bf2a0;hp=d5166b2a7a5d5c57857207aa18dab851ccc39367;hpb=84dd85dc85cc2325f9c54100ca3fd7d4842db06f;p=collectd.git diff --git a/src/tail.c b/src/tail.c index d5166b2a..3904f1be 100644 --- a/src/tail.c +++ b/src/tail.c @@ -80,6 +80,10 @@ static int ctail_config_add_match_dstype (ctail_config_match_t *cm, cm->flags |= UTILS_MATCH_CF_GAUGE_MAX; else if (strcasecmp ("GaugeLast", ci->values[0].value.string) == 0) cm->flags |= UTILS_MATCH_CF_GAUGE_LAST; + else if (strcasecmp ("GaugeInc", ci->values[0].value.string) == 0) + cm->flags |= UTILS_MATCH_CF_GAUGE_INC; + else if (strcasecmp ("GaugeAdd", ci->values[0].value.string) == 0) + cm->flags |= UTILS_MATCH_CF_GAUGE_ADD; else cm->flags = 0; } @@ -220,7 +224,6 @@ static int ctail_config_add_file (oconfig_item_t *ci) cdtime_t interval = 0; char *plugin_instance = NULL; int num_matches = 0; - int status; int i; if ((ci->values_num != 1) || (ci->values[0].type != OCONFIG_TYPE_STRING)) @@ -237,10 +240,10 @@ static int ctail_config_add_file (oconfig_item_t *ci) return (-1); } - status = 0; for (i = 0; i < ci->children_num; i++) { oconfig_item_t *option = ci->children + i; + int status = 0; if (strcasecmp ("Instance", option->key) == 0) status = cf_util_get_string (option, &plugin_instance); @@ -338,6 +341,8 @@ static int ctail_init (void) return (-1); } + memset(&ud, '\0', sizeof(ud)); + for (i = 0; i < tail_match_list_num; i++) { ud.data = (void *)tail_match_list[i];