From 8d01109bb9c329d57a30edd790f835c843d430d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Garc=C3=ADa=20Montoro?= Date: Wed, 25 Mar 2026 15:45:01 +0100 Subject: [PATCH 1/4] Fix Prometheus path --- deployment/terraform/strings.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/terraform/strings.go b/deployment/terraform/strings.go index 05de39eac..4c3285c7d 100644 --- a/deployment/terraform/strings.go +++ b/deployment/terraform/strings.go @@ -577,7 +577,7 @@ Description=Node Exporter [Service] # Fallback when environment file does not exist EnvironmentFile=-/etc/default/prometheus-node-exporter -ExecStart=/usr/local/bin/node_exporter +ExecStart=/usr/bin/prometheus-node-exporter [Install] WantedBy=multi-user.target` From 73505bdafc6b8eb20c5c54aea70bd016a55788b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Garc=C3=ADa=20Montoro?= Date: Wed, 25 Mar 2026 18:13:37 +0100 Subject: [PATCH 2/4] Actually enable ethtool collector The flag was defined in an ARGS envvar in an environment file that was included in the systemd file, but the envvar itself was never used. Use the flag directly in the invocation of the binary. --- deployment/terraform/agent.go | 1 - deployment/terraform/create.go | 2 -- deployment/terraform/strings.go | 6 +----- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/deployment/terraform/agent.go b/deployment/terraform/agent.go index 9f55cdaf0..d2e904509 100644 --- a/deployment/terraform/agent.go +++ b/deployment/terraform/agent.go @@ -218,7 +218,6 @@ func (t *Terraform) configureAndRunAgents(extAgent *ssh.ExtAgent) error { {srcData: strings.TrimPrefix(browserBuf.String(), "\n"), dstPath: "/lib/systemd/system/ltbrowserapi.service", msg: "Uploading load-test browser api service file"}, {srcData: strings.TrimPrefix(clientSysctlConfig, "\n"), dstPath: "/etc/sysctl.conf"}, {srcData: strings.TrimPrefix(limitsConfig, "\n"), dstPath: "/etc/security/limits.conf"}, - {srcData: strings.TrimPrefix(prometheusNodeExporterConfig, "\n"), dstPath: "/etc/default/prometheus-node-exporter"}, {srcData: strings.TrimSpace(otelcolConfigFile), dstPath: "/etc/otelcol-contrib/config.yaml"}, {srcData: agentType, dstPath: t.ExpandWithUser(dstAgentTypeFilePath), msg: "Uploading agent type file"}, } diff --git a/deployment/terraform/create.go b/deployment/terraform/create.go index 35a525df9..e820f28d7 100644 --- a/deployment/terraform/create.go +++ b/deployment/terraform/create.go @@ -476,7 +476,6 @@ func (t *Terraform) setupAppServer(extAgent *ssh.ExtAgent, ip, siteURL, serviceF {srcData: strings.TrimPrefix(serverSysctlConfig, "\n"), dstPath: "/etc/sysctl.conf"}, {srcData: strings.TrimSpace(serviceFileTemplateOutput.String()), dstPath: "/lib/systemd/system/mattermost.service"}, {srcData: strings.TrimPrefix(limitsConfig, "\n"), dstPath: "/etc/security/limits.conf"}, - {srcData: strings.TrimPrefix(prometheusNodeExporterConfig, "\n"), dstPath: "/etc/default/prometheus-node-exporter"}, {srcData: strings.TrimSpace(fmt.Sprintf(netpeekServiceFile, gossipPort)), dstPath: "/lib/systemd/system/netpeek.service"}, {srcData: strings.TrimSpace(otelcolConfig), dstPath: "/etc/otelcol-contrib/config.yaml"}, } @@ -972,7 +971,6 @@ func (t *Terraform) setupProxyServer(extAgent *ssh.ExtAgent, instance Instance) {srcData: strings.TrimLeft(serverSysctlConfig, "\n"), dstPath: "/etc/sysctl.conf"}, {srcData: strings.TrimLeft(nginxConfig, "\n"), dstPath: "/etc/nginx/nginx.conf"}, {srcData: strings.TrimLeft(limitsConfig, "\n"), dstPath: "/etc/security/limits.conf"}, - {srcData: strings.TrimPrefix(prometheusNodeExporterConfig, "\n"), dstPath: "/etc/default/prometheus-node-exporter"}, {srcData: strings.TrimSpace(otelcolConfigFile), dstPath: "/etc/otelcol-contrib/config.yaml"}, } if err := uploadBatch(sshc, batch); err != nil { diff --git a/deployment/terraform/strings.go b/deployment/terraform/strings.go index 4c3285c7d..7b0f3888f 100644 --- a/deployment/terraform/strings.go +++ b/deployment/terraform/strings.go @@ -552,10 +552,6 @@ KC_DB_PASSWORD=mmpass KC_DB_USERNAME=keycloak KC_DATABASE=keycloak` -const prometheusNodeExporterConfig = ` -ARGS="--collector.ethtool" -` - const netpeekServiceFile = ` [Unit] Description=netpeek @@ -577,7 +573,7 @@ Description=Node Exporter [Service] # Fallback when environment file does not exist EnvironmentFile=-/etc/default/prometheus-node-exporter -ExecStart=/usr/bin/prometheus-node-exporter +ExecStart=/usr/bin/prometheus-node-exporter --collector.ethtool [Install] WantedBy=multi-user.target` From 786b190017b63b739322830f91556f30cd871dd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Garc=C3=ADa=20Montoro?= Date: Wed, 25 Mar 2026 18:39:25 +0100 Subject: [PATCH 3/4] Remove no-longer needed EnvironmentFile line --- deployment/terraform/strings.go | 1 - 1 file changed, 1 deletion(-) diff --git a/deployment/terraform/strings.go b/deployment/terraform/strings.go index 7b0f3888f..262da7a0e 100644 --- a/deployment/terraform/strings.go +++ b/deployment/terraform/strings.go @@ -572,7 +572,6 @@ Description=Node Exporter [Service] # Fallback when environment file does not exist -EnvironmentFile=-/etc/default/prometheus-node-exporter ExecStart=/usr/bin/prometheus-node-exporter --collector.ethtool [Install] From 485b15b20ef4c5778b82586230fdb8fb54f68100 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Garc=C3=ADa=20Montoro?= Date: Fri, 27 Mar 2026 15:59:53 +0100 Subject: [PATCH 4/4] Remove outdated comment --- deployment/terraform/strings.go | 1 - 1 file changed, 1 deletion(-) diff --git a/deployment/terraform/strings.go b/deployment/terraform/strings.go index 262da7a0e..d2e76ab37 100644 --- a/deployment/terraform/strings.go +++ b/deployment/terraform/strings.go @@ -571,7 +571,6 @@ const prometheusNodeExporterServiceFile = `[Unit] Description=Node Exporter [Service] -# Fallback when environment file does not exist ExecStart=/usr/bin/prometheus-node-exporter --collector.ethtool [Install]