CERMM/wiki>

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

  1. Build the agents: npm run agents.
  2. In CERMM, open Add device and copy the line. You need two things from it: the --pin (the part after sha256//) and the --token.
  3. 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.

CERMM is in development. Something here wrong or out of date? Tell us or fix it.