fluent-plugin-prometheus-smarter 1.8.6 → 1.8.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fluent-plugin-prometheus.gemspec +1 -1
- data/lib/fluent/plugin/out_prometheus_metric.rb +2 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5723aa3c3124615c06e3a261900f87f454f93ce91fe5f1cdc9a9fe5f03e825d
|
4
|
+
data.tar.gz: eadce6c28a938205269ee8854ac174ba4c1177fea45eda343270bd6f9eef71e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25d644dc5d15790730dfe52dea41ba4609375f93d72ea92982515d259391d7d83712c16a0269cceadc3f8c653adc4e4e1d18d2cb3c97e260f2600dc823f5bf2a
|
7
|
+
data.tar.gz: d0581d307779fc20fea1f0488daacc01f57794baee33ff4829465cc44683450997202387f71c4b00dfb81bef072ea3d5e7aa173dbb960a1157c27c71a41b04ca
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "fluent-plugin-prometheus-smarter"
|
3
|
-
spec.version = "1.8.
|
3
|
+
spec.version = "1.8.7"
|
4
4
|
spec.authors = ["Masahiro Sano", "Josh Minor"]
|
5
5
|
spec.email = ["jishminor@gmail.com"]
|
6
6
|
spec.summary = %q{A fluent plugin that collects metrics and exposes for Prometheus.}
|
@@ -35,21 +35,19 @@ module Fluent::Plugin
|
|
35
35
|
@labels = parse_labels_elements(conf)
|
36
36
|
@placeholder_values = {}
|
37
37
|
@placeholder_expander_builder = Fluent::Plugin::Prometheus.placeholder_expander(log)
|
38
|
-
@hostname = Socket.gethostname
|
39
38
|
end
|
40
39
|
|
41
40
|
def process(tag, es)
|
42
41
|
placeholder_values = {
|
43
42
|
'tag' => tag,
|
44
|
-
'hostname' => @hostname,
|
45
43
|
'worker_id' => fluentd_worker_id,
|
46
44
|
}
|
47
45
|
|
48
46
|
# Create metric if not exists
|
49
47
|
begin
|
50
|
-
gauge = registry.gauge(tag.to_sym)
|
48
|
+
gauge = @registry.gauge(tag.to_sym)
|
51
49
|
rescue ::Prometheus::Client::Registry::AlreadyRegisteredError
|
52
|
-
gauge = registry.get(tag.to_sym)
|
50
|
+
gauge = @registry.get(tag.to_sym)
|
53
51
|
end
|
54
52
|
|
55
53
|
# Write out values in event stream to Registry
|