Skip to content

Conversation

@RDruon
Copy link
Contributor

@RDruon RDruon commented Feb 26, 2024

Add POST support to the exporter.

This patch is based on a fork of https://github.com/MindFlavor/prometheus_exporter_base to enable POST supports. A PR has been opened to include this change in the official crate MindFlavor/prometheus_exporter_base#30

In the meantime, I can transfer the fork to the whamcloud org.

With patch

[root@node1 ~]# curl -X POST -I http://localhost:32221/metrics
HTTP/1.1 200 OK
content-type: text/plain; version=0.0.4
content-length: 4766
date: Mon, 26 Feb 2024 11:34:08 GMT
[root@node1 ~]# curl -X GET -I http://localhost:32221/metrics
HTTP/1.1 200 OK
content-type: text/plain; version=0.0.4
content-length: 4766
date: Mon, 26 Feb 2024 11:34:12 GMT

Without patch (405 Method Not Allowed):

[root@node1 ~]# curl -X POST -I http://localhost:32221/metrics
HTTP/1.1 405 Method Not Allowed
content-length: 0
date: Mon, 26 Feb 2024 11:27:12 GMT

[root@node1 ~]# curl -X GET -I http://localhost:32221/metrics
HTTP/1.1 200 OK
content-type: text/plain; version=0.0.4
content-length: 4766
date: Mon, 26 Feb 2024 11:27:18 GMT

@RDruon RDruon added the enhancement New feature or request label Feb 26, 2024
@RDruon RDruon self-assigned this Feb 26, 2024
Copy link
Member

@jgrund jgrund left a comment

Choose a reason for hiding this comment

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

There is no description of why this change is needed.

@RDruon
Copy link
Contributor Author

RDruon commented Apr 24, 2024

A software (that can't be named here) retrieve metrics through "POST" instead of "GET".
The software has been updated to support both "POST" and "GET", closing.

@RDruon RDruon closed this Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants