Skip to content

nginx_up metric name is misleading #978

Open
@grepwood

Description

@grepwood

Describe the bug
nginx_up's name implies that it indicates whether nginx is up or not - not that the scrape was successful, as the documentation for nginx-prometheus-exporter states. As such, this creates an opportunity to confuse users by giving them false negatives - they will believe that nginx is down based on nginx_up returning 0 - when in reality, nginx returned a perfectly normal HTTP error, which it could have not done if it wasn't up.

To reproduce
Steps to reproduce the behavior:

  1. Deploy any version of nginx and configure it deliberately to serve any HTTP error for GET /stub_status.
  2. Deploy nginx-prometheus-exporter and tell it to scrape metrics from that nginx from the usual place.

Expected behavior
If nginx_up's definition were consistent with its name, it would return true. The status of whether a scrape has succeeded, should be described in a different metric.

Your environment

  • Version of the Prometheus exporter - 1.4.1
  • Version of Docker/Kubernetes - not relevant
  • [if applicable] Kubernetes platform (e.g. Mini-kube or GCP) - not relevant
  • Using NGINX or NGINX Plus - NGINX 1.26.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementPull requests for new features/feature enhancementshelp wantedIssues identified as good community contribution opportunitiesproposalAn issue that proposes a feature requestrefinedIssues that are ready to be prioritized

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions