Sha256: e5d90bc7dbf1c2e4718ea5190a429b3e08c6c8f9c913a6f698f2871dbfaad010
Contents?: true
Size: 792 Bytes
Versions: 9
Compression:
Stored size: 792 Bytes
Contents
require 'knife-spork/plugins/plugin' module KnifeSpork module Plugins class Influxdb < Plugin name :influxdb hooks :after_upload def perform safe_require 'influxdb' conn = InfluxDB::Client.new(config.database, host: config.host, port: config.port, username: config.username, password: config.password, use_ssl: config.ssl) environments.each do |environment| begin data = { user: current_user, cookbook: cookbook.name, version: cookbook.version } conn.write_point(config.series, data) rescue Exception => e ui.error 'Could not write data to influxdb' ui.error e.to_s end end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems