From: Marc Fournier Date: Thu, 21 Jan 2016 20:29:18 +0000 (+0100) Subject: Merge branch 'collectd-5.5' X-Git-Tag: collectd-5.6.0~477 X-Git-Url: https://git.octo.it/?p=collectd.git;a=commitdiff_plain;h=029e88709f60d90fede55ed31f775602c1487d24;hp=-c Merge branch 'collectd-5.5' --- 029e88709f60d90fede55ed31f775602c1487d24 diff --combined src/collectd.conf.in index bb1d6671,07d66cd7..953b5e4c --- a/src/collectd.conf.in +++ b/src/collectd.conf.in @@@ -140,7 -140,6 +140,7 @@@ @BUILD_PLUGIN_MEMORY_TRUE@@BUILD_PLUGIN_MEMORY_TRUE@LoadPlugin memory #@BUILD_PLUGIN_MIC_TRUE@LoadPlugin mic #@BUILD_PLUGIN_MODBUS_TRUE@LoadPlugin modbus +#@BUILD_PLUGIN_MQTT_TRUE@LoadPlugin mqtt #@BUILD_PLUGIN_MULTIMETER_TRUE@LoadPlugin multimeter #@BUILD_PLUGIN_MYSQL_TRUE@LoadPlugin mysql #@BUILD_PLUGIN_NETAPP_TRUE@LoadPlugin netapp @@@ -150,7 -149,6 +150,7 @@@ #@BUILD_PLUGIN_NGINX_TRUE@LoadPlugin nginx #@BUILD_PLUGIN_NOTIFY_DESKTOP_TRUE@LoadPlugin notify_desktop #@BUILD_PLUGIN_NOTIFY_EMAIL_TRUE@LoadPlugin notify_email +#@BUILD_PLUGIN_NOTIFY_NAGIOS_TRUE@LoadPlugin notify_nagios #@BUILD_PLUGIN_NTPD_TRUE@LoadPlugin ntpd #@BUILD_PLUGIN_NUMA_TRUE@LoadPlugin numa #@BUILD_PLUGIN_NUT_TRUE@LoadPlugin nut @@@ -208,7 -206,6 +208,7 @@@ #@BUILD_PLUGIN_WRITE_TSDB_TRUE@LoadPlugin write_tsdb #@BUILD_PLUGIN_XMMS_TRUE@LoadPlugin xmms #@BUILD_PLUGIN_ZFS_ARC_TRUE@LoadPlugin zfs_arc +#@BUILD_PLUGIN_ZONE_TRUE@LoadPlugin zone #@BUILD_PLUGIN_ZOOKEEPER_TRUE@LoadPlugin zookeeper ############################################################################## @@@ -266,7 -263,6 +266,7 @@@ # Host "localhost" # Port "3551" # ReportSeconds true +# PersistentConnection true # # @@@ -488,7 -484,6 +488,6 @@@ # FSType "ext3" # IgnoreSelected false # ReportByDevice false - # ReportReserved false # ReportInodes false # ValuesAbsolute true # ValuesPercentage false @@@ -564,7 -559,6 +563,7 @@@ # # Interface "eth0" # IgnoreSelected false +# UniqueName false # # @@@ -675,35 -669,6 +674,35 @@@ # # +# +# +# Host "localhost" +# Port 1883 +# ClientId "localhost" +# User "user" +# Password "secret" +# QoS 0 +# Prefix "collectd" +# StoreRates true +# Retain false +# CACert "/etc/ssl/ca.crt" +# CertificateFile "/etc/ssl/client.crt" +# CertificateKeyFile "/etc/ssl/client.pem" +# TLSProtocol "tlsv1.2" +# CipherSuite "ciphers" +# +# +# Host "localhost" +# Port 1883 +# ClientId "localhost" +# User "user" +# Password "secret" +# QoS 2 +# Topic "collectd/#" +# CleanSession true +# +# + # # # Host "database.serv.er" @@@ -841,10 -806,6 +840,10 @@@ # Recipient "email2@domain2.com" # +# +# CommandFile "/usr/local/nagios/var/rw/nagios.cmd" +# + # # Host "localhost" # Port 123 @@@ -1139,7 -1100,6 +1138,7 @@@ # DeleteTimers false # DeleteGauges false # DeleteSets false +# CounterSum false # TimerPercentile 90.0 # TimerPercentile 95.0 # TimerPercentile 99.0 @@@ -1350,7 -1310,6 +1349,7 @@@ # Host "localhost" # Port "2003" # Protocol "tcp" +# ReconnectInterval 0 # LogSendErrors true # Prefix "collectd" # Postfix "collectd" @@@ -1405,7 -1364,6 +1404,7 @@@ # Host "localhost" # Port "6379" # Timeout 1000 +# Prefix "collectd/" # # diff --combined src/collectd.conf.pod index b992eac1,7a66c818..5d9e7370 --- a/src/collectd.conf.pod +++ b/src/collectd.conf.pod @@@ -130,15 -130,6 +130,15 @@@ Sets a plugin-specific interval for col global B setting. If a plugin provides own support for specifying an interval, that setting will take precedence. +=item B I + +Specifies the the interval, in seconds, to call the flush callback if it's +defined in this plugin. By default, this is disabled + +=item B I + +Specifies the value of the timeout argument of the flush callback. + =back =item B B|B @@@ -528,9 -519,7 +528,9 @@@ are disabled by default The I can be used to communicate with other instances of I or third party applications using an AMQP message broker. Values are sent to or received from the broker, which handles routing, queueing and -possibly filtering or messages. +possibly filtering out messages. + +B # Send values to an AMQP broker @@@ -828,22 -817,12 +828,22 @@@ B can handle it TCP-Port to connect to. Defaults to B<3551>. -=item B B +=item B B|B If set to B, the time reported in the C metric will be converted to seconds. This is the recommended setting. If set to B, the default for backwards compatibility, the time will be reported in minutes. +=item B B|B + +By default, the plugin will try to keep the connection to UPS open between +reads. Since this appears to be somewhat brittle (I appears to close +the connection due to inactivity quite quickly), the plugin will try to detect +this problem and switch to an open-read-close mode in such cases. + +You can instruct the plugin to close the connection after each read by setting +this option to B. + =back =head2 Plugin C @@@ -1842,7 -1821,6 +1842,7 @@@ than those of other plugins. It usuall Driver "mysql" + Interval 120 DriverOption "host" "localhost" DriverOption "username" "collectd" DriverOption "password" "aZo6daiw" @@@ -2022,11 -2000,6 +2022,11 @@@ the daemon. Other than that, that name =over 4 +=item B I + +Sets the interval (in seconds) in which the values will be collected from this +database. By default the global B setting will be used. + =item B I Specifies the driver to use to connect to the database. In many cases those @@@ -2540,17 -2513,23 +2540,34 @@@ do that: By setting B t B is inverted: All selected interfaces are ignored and all other interfaces are collected. + It is possible to use regular expressions to match interface names, if the + name is surrounded by I and collectd was compiled with support for + regexps. This is useful if there's a need to collect (or ignore) data + for a group of interfaces that are similarly named, without the need to + explicitly list all of them (especially useful if the list is dynamic). + Example: + + Interface "lo" + Interface "/^veth/" + Interface "/^tun[0-9]+/" + IgnoreSelected "true" + + This will ignore the loopback interface, all interfaces with names starting + with I and all interfaces with names starting with I followed by + at least one digit. + + +=item B I|I + +Interface name is not unique on Solaris (KSTAT), interface name is unique +only within a module/instance. Following tuple is considered unique: + (ks_module, ks_instance, ks_name) +If this option is set to true, interface name contains above three fields +separated by an underscore. For more info on KSTAT, visit +L + +This option is only available on Solaris. + =back =head2 Plugin C @@@ -3271,146 -3250,6 +3288,146 @@@ B option is mandatory =back +=head2 Plugin C + +The I can send metrics to MQTT (B blocks) and receive +values from MQTT (B blocks). + +B + + + + Host "mqtt.example.com" + Prefix "collectd" + + + Host "mqtt.example.com" + Topic "collectd/#" + + + +The plugin's configuration is in B and/or B blocks, +configuring the sending and receiving direction respectively. The plugin will +register a write callback named C> where I is the string +argument given to the B block. Both types of blocks share many but not +all of the following options. If an option is valid in only one of the blocks, +it will be mentioned explicitly. + +B + +=over 4 + +=item B I + +Hostname of the MQTT broker to connect to. + +=item B I + +Port number or service name of the MQTT broker to connect to. + +=item B I + +Username used when authenticating to the MQTT broker. + +=item B I + +Password used when authenticating to the MQTT broker. + +=item B I + +MQTT client ID to use. Defaults to the hostname used by I. + +=item B [B<0>-B<2>] + +Sets the I, with the values C<0>, C<1> and C<2> meaning: + +=over 4 + +=item B<0> + +At most once + +=item B<1> + +At least once + +=item B<2> + +Exactly once + +=back + +In B blocks, this option determines the QoS flag set on outgoing +messages and defaults to B<0>. In B blocks, determines the maximum +QoS setting the client is going to accept and defaults to B<2>. If the QoS flag +on a message is larger than the maximum accepted QoS of a subscriber, the +message's QoS will be downgraded. + +=item B I (Publish only) + +This plugin will use one topic per I which will looks like a path. +I is used as the first path element and defaults to B. + +An example topic name would be: + + collectd/cpu-0/cpu-user + +=item B B|B (Publish only) + +Controls whether the MQTT broker will retain (keep a copy of) the last message +sent to each topic and deliver it to new subscribers. Defaults to B. + +=item B B|B (Publish only) + +Controls whether C and C metrics are converted to a I +before sending. Defaults to B. + +=item B B|B (Subscribe only) + +Controls whether the MQTT "cleans" the session up after the subscriber +disconnects or if it maintains the subscriber's subscriptions and all messages +that arrive while the subscriber is disconnected. Defaults to B. + +=item B I (Subscribe only) + +Configures the topic(s) to subscribe to. You can use the single level C<+> and +multi level C<#> wildcards. Defaults to B, i.e. all topics beneath +the B branch. + +=item B I + +Path to the PEM-encoded CA certificate file. Setting this option enables TLS +communication with the MQTT broker, and as such, B should be the TLS-enabled +port of the MQTT broker. +A valid TLS configuration requires B, B and B. + +=item B I + +Path to the PEM-encoded certificate file to use as client certificate when +connecting to the MQTT broker. +A valid TLS configuration requires B, B and B. + +=item B I + +Path to the unencrypted PEM-encoded key file corresponding to B. +A valid TLS configuration requires B, B and B. + +=item B I + +If configured, this specifies the string protocol version (e.g. C, +C) to use for the TLS connection to the broker. If not set a default +version is used which depends on the version of OpenSSL the Mosquitto library +was linked against. + +=item B I + +A string describing the ciphers available for use. See L and the +C utility for more information. If unset, the default ciphers +will be used. + + +=back + =head2 Plugin C The C requires B to be installed. It connects to @@@ -4466,21 -4305,6 +4483,21 @@@ Default: C + +The I plugin writes notifications to Nagios' I as +a I. + +Available configuration options: + +=over 4 + +=item B I + +Sets the I to write to. Defaults to F. + +=back + =head2 Plugin C =over 4 @@@ -4706,16 -4530,6 +4723,16 @@@ The following options are accepted with Sets the URL to use to connect to the I server. This option is I. +=item B I + +Name in the form of an LDAP distinguished name intended to be used for +authentication. Defaults to empty string to establish an anonymous authorization. + +=item B I + +Password for simple bind authentication. If this option is not set, +unauthenticated bind operation is used. + =item B B Defines whether TLS must be used when connecting to the I server. @@@ -4987,13 -4801,6 +5004,13 @@@ Default: B<0.9 Sets the Time-To-Live of generated ICMP packets. +=item B I + +Sets the size of the data payload in ICMP packet to specified I (it +will be filled with regular ASCII pattern). If not set, default 56 byte +long string is used so that the packet size of an ICMPv4 packet is exactly +64 bytes, similar to the behaviour of normal ping(1) command. + =item B I Sets the source address to use. I may either be a numerical network @@@ -5651,10 -5458,6 +5668,10 @@@ dispatched to the daemon using the spec allows to "group" several processes together. I must not contain slashes. +=item B I + +Collect context switch of the process. + =back =head2 Plugin C @@@ -6269,12 -6072,6 +6286,12 @@@ rate of counters and size of sets will are unchanged. If set to B, the such metrics are not dispatched and removed from the internal cache. +=item B B|B + +When enabled, create a C metric which reports the change since the last +read. This option primarily exists for compatibility with the I +impelemtation by Etsy. + =item B I Calculate and dispatch the configured percentile, i.e. compute the latency, so @@@ -7229,17 -7026,17 +7246,17 @@@ setting B B
means use the interface's mac address. This is useful since the interface path might change between reboots of a guest or across migrations. -=item B B +=item B B When the virt plugin logs data, it sets the plugin_instance of the collected -data according to this setting. The default is to use the guest name as provided -by the hypervisor, which is equal to setting B. +data according to this setting. The default is to not set the plugin_instance. +B means use the guest's name as provided by the hypervisor. B means use the guest's UUID. -You can also specify combinations of these fields. For example B -means to concatenate the guest name and UUID (with a literal colon character -between, thus I<"foo:1234-1234-1234-1234">). +You can also specify combinations of the B and B fields. +For example B means to concatenate the guest name and UUID +(with a literal colon character between, thus I<"foo:1234-1234-1234-1234">). =back @@@ -7314,14 -7111,6 +7331,14 @@@ Service name or port number to connect Protocol to use when connecting to I. Defaults to C. +=item B I + +When set to non-zero, forces the connection to the Graphite backend to be +closed and re-opend periodically. This behavior is desirable in environments +where the connection to the Graphite backend is done through load balancers, +for example. When set to zero, the default, the connetion is kept open for as +long as possible. + =item B B|B If set to B (the default), logs errors when sending data to I. @@@ -7590,10 -7379,6 +7607,10 @@@ complete. When this limit is reached, t all the data in the current send buffer will probably be lost. Defaults to 0, which means the connection never times out. +=item B B|B + +Enables printing of HTTP error code to log. Turned off by default. + The C plugin regularly submits the collected values to the HTTP server. How frequently this happens depends on how much data you are collecting and the size of B. The optimal value to set B to is @@@ -7720,20 -7505,14 +7737,20 @@@ Synopsis Host "localhost" Port "6379" Timeout 1000 + Prefix "collectd/" + Database 1 + MaxSetSize -1 + StoreRates true Values are submitted to I, using the metric name as the key, and the timestamp as the score. Retrieving a date range can then be done using the C I command. Additionally, all the identifiers of these -I are kept in a I called C and can be -retrieved using the C I command. See +I are kept in a I called C (or +C<${prefix}/values> if the B option was specified) and can be retrieved +using the C I command. You can specify the database to use +with the B parameter (default is C<0>). See L and L for details. @@@ -7768,28 -7547,6 +7785,28 @@@ that numerical port numbers must be giv The B option sets the socket connection timeout, in milliseconds. +=item B I + +Prefix used when constructing the name of the I and the I +containing all metrics. Defaults to C, so metrics will have names +like C. When setting this to something different, it +is recommended but not required to include a trailing slash in I. + +=item B I + +This index selects the redis database to use for writing operations. Defaults +to C<0>. + +=item B I + +The B option limits the number of items that the I can +hold. Negative values for I sets no limit, which is the default behavior. + +=item B B|B + +If set to B (the default), convert counter values to rates. If set to +B counter values are stored as is, i.e. as an increasing integer number. + =back =head2 Plugin C diff --combined src/virt.c index 6824b134,c9355c4a..b9da68e7 --- a/src/virt.c +++ b/src/virt.c @@@ -128,7 -128,7 +128,7 @@@ enum plginst_field }; static enum plginst_field plugin_instance_format[PLGINST_MAX_FIELDS] = - { plginst_name }; + { plginst_none }; /* InterfaceFormat. */ enum if_field { @@@ -327,8 -327,8 +327,8 @@@ lv_init (void { if (virInitialize () != 0) return -1; - - return 0; + else + return 0; } static int @@@ -449,10 -449,7 +449,10 @@@ lv_config (const char *key, const char } for (i = 0; i < n; ++i) { - if (strcasecmp (fields[i], "name") == 0) + if (strcasecmp (fields[i], "none") == 0) { + plugin_instance_format[i] = plginst_none; + break; + } else if (strcasecmp (fields[i], "name") == 0) plugin_instance_format[i] = plginst_name; else if (strcasecmp (fields[i], "uuid") == 0) plugin_instance_format[i] = plginst_uuid;