Skip to content

Commit

Permalink
Antrea Prometheus integration (antrea-io#236)
Browse files Browse the repository at this point in the history
Integrate with Prometheus monitoring solution.
Integration of the Prometheus client into Antrea controller and agent
allows the exposure of various metrics to Prometheus server.
In addition to Antrea's own set of metrics, Prometheus client will also
expose metrics which are defined by various components which are part of
the Antrea ecosystem, e.g golang, Prometheus itself etc.
  • Loading branch information
ksamoray committed Mar 16, 2020
1 parent 500bb4a commit 7361fd9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions cmd/antrea-controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ package main

import (
"fmt"
"github.com/prometheus/common/log"
"net"
"net/http"
"os"
Expand Down Expand Up @@ -141,7 +140,7 @@ func createPrometheusMetricsListener(prometheusHost string,

err = http.ListenAndServe(net.JoinHostPort(prometheusHost, prometheusPort), nil)
if err != nil {
klog.Error("Failed to initialize Prometheus metrics server %v", err)
klog.Errorf("Failed to initialize Prometheus metrics server %v", err)
}
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/agent/metrics/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,6 @@ func StartListener(

err = http.ListenAndServe(net.JoinHostPort(prometheusHost, strconv.Itoa(prometheusPort)), nil)
if err != nil {
klog.Error("Failed to initialize Prometheus metrics server %v", err)
klog.Errorf("Failed to initialize Prometheus metrics server %v", err)
}
}

0 comments on commit 7361fd9

Please sign in to comment.