mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-04 14:30:15 +00:00
Improve host agent onboarding flow
This commit is contained in:
parent
c933eb699c
commit
138d8facd2
10 changed files with 1015 additions and 163 deletions
|
|
@ -17,7 +17,53 @@ machine alongside the rest of your infrastructure.
|
|||
|
||||
> Replace `<api-token>` with a Pulse API token limited to the `host-agent:report` scope. Tokens generated from **Settings → Agents → Host agents** already apply this scope.
|
||||
|
||||
### Linux (systemd)
|
||||
### Linux
|
||||
|
||||
The hosted installer handles systemd, rc.local environments, and Unraid automatically.
|
||||
|
||||
```bash
|
||||
curl -fsSL http://pulse.example.local:7655/install-host-agent.sh | \
|
||||
bash -s -- --url http://pulse.example.local:7655 --token <api-token>
|
||||
```
|
||||
|
||||
- On systemd machines the script installs the binary, wires up `/etc/systemd/system/pulse-host-agent.service`, enables it, and tails the registration status.
|
||||
- On Unraid hosts it starts the agent under `nohup`, creates `/var/log/pulse`, and (optionally) inserts the auto-start line into `/boot/config/go`.
|
||||
- On minimalist distros without systemd (e.g. Alpine) it creates/updates `/etc/rc.local`, adds the background runner, and verifies it launches.
|
||||
|
||||
Use `--force` to skip interactive prompts or `--interval 1m` to change the polling cadence.
|
||||
|
||||
### macOS
|
||||
|
||||
```bash
|
||||
curl -fsSL http://pulse.example.local:7655/install-host-agent.sh | \
|
||||
bash -s -- --url http://pulse.example.local:7655 --token <api-token>
|
||||
```
|
||||
|
||||
On macOS the installer stores the token in the Keychain when possible, generates a launchd plist inside `~/Library/LaunchAgents`, and restarts the job so the agent survives logouts and reboots.
|
||||
|
||||
### Windows
|
||||
|
||||
Run the PowerShell bootstrapper as an administrator:
|
||||
|
||||
```powershell
|
||||
irm http://pulse.example.local:7655/install-host-agent.ps1 | iex
|
||||
```
|
||||
|
||||
Set `PULSE_URL` and `PULSE_TOKEN` in the environment first for a non-interactive flow:
|
||||
|
||||
```powershell
|
||||
$env:PULSE_URL = "http://pulse.example.local:7655"
|
||||
$env:PULSE_TOKEN = "<api-token>"
|
||||
irm http://pulse.example.local:7655/install-host-agent.ps1 | iex
|
||||
```
|
||||
|
||||
The script installs the service under `PulseHostAgent`, registers Windows Event Log messages, configures automatic recovery on failure, and waits for Pulse to acknowledge the new host.
|
||||
|
||||
### Manual installation (advanced)
|
||||
|
||||
Prefer to take full control or working in air-gapped environments? You can still download the static binaries and wire them up manually. The commands below mirror what the installer scripts perform for their respective platforms.
|
||||
|
||||
#### Linux (systemd)
|
||||
|
||||
```bash
|
||||
sudo curl -fsSL https://github.com/rcourtman/Pulse/releases/latest/download/pulse-host-agent-linux-amd64 \
|
||||
|
|
@ -31,7 +77,7 @@ sudo /usr/local/bin/pulse-host-agent \
|
|||
|
||||
For persistence, drop a systemd unit (e.g. `/etc/systemd/system/pulse-host-agent.service`) referencing the same command and enable it with `systemctl enable --now pulse-host-agent`.
|
||||
|
||||
### macOS (launchd)
|
||||
#### macOS (launchd)
|
||||
|
||||
```bash
|
||||
sudo curl -fsSL https://github.com/rcourtman/Pulse/releases/latest/download/pulse-host-agent-darwin-arm64 \
|
||||
|
|
@ -72,9 +118,18 @@ Create `~/Library/LaunchAgents/com.pulse.host-agent.plist` to keep the agent run
|
|||
|
||||
Load it with `launchctl load ~/Library/LaunchAgents/com.pulse.host-agent.plist`.
|
||||
|
||||
### Windows
|
||||
#### Windows (manual)
|
||||
|
||||
A Windows build will ship shortly. In the meantime run the Linux/WSL binary or compile from source (`GOOS=windows GOARCH=amd64`).
|
||||
Compile from source (`GOOS=windows GOARCH=amd64`) or download the latest release, then install the Windows service yourself:
|
||||
|
||||
```powershell
|
||||
New-Service -Name PulseHostAgent `
|
||||
-BinaryPathName '"C:\Program Files\Pulse\pulse-host-agent.exe" --url http://pulse.example.local:7655 --token <api-token> --interval 30s' `
|
||||
-DisplayName "Pulse Host Agent" `
|
||||
-Description "Monitors system metrics and reports to Pulse monitoring server" `
|
||||
-StartupType Automatic
|
||||
Start-Service -Name PulseHostAgent
|
||||
```
|
||||
|
||||
## Command Flags
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue