@@ -55,19 +55,18 @@ The agent uses [Cobra](https://github.com/spf13/cobra) for CLI command handling:
5555
5656- ** cmd/root.go** : Base command that all subcommands attach to
5757- ** cmd/start.go** : Start command with three modes:
58- - Foreground mode (` pulse start` ): Runs in terminal, blocks execution
59- - Daemon mode (` pulse start -d` ): Spawns background process using ` exec.Command ` with ` Setsid: true `
58+ - Foreground mode (` nodepulse start` ): Runs in terminal, blocks execution
59+ - Daemon mode (` nodepulse start -d` ): Spawns background process using ` exec.Command ` with ` Setsid: true `
6060 - Both modes create PID file EXCEPT when running under systemd (detected via ` INVOCATION_ID ` env var)
6161 - ** Current** : Scrapes Prometheus instead of collecting custom metrics
6262- ** cmd/stop.go** : Stops daemon mode only (reads PID file, sends SIGTERM → SIGKILL if needed)
6363 - Will NOT stop systemd-managed processes (they don't create PID files)
6464 - Provides helpful message if systemd service is running
6565- ** cmd/service.go** : systemd service management (install/start/stop/restart/status/uninstall)
66- - ** cmd/setup.go** : Setup wizard for first-time configuration (command: ` pulse setup` )
66+ - ** cmd/setup.go** : Setup wizard for first-time configuration (command: ` nodepulse setup` )
6767 - ** Current** : Interactive TUI mode removed, only quick mode (` --yes ` ) available
6868 - Prompts for: endpoint URL and server_id
6969- ** cmd/status.go** : Shows comprehensive agent status including server ID, config, service status, buffer state, and logs
70- - ** cmd/update.go** : Self-update command that checks for new versions and performs updates
7170
7271### Prometheus Scraping (internal/prometheus/)
7372The agent scrapes Prometheus exporters instead of collecting custom metrics:
@@ -108,13 +107,13 @@ Uses [Viper](https://github.com/spf13/viper) for config loading from YAML:
108107 - Default endpoint: ` /metrics/prometheus `
109108- ** serverid.go** : Server ID generation and persistence
110109 - Auto-generates UUID if not set in config
111- - Persists to ` /var/lib/node-pulse /server_id `
110+ - Persists to ` /var/lib/nodepulse /server_id `
112111 - Validates format: alphanumeric + dashes, must start/end with alphanumeric
113112
114113Config search paths (in order):
1151141 . Explicit ` --config ` flag
116- 2 . ` /etc/node-pulse /nodepulse.yml `
117- 3 . ` $HOME/.node-pulse /nodepulse.yml `
115+ 2 . ` /etc/nodepulse /nodepulse.yml `
116+ 3 . ` $HOME/.nodepulse /nodepulse.yml `
1181174 . ` ./nodepulse.yml `
119118
120119### Logger (internal/logger/)
@@ -124,21 +123,18 @@ Structured logging with [Zap](https://github.com/uber-go/zap):
124123- File rotation with [ Lumberjack] ( https://github.com/natefinch/lumberjack )
125124- Configurable log level, size limits, and retention
126125
127- ### Updater (internal/updater/)
128- Self-update system for the agent:
126+ ### Update Management
127+ ** Agent updates are managed centrally via Ansible ** , not by the agent itself :
129128
130- - ** updater.go** : Core updater logic
131- - Checks version API endpoint for new releases
132- - Downloads new binary with SHA256 checksum verification
133- - Atomically replaces ` /usr/local/bin/pulse `
134- - Restarts agent service via systemd
135- - Includes automatic rollback on failure
136- - ** Version endpoint** : ` GET /agent/version?version={current}&os={os}&arch={arch} `
129+ - Updates deployed through dashboard's Ansible deployment system
130+ - Version controlled with rollback capability
131+ - Staged rollouts across server fleet
132+ - No self-update mechanism in the agent (removed in v0.1.x)
137133
138134### PID File Management (internal/pidfile/)
139135Handles process tracking and prevents duplicate agent runs:
140136
141- - ** Location** : ` /var/run/pulse .pid ` (root) or ` ~/.node-pulse/pulse .pid ` (user)
137+ - ** Location** : ` /var/run/nodepulse .pid ` (root) or ` ~/.nodepulse/nodepulse .pid ` (user)
142138- ** Stale PID detection** : ` CheckRunning() ` automatically detects and cleans stale PID files
143139- ** Systemd detection** : Checks for ` INVOCATION_ID ` environment variable (no PID file created under systemd)
144140
@@ -176,8 +172,9 @@ The agent runs as a **long-running daemon**:
176172- ** Dependencies** : ` node_exporter ` must be installed and running
177173- ** Security** : Port 9100 must be blocked from external access (UFW/iptables)
178174- ** Permissions** :
179- - Regular user can run ` pulse start ` , ` pulse start -d ` , ` pulse stop `
180- - Root required for ` pulse service ` , ` pulse setup ` , and ` pulse update ` commands
175+ - Regular user can run ` nodepulse start ` , ` nodepulse start -d ` , ` nodepulse stop `
176+ - Root required for ` nodepulse service ` and ` nodepulse setup ` commands
177+ - ** Deployment** : Managed via Ansible from central dashboard (not manual installation)
181178
182179## Testing Notes
183180
@@ -207,7 +204,7 @@ To test the full flow locally:
207204
2082054 . Verify buffering by pointing endpoint to invalid URL and checking buffer directory:
209206 ``` bash
210- ls -la /var/lib/node-pulse /buffer/
207+ ls -la /var/lib/nodepulse /buffer/
211208 ```
212209
213210## Release Process
0 commit comments