sensu-extensions-influxdb2 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2391a1c283a6fbca0bb750960d1ede012272b8c8
4
- data.tar.gz: 44da7aef7f23edac1e6a7e2dd55f9a1df6f6288e
3
+ metadata.gz: 23a1aee37a19efead5d1a9f1add2f631ca74f507
4
+ data.tar.gz: fd136bb6d53c4201671607ec8c4e1bd487913971
5
5
  SHA512:
6
- metadata.gz: e1e4d7535c89ce23eaafc069d321266ef11b22c8fe58344ada125c0a7fa76fcfdc54f08b7aad6c0f8fe768c648ed6ef9fc835408aa442302bf8c681914918623
7
- data.tar.gz: 151b76ad0eb22dff5dc8f95905edd07488262f6f511157faf92e03a1273a70669a919778c703a15956395d57cd750578a70ce0413a7ac7782a93f0bc4496e889
6
+ metadata.gz: d839894dd5b8852ad1fc6fd811e85e7aea58cebc699884317bba243364ddf163feeda4babcb0c1c1cd183a140902238ee5f55c285b869a85099fca5f759b0e81
7
+ data.tar.gz: c4144d4ea4ba25265ed803a2ed2c5c1cc8f09e9a29dbcd6998ff16e057f18fe127d8294caa868b71e8f72360e6bde6eeec73bb14aebb840418d481acd4322bd9
data/README.md CHANGED
@@ -201,7 +201,7 @@ Note that :
201
201
  * `buffer_max_size` : buffer size limit before flush - This is the amount of points in the InfluxDB batch - (default is `500`)
202
202
  * `buffer_max_age` : buffer maximum age - Flush will be forced after this amount of time - (default is `6` seconds)
203
203
  * `Proxy mode` : If the extension is configured to be in proxy mode, it will skip the transformation step and assume that the data is valid [line protocol](https://docs.influxdata.com/influxdb/latest/write_protocols/line_protocol_reference). It will not take into account any tags defined in the sensu-configuration.
204
- * `enhanced_history`: by default this extension writes checks history as separated measurements on InfluxDB. Setting this attribute to true will write all check history in the same metric (sensu.checks), tagging check name and subscriptions, allowing the user to write InfluxDB queries filtering by check name and subscriptions.
204
+ * `enhanced_history`: by default this extension writes checks history as separated measurements on InfluxDB. Setting this attribute to true will write all check history in the same metric (sensu.checks), tagging check name and subscriptions (if any), allowing the user to write InfluxDB queries filtering by check name and subscriptions.
205
205
 
206
206
  ## Check options
207
207
 
@@ -43,9 +43,13 @@ module Sensu
43
43
  metric = event_data[:check][:name]
44
44
  timestamp = event_data[:check][:executed]
45
45
  value = event_data[:check][:status]
46
- subscribers = event_data[:check][:subscribers].join('_')
46
+ subscribers_tag = if event_data[:check][:subscribers].nil?
47
+ ''
48
+ else
49
+ ",subscribers=#{event_data[:check][:subscribers].join('_')}"
50
+ end
47
51
  output = if @influx_conf['enhanced_history']
48
- "#{@influx_conf['scheme']}.checks,check_name=#{metric},type=history,host=#{host},subscribers=#{subscribers} value=#{value} #{timestamp}"
52
+ "#{@influx_conf['scheme']}.checks,check_name=#{metric},type=history,host=#{host}#{subscribers_tag} value=#{value} #{timestamp}"
49
53
  else
50
54
  "#{@influx_conf['scheme']}.checks.#{metric},type=history,host=#{host} value=#{value} #{timestamp}"
51
55
  end
@@ -3,7 +3,7 @@ module SensuExtensionsInfluxDB2
3
3
  module Version
4
4
  MAJOR = 0
5
5
  MINOR = 1
6
- PATCH = 0
6
+ PATCH = 1
7
7
 
8
8
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-extensions-influxdb2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Critical Media
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-03-26 00:00:00.000000000 Z
12
+ date: 2018-04-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sensu-extension