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

jsonexporter/scraper: add bool support #17

Merged
merged 1 commit into from
Apr 17, 2020

Conversation

WilliButz
Copy link
Contributor

@WilliButz WilliButz commented Aug 21, 2018

This adds boolean-parsing support to the exporter, which is already provided by the jsonpath library.

Previously json input, such as the one provided by the rspamd stat endpoint could not be fully parsed:

/* shortened response */
{
  "read_only": false,
  "scanned": 364200,
  "learned": 9484
}

The boolean values true and false are interpreted in correspondence with other metrics, such as the basic prometheus up metric.

/cc @globin

Copy link
Contributor

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SuperQ SuperQ merged commit c483776 into prometheus-community:master Apr 17, 2020
@davdr davdr mentioned this pull request Jun 13, 2020
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 this pull request may close these issues.

2 participants