Skip to content

HTTP server responds with metrics on any url #551

@robinp-tw

Description

@robinp-tw

It seems client_java/simpleclient_httpserver/src/main/java/io/prometheus/client/exporter/HTTPServer.java creates context mappings for / and /metrics, which according to https://docs.oracle.com/javase/8/docs/jre/api/net/httpserver/spec/com/sun/net/httpserver/HttpServer.html#mapping_description means that - without further filtering - it just responds to any url with the metrics (even /foo/bar).

This results in a great scraping load on the server if it is hit by, for example, security scanners.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions