Closed
Description
Since NGINX Plus R18 the API module provides the list of fields according to the configuration instead of using the static list of fields.
In previous versions, the api returned the static list of fields: "nginx","processes","connections","slabs","http","stream","ssl"
Since r18, this list can be different for diffrent configurations. For example, if there are no configured stream{}, then the list of fields will be:
"nginx","processes","connections","slabs","http""ssl"
To reproduce
Steps to reproduce the behavior:
- Upgrade NGINX Plus up to the latest r18 release
- Comment out the whole stream {} configuration
- See error
Expected behavior
The prometheus exporter should request /api/ first, to get the number of latest available API version. After that, request /api/ to get the list of configured fields.