Skip to content

Managing the Agent

Where it lives

PlatformInstall directorySchedule
Linux, macOS, BSD/opt/pingninerA crontab entry for the installing user
WindowsC:\Program Files\PingninerA scheduled task named Pingniner Agent, running as SYSTEM

The directory contains the agent (agent.js) and its own Node runtime (node), so the agent does not depend on any Node installation you may have.

Commands

The agent is run through its bundled Node binary. On Linux, macOS and BSD:

sh
sudo /opt/pingniner/node /opt/pingniner/agent.js <command>

On Windows, in an elevated PowerShell:

powershell
& "C:\Program Files\Pingniner\node.exe" "C:\Program Files\Pingniner\agent.js" <command>
CommandWhat it does
runCollects metrics once and posts them. This is what the schedule calls.
init <key> <server|workstation>Registers the schedule for a key and mode
deinitRemoves the schedule but leaves the files in place
uninstallRemoves the schedule and the installed files
updateUpdates the agent to the latest release
versionPrints the installed agent version
pathsPrints the paths the agent is using

Running run by hand is the fastest way to diagnose a silent agent — it prints each collection step and any error to the terminal.

Checking the schedule

Linux, macOS, BSD:

sh
sudo crontab -l | grep pingniner

You should see one entry — * * * * * for a server, 0 * * * * for a workstation.

Windows:

powershell
schtasks /query /tn "Pingniner Agent"

If the entry is missing, the agent will never run. Re-register it with init, or reinstall.

Updating

sh
sudo /opt/pingniner/node /opt/pingniner/agent.js update

The agent does not update itself. Check the version shown in the Agent panel on the monitor's Overview page against the latest release periodically.

Reinstalling with the original install command also gets you the latest version.

Removing

Uninstall completely

Linux, macOS, BSD:

sh
sudo /opt/pingniner/node /opt/pingniner/agent.js uninstall

Windows, in an elevated PowerShell:

powershell
& "C:\Program Files\Pingniner\node.exe" "C:\Program Files\Pingniner\agent.js" uninstall

This removes the schedule and the installed files.

Stop reporting without removing files

sh
sudo /opt/pingniner/node /opt/pingniner/agent.js deinit

Useful when you want to pause a machine temporarily — init puts it back.

After uninstalling

The monitor in Pingniner will stop receiving data and, if you have a No Data trigger, will raise an incident. Delete the monitor in Pingniner as well if the machine is being retired.

TIP

Decommissioning a server? Delete the monitor first, then uninstall the agent. Doing it the other way round pages whoever is on the trigger's contact list.

Moving a machine to a different monitor

  1. deinit the agent.
  2. init it with the new key: sudo /opt/pingniner/node /opt/pingniner/agent.js init NEW_KEY server

History does not move with it. The new monitor starts empty.

Building from source

The agent is open source and can be built yourself — useful if your policy forbids running downloaded binaries:

sh
git clone https://github.com/pingniner/agent
cd agent
npm install --save-dev
npm run build

The output is build/agent.js, run as node build/agent.js run <key> <server|workstation>. Node 20 or later is required.

Troubleshooting

Agent installed but no data

Run run by hand and read the output. Most failures are network — the machine cannot reach ingest.pingniner.com on port 443.

Data stopped arriving

Check the schedule still exists. Cron entries are per-user, so a crontab restored from a backup or a user removal can silently drop it.

Version in the panel looks old

The agent does not self-update. Run update.

Some metrics missing

Not every machine reports everything. Temperatures in particular are commonly unavailable on virtual machines, and Docker metrics only appear where Docker is running. Trigger types are generated from what has actually been reported — if a metric never arrives, no trigger for it is offered.

Windows task exists but never runs

The task runs as SYSTEM. Group Policy that restricts SYSTEM scheduled tasks will stop it. Check Task Scheduler's history for the task.

Monitoring done right.