Skip to content

Devices & Inventory

Devices are the heart of GridNMS. Every switch, router, firewall, server, access point, and storage array you monitor lives in your inventory. This page explains how to browse that inventory, add new devices, organize them, and inspect a single device in depth.

The device inventory list The device list with status badges, filters, and summary cards across the top.

Open Devices from the main navigation to see everything GridNMS is tracking. At the top, summary cards give you a running count of Total, Up, Down, and Unknown devices — click any card to filter the list to just those devices.

The list itself shows one row per device. Typical columns include:

Column Description
Status A colored badge: Up, Down, Unknown, or Unmonitored.
Name The device’s display name (often its hostname).
Address The IP address GridNMS uses to reach it.
Class The device type — Router, Switch, Firewall, Access Point, and so on.
Site Which location the device belongs to.
Last seen When the device was last confirmed reachable.
  • Up — reachable and responding to monitoring.
  • Down — failed its reachability check.
  • Unknown — state not yet determined (newly added, or its collector is offline).
  • Unmonitored — the device is in your inventory but monitoring is turned off, so GridNMS isn’t checking it.

Use the search box to find a device by name or IP. Use the filters to narrow the list by class, site, status, or vendor. Filters and the status cards stack, so you can quickly answer questions like “show me every Down switch in the East datacenter.”

  1. Click Add Device in the top-right of the device list.
  2. Enter the device’s name and IP address.
  3. Choose a class (Router, Switch, Firewall, etc.). The class determines which monitoring packs apply and which detail tabs appear.
  4. Assign the device to a site and, if needed, a specific collector that can reach it.
  5. Add monitoring credentials (see below).
  6. Confirm. The device appears in the list and monitoring begins shortly after.

Every device belongs to a class that describes what kind of device it is. Classes are arranged in a hierarchy (for example, a specific switch model can sit under a general Switch class), and monitoring settings flow down that hierarchy. Assigning the right class means a device automatically inherits the correct checks and detail tabs without you configuring anything per device.

  • Site groups devices by physical location and drives the Site selector used across GridNMS.
  • Collector is the GridNMS component that actually reaches out and polls the device. GridNMS can usually pick the right collector automatically based on the device’s network, but you can pin a device to a specific one if needed. See Collectors for how this works.

To poll a device for detailed metrics, GridNMS needs credentials:

  • SNMP — a community string (v2c) or username/auth/privacy settings (v3), used for interface counters, CPU, memory, and other metrics.
  • SSH — a username with either a password or a private key, used for command-based collection on devices that support it. Paste a PEM-encoded key into the Private Key (PEM) box to use key-based login, leave it blank to use the password, or let GridNMS create the key pair for you. Appliances whose SSH login only answers interactive prompts are handled automatically; you don’t need to configure anything for them.

You can set credentials globally and override them per device when a particular device uses a different community string or login. Open the device, go to its settings, and enter the override there — it takes precedence over the global default for that one device.

Key-based login is usually the better choice for SSH collection: nothing has to store a reusable password for the device, and the key can be restricted to read-only use.

You can paste a key you already have, or have GridNMS make one:

  1. Open the device and select Configure to open Collection & Credential Overrides.
  2. Under Credentials → SSH, select Generate a key for me.
  3. GridNMS creates a new key pair, keeps the private half in its encrypted credential store, and shows you the matching public key. Copy it — this is the only time it’s shown. If you lose it, generate a new one.
  4. Add that public key to the device’s allowed logins and save the device’s SSH username alongside it.

The private half is never displayed and never leaves GridNMS. Generating a new key does not remove the old one from the device — if you’re replacing a key because it may have been exposed, delete the old key’s entry on the device too.

SSH collection only ever reads; it never changes anything on the device. Give it a dedicated account rather than reusing an administrator login, and set that account up so it can do no more than it needs:

  • No password login — lock or disable the account’s password so the key is the only way in.
  • No administrative rights. GridNMS’s built-in Linux, macOS and Windows collection reads values any ordinary logged-in account can already see, so the account needs no sudo, no admin group, and no elevation.
  • Restrict the key itself. Most SSH servers let you attach restrictions to a single key — no interactive terminal, and no port, agent or X11 forwarding. Collection issues one-off commands and needs none of those.
  • Keep a working shell. A “no login” shell such as nologin or false refuses every command, including the short non-interactive ones collection runs, so the account would fail to collect anything. The restrictions above are what limit the account, not the shell.

On macOS and Windows, SSH is off by default — turn on Remote Login (macOS) or install the OpenSSH server feature (Windows) before the device will answer.

Rather than creating and locking down that account by hand, copy the script below for the device’s operating system, save it on the device, and run it there with the public key GridNMS gave you. It creates the account, disables password login, installs the key with the restrictions described above, and prints a short summary when it’s done. Re-running it later — to rotate the key, for example — updates the existing account instead of failing.

Save as provision-ro-linux.sh, then run as root with the public key GridNMS gave you:

Terminal window
sudo ./provision-ro-linux.sh "ssh-ed25519 AAAA... gridnms-device-42"
#!/usr/bin/env bash
# provision-ro-linux.sh — read-only account provisioning for GridNMS agentless
# SSH monitoring.
#
# Creates a dedicated, non-privileged system account this Linux host's SSH
# collection will authenticate as. Run this on the TARGET host you want
# GridNMS to interrogate over SSH — not on the collector or the server.
#
# Usage:
# sudo ./provision-ro-linux.sh "ssh-ed25519 AAAA... gridnms-device-42"
# sudo ./provision-ro-linux.sh --user my-ro-user "ssh-ed25519 AAAA..."
#
# The public key argument is exactly what GridNMS gives you after
# Device → Configure → SSH → "Generate a key for me" (or your own public key,
# if you configured a private key manually instead).
#
# What this does, and why:
# - Creates the account with a REAL shell (default: /bin/bash), never
# /usr/sbin/nologin or /bin/false. This is intentional, not an oversight:
# those "no-login" shells refuse EVERY command the SSH server tries to run
# on the account's behalf, including the one-shot, non-interactive
# commands GridNMS's SSH collection issues (`cat /proc/loadavg`, `df -kP`,
# …) — not just an interactive login. A read-only account still needs a
# working shell to run those; the restriction that matters is everything
# else below, not the shell.
# - Locks the password (`passwd -l`) — no password login is possible at all.
# - Installs ONLY the public key you provide into a dedicated
# ~/.ssh/authorized_keys, with SSH's own key-level restrictions
# (no-pty, no-port-forwarding, no-X11-forwarding, no-agent-forwarding) —
# the key can run a command, but never open an interactive session or
# tunnel through the host.
# - Grants NO sudo/elevated rights. GridNMS's current Linux SSH pack
# (os_release, hw identity via /sys/class/dmi/id/*, /proc/*, df) reads
# files that are world-readable on every mainstream distro by default —
# verified against the shipped pack's own command list. There is
# currently nothing this account needs elevated access for. If a FUTURE
# collector needs one specific privileged command, add a narrowly-scoped
# sudoers NOPASSWD entry for that exact command at that time — never a
# blanket sudo grant "just in case" (see the commented example at the
# bottom of this file).
# - Is idempotent: re-running it (e.g. to rotate the key) updates the
# existing account instead of failing on "user already exists".
#
# This script does NOT install or download anything at runtime (no
# curl/wget/apt/yum calls) — it only uses standard tools already on the box
# (useradd/usermod, passwd, install, id).
set -euo pipefail
PROG="$(basename "$0")"
GRIDNMS_USER="gridnms-ro"
HOME_DIR=""
PUBKEY=""
usage() {
cat >&2 <<EOF
Usage: sudo $PROG [--user NAME] [--home DIR] "<ssh public key line>"
--user NAME account name to create/update (default: gridnms-ro)
--home DIR home directory for the account (default: /var/lib/<user>)
EOF
exit 1
}
while [ $# -gt 0 ]; do
case "$1" in
--user) GRIDNMS_USER="${2:?--user requires a value}"; shift 2 ;;
--home) HOME_DIR="${2:?--home requires a value}"; shift 2 ;;
-h|--help) usage ;;
--) shift; break ;;
-*) echo "$PROG: unknown option: $1" >&2; usage ;;
*) break ;;
esac
done
PUBKEY="${1:-}"
if [ -z "$PUBKEY" ]; then
echo "$PROG: missing required <ssh public key line> argument" >&2
usage
fi
case "$PUBKEY" in
*$'\n'*|*$'\r'*)
echo "$PROG: the public key argument contains a newline or carriage return —" >&2
echo " refusing to use it. A multi-line value would write a SECOND, unrestricted" >&2
echo " authorized_keys entry (only the first line gets the no-pty/no-forwarding" >&2
echo " restrictions below). Paste exactly one key line, with no embedded newlines." >&2
exit 1
;;
esac
case "$PUBKEY" in
ssh-ed25519\ *|ssh-rsa\ *|ecdsa-sha2-*\ *) ;;
*)
echo "$PROG: that doesn't look like an SSH public key line (expected it to start with" >&2
echo " ssh-ed25519 / ssh-rsa / ecdsa-sha2-...) — paste the PUBLIC key GridNMS gave you," >&2
echo " never a private key." >&2
exit 1
;;
esac
if [ -z "$HOME_DIR" ]; then
HOME_DIR="/var/lib/${GRIDNMS_USER}"
fi
if [ "$(id -u)" != "0" ]; then
echo "$PROG: must be run as root (sudo)" >&2
exit 1
fi
if id "$GRIDNMS_USER" >/dev/null 2>&1; then
echo "== ${GRIDNMS_USER} already exists — updating its key and lockdown, not recreating it =="
else
echo "== creating system account ${GRIDNMS_USER} =="
useradd --system --no-create-home --home-dir "$HOME_DIR" --shell /bin/bash "$GRIDNMS_USER"
fi
# No password, ever — key-only. `passwd -l` on an account with no password set
# yet is a harmless no-op (there's nothing to lock beyond marking it locked).
passwd -l "$GRIDNMS_USER" >/dev/null
mkdir -p "${HOME_DIR}/.ssh"
chmod 700 "$HOME_DIR" "${HOME_DIR}/.ssh"
# The key-level restriction options are the actual boundary here — they hold
# even if this account's shell or filesystem posture ever loosens by mistake.
{
printf 'no-pty,no-port-forwarding,no-X11-forwarding,no-agent-forwarding %s\n' "$PUBKEY"
} > "${HOME_DIR}/.ssh/authorized_keys"
chmod 600 "${HOME_DIR}/.ssh/authorized_keys"
chown -R "${GRIDNMS_USER}:${GRIDNMS_USER}" "$HOME_DIR" 2>/dev/null || \
chown -R "${GRIDNMS_USER}" "$HOME_DIR"
echo "== done =="
echo "Account: ${GRIDNMS_USER}"
echo "Home: ${HOME_DIR}"
echo "Auth: SSH key only (password login disabled)"
echo "Privileges: none (no sudo, no group membership beyond its own)"
echo
echo "In GridNMS, set this device's SSH username to '${GRIDNMS_USER}' — the private key"
echo "half already lives on the server from when the public key above was generated/pasted."
# ── If a future collector genuinely needs one privileged command ───────────
# Add a narrowly-scoped sudoers entry for THAT command only, e.g.:
# echo '${GRIDNMS_USER} ALL=(root) NOPASSWD: /usr/sbin/dmidecode -s system-manufacturer' \
# > /etc/sudoers.d/gridnms-ro
# chmod 440 /etc/sudoers.d/gridnms-ro
# Never grant blanket sudo, and never grant a command with arguments the
# account itself can influence (a bare `NOPASSWD: /usr/sbin/dmidecode` with no
# fixed arguments is enough to read arbitrary hardware info this account has
# no other reason to have).

Each device has a Monitor on/off toggle. Turn it off to stop all checks for a device — useful for gear that’s being decommissioned, lab equipment, or a device you don’t want generating alerts. While monitoring is off, the device shows the Unmonitored badge and raises no events. Turn it back on to resume.

Click any device in the list to open its detail page — a focused view of everything GridNMS knows about that one device.

A single device’s detail page The device detail page, with tabs for overview, system stats, interfaces, events, and more.

The detail page is organized into tabs. Which tabs appear depends on the device’s class and the monitoring packs that apply to it, but you’ll commonly see:

Tab What it shows
Overview Key facts — status, address, class, site, uptime, vendor/model, operating system, and current health summary. Collection and credential settings for this device open from the bottom of this tab, alongside a Reachability Alerts switch for silencing up/down alerts from a noisy device without hiding its events.
System Stats Every system chart for the device in one place — CPU, memory, load, disk, temperature, and anything else its packs report — with a Chart range picker. Device metric thresholds are set here, next to the charts they apply to.
Interfaces Every port on the device with its status, speed, and live traffic. You can set per-interface bandwidth thresholds here.
Neighbors Directly connected neighbors the device reports, the basis of the topology map.
Applications Services found listening on the device.
Actions Run a check against the device on demand — poll it, scan it, or probe it — and see the result of recent runs. You can also run a single collector from one of its packs (for example Run Config Backup) rather than a full cycle, which is the quickest way to test a change you just made.
Maintenance Maintenance windows scheduled for this device.
Events The history of events for this device.
Logs Raw log messages received from or about this device.
Config Saved configuration backups captured over time, so you can see what changed and when.
Packs The monitoring packs applied to this device, and any collection you have turned off for it.
Discover OIDs Walk the device over SNMP to see what it actually exposes — useful when building a pack.

A tab that counts things shows the count in its label, so you can see there are twelve interfaces without opening the tab. Specialized device classes add their own tabs as well (for example, an access point might show connected clients, and a storage array might show volume capacity).

If one device flaps up and down in a way you’ve decided not to be paged about, turn off Reachability Alerts on its Overview tab rather than turning off its monitoring. The up/down events — and everything that depends on them — keep being recorded; only the email or page stops, and only for reachability. Every other alert about that device still reaches you. See Notifications.

When you need to act on many devices at once, select multiple rows in the device list using the checkboxes. A bulk-action bar appears, letting you:

  • Turn monitoring on or off for all selected devices.
  • Reassign them to a different site or collector.
  • Change their class.
  • Delete them from inventory.

This is the fastest way to onboard or reorganize a batch of devices after a discovery scan.

  • Find devices automatically with Network Discovery.
  • See what your network gear has spotted nearby that isn’t in your inventory yet on the Hosts page.
  • See how devices connect on the Graph Explorer page.
  • Learn what GridNMS checks and how often in Monitoring.

docs built 2026-09-26 · 195c6d00