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 /ping endpoint for compatibility with telegraf/influxdb endpoints #29594

Closed
DaveWK opened this issue Nov 30, 2023 · 6 comments
Closed

Add /ping endpoint for compatibility with telegraf/influxdb endpoints #29594

DaveWK opened this issue Nov 30, 2023 · 6 comments
Labels

Comments

@DaveWK
Copy link

DaveWK commented Nov 30, 2023

Component(s)

receiver/influxdb

Is your feature request related to a problem? Please describe.

Some third party apps utilize a /ping endpoint which is available on telegraf/influxdb and will bail out on sending data when it gets an unexpected ping response (currently for the otel-contrib influxdb receiver it returns 404)

Describe the solution you'd like

Add the /pingto the opentelemetry plugin as an endpoint and have it return 204.
An example curl of telegraf:

curl -vv localhost:8086/ping
*   Trying 127.0.0.1:8086...
* Connected to localhost (127.0.0.1) port 8086 (#0)
> GET /ping HTTP/1.1
> Host: localhost:8086
> User-Agent: curl/8.0.1
> Accept: */*
>
< HTTP/1.1 204 No Content
< X-Influxdb-Version: 1.0
< Date: Thu, 30 Nov 2023 21:16:10 GMT
<
* Connection #0 to host localhost left intact

Describe alternatives you've considered

I tried setting a proxy in front of the endpoint to catch the /ping and return the 204 but it's convoluted to add and support a whole proxy service in an attempt to emulate the native behaviour of a the native telegraf/influxdb rpc

Additional context

No response

@DaveWK DaveWK added enhancement New feature or request needs triage New item requiring triage labels Nov 30, 2023
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@jve-engineering
Copy link
Contributor

When I tried to activate the influxdbreceiver as a sink for checkmk, I encountered the same message.

2023-12-03 16:36:48 [5] [influxdb http://192.168.122.166:8086] Successfully initiated connection
2023-12-03 16:36:48 [7] [influxdb http://192.168.122.166:8086] GET /ping
2023-12-03 16:36:48 [3] [influxdb http://192.168.122.166:8086] GET [404] 404 page not found

2023-12-03 16:36:48 [5] [influxdb http://192.168.122.166:8086] Closing connection

I have added the /ping endpoint and tested it successfully with checkmk. If the changes are acceptable, I would like to open a pull request.

@jacobmarble
Copy link
Contributor

@jve-engineering LGTM!

@crobert-1
Copy link
Member

Removing the needs triage label as the code owner supports the idea.

@crobert-1 crobert-1 removed the needs triage New item requiring triage label Dec 6, 2023
mx-psi pushed a commit that referenced this issue Dec 11, 2023
…tibility (#29662)

**Description:** This PR supplements the receiver `influxdbreceiver`
with an implementation of the `/ping`
[endpoint](https://docs.influxdata.com/influxdb/v2/api/#operation/GetPing).
Various third-party applications use this to check the availability of
the receiver before sending metrics, e.g. checkmk.

**Link to tracking Issue:** #29594

**Testing:** Basic tests and end to end testing with the third party
application
[checkmk](https://docs.checkmk.com/latest/en/metrics_exporter.html).

**Documentation:** No additional documentation has been added.
- The user does not interact directly with this endpoint.
- There are no configuration options.
Copy link
Contributor

github-actions bot commented Feb 5, 2024

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label Feb 5, 2024
@mx-psi
Copy link
Member

mx-psi commented Feb 5, 2024

I believe this was fixed by #29662

@mx-psi mx-psi closed this as completed Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants