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

Invalid textfile collector file brings down whole exporter #755

Closed
Mario-Hofstaetter opened this issue Apr 3, 2021 · 0 comments · Fixed by #759
Closed

Invalid textfile collector file brings down whole exporter #755

Mario-Hofstaetter opened this issue Apr 3, 2021 · 0 comments · Fixed by #759
Labels

Comments

@Mario-Hofstaetter
Copy link
Contributor

Mario-Hofstaetter commented Apr 3, 2021

Certain malformed .prom files are handled gracefully by the exporter
However, there are some cases that will bring down the whole exporter endpoint (HTTP 500) and show an exception.

Example:
Add this as oh-oh.prom to the textfile collector directory:

# HELP windows_sometest This is a Test.
# TYPE windows_sometest gauge
windows_sometest{display_name="foobar",display_version="13.4.0"} 1
windows_sometest{display_name="foobar",display_version="13.4.0"} 1

This brings down the whole exporter:

curl.exe http://localhost:9182/metrics --verbose
HTTP/1.1 500 Internal Server Error
An error has occurred while serving metrics:
collected metric "windows_sometest" { label:<name:"display_name" value:"foobar" > label:<name:"display_version" value:"13.4.0" > gauge:<value:1 > } was collected before with the same name and label values

There are several possible cases, where duplicate/mixed format metrics cause this error. This can happen quite easily when using scripting and textfile collector.

Can this be fixed?

Expected behavior is that windows_textfile_scrape_error returns 1 but other metrics should continue to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants