fluent-plugin-prometheus 1.8.4 → 1.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ChangeLog +4 -0
- data/fluent-plugin-prometheus.gemspec +1 -1
- data/lib/fluent/plugin/in_prometheus_monitor.rb +13 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5679e5c8d8872be0448075a8c1e05c395b1f9c06a0267f568a788c77dc12dc62
|
4
|
+
data.tar.gz: 786191b3092cf3745ab97425e4aebb4b1cb524c907433d0f4e091dbb6d14b7f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b7c49f483ad596641edf01226e4282db10b72dd0117867884d0df4cf6ca0cf23c48e54eab6a2a22ca3ecae845ad8edda6e75d3532853a200b7a57ac8caca423
|
7
|
+
data.tar.gz: 344b9a363c49067056c4366f46b6b9f3bddf955e22a0155215158b13420027479c0a5e41da1a86b2baaf71e0b01256d90d0a0c8269c322ebe3616c861ce35a98
|
data/ChangeLog
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "fluent-plugin-prometheus"
|
3
|
-
spec.version = "1.8.
|
3
|
+
spec.version = "1.8.5"
|
4
4
|
spec.authors = ["Masahiro Sano"]
|
5
5
|
spec.email = ["sabottenda@gmail.com"]
|
6
6
|
spec.summary = %q{A fluent plugin that collects metrics and exposes for Prometheus.}
|
@@ -46,19 +46,19 @@ module Fluent::Plugin
|
|
46
46
|
def start
|
47
47
|
super
|
48
48
|
|
49
|
-
@buffer_newest_timekey =
|
49
|
+
@buffer_newest_timekey = get_gauge(
|
50
50
|
:fluentd_status_buffer_newest_timekey,
|
51
51
|
'Newest timekey in buffer.')
|
52
|
-
@buffer_oldest_timekey =
|
52
|
+
@buffer_oldest_timekey = get_gauge(
|
53
53
|
:fluentd_status_buffer_oldest_timekey,
|
54
54
|
'Oldest timekey in buffer.')
|
55
|
-
buffer_queue_length =
|
55
|
+
buffer_queue_length = get_gauge(
|
56
56
|
:fluentd_status_buffer_queue_length,
|
57
57
|
'Current buffer queue length.')
|
58
|
-
buffer_total_queued_size =
|
58
|
+
buffer_total_queued_size = get_gauge(
|
59
59
|
:fluentd_status_buffer_total_bytes,
|
60
60
|
'Current total size of queued buffers.')
|
61
|
-
retry_counts =
|
61
|
+
retry_counts = get_gauge(
|
62
62
|
:fluentd_status_retry_count,
|
63
63
|
'Current retry counts.')
|
64
64
|
|
@@ -95,5 +95,13 @@ module Fluent::Plugin
|
|
95
95
|
type: plugin_info["type"],
|
96
96
|
)
|
97
97
|
end
|
98
|
+
|
99
|
+
def get_gauge(name, docstring)
|
100
|
+
if @registry.exist?(name)
|
101
|
+
@registry.get(name)
|
102
|
+
else
|
103
|
+
@registry.gauge(name, docstring)
|
104
|
+
end
|
105
|
+
end
|
98
106
|
end
|
99
107
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-prometheus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masahiro Sano
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|