From: Florian Forster Date: Wed, 24 Mar 2010 15:58:21 +0000 (+0100) Subject: curl plugin: Add the "ExcludeRegex" config option. X-Git-Tag: collectd-5.1.0~81^2~1 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=4d7f2ab1298668b9bdb135c127ad6e1102b94db3;p=collectd.git curl plugin: Add the "ExcludeRegex" config option. --- diff --git a/src/curl.c b/src/curl.c index 6e2811c8..a533e147 100644 --- a/src/curl.c +++ b/src/curl.c @@ -37,6 +37,7 @@ typedef struct web_match_s web_match_t; struct web_match_s /* {{{ */ { char *regex; + char *exclude_regex; int dstype; char *type; char *instance; @@ -291,6 +292,8 @@ static int cc_config_add_match (web_page_t *page, /* {{{ */ if (strcasecmp ("Regex", child->key) == 0) status = cc_config_add_string ("Regex", &match->regex, child); + else if (strcasecmp ("ExcludeRegex", child->key) == 0) + status = cc_config_add_string ("ExcludeRegex", &match->exclude_regex, child); else if (strcasecmp ("DSType", child->key) == 0) status = cc_config_add_match_dstype (&match->dstype, child); else if (strcasecmp ("Type", child->key) == 0) @@ -333,7 +336,8 @@ static int cc_config_add_match (web_page_t *page, /* {{{ */ 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 ("curl plugin: tail_match_add_match_simple failed.");