fluent-plugin-prometheus 1.4.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -4
- data/fluent-plugin-prometheus.gemspec +1 -1
- data/lib/fluent/plugin/in_prometheus_output_monitor.rb +12 -0
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de38cb79041db3b0a78ead61eee23d58b568b71292886b19db9ca30ad38ad00b
|
4
|
+
data.tar.gz: a1867c481cd9527cc4ada9125a266a2455aacca7868c4f00d8489926c845a665
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb397416c207fcc7d6111aaa9346bca990e5c44764b25072a7a0c68ef32748e767ba04637ec9576be25273caf2345303e6ab7bacbbb261e572cd3288b01475ff
|
7
|
+
data.tar.gz: 3e4a0484386035bf791b49f39d567b52675b97c5ccf7738edaeeb90e23c4adfce852ee1f5a5c69ee0905bbc33f57358e0322761dbbdf86b559d10524f7c21abf
|
data/README.md
CHANGED
@@ -63,11 +63,11 @@ When using multiple workers, each worker binds to port + `fluent_worker_id`.
|
|
63
63
|
|
64
64
|
### prometheus_monitor input plugin
|
65
65
|
|
66
|
-
This plugin collects internal metrics in Fluentd. The metrics are similar to/part of [monitor_agent](
|
66
|
+
This plugin collects internal metrics in Fluentd. The metrics are similar to/part of [monitor_agent](https://docs.fluentd.org/input/monitor_agent).
|
67
67
|
|
68
68
|
Current exposed metrics:
|
69
69
|
|
70
|
-
- `
|
70
|
+
- `buffer_queue_length` of each BufferedOutput plugins
|
71
71
|
- `buffer_total_queued_size` of each BufferedOutput plugins
|
72
72
|
- `retry_count` of each BufferedOutput plugins
|
73
73
|
|
@@ -97,6 +97,8 @@ Current exposed metrics:
|
|
97
97
|
- `fluentd_output_status_retry_count`
|
98
98
|
- `fluentd_output_status_num_errors`
|
99
99
|
- `fluentd_output_status_emit_count`
|
100
|
+
- `fluentd_output_status_flush_time_count`
|
101
|
+
- `fluentd_output_status_slow_flush_count`
|
100
102
|
- `fluentd_output_status_retry_wait`
|
101
103
|
- current retry_wait computed from last retry time and next retry time
|
102
104
|
- `fluentd_output_status_emit_records`
|
@@ -224,7 +226,7 @@ In output plugin style:
|
|
224
226
|
|
225
227
|
With above configuration, the plugin collects a metric named `message_foo_counter` from key `foo` of each records.
|
226
228
|
|
227
|
-
You can access nested keys in records via dot or bracket notation (https://docs.fluentd.org/
|
229
|
+
You can access nested keys in records via dot or bracket notation (https://docs.fluentd.org/plugin-helper-overview/api-plugin-helper-record_accessor#syntax), for example: `$.kubernetes.namespace`, `$['key1'][0]['key2']`. The record accessor is enable only if the value starts with `$.` or `$[`.
|
228
230
|
|
229
231
|
See Supported Metric Type and Labels for more configuration parameters.
|
230
232
|
|
@@ -341,7 +343,7 @@ You can add labels with static value or dynamic value from records. In `promethe
|
|
341
343
|
|
342
344
|
All labels sections has same format. Each lines have key/value for label.
|
343
345
|
|
344
|
-
You can access nested fields in records via dot or bracket notation (https://docs.fluentd.org/
|
346
|
+
You can access nested fields in records via dot or bracket notation (https://docs.fluentd.org/plugin-helper-overview/api-plugin-helper-record_accessor#syntax), for example: `$.kubernetes.namespace`, `$['key1'][0]['key2']`. The record accessor is enable only if the value starts with `$.` or `$[`. Other values are handled as raw string as is and may be expanded by placeholder described later.
|
345
347
|
|
346
348
|
You can use placeholder for label values. The placeholders will be expanded from reserved values and records.
|
347
349
|
If you specify `${hostname}`, it will be expanded by value of a hostname where fluentd runs.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "fluent-plugin-prometheus"
|
3
|
-
spec.version = "1.
|
3
|
+
spec.version = "1.5.0"
|
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.}
|
@@ -24,6 +24,10 @@ module Fluent::Plugin
|
|
24
24
|
:emit_records,
|
25
25
|
:write_count,
|
26
26
|
:rollback_count,
|
27
|
+
|
28
|
+
# from v1.6.0
|
29
|
+
:flush_time_count,
|
30
|
+
:slow_flush_count,
|
27
31
|
]
|
28
32
|
|
29
33
|
def initialize
|
@@ -84,6 +88,12 @@ module Fluent::Plugin
|
|
84
88
|
rollback_count: @registry.gauge(
|
85
89
|
:fluentd_output_status_rollback_count,
|
86
90
|
'Current rollback counts.'),
|
91
|
+
flush_time_count: @registry.gauge(
|
92
|
+
:fluentd_output_status_flush_time_count,
|
93
|
+
'Total flush time.'),
|
94
|
+
slow_flush_count: @registry.gauge(
|
95
|
+
:fluentd_output_status_slow_flush_count,
|
96
|
+
'Current slow flush counts.'),
|
87
97
|
retry_wait: @registry.gauge(
|
88
98
|
:fluentd_output_status_retry_wait,
|
89
99
|
'Current retry wait'),
|
@@ -112,6 +122,8 @@ module Fluent::Plugin
|
|
112
122
|
emit_count: @metrics[:emit_count],
|
113
123
|
emit_records: @metrics[:emit_records],
|
114
124
|
rollback_count: @metrics[:rollback_count],
|
125
|
+
flush_time_count: @metrics[:flush_time_count],
|
126
|
+
slow_flush_count: @metrics[:slow_flush_count],
|
115
127
|
}
|
116
128
|
|
117
129
|
agent_info.each do |info|
|
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.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masahiro Sano
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|
@@ -151,8 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
153
|
requirements: []
|
154
|
-
|
155
|
-
rubygems_version: 2.7.6
|
154
|
+
rubygems_version: 3.0.3
|
156
155
|
signing_key:
|
157
156
|
specification_version: 4
|
158
157
|
summary: A fluent plugin that collects metrics and exposes for Prometheus.
|