Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

num_errors metric missing with fluentd 1.14 #195

Closed
stevenjm opened this issue Dec 14, 2021 · 0 comments · Fixed by #197
Closed

num_errors metric missing with fluentd 1.14 #195

stevenjm opened this issue Dec 14, 2021 · 0 comments · Fixed by #197

Comments

@stevenjm
Copy link
Contributor

stevenjm commented Dec 14, 2021

Since the metrics changes in fluentd 1.14 (#191), the fluentd_output_status_num_errors metric is missing. To reproduce:

  1. Clone the https://github.com/fluent/fluentd repo.
  2. git checkout v1.14.0
  3. Gemfile.local
gem "fluent-plugin-prometheus", "2.0.2"
  1. fluent.conf
<source>
  @type tail
  @id in
  path in
  tag test
  read_from_head true
  <parse>
    @type none
  </parse>
</source>

<match test.**>
  @type file
  @id out
  path out
</match>

<source>
@type prometheus
</source>

<source>
@type prometheus_output_monitor
</source>
  1. bundle install
  2. bundle exec fluentd -c fluent.conf
  3. There is no num_errors metric...
$ curl -s http://127.0.0.1:24231/metrics | grep num_errors
# TYPE fluentd_output_status_num_errors gauge
# HELP fluentd_output_status_num_errors Current number of errors.
  1. ... but the same metric is available under the old retry_count name.
$ curl -s http://127.0.0.1:24231/metrics | grep retry_count
# TYPE fluentd_output_status_retry_count gauge
# HELP fluentd_output_status_retry_count Current retry counts.
fluentd_output_status_retry_count{plugin_id="out",type="file"} 0.0

To confirm it works with previous versions:

  1. git checkout v1.13.3
  2. bundle exec fluentd -c fluent.conf
$ curl -s http://127.0.0.1:24231/metrics | grep num_errors
# TYPE fluentd_output_status_num_errors gauge
# HELP fluentd_output_status_num_errors Current number of errors.
fluentd_output_status_num_errors{plugin_id="out",type="file"} 0.0
@stevenjm stevenjm changed the title num_errors metric missing with fluentd 0.14 num_errors metric missing with fluentd 1.14 Dec 14, 2021
szymonpk pushed a commit to szymonpk/fluent-plugin-splunk-hec that referenced this issue Apr 7, 2022
Metrics like emit_count, num_errors, and others are missing when 2.0.1
is used [1][2].

Also, bump .ruby-version to 2.7.4. It is the same as in the docker
image. The previous version is incompatible with some gems used in the
repo.

1. fluent/fluent-plugin-prometheus#195
2. fluent/fluent-plugin-prometheus@0e5d768
hvaghani221 pushed a commit to splunk/fluent-plugin-splunk-hec that referenced this issue Apr 8, 2022
Metrics like emit_count, num_errors, and others are missing when 2.0.1
is used [1][2].

Also, bump .ruby-version to 2.7.4. It is the same as in the docker
image. The previous version is incompatible with some gems used in the
repo.

1. fluent/fluent-plugin-prometheus#195
2. fluent/fluent-plugin-prometheus@0e5d768

Co-authored-by: Szymon Szypulski <ss@viabill.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant