- Add database migration 006 for agent_key, agent_installed, agent_install_path, agent_last_seen_at columns - Add Server model methods: findByAgentKey, generateAgentKey, regenerateAgentKey, updateAgentLastSeen, setAgentInstalled - Auto-generate agent_key on server creation - Create AgentService for SSH-based install/uninstall of remote agent - Create bin/agent.sh - bash agent script for remote servers - Create install/agent-install.sh and install/agent-uninstall.sh - Create install/servermanager-agent.service systemd unit - Add POST /api/metrics/push endpoint (auth via agent_key) - Add web routes for agent install/uninstall/regenerate-key - Add agent status section to server detail view with install/uninstall modals - Make MonitoringService::saveMetrics() public for reuse
22 lines
420 B
Desktop File
22 lines
420 B
Desktop File
[Unit]
|
|
Description=ServerManager Monitoring Agent
|
|
Documentation=https://github.com/servermanager
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
ExecStart=/usr/local/bin/servermanager-agent
|
|
Restart=always
|
|
RestartSec=10
|
|
StartLimitIntervalSec=60
|
|
StartLimitBurst=5
|
|
NoNewPrivileges=yes
|
|
ProtectSystem=full
|
|
ProtectHome=yes
|
|
PrivateDevices=yes
|
|
PrivateTmp=yes
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|