Contribute
Testing an agent without root
Run an agent by hand against your local server, with its config in the current folder. Nothing is installed.
Enroll and run
- Build the agents:
npm run agents. - In CERMM, open Add device and copy the line. You need two things from it: the
--pin(the part aftersha256//) and the--token. - Enroll, then run:
agent/dist/cermm-agent-linux-amd64 enroll --server https://localhost:4800 --pin PIN --token TOKEN --config ./agent.json agent/dist/cermm-agent-linux-amd64 run --config ./agent.json
It shows up on the Devices list like any machine. Ctrl+C stops it. Add --no-commands to enroll to try a monitor-only agent.
Not running as root means some things can't be read (and jobs run as you, not root). That's expected for a test.
Look without sending
agent/dist/cermm-agent-linux-amd64 inventory # what it would report, as JSON
agent/dist/cermm-agent-linux-amd64 health # pending reboot, failed services and updates
agent/dist/cermm-agent-linux-amd64 version
Against the API
Use curl -k (or NODE_TLS_REJECT_UNAUTHORIZED=0 for Node) for the local server's own certificate. curl -k https://localhost:4800/api/agent/ping answers cermm.