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 +4 -4
- data/README.md +1 -1
- data/lib/sensu/extensions/history.rb +6 -2
- data/lib/sensu/extensions/influxdb2/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23a1aee37a19efead5d1a9f1add2f631ca74f507
|
4
|
+
data.tar.gz: fd136bb6d53c4201671607ec8c4e1bd487913971
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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}
|
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
|
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.
|
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-
|
12
|
+
date: 2018-04-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sensu-extension
|