NodeSniff Agent is a lightweight server metrics collector for the NodeSniff monitoring system.
The agent collects and securely sends metrics to your NodeSniff backend over HTTPS.
License: GNU GPL v3 (non-commercial use only)
- Collects CPU, RAM, disk, network, and OS metrics (extensible via Python plugins)
- Secure HTTPS metric transmission with HMAC authentication
- CLI modes for install, remove, cleanup
- Systemd integration with
/usr/bin/nsagentsymlink - Recommended setup as dedicated unprivileged
nodesniffuser
- Python 3.7+
- Linux (x86, ARM, etc.)
- Python packages:
psutilPyYAMLrequestssetuptools(required for some plugin systems)
Install dependencies:
pip install -r requirements.txtsudo useradd --system --no-create-home --shell /usr/sbin/nologin nodesniffsudo ./nsagent.pyIf Python or packages are missing:
sudo apt install python3-pip
sudo pip3 install -r requirements.txt
# or, for Raspberry Pi and similar:
sudo pip3 install --break-system-packages PyYAMLPaste your company key into:
sudo nano /etc/nodesniff/nsagent.tokenRun agent again:
sudo ./nsagent.pysudo mkdir -p /var/log/nodesniff
sudo chown -R nodesniff:nodesniff /etc/nodesniff
sudo chown -R nodesniff:nodesniff /usr/lib/nodesniff
sudo chown -R nodesniff:nodesniff /var/log/nodesniff
sudo chmod 750 /var/log/nodesniff(Skip file creation — /var/log/nodesniff/nsagent.log will be created automatically.)
sudo ./nsagent.py --service
sudo systemctl daemon-reload
sudo systemctl restart nodesniff-agent
sudo systemctl enable nodesniff-agentAgent will now run as nodesniff user.
ps aux | grep nsagent
systemctl status nodesniff-agentYou should see:
User=nodesniff
Active: active (running)
-
sudo ./nsagent.py
One-time run (registers if needed, then loops) -
sudo ./nsagent.py --service
Installs systemd service (requires registration) -
sudo ./nsagent.py --clean
Uninstalls: removes configs, service, logs, symlink
sudo ./nsagent.py
# Paste company key again if prompted
sudo ./nsagent.py --servicesudo ./nsagent.py --clean
# Copy updated nsagent.py
sudo ./nsagent.py
sudo ./nsagent.py --servicesudo ./nsagent.py --cleanCreate and fix permissions manually:
sudo mkdir -p /var/log/nodesniff
sudo touch /var/log/nodesniff/nsagent.log
sudo chown nodesniff:nodesniff /var/log/nodesniff /var/log/nodesniff/nsagent.log
sudo chmod 750 /var/log/nodesniff
sudo chmod 640 /var/log/nodesniff/nsagent.log
sudo systemctl restart nodesniff-agentCheck logs:
journalctl -u nodesniff-agent -n 50 --no-pagerCommon causes:
- Missing or placeholder token file
/etc/nodesniff/nsagent.token - Wrong permissions on
/etc/nodesniffor/var/log/nodesniff - Outdated Python version
- Backend or database unavailable
systemctl show -p User nodesniff-agent.serviceExpected:
User=nodesniff
sudo -u nodesniff python3 /usr/lib/nodesniff/nsagent.py --daemonGPL v3 — non-commercial use only.
For commercial use or support, contact us: info@nodesniff.com