Skip to content

Currently running 2 servers to expose metrics, move to 1 #420

@viveksb007

Description

@viveksb007
Contributor

What would you like to be added:
Currently we are running 2 prometheus server endpoints in aws-network-policy-agent container in aws-node pod.

  1. Created by controller-runtime (:8162/metrics can see standard controller runtime and go metrics )
  2. Created in metrics package (:61680/metrics can see custom metrics and go metrics)
    func ServeMetrics() {

We can register our customer metrics to the same server created by controller-runtime (can get rid of our own created metric server).
Ref - https://book.kubebuilder.io/reference/metrics#publishing-additional-metrics

Why is this needed:

  • Avoid duplication and efficient metric scraping (we only need to specify single metric endpoint for metric scraping for this container)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Participants

    @viveksb007

    Issue actions

      Currently running 2 servers to expose metrics, move to 1 · Issue #420 · aws/aws-network-policy-agent