nginxinc/nginx-prometheus-exporter

Allow using the latest version with older versions of NGINX Plus

Opened this issue · 6 comments

I want to be able to use the exporter with older versions of NGINX Plus and not have the latest version of the API hardcoded.

Depends on nginxinc/nginx-plus-go-client#222

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 10 days.

This issue was closed because it has been stalled for 10 days with no activity.

My assumption is we won't be able to fix this with the given solution for nginxinc/nginx-plus-go-client#222 as it needs an already connected client.

@alitoufighi yes we need a connection to get the API versions from NGINX. One of the options that I was thinking about was to check the version every time we collect the metrics, but that might be a little bit expensive.

I'm open to suggestions 🙂

Hmm maybe beginning the connection in a minimal way (is finding the lowest compatible api version any easier? i.e. 1?) and then promoting it to a higher version? (I mean in the client)

Also I don't think the call to get API versions is over a specific API version, so it could be doable to communicate over to find the max compatible API version during initialization as well (in the nginx client repo, could be a breaking change?). It might not be the cleanest way either. (might actually give this a shot)

Blocked until nginx-plus-go-client 1.3.0 is release. When it is, @alitoufighi would you be open to creating a PR for this?