From 55ee772a6ff7c08c57f0910aba624be693eb530e Mon Sep 17 00:00:00 2001 From: Viliam Lorinc Date: Tue, 7 May 2024 16:54:02 +0200 Subject: [PATCH 1/2] change SocketPath from var to const as it should not be changed --- metrics/metrics.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metrics/metrics.go b/metrics/metrics.go index 6e37c08..9a9a19d 100644 --- a/metrics/metrics.go +++ b/metrics/metrics.go @@ -14,7 +14,7 @@ import ( "github.com/sirupsen/logrus" ) -var SocketPath = "/var/run/dpdk/rte/dpdk_telemetry.v2" +const SocketPath = "/var/run/dpdk/rte/dpdk_telemetry.v2" func queryTelemetry(conn net.Conn, log *logrus.Logger, command string, response interface{}) { _, err := conn.Write([]byte(command)) From fa92e867f39d0e209ba46316a33e48b783f7eba9 Mon Sep 17 00:00:00 2001 From: Viliam Lorinc Date: Tue, 7 May 2024 16:55:00 +0200 Subject: [PATCH 2/2] revert http port back to 9064 to match dpservice config --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 7d389a6..33ef697 100644 --- a/main.go +++ b/main.go @@ -46,7 +46,7 @@ func main() { flag.StringVar(&hostnameFlag, "hostname", "", "Hostname to use") flag.IntVar(&pollIntervalFlag, "poll-interval", 20, "Polling interval in seconds") - flag.Uint64Var(&exporterPort, "port", 8080, "Port on which exporter will be running.") + flag.Uint64Var(&exporterPort, "port", 9064, "Port on which exporter will be running.") flag.Parse() if exporterPort < 1024 || exporterPort > 65535 {