From 9fa24ededf1388fa529a330e02307b82f9ed1407 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 27 Nov 2015 10:05:48 +0100 Subject: [PATCH] mqtt plugin: Add TLS options to the example config and improve documentation. --- src/collectd.conf.in | 5 +++++ src/collectd.conf.pod | 19 ++++++++++++------- src/mqtt.c | 2 +- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/collectd.conf.in b/src/collectd.conf.in index 61c01f94..30d536a1 100644 --- a/src/collectd.conf.in +++ b/src/collectd.conf.in @@ -683,6 +683,11 @@ # 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" diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod index 82fa4ce9..78a130cf 100644 --- a/src/collectd.conf.pod +++ b/src/collectd.conf.pod @@ -3352,26 +3352,31 @@ the B branch. 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. Requires B +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. +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. tlsv1, tlsv1.2) 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. +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 the "openssl ciphers" utility -for more information. If unset, the default ciphers will be used. +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 diff --git a/src/mqtt.c b/src/mqtt.c index cbffa67e..b2d21b1c 100644 --- a/src/mqtt.c +++ b/src/mqtt.c @@ -642,7 +642,7 @@ static int mqtt_config_publisher (oconfig_item_t *ci) * User "guest" * Password "secret" * Topic "collectd/#" - * + * */ static int mqtt_config_subscriber (oconfig_item_t *ci) { -- 2.11.0