Skip to content

New behavior of NGINX Plus r18 API module breaks prometheus #45

Closed
@eepifanova

Description

@eepifanova

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:

  1. Upgrade NGINX Plus up to the latest r18 release
  2. Comment out the whole stream {} configuration
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn issue reporting a potential bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions