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

Add forward-slash as illegal character in prometheus #84

Merged
merged 1 commit into from
Sep 17, 2018

Conversation

uepoch
Copy link

@uepoch uepoch commented Sep 12, 2018

They are considered as an illegal character in prometheus text-format in metrics_name

Example file

TEST[promtheus]$ cat test.txt 
# HELP vault_audit_file/_log_request vault_audit_file/_log_request
# TYPE vault_audit_file/_log_request summary
vault_audit_file/_log_request{quantile="0.5"} NaN
vault_audit_file/_log_request{quantile="0.9"} NaN
vault_audit_file/_log_request{quantile="0.99"} NaN
vault_audit_file/_log_request_sum 1.7049709558486938
vault_audit_file/_log_request_count 1
TEST[promtheus]$ cat test.txt | ./promtool check metrics
error while linting: text format parsing error in line 1: invalid metric name in comment
TEST[promtheus]$ cat test.txt | sed 's#/#_#g' | ./promtool check metrics && echo $?
0

@uepoch
Copy link
Author

uepoch commented Sep 17, 2018

Hello, sorry for highlighting you @banks, you seem to be the one merging PR for a while.
Can you take a look at this review when you have some time ? We need it for hashicorp/vault#5308
Thanks a lot in advance !

Copy link
Member

@banks banks left a comment

Choose a reason for hiding this comment

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

Thanks for showing your rationale with promtool.

This seems reasonable to me if Prometheus chokes on these anyway!

@banks banks merged commit f0300d1 into hashicorp:master Sep 17, 2018
@uepoch
Copy link
Author

uepoch commented Sep 17, 2018

Thanks !

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