Files
ubicloud/prog/setup_node_exporter.rb
mohi-kalantari ec1e11a2a7 Add node_exporter installation prog to VmHost
A new prog is added to install the node_exporter on VmHosts.

A flag is also added to make sure the application will serve the
metrics on localhost instead of all network interfaces.

For the VmHosts which are already setup and do not have the app
installed we can create this strand:

Strand.create(prog: "SetupNodeExporter", label: "start",
	stack: [{subject_id: vm_host.id}])
2025-06-25 10:59:23 +02:00

12 lines
245 B
Ruby

# frozen_string_literal: true
class Prog::SetupNodeExporter < Prog::Base
subject_is :sshable
label def start
version = "1.9.1"
sshable.cmd("sudo host/bin/setup-node-exporter #{version}")
pop "node exporter was setup"
end
end