[VOL-5506] Enable grpc stats
Change-Id: I78fe2235a2df26855053aa91da6f0b2c4fccd5f0
Signed-off-by: Abhay Kumar <abhay.kumar@radisys.com>
diff --git a/internal/pkg/config/config.go b/internal/pkg/config/config.go
index ba0e564..d06607e 100644
--- a/internal/pkg/config/config.go
+++ b/internal/pkg/config/config.go
@@ -39,6 +39,7 @@
defaultEventtopic = "voltha.events"
defaultOnunumber = 1
defaultProbeAddress = ":8080"
+ defaultPrometheusPort = ":8081"
defaultLiveProbeInterval = 60 * time.Second
defaultNotLiveProbeInterval = 5 * time.Second // Probe more frequently when not alive
// defaultHeartbeatCheckInterval is the time in seconds the adapter will keep checking the hardware for heartbeat.
@@ -78,6 +79,7 @@
EventTopic string
LogLevel string
ProbeAddress string
+ PrometheusAddress string
GrpcAddress string
CoreEndpoint string
TraceAgentAddress string
@@ -123,6 +125,7 @@
Banner: defaultBanner,
DisplayVersionOnly: defaultDisplayVersionOnly,
ProbeAddress: defaultProbeAddress,
+ PrometheusAddress: defaultPrometheusPort,
LiveProbeInterval: defaultLiveProbeInterval,
NotLiveProbeInterval: defaultNotLiveProbeInterval,
HeartbeatCheckInterval: defaultHeartbeatCheckInterval,
@@ -201,6 +204,11 @@
defaultProbeAddress,
"The address on which to listen to answer liveness and readiness probe queries over HTTP.")
+ flag.StringVar(&(so.PrometheusAddress),
+ "prometheus_address",
+ defaultPrometheusPort,
+ "Used for exposing the metrics to prometheus.")
+
flag.DurationVar(&(so.LiveProbeInterval),
"live_probe_interval",
defaultLiveProbeInterval,