bin/check-influxdb-query.rb in sensu-plugins-influxdb-0.0.4 vs bin/check-influxdb-query.rb in sensu-plugins-influxdb-0.0.5

- old
+ new

@@ -52,10 +52,29 @@ short: '-P PORT', long: '--port PORT', default: '8086', description: 'InfluxDB port' + option :use_ssl, + description: 'Turn on/off SSL (default: false)', + short: '-s', + long: '--use_ssl', + boolean: true, + default: false + + option :verify_ssl, + description: 'Turn on/off using SSL certificate (default: false)', + short: '-v', + long: '--verify_ssl', + boolean: true, + default: false + + option :ssl_ca_cert, + description: 'Path to the ssl ca certificate to connect to the InfluxDB server', + short: '-c CA_CERT', + long: '--ssl_ca_cert CA_CERT' + option :database, short: '-d DATABASE', long: '--database DATABASE', default: 'influxdb', description: 'InfluxDB database name' @@ -128,9 +147,12 @@ def run influxdb = InfluxDB::Client.new config[:database], host: config[:host], port: config[:port], + use_ssl: config[:use_ssl], + verify_ssl: config[:verify_ssl], + ssl_ca_cert: config[:ssl_ca_cert], username: config[:username], password: config[:password] value = influxdb.query config[:query]