Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

fix(agent): add --hostname support to Windows PowerShell install script

rcourtman6b317f08d2d8
diff --git a/frontend-modern/public/install-host-agent.ps1 b/frontend-modern/public/install-host-agent.ps1
index 5a11761836..c0c14509c3 100644
--- a/frontend-modern/public/install-host-agent.ps1
+++ b/frontend-modern/public/install-host-agent.ps1
@@ -11,6 +11,7 @@ param(
[string]$PulseUrl = $env:PULSE_URL,
[string]$Token = $env:PULSE_TOKEN,
[string]$Interval = $env:PULSE_INTERVAL,
+ [string]$Hostname = $env:PULSE_HOSTNAME,
[string]$InstallPath = "C:\Program Files\Pulse",
[string]$Arch = $env:PULSE_ARCH,
[switch]$NoService
@@ -253,6 +254,9 @@ PulseInfo "Configuration:"
Write-Host " Pulse URL: $PulseUrl"
Write-Host " Token: $(if ($Token) { '***' + $Token.Substring([Math]::Max(0, $Token.Length - 4)) } else { 'none' })"
Write-Host " Interval: $Interval"
+if ($Hostname) {
+ Write-Host " Hostname Override: $Hostname"
+}
Write-Host " Install Path: $InstallPath"
if ($Arch) {
Write-Host " Architecture Override: $Arch"
@@ -382,6 +386,9 @@ try {
if ($Token) {
$agentArgs += @("--token", "`"$Token`"")
}
+ if ($Hostname) {
+ $agentArgs += @("--hostname", "`"$Hostname`"")
+ }
$serviceBinaryPath = "`"$agentPath`" $($agentArgs -join ' ')"
$manualCommand = "& `"$agentPath`" $($agentArgs -join ' ')"
} catch {
@@ -398,6 +405,9 @@ $config = @{
if ($Token) {
$config.token = $Token
}
+if ($Hostname) {
+ $config.hostname = $Hostname
+}
$config | ConvertTo-Json | Set-Content $configPath
PulseSuccess "Created configuration at $configPath"