<Plugin curl>
<Page "stock_quotes">
+ Plugin "quotes"
URL "http://finance.google.com/finance?q=NYSE%3AAMD"
User "foo"
Password "bar"
=over 4
+=item B<Plugin> I<Plugin>
+
+Use I<Plugin> as the plugin name when submitting values.
+Defaults to C<curl>.
+
=item B<URL> I<URL>
URL of the web site to retrieve. Since a regular expression will be used to
Use I<Name> as the host name when submitting values. Defaults to the global
host name setting.
+=item B<Plugin> I<Plugin>
+
+Use I<Plugin> as the plugin name when submitting values.
+Defaults to C<curl_json>.
+
=item B<Instance> I<Instance>
Sets the plugin instance to I<Instance>.
<Plugin "curl_xml">
<URL "http://localhost/stats.xml">
Host "my_host"
+ #Plugin "curl_xml"
Instance "some_instance"
User "collectd"
Password "thaiNg0I"
Type "magic_level"
#InstancePrefix "prefix-"
InstanceFrom "td[1]"
+ #PluginInstanceFrom "td[1]"
ValuesFrom "td[2]/span[@class=\"level\"]"
</XPath>
</URL>
Use I<Name> as the host name when submitting values. Defaults to the global
host name setting.
+=item B<Plugin> I<Plugin>
+
+Use I<Plugin> as the plugin name when submitting values.
+Defaults to 'curl_xml'.
+
=item B<Instance> I<Instance>
-Use I<Instance> as the plugin instance when submitting values. Defaults to an
-empty string (no plugin instance).
+Use I<Instance> as the plugin instance when submitting values.
+May be overridden by B<PluginInstanceFrom> option inside B<XPath> blocks.
+Defaults to an empty string (no plugin instance).
=item B<Namespace> I<Prefix> I<URL>
XPath expression must return exactly one element. The element's value is then
used as I<type instance>, possibly prefixed with I<InstancePrefix> (see above).
-This value is required. As a special exception, if the "base XPath expression"
-(the argument to the B<XPath> block) returns exactly one argument, then this
-option may be omitted.
+=item B<PluginInstanceFrom> I<PluginInstanceFrom>
+
+Specifies a XPath expression to use for determining the I<plugin instance>. The
+XPath expression must return exactly one element. The element's value is then
+used as I<plugin instance>.
+
+=back
+
+If the "base XPath expression" (the argument to the B<XPath> block) returns
+exactly one argument, then I<InstanceFrom> and I<PluginInstanceFrom> may be omitted.
+Otherwise, at least one of I<InstanceFrom> or I<PluginInstanceFrom> is required.
+
+=over 4
=item B<ValuesFrom> I<ValuesFrom> [I<ValuesFrom> ...]
I<type> specified with B<Type> (see above). Each XPath expression must return
exactly one element. The element's value is then parsed as a number and used as
value for the appropriate value in the value list dispatched to the daemon.
+This option is required.
=back
</Result>
</Query>
<Database "product_information">
+ #Plugin "warehouse"
Driver "mysql"
Interval 120
DriverOption "host" "localhost"
=over 4
+=item B<Plugin> I<Plugin>
+
+Use I<Plugin> as the plugin name when submitting query results from
+this B<Database>. Defaults to C<dbi>.
+
=item B<Interval> I<Interval>
Sets the interval (in seconds) in which the values will be collected from this
If you have for example dual power supply and one of them is (un)plugged then
a notification is sent.
+=item B<SELEnabled> I<true>|I<false>
+
+If system event log (SEL) is enabled, plugin will listen for sensor threshold
+and discrete events. When event is received the notification is sent.
+Defaults to B<false>.
+
+=item B<SELClearEvent> I<true>|I<false>
+
+If SEL clear event is enabled, plugin will delete event from SEL list after
+it is received and successfully handled. In this case other tools that are
+subscribed for SEL events will receive an empty event.
+Defaults to B<false>.
+
=back
=head2 Plugin C<iptables>
<Page "plugin_instance">
Server "localhost"
Key "page_key"
+ Plugin "plugin_name"
<Match>
Regex "(\\d+) bytes sent"
DSType CounterAdd
When connected to the memcached server, asks for the page I<Key>.
+=item B<Plugin> I<Plugin>
+
+Use I<Plugin> as the plugin name when submitting values.
+Defaults to C<memcachec>.
+
=item E<lt>B<Match>E<gt>
Match blocks define which strings to look for and how matches substrings are
</Result>
</Query>
<Database "product_information">
+ #Plugin "warehouse"
ConnectID "db01"
Username "oracle"
Password "secret"
=over 4
+=item B<Plugin> I<Plugin>
+
+Use I<Plugin> as the plugin name when submitting query results from
+this B<Database>. Defaults to C<oracle>.
+
=item B<ConnectID> I<ID>
Defines the "database alias" or "service name" to connect to. Usually, these
enable the interface, OVS DB daemon should be running with C<--remote=ptcp:>
option. See L<ovsdb-server(1)> for more details. The option may be either
network hostname, IPv4 numbers-and-dots notation or IPv6 hexadecimal string
-format. Defaults to B<'localhost'>.
+format. Defaults to C<localhost>.
=item B<Port> I<service>
enable the interface, OVS DB daemon should be running with C<--remote=ptcp:>
option. See L<ovsdb-server(1)> for more details. The option may be either
network hostname, IPv4 numbers-and-dots notation or IPv6 hexadecimal string
-format. Defaults to B<'localhost'>.
+format. Defaults to C<localhost>.
=item B<Port> I<service>
</Writer>
<Database foo>
+ Plugin "kingdom"
Host "hostname"
Port "5432"
User "username"
amount of time will be lost, for example, if a single statement within the
transaction fails or if the database server crashes.
+=item B<Plugin> I<Plugin>
+
+Use I<Plugin> as the plugin name when submitting query results from
+this B<Database>. Defaults to C<postgresql>.
+
=item B<Instance> I<name>
Specify the plugin instance name that should be used instead of the database
- number of processes
- number of threads
- number of open files (under Linux)
+ - number of memory mapped files (under Linux)
- io data (where available)
- context switches (under Linux)
- minor and major pagefaults.
Collect context switch of the process.
+=item B<CollectMemoryMaps> I<Boolean>
+
+Collect the number of memory mapped files of the process.
+The limit for this number is configured via F</proc/sys/vm/max_map_count> in
+the Linux kernel.
+
=back
=head2 Plugin C<protocols>
<Plugin "tail">
<File "/var/log/exim4/mainlog">
+ Plugin "mail"
Instance "exim"
Interval 60
<Match>
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<Instance> option in the B<File> block may be used to set the plugin
-instance. So in the above example the plugin name C<tail-foo> would be used.
-This plugin instance is for all B<Match> blocks that B<follow> it, until the
-next B<Instance> option. This way you can extract several plugin instances from
-one logfile, handy when parsing syslog and the like.
+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<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
this is not set, the default Interval will be used.
Index 1
</Metric>
<File "/var/log/snort/snort.stats">
- Instance "snort-eth0"
+ Plugin "snortstats"
+ Instance "eth0"
Interval 600
Collect "snort-dropped"
</File>
=over 4
+=item B<Plugin> I<Plugin>
+
+Use I<Plugin> as the plugin name when submitting values.
+Defaults to C<tail_csv>.
+
=item B<Instance> I<PluginInstance>
Sets the I<plugin instance> used when dispatching the values.
CollectManagement false
CollectSMF false
CollectVBE false
+ CollectMSE false
</Instance>
</Plugin>
=item B<CollectSMA> B<true>|B<false>
malloc or umem (umem_alloc(3MALLOC) based) storage statistics. The umem storage
- component is Solaris specific.
- Note: SMA and SMF share counters, enable only the one used by the Varnish
- instance.
- Only available with Varnish 2.x. False by
- default.
+ component is Solaris specific. Note: SMA, SMF and MSE share counters, enable
+ only the one used by the Varnish instance. Only available with Varnish 2.x.
+ False by default.
=item B<CollectSMS> B<true>|B<false>
=item B<CollectSMF> B<true>|B<false>
file (memory mapped file) storage statistics. Only available with Varnish 4.x.
- Note: SMA and SMF share counters, enable only the one used by the Varnish
- instance.
- Used to be called SM in Varnish 2.x. False by default.
+ Note: SMA, SMF and MSE share counters, enable only the one used by the Varnish
+ instance. Used to be called SM in Varnish 2.x. False by default.
=item B<CollectManagement> B<true>|B<false>
Memory pool counters. Only available with Varnish 4.x. False by default.
+ =item B<CollectMSE> B<true>|B<false>
+
+ Varnish Massive Storage Engine 2.0 (MSE2) is an improved storage backend for
+ Varnish, replacing the traditional malloc and file storages. Only available
+ with Varnish-Plus 4.x. Note: SMA, SMF and MSE share counters, enable only the
+ one used by the Varnish instance. False by default.
+
=back
=head2 Plugin C<virt>
Prefix "collectd/"
Database 1
MaxSetSize -1
+ MaxSetDuration -1
StoreRates true
</Node>
</Plugin>
The B<MaxSetSize> option limits the number of items that the I<Sorted Sets> can
hold. Negative values for I<Items> sets no limit, which is the default behavior.
+=item B<MaxSetDuration> I<Seconds>
+
+The B<MaxSetDuration> option limits the duration of items that the
+I<Sorted Sets> can hold. Negative values for I<Items> sets no duration, which
+is the default behavior.
+
=item B<StoreRates> B<true>|B<false>
If set to B<true> (the default), convert counter values to rates. If set to
_Bool collect_mgt;
_Bool collect_smf;
_Bool collect_vbe;
+ _Bool collect_mse;
#endif
};
typedef struct user_config_s user_config_t; /* }}} */
else if (strcmp(name, "esi_warnings") == 0)
return varnish_submit_derive(conf->instance, "esi", "total_operations",
"warning", val);
+ else if (strcmp(name, "esi_maxdepth") == 0)
+ return varnish_submit_derive(conf->instance, "esi", "total_operations",
+ "max_depth", val);
}
if (conf->collect_backend) {
"workspace_overflow", val);
#if HAVE_VARNISH_V4
else if (strcmp(name, "exp_mailed") == 0)
- return varnish_submit_derive(conf->instance, "struct", "objects",
+ return varnish_submit_gauge(conf->instance, "struct", "objects",
"exp_mailed", val);
else if (strcmp(name, "exp_received") == 0)
- return varnish_submit_derive(conf->instance, "struct", "objects",
+ return varnish_submit_gauge(conf->instance, "struct", "objects",
"exp_received", val);
#endif
}
return varnish_submit_derive(conf->instance, "ban", "total_operations",
"obj_killed", val);
else if (strcmp(name, "bans_persisted_bytes") == 0)
- return varnish_submit_gauge(conf->instance, "ban", "total_bytes",
+ return varnish_submit_derive(conf->instance, "ban", "total_bytes",
"persisted_bytes", val);
else if (strcmp(name, "bans_persisted_fragmentation") == 0)
- return varnish_submit_gauge(conf->instance, "ban", "total_bytes",
+ return varnish_submit_derive(conf->instance, "ban", "total_bytes",
"persisted_fragmentation", val);
else if (strcmp(name, "bans_tests_tested") == 0)
return varnish_submit_derive(conf->instance, "ban", "total_operations",
else if (strcmp(name, "s_req_bodybytes") == 0)
return varnish_submit_derive(conf->instance, "totals", "total_bytes",
"req_body", val);
+ else if (strcmp(name, "s_req_protobytes") == 0)
+ return varnish_submit_derive(conf->instance, "totals", "total_bytes",
+ "req_proto", val);
else if (strcmp(name, "s_resp_hdrbytes") == 0)
return varnish_submit_derive(conf->instance, "totals", "total_bytes",
"resp_header", val);
else if (strcmp(name, "s_resp_bodybytes") == 0)
return varnish_submit_derive(conf->instance, "totals", "total_bytes",
"resp_body", val);
+ else if (strcmp(name, "s_resp_protobytes") == 0)
+ return varnish_submit_derive(conf->instance, "totals", "total_bytes",
+ "resp_proto", val);
else if (strcmp(name, "s_pipe_hdrbytes") == 0)
return varnish_submit_derive(conf->instance, "totals", "total_bytes",
"pipe_header", val);
return varnish_submit_derive(conf->instance, "workers", "total_threads",
"dropped", val);
else if (strcmp(name, "thread_queue_len") == 0)
- return varnish_submit_derive(conf->instance, "workers", "queue_length",
+ return varnish_submit_gauge(conf->instance, "workers", "queue_length",
"threads", val);
else if (strcmp(name, "n_wrk") == 0)
return varnish_submit_gauge(conf->instance, "workers", "threads",
else if (strcmp(name, "busy_killed") == 0)
return varnish_submit_derive(conf->instance, "workers", "http_requests",
"busy_killed", val);
-
#endif
}
else if (strcmp(name, "bereq_bodybytes") == 0)
return varnish_submit_derive(conf->instance, "vbe",
"total_bytes", "bereq_bodybytes", val);
+ else if (strcmp(name, "bereq_protobytes") == 0)
+ return varnish_submit_derive(conf->instance, "vbe",
+ "total_bytes", "bereq_protobytes", val);
else if (strcmp(name, "beresp_hdrbytes") == 0)
return varnish_submit_derive(conf->instance, "vbe",
"total_bytes", "beresp_hdrbytes", val);
else if (strcmp(name, "beresp_bodybytes") == 0)
return varnish_submit_derive(conf->instance, "vbe",
"total_bytes", "beresp_bodybytes", val);
+ else if (strcmp(name, "beresp_protobytes") == 0)
+ return varnish_submit_derive(conf->instance, "vbe",
+ "total_bytes", "beresp_protobytes", val);
else if (strcmp(name, "pipe_hdrbytes") == 0)
return varnish_submit_derive(conf->instance, "vbe",
"total_bytes", "pipe_hdrbytes", val);
return varnish_submit_derive(conf->instance, "vbe", "connections",
"c_conns", val);
else if (strcmp(name, "req") == 0)
- return varnish_submit_gauge(conf->instance, "vbe", "http_requests",
+ return varnish_submit_derive(conf->instance, "vbe", "http_requests",
"b_reqs", val);
}
/* All Stevedores support these counters */
- if (conf->collect_sma || conf->collect_smf) {
+ if (conf->collect_sma || conf->collect_smf || conf->collect_mse) {
char category[4];
if (conf->collect_sma)
strncpy(category, "sma", 4);
- else
+ else if (conf->collect_smf)
strncpy(category, "smf", 4);
+ else
+ strncpy(category, "mse", 4);
if (strcmp(name, "c_req") == 0)
return varnish_submit_derive(conf->instance, category,
if (conf->collect_lck) {
if (strcmp(name, "creat") == 0)
- return varnish_submit_derive(conf->instance, "lck", "objects",
+ return varnish_submit_gauge(conf->instance, "lck", "objects",
"created", val);
else if (strcmp(name, "destroy") == 0)
- return varnish_submit_derive(conf->instance, "lck", "objects",
+ return varnish_submit_gauge(conf->instance, "lck", "objects",
"destroyed", val);
else if (strcmp(name, "locks") == 0)
return varnish_submit_derive(conf->instance, "lck", "total_operations",
return varnish_submit_derive(conf->instance, "mempool",
"total_operations", "frees", val);
else if (strcmp(name, "recycle") == 0)
- return varnish_submit_derive(conf->instance, "mempool",
+ return varnish_submit_gauge(conf->instance, "mempool",
"objects", "recycled", val);
else if (strcmp(name, "timeout") == 0)
- return varnish_submit_derive(conf->instance, "mempool",
+ return varnish_submit_gauge(conf->instance, "mempool",
"objects", "timed_out", val);
else if (strcmp(name, "toosmall") == 0)
- return varnish_submit_derive(conf->instance, "mempool",
+ return varnish_submit_gauge(conf->instance, "mempool",
"objects", "too_small", val);
else if (strcmp(name, "surplus") == 0)
- return varnish_submit_derive(conf->instance, "mempool",
+ return varnish_submit_gauge(conf->instance, "mempool",
"objects", "surplus", val);
else if (strcmp(name, "randry") == 0)
- return varnish_submit_derive(conf->instance, "mempool",
+ return varnish_submit_gauge(conf->instance, "mempool",
"objects", "ran_dry", val);
}
+
+ if (conf->collect_mse) {
+ if (strcmp(name, "c_full") == 0)
+ return varnish_submit_derive(conf->instance, "mse",
+ "total_operations", "full_allocs", val);
+ else if (strcmp(name, "c_truncated") == 0)
+ return varnish_submit_derive(conf->instance, "mse",
+ "total_operations", "truncated_allocs", val);
+ else if (strcmp(name, "c_expanded") == 0)
+ return varnish_submit_derive(conf->instance, "mse",
+ "total_operations", "expanded_allocs", val);
+ else if (strcmp(name, "c_failed") == 0)
+ return varnish_submit_derive(conf->instance, "mse",
+ "total_operations", "failed_allocs", val);
+ else if (strcmp(name, "c_bytes") == 0)
+ return varnish_submit_derive(conf->instance, "mse",
+ "total_bytes", "bytes_allocated", val);
+ else if (strcmp(name, "c_freed") == 0)
+ return varnish_submit_derive(conf->instance, "mse",
+ "total_bytes", "bytes_freed", val);
+ else if (strcmp(name, "g_fo_alloc") == 0)
+ return varnish_submit_derive(conf->instance, "mse",
+ "total_operations", "fo_allocs_outstanding", val);
+ else if (strcmp(name, "g_fo_bytes") == 0)
+ return varnish_submit_gauge(conf->instance, "mse",
+ "bytes", "fo_bytes_outstanding", val);
+ else if (strcmp(name, "g_membuf_alloc") == 0)
+ return varnish_submit_gauge(conf->instance, "mse",
+ "objects", "membufs_allocated", val);
+ else if (strcmp(name, "g_membuf_inuse") == 0)
+ return varnish_submit_gauge(conf->instance, "mse",
+ "objects", "membufs_inuse", val);
+ else if (strcmp(name, "g_bans_bytes") == 0)
+ return varnish_submit_gauge(conf->instance, "mse",
+ "bytes", "persisted_banspace_used", val);
+ else if (strcmp(name, "g_bans_space") == 0)
+ return varnish_submit_gauge(conf->instance, "mse",
+ "bytes", "persisted_banspace_available", val);
+ else if (strcmp(name, "g_bans_persisted") == 0)
+ return varnish_submit_derive(conf->instance, "mse",
+ "total_operations", "bans_persisted", val);
+ else if (strcmp(name, "g_bans_lost") == 0)
+ return varnish_submit_derive(conf->instance, "mse",
+ "total_operations", "bans_lost", val);
+
+ /* mse seg */
+ else if (strcmp(name, "g_journal_bytes") == 0)
+ return varnish_submit_gauge(conf->instance, "mse_reg",
+ "bytes", "journal_bytes_used", val);
+ else if (strcmp(name, "g_journal_space") == 0)
+ return varnish_submit_gauge(conf->instance, "mse_reg",
+ "bytes", "journal_bytes_free", val);
+
+ /* mse segagg */
+ else if (strcmp(name, "g_bigspace") == 0)
+ return varnish_submit_gauge(conf->instance, "mse_segagg",
+ "bytes", "big_extents_bytes_available", val);
+ else if (strcmp(name, "g_extfree") == 0)
+ return varnish_submit_gauge(conf->instance, "mse_segagg",
+ "objects", "free_extents", val);
+ else if (strcmp(name, "g_sparenode") == 0)
+ return varnish_submit_gauge(conf->instance, "mse_segagg",
+ "objects", "spare_nodes_available", val);
+ else if (strcmp(name, "g_objnode") == 0)
+ return varnish_submit_gauge(conf->instance, "mse_segagg",
+ "objects", "object_nodes_in_use", val);
+ else if (strcmp(name, "g_extnode") == 0)
+ return varnish_submit_gauge(conf->instance, "mse_segagg",
+ "objects", "extent_nodes_in_use", val);
+ else if (strcmp(name, "g_bigextfree") == 0)
+ return varnish_submit_gauge(conf->instance, "mse_segagg",
+ "objects", "free_big_extents", val);
+ else if (strcmp(name, "c_pruneloop") == 0)
+ return varnish_submit_derive(conf->instance, "mse_segagg",
+ "total_operations", "prune_loops", val);
+ else if (strcmp(name, "c_pruned") == 0)
+ return varnish_submit_derive(conf->instance, "mse_segagg",
+ "total_objects", "pruned_objects", val);
+ else if (strcmp(name, "c_spared") == 0)
+ return varnish_submit_derive(conf->instance, "mse_segagg",
+ "total_operations", "spared_objects", val);
+ else if (strcmp(name, "c_skipped") == 0)
+ return varnish_submit_derive(conf->instance, "mse_segagg",
+ "total_operations", "missed_objects", val);
+ else if (strcmp(name, "c_nuked") == 0)
+ return varnish_submit_derive(conf->instance, "mse_segagg",
+ "total_operations", "nuked_objects", val);
+ else if (strcmp(name, "c_sniped") == 0)
+ return varnish_submit_derive(conf->instance, "mse_segagg",
+ "total_operations", "sniped_objects", val);
+
+ }
+
#endif
return 0;
conf->collect_mgt = 0;
conf->collect_smf = 0;
conf->collect_vbe = 0;
+ conf->collect_mse = 0;
#endif
return 0;
WARNING("Varnish plugin: \"%s\" is available for Varnish %s only.",
child->key, "v4");
#endif
+ else if (strcasecmp("CollectMSE", child->key) == 0)
+ #if HAVE_VARNISH_V4
+ cf_util_get_boolean(child, &conf->collect_mse);
+ #else
+ WARNING("Varnish plugin: \"%s\" is available for Varnish %s only.",
+ child->key, "Plus v4");
+ #endif
else {
WARNING("Varnish plugin: Ignoring unknown "
"configuration option: \"%s\". Did "
#if HAVE_VARNISH_V4
&& !conf->collect_vsm && !conf->collect_vbe && !conf->collect_smf
&& !conf->collect_mgt && !conf->collect_lck && !conf->collect_mempool
+ && !conf->collect_mse
#endif
) {
WARNING("Varnish plugin: No metric has been configured for "