summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: afecba0)
raw | patch | inline | side by side (parent: afecba0)
author | Pavel Rochnyack <pavel2000@ngs.ru> | |
Mon, 19 Sep 2016 10:07:53 +0000 (16:07 +0600) | ||
committer | Pavel Rochnyack <pavel2000@ngs.ru> | |
Mon, 10 Jul 2017 09:38:37 +0000 (16:38 +0700) |
src/collectd.conf.pod | patch | blob | history | |
src/curl.c | patch | blob | history | |
src/memcachec.c | patch | blob | history | |
src/tail.c | patch | blob | history | |
src/tail_csv.c | patch | blob | history |
diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod
index 91ff74162996a55b732b77154cdb038ed94878d6..2f7e1cd5d427558279b1e547b11609ddc72e4295 100644 (file)
--- a/src/collectd.conf.pod
+++ b/src/collectd.conf.pod
<Plugin curl>
<Page "stock_quotes">
- PluginName "quotes"
+ Plugin "quotes"
URL "http://finance.google.com/finance?q=NYSE%3AAMD"
User "foo"
Password "bar"
=over 4
-=item B<PluginName> I<PluginName>
+=item B<Plugin> I<Plugin>
-Use I<PluginName> as the plugin name when submitting values.
+Use I<Plugin> as the plugin name when submitting values.
Defaults to 'curl'.
=item B<URL> I<URL>
<Page "plugin_instance">
Server "localhost"
Key "page_key"
- PluginName "plugin_name"
+ Plugin "plugin_name"
<Match>
Regex "(\\d+) bytes sent"
DSType CounterAdd
When connected to the memcached server, asks for the page I<Key>.
-=item B<PluginName> I<PluginName>
+=item B<Plugin> I<Plugin>
-Use I<PluginName> as the plugin name when submitting values.
+Use I<Plugin> as the plugin name when submitting values.
Defaults to 'memcachec'.
=item E<lt>B<Match>E<gt>
<Plugin "tail">
<File "/var/log/exim4/mainlog">
- PluginName "mail"
+ Plugin "mail"
Instance "exim"
Interval 60
<Match>
@@ -7563,12 +7563,12 @@ The config consists of one or more B<File> blocks, each of which configures one
logfile to parse. Within each B<File> block, there are one or more B<Match>
blocks, which configure a regular expression to search for.
-The B<PluginName> and B<Instance> options in the B<File> block may be used to set
+The B<Plugin> and B<Instance> options in the B<File> block may be used to set
the plugin name and instance respectively. So in the above example the plugin name
C<mail-exim> would be used.
These options are applied for all B<Match> blocks that B<follow> it, until the
-next B<PluginName> or B<Instance> option. This way you can extract several plugin
+next B<Plugin> or B<Instance> option. This way you can extract several plugin
instances from one logfile, handy when parsing syslog and the like.
The B<Interval> option allows you to define the length of time between reads. If
Index 1
</Metric>
<File "/var/log/snort/snort.stats">
- PluginName "snortstats"
+ Plugin "snortstats"
Instance "eth0"
Interval 600
Collect "snort-dropped"
=over 4
-=item B<PluginName> I<PluginName>
+=item B<Plugin> I<Plugin>
-Use I<PluginName> as the plugin name when submitting values.
+Use I<Plugin> as the plugin name when submitting values.
Defaults to 'tail_csv'.
=item B<Instance> I<PluginInstance>
diff --git a/src/curl.c b/src/curl.c
index d1957d2d027087c7d3f508993c6f6a19933d181a..02761d265cd40d17cca4c1383076c37144308163 100644 (file)
--- a/src/curl.c
+++ b/src/curl.c
for (int i = 0; i < ci->children_num; i++) {
oconfig_item_t *child = ci->children + i;
- if (strcasecmp("PluginName", child->key) == 0)
+ if (strcasecmp("Plugin", child->key) == 0)
status = cf_util_get_string(child, &page->plugin_name);
else if (strcasecmp("URL", child->key) == 0)
status = cf_util_get_string(child, &page->url);
diff --git a/src/memcachec.c b/src/memcachec.c
index 965aa6539bbfc52e404753225d1e66c3aa1894ed..bd088ecdfce3cb6b67322875e34e416688623e90 100644 (file)
--- a/src/memcachec.c
+++ b/src/memcachec.c
status = cmc_config_add_string("Server", &page->server, child);
else if (strcasecmp("Key", child->key) == 0)
status = cmc_config_add_string("Key", &page->key, child);
- else if (strcasecmp("PluginName", child->key) == 0)
- status = cmc_config_add_string("PluginName", &page->plugin_name, child);
+ else if (strcasecmp("Plugin", child->key) == 0)
+ status = cmc_config_add_string("Plugin", &page->plugin_name, child);
else if (strcasecmp("Match", child->key) == 0)
/* Be liberal with failing matches => don't set `status'. */
cmc_config_add_match(page, child);
diff --git a/src/tail.c b/src/tail.c
index f7f061a961ec5a17033702afb401a3314cf6e9ba..a135d79c0459e0b8f8f8f628ff95966a2e6d4163 100644 (file)
--- a/src/tail.c
+++ b/src/tail.c
/*
* <Plugin tail>
* <File "/var/log/exim4/mainlog">
- * PluginName "mail"
+ * Plugin "mail"
* Instance "exim"
* Interval 60
* <Match>
oconfig_item_t *option = ci->children + i;
int status = 0;
- if (strcasecmp("PluginName", option->key) == 0)
+ if (strcasecmp("Plugin", option->key) == 0)
status = cf_util_get_string (option, &plugin_name);
else if (strcasecmp("Instance", option->key) == 0)
status = cf_util_get_string(option, &plugin_instance);
diff --git a/src/tail_csv.c b/src/tail_csv.c
index 498b4c1153f51ab290bb4a5ed30fa7c684600c49..f303988553d09f696c231b212cf2cfb8ee9a4314 100644 (file)
--- a/src/tail_csv.c
+++ b/src/tail_csv.c
cf_util_get_cdtime(option, &id->interval);
else if (strcasecmp("TimeFrom", option->key) == 0)
status = tcsv_config_get_index(option, &id->time_from);
- else if (strcasecmp("PluginName", option->key) == 0)
+ else if (strcasecmp("Plugin", option->key) == 0)
status = cf_util_get_string(option, &id->plugin_name);
else {
WARNING("tail_csv plugin: Option `%s' not allowed here.", option->key);