projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4d7f2ab
)
memcachec plugin: Add the "ExcludeRegex" config option.
author
Florian Forster
<octo@huhu.verplant.org>
Wed, 24 Mar 2010 15:58:36 +0000
(16:58 +0100)
committer
Florian Forster
<octo@huhu.verplant.org>
Wed, 24 Mar 2010 15:58:36 +0000
(16:58 +0100)
src/memcachec.c
patch
|
blob
|
history
diff --git
a/src/memcachec.c
b/src/memcachec.c
index
75e6427
..
d066501
100644
(file)
--- a/
src/memcachec.c
+++ b/
src/memcachec.c
@@
-37,6
+37,7
@@
typedef struct web_match_s web_match_t;
struct web_match_s /* {{{ */
{
char *regex;
struct web_match_s /* {{{ */
{
char *regex;
+ char *exclude_regex;
int dstype;
char *type;
char *instance;
int dstype;
char *type;
char *instance;
@@
-220,6
+221,8
@@
static int cmc_config_add_match (web_page_t *page, /* {{{ */
if (strcasecmp ("Regex", child->key) == 0)
status = cmc_config_add_string ("Regex", &match->regex, child);
if (strcasecmp ("Regex", child->key) == 0)
status = cmc_config_add_string ("Regex", &match->regex, child);
+ else if (strcasecmp ("ExcludeRegex", child->key) == 0)
+ status = cmc_config_add_string ("ExcludeRegex", &match->exclude_regex, child);
else if (strcasecmp ("DSType", child->key) == 0)
status = cmc_config_add_match_dstype (&match->dstype, child);
else if (strcasecmp ("Type", child->key) == 0)
else if (strcasecmp ("DSType", child->key) == 0)
status = cmc_config_add_match_dstype (&match->dstype, child);
else if (strcasecmp ("Type", child->key) == 0)
@@
-262,7
+265,8
@@
static int cmc_config_add_match (web_page_t *page, /* {{{ */
if (status != 0)
return (status);
if (status != 0)
return (status);
- match->match = match_create_simple (match->regex, NULL, match->dstype);
+ match->match = match_create_simple (match->regex, match->exclude_regex,
+ match->dstype);
if (match->match == NULL)
{
ERROR ("memcachec plugin: tail_match_add_match_simple failed.");
if (match->match == NULL)
{
ERROR ("memcachec plugin: tail_match_add_match_simple failed.");