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

Cherry-pick #17291 to 7.x: Set accept header for prometheus client scraping #17325

Merged
merged 1 commit into from
Mar 31, 2020

Conversation

blakerouse
Copy link
Contributor

@blakerouse blakerouse commented Mar 30, 2020

Cherry-pick of PR #17291 to 7.x branch. Original message:

What does this PR do?

Sets the default Accept header for the prometheus scraper to match the same accept header used by upstream prometheus.

Why is it important?

Some servers that expose prometheus metrics can fail to respond unless this Accept header is present and correct.

Example being the referenced but that returns HTTP error code 406.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Author's Checklist

  • Accept header is sent on request.

Related issues

* Set accept header for prometheus to match the same as prometheus upstream.

* Fix go.mod.

* Add changelog entry.

(cherry picked from commit 268511d)
@blakerouse blakerouse requested a review from a team March 30, 2020 13:48
@blakerouse blakerouse added the Team:Platforms Label for the Integrations - Platforms team label Mar 30, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-platforms (Team:Platforms)

@blakerouse blakerouse merged commit b62b5e4 into elastic:7.x Mar 31, 2020
@blakerouse blakerouse deleted the backport_17291_7.x branch March 31, 2020 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport review Team:Platforms Label for the Integrations - Platforms team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants