projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Initial support of GPSd in collectd.
[collectd.git]
/
src
/
tail.c
diff --git
a/src/tail.c
b/src/tail.c
index
d5166b2
..
3904f1b
100644
(file)
--- 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;
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;
}
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;
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))
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);
}
return (-1);
}
- status = 0;
for (i = 0; i < ci->children_num; i++)
{
oconfig_item_t *option = ci->children + i;
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);
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);
}
return (-1);
}
+ memset(&ud, '\0', sizeof(ud));
+
for (i = 0; i < tail_match_list_num; i++)
{
ud.data = (void *)tail_match_list[i];
for (i = 0; i < tail_match_list_num; i++)
{
ud.data = (void *)tail_match_list[i];