Skip to content

Commit

Permalink
Fix ethtool metrics (#852)
Browse files Browse the repository at this point in the history
  • Loading branch information
streamer45 authored Nov 25, 2024
1 parent 48a236b commit 134b92b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion deployment/terraform/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func (t *Terraform) configureAndRunAgents(extAgent *ssh.ExtAgent) error {
return
}

cmd = "sudo systemctl restart otelcol-contrib"
cmd = "sudo systemctl restart otelcol-contrib && sudo systemctl restart prometheus-node-exporter"
if out, err := sshc.RunCommand(cmd); err != nil {
mlog.Error("error running ssh command", mlog.Int("agent", agentNumber), mlog.String("cmd", cmd), mlog.String("out", string(out)), mlog.Err(err))
foundErr.Store(true)
Expand Down
4 changes: 2 additions & 2 deletions deployment/terraform/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ func (t *Terraform) setupAppServer(extAgent *ssh.ExtAgent, ip, siteURL, serviceF
return fmt.Errorf("batch upload failed: %w", err)
}

cmd := "sudo systemctl restart otelcol-contrib"
cmd := "sudo systemctl restart otelcol-contrib && sudo systemctl restart prometheus-node-exporter"
if out, err := sshc.RunCommand(cmd); err != nil {
return fmt.Errorf("error running ssh command %q, output: %q: %w", cmd, string(out), err)
}
Expand Down Expand Up @@ -848,7 +848,7 @@ func (t *Terraform) setupProxyServer(extAgent *ssh.ExtAgent, instance Instance)
return
}

cmd := "sudo systemctl restart otelcol-contrib"
cmd := "sudo systemctl restart otelcol-contrib && sudo systemctl restart prometheus-node-exporter"
if out, err := sshc.RunCommand(cmd); err != nil {
mlog.Error("error running ssh command", mlog.String("output", string(out)), mlog.String("cmd", cmd), mlog.Err(err))
return
Expand Down

0 comments on commit 134b92b

Please sign in to comment.