What the agent collects, where each value comes from and when it is collected. The payload shapes are specified in the agent protocol; How the agent works covers how changed datasets are delivered.
| Dataset | Contents | Sources |
|---|---|---|
system |
hostname, FQDN, OS family, ID, version, point release and codename, kernel, architecture, virtualization, boot time and ID, timezone, init system | /etc/os-release with /etc/redhat-release, /etc/lsb-release and /etc/debian_version fallbacks; uname(2); /etc/hosts then DNS for the FQDN; DMI, /proc/1/environ, /proc/1/cgroup, /proc/vz, /proc/xen, kvm-clock and the CPU hypervisor flag for virtualization (no systemd-detect-virt needed) |
hardware |
CPU vendor, model, sockets, cores, threads and flags; RAM and swap totals; block devices with partitions (ZFS volumes typed zvol); mounted storage file systems with size and inode totals |
/proc/cpuinfo (x86 and ARM layouts, ARM implementer/part names), sysfs CPU topology, /proc/meminfo, /sys/block, /proc/1/mounts (the host's mounts rather than the sandboxed daemon's, falling back to /proc/mounts) + statfs(2) |
storage |
{arrays: [{name, level, state, raid_disks, layout, degraded, sync_action, sync_delayed, size_bytes, members: [{device, slot, state}]}], pools: [{name, state, scan: {function, state, errors, ended_at}, data_errors, vdevs: [{name, type, class, state, read, write, checksum, devices: [{device, state, read, write, checksum, note, parent}]}], volumes: [{name, device, size_bytes}]}], disks: [{name, type: nvme|scsi, model, serial, firmware, state, size_bytes, smart}], smart: {status}}. state of an array is its array_state with the states that follow writes (clean, active, active-idle, write-pending, read-auto) folded into active; layout is the md layout number (for RAID 10 the near copies in the low byte, the far copies in the next and 0x10000 for the offset layout: 258 is near=2, so slots 0+1 and 2+3 mirror each other); degraded counts the slots without a working device; sync_action is idle, resync, recover (a rebuild), check, repair, reshape or frozen, without its progress; sync_delayed is true while it waits for another array on the same disks to finish its own (md syncs them one at a time). A member being rebuilt already has its slot but is flagged spare instead of in_sync. Member state lists the kernel flags (in_sync, faulty, spare, write_error, …), slot is null for spares and failed devices. A pool's state is ONLINE, DEGRADED, FAULTED, OFFLINE, REMOVED, UNAVAIL or SUSPENDED; vdevs are the top-level vdevs in zpool status order, type mirror, raidz1–raidz3, draid or disk (a single device), class data, log, cache, spare, special or dedup, with the leaf devices below them (also those of replacing-N and spare-N, named in parent, which together fill one place of the vdev) by kernel name, or by GUID with the note was /dev/… when missing; read, write and checksum are zpool's error counters. scan is the last or running scrub or resilver (function scrub, resilver or empty; state none, in_progress, finished, canceled or paused; errors it could not repair; ended_at in UTC), without its progress; data_errors counts files with permanent errors. volumes are the pool's zvols with their zd device. A disk state is the kernel's word: live, dead, resetting, … for NVMe and running, offline, transport-offline, … for SCSI. An NVMe controller without namespaces (a dead disk) is listed by the controller's name. Serial numbers are only read for NVMe. smart of a disk holds what it reports about its own health, null when it could not be read (asleep, gone): passed (the overall SMART verdict), NVMe critical_warning (bit field), available_spare and available_spare_threshold (%), percentage_used (endurance used, above 100 once exceeded), media_errors, error_log_entries, ATA reallocated_sectors (5, or SCSI grown defects), pending_sectors (197), offline_uncorrectable (198), reported_uncorrectable (187, or SCSI uncorrected read and write errors), crc_errors (199) and self_test_passed (the latest completed self-test the disk logged); each null when the disk does not report it. Temperature, power-on hours and amounts written change all the time and are left out. smart.status is read, not_installed (no smartctl), virtual (a virtual machine or container, whose disks have no SMART data), none (no NVMe or SATA/SAS disk) or unavailable (smartctl could not run, such as without the root helper). Hardware RAID controllers are not covered: their disks need vendor-specific smartctl options. |
/sys/block/md*/md (level, array_state, raid_disks, degraded, sync_action, metadata_version, dev-*/state, dev-*/slot; IMSM/DDF containers are skipped, their volumes are arrays of their own); /proc/spl/kstat/zfs/<pool>/state and, when the ZFS module is loaded, zpool status -L -P -p (at most 15 s; without it the pools keep only their state), /dev/zvol/<pool> links; /sys/class/nvme/* (state, model, serial, firmware_rev, namespaces), /sys/block/sd*/device/{state,model,rev} (removable devices skipped); SMART data from smartctl -j -H -A -l error -l selftest -n standby per disk through the root helper (disk-health), at most hourly, skipping dead controllers, emulated disks (QEMU, VMware, VirtualBox, Hyper-V) and, with -n standby, sleeping disks, which keep their last data. Collected every 5 minutes. |
network |
interfaces (kind, MAC, MTU, state, virtual flag), addresses with scope, default IPv4 and IPv6 routes | /sys/class/net, net.Interfaces(), /proc/net/route, /proc/net/ipv6_route, /proc/net/if_inet6 |
resolvers |
nameservers, search domains and options in file order, the managing tool, systemd-resolved upstreams behind the 127.0.0.53 stub | /etc/resolv.conf, /run/systemd/resolve/resolv.conf |
packages (optional) |
{manager: dpkg|rpm, items: [{name, version, arch, source?, source_version?, versions?, origins?}]} sorted by the delta key manager/name/arch; source_version is set when it differs from version (dpkg Source: name (version), rpm SOURCERPM version-release with the binary's non-zero epoch); versions lists every installed version of rpm installonly packages such as kernel-core; origins lists the sorted repositories ids offering the installed version, [] when none does (a manually installed .deb/.rpm, a removed repository, a superseded version gone from the mirror), and is left out when it cannot be told (no apt lists yet, dnf failed) |
/var/lib/dpkg/status parsed directly (fully installed packages only); rpm -qa --queryformat with an explicit format including the epoch. gpg-pubkey entries are skipped. Origins: apt streams the *_Packages lists of the enabled deb sources in /var/lib/apt/lists (plain, .lz4, as the Debian and Ubuntu container images keep them, .gz and .bz2), keeping only installed names and matching name, version and arch; each list is mapped to its source by apt's own file naming of the URI, suite and component. rpm: dnf -C -q --setopt=exit_on_lock=True repoquery --installed --qf '%{name}\t%{arch}\t%{from_repo}\n', or yum -C -q --setopt=exit_on_lock=True list installed on EL7 (yumdb needs yum-utils), keeping configured repository ids only (@System, @commandline, anaconda, installed give none). The origin index is shared with repositories and reused until the package database, the sources or the lists change. Collected early, once idle, after the package database changes (see Package metadata refresh and package activity). |
repositories (optional) |
{manager: apt|yum|dnf, items: [{id, file, type: deb|deb-src|rpm, enabled, uris, suite?, components?, name?, signing: {signed_by, trusted, gpgcheck}, transport, packages}]} in configuration order. apt items are one per type, URI and suite, with the id <suite>:<first 8 hex digits of the SHA-256 of file, type, URI, suite and components>; rpm ids are the .repo sections. uris never contain credentials (user:pass@) or query strings, except the identifying repo, arch, country, protocol, content, infra and release parameters of mirrorlist/metalink URIs (metalink?repo=epel-$releasever&arch=$basearch). An inline deb822 Signed-By key is reported as its fingerprints (or inline), never whole. transport is the first URI's scheme, the method for mirror+/tor+. packages counts the installed packages whose origins include the id. |
/etc/apt/sources.list and sources.list.d/*.list (one-line, [signed-by= trusted= arch=] options, # comments, malformed lines skipped) and *.sources (deb822: several Types/URIs/Suites, Enabled: no, Trusted, Signed-By as paths, fingerprints or an inline key). /etc/yum.repos.d/*.repo (name, baseurl over several lines, mirrorlist:/metalink: URIs, enabled, gpgcheck falling back to [main] of dnf.conf/yum.conf, the first gpgkey as signed_by; $releasever/$basearch left unexpanded) with the effective enabled from dnf -C -q --setopt=exit_on_lock=True repolist --all or yum ... repolist all. Never read: /etc/apt/auth.conf and auth.conf.d; .repo keys other than those listed (username, password, proxy_password, sslclientkey, …) are dropped while parsing. Collected early when the sources, yum.repos.d or apt's lists change, after the agent's own metadata refresh and after package activity. |
updates (optional) |
{manager: apt|yum|dnf, items: [{name, current_version, candidate_version, arch, security, origins?}], security_count, reboot_required, cache_updated_at}; origins lists the sorted repositories ids offering the candidate version, [] when none of the configured ones does, and is left out when it cannot be told |
apt-get -s -o Debug::NoLocking=1 -o Dir::Bin::ischroot=/bin/false dist-upgrade (works on 14.04+, unlike apt list; security from -security pockets; phased updates the host is not yet selected for are left out, as apt-get upgrade would); yum/dnf -C check-update and updateinfo list security; /var/run/reboot-required, needs-restarting -r. Origins: apt looks the candidate up in the origin index shared with packages and repositories, which keeps every version of the installed packages its scan of the lists sees; yum/dnf keep the repository check-update names when it is a configured .repo section. reboot_required is null when unknown. cache_updated_at (RFC 3339 UTC, null without a cache) is the newest of apt's success stamps (/var/lib/apt/periodic/update-success-stamp, update-stamp), the lists directory and its *_Release/*_InRelease files, or of yum/dnf's repomd.xml, cachecookie and repodata/*primary.xml* (whose mtime dnf resets on every metadata check), or the agent's own last successful metadata refresh when that is newer. lists/partial is not used because failed updates touch it too. A timestamp rather than an age keeps the hash stable; a refreshed cache also triggers an early collection. Skipped, keeping the previous dataset, while a package manager holds its lock. |
cloud (optional) |
{provider, source: metadata|dmi, region, zone, instance_type, instance_id, public_ipv4, public_ipv6}, every field null when nothing is detected |
DMI (sys_vendor, product_name, bios_vendor, chassis_asset_tag, board_vendor, plus /sys/hypervisor/uuid for Xen-era EC2) picks the provider, then only that provider's metadata leaves are read: Hetzner /hetzner/v1/metadata, AWS IMDSv2, DigitalOcean /metadata/v1/*, GCP computeMetadata/v1, Azure IMDS text leaves, OpenStack/OVH EC2-compatible leaves, Oracle /opc/v2/instance/*, Vultr /v1.json, Linode /v1/instance with a token, Scaleway 169.254.42.42/conf from a privileged port, TransIP pxe.frontend.transip.nl/cloudinit/meta-data when the DMI serial or /var/lib/cloud/instance/datasource names that NoCloud seed, or, on a QEMU guest without a known provider, when apt uses mirror.transip.net or the resolvers are TransIP's (then only an answer with the instance counts). When DMI is inconclusive one probe of 169.254.169.254 runs (connect ≤ 500 ms, all of it ≤ 2 s). No proxy, no redirects, never user data, vendor data or credentials. Collected at start and daily. |
vhosts (optional) |
{items: [{source, name, aliases, ports, ssl, http2, http3, document_root, php: {version, handler}, certificate: {subject, issuer, not_after, names, fingerprint}, config_file, owner, redirect: {status, target, host}, https_redirect}]} sorted by the delta key source/name |
apache2ctl -S / httpd -S / apachectl -S (first that works) plus the referenced <VirtualHost> blocks and their Includes; nginx: nginx.conf (the --conf-path of nginx -V, else the usual locations) parsed with its include globs followed, at most 8 levels and 5000 files deep, skipping missing files (never nginx -t/-T, whose config test opens and can create every log file); Plesk plesk db -Ne read-only queries (fallback plesk bin site --list, names only, once the database has failed for 30 minutes; until then Plesk sites keep their previous items, or the dataset, and with it certificates and applications, is skipped like with a busy package manager), with the form-encoded public certificates.cert (never cert_file, which holds the key); DirectAdmin data/users/*/domains.list and domains/<domain>.{conf,subdomains,pointers,cert} with custombuild/options.conf (never .key or .combined). Panel items include the implicit www.<name> alias. Blocks that only redirect (nginx return/rewrite, Apache Redirect/RewriteRule) fold into the site they point to: an HTTPS redirect on the same host sets https_redirect and adds its port, a redirect to another served host (www. to the apex) adds its names as aliases; other redirects stay items with redirect set. Plesk's ipv4./ipv6./preview names and the www. of Plesk and DirectAdmin subdomains are dropped from every source unless the certificate covers them. http2 comes from nginx http2 on/listen … http2 or Apache Protocols h2, http3 from an nginx listen … quic without http3 off. Sites no panel manages get the regular user whose home directory holds the document root as owner (Forge, Ploi). Apache php_value-only sites take the server-wide handler (mod_lsapi, mod_php) or, for DirectAdmin vhosts, its PHP selection. Certificates: first PEM certificate of the configured file only, never a key; fingerprint links the site to the certificates dataset. Collected early when /etc/apache2, /etc/httpd, /etc/nginx, /etc/letsencrypt/live, Plesk's /var/www/vhosts/system/<domain>/conf (not its logs, statistics or stat_ttl.conf) or DirectAdmin's data/users change. |
certificates (optional) |
{items: [{fingerprint, serial, subject: {cn, org}, issuer: {cn, org}, not_before, not_after, names, key: {type, bits, curve}, signature_algorithm, self_signed, chain: {complete, intermediates}, paths, used_by: [{kind, ref}], managed_by: {tool, name, plugin, installer, ca, ca_url, key_type, renewal, config}}]} sorted by the delta key fingerprint, one item per leaf however many sites and services use it. chain.complete verifies the leaf against the system roots plus the embedded bundle with the intermediates of the same file or chain file, at a moment inside the leaf's validity (expired certificates do not read as incomplete); null for self-signed certificates. |
Sites from the vhosts collection (reused when at most a minute old, or at most 30 minutes old and unchanged), including Apache's SSLCertificateChainFile, DirectAdmin's .cacert and Plesk's certificates.cert/ca_cert; Postfix postconf -x smtpd_tls_cert_file smtpd_tls_eccert_file smtpd_tls_chain_files (else main.cf); Dovecot ssl_cert = <… with !include/!include_try; Exim tls_certificate in the main section with macros, .ifdef and .include; Plesk admin/conf/httpsd.pem; DirectAdmin cacert/carootcert. Renewal: certbot /etc/letsencrypt/renewal/*.conf (certbot.timer, snap.certbot.renew.timer or certbot-renew.timer in a *.wants directory, else a certbot renew line, also through certbot-auto/letsencrypt-auto or as a scheduled certonly, in a crontab or an executable /etc/cron.{hourly,daily,weekly,monthly} script), acme.sh ~root/.acme.sh/<domain>[_ecc]/<domain>.conf (an acme.sh --cron crontab line), Laravel Forge's per-certificate /etc/cron.d jobs running /root/.letsencrypt-renew/<id> (matched to /etc/nginx/ssl/**/<id>/server.crt, the script is not read), Plesk Lets Encrypt … certificates and DirectAdmin letsencrypt=1/.cert.creation_time/.san_config (panel). PEM files are scanned block by block and only CERTIFICATE blocks are decoded; keys are skipped unread and the read buffer is wiped. Files over 1 MiB, non-regular files and symbolic links in user-owned trees (/home/*, /srv/*, /var/www/*, or any directory owned by a non-root user) that point outside that tree are skipped with a warning. Parsed files are cached by path, size, mtime and inode, shared with vhosts. Collected early when the web server, mail, panel, certbot or acme.sh trees or the directories of the certificates found change. |
applications (optional) |
{truncated, items: [{path, kind: wordpress|laravel|symfony|composer|node, version, sites, owner, lockfiles, packages: [{ecosystem: composer|npm, name, version, direct, dev}], wordpress: {plugins: [{slug, name, version, must_use}], themes: [{slug, name, version, parent}]}, truncated}]} sorted by the delta key path. version is the WordPress, laravel/framework or symfony/http-kernel version. dev marks packages only development dependencies need: packages-dev of composer.lock and npm's dev flags, for yarn.lock and pnpm 9 the packages not reachable from package.json's production dependencies. |
The document roots of the vhosts collection (reused when at most a minute old, or at most 30 minutes old and unchanged). The application root is the nearest directory at or up to 3 levels above a document root with a composer.json, package.json, artisan, lockfile or WordPress core (wp-includes/version.php at the root or in wp/, wordpress/ or Bedrock's web/wp/), within the hosting user's tree and never a top-level directory; a WordPress directory without composer.json defers to a parent with one (Bedrock). path keeps symbolic links such as a deploy's current/. Only files at the application root are read, never below it, so the lockfiles of plugins, vendored packages, backups and other releases are not: composer.lock, package-lock.json, npm-shrinkwrap.json, pnpm-lock.yaml and yarn.lock (Yarn 1 and Berry's npm: entries), and the dependency names of composer.json and package.json. WordPress: $wp_version from wp-includes/version.php; plugins, must-use plugins and themes from the first 8 KiB of their header files like WordPress (Plugin Name/Version of the top-level PHP files of each plugins/ directory and file, every mu-plugins/*.php but index.php, Theme Name/Version/Template of themes/*/style.css, one level deeper when missing). Whether a plugin is active is in the database and not collected. wp-config.php, .env and other configuration files are never opened. At most 1000 applications, 5000 packages per lockfile, 500 plugins and themes per install and 100000 entries in total; truncated marks what was cut. Collected early when the web server configuration, an application's lockfiles or manifests, wp-includes or the plugin and theme directories change. |
Datasets collected early are checked for changes once a minute. A first change is collected at once; a source that keeps changing is collected at most once every 5 minutes.
packages, repositories, updates, cloud, vhosts, certificates and applications are only collected when the backend enables them or when selected with serverchief collect -d. The collectors themselves never refresh package metadata; the daemon does that on its own schedule (see below). Without a yum/dnf metadata cache, updates reports an error that says so until the first refresh. dist-upgrade rather than upgrade is simulated so that updates held back by new dependencies, such as kernel meta packages, are counted.
Apart from installing its own serverchief package through the update helper, the agent never installs, upgrades or removes packages. TestPackageCommandAllowList and TestUpdateCommandAllowList pin every package-manager command it can run, and TestNoMutatingPackageVerbsInSource fails on any string literal such as install or remove in the agent's sources outside updater/commands.go, which may only use install, downgrade and -y.
-
Metadata refresh. While
updatesis enabled andpackage_metadata_refresh.enabled(backend default: on, every 21600 s), the daemon refreshes the metadata cache every interval ±10%, starting up to 5 minutes after start:nice -n 19 ionice -c3 -t apt-get update -qqnice -n 19 ionice -c3 -t yum makecache fast -q --setopt=exit_on_lock=True(EL7, Amazon Linux 2; plainmakecacheon other yum hosts)nice -n 19 ionice -c3 -t dnf makecache -q --setopt=exit_on_lock=True
The agent writes no file of apt, yum or dnf itself. It records the time of its last successful refresh in
/var/lib/serverchief/metadata-refresh.json(atomic write), andcache_updated_atis the newest of the cache mtimes above and that time, for apt as well as yum/dnf (only when a cache exists). apt keeps the lists' mtimes when nothing changed upstream, so without the record a successful refresh would not show. The value only moves when a refresh succeeded or the cache changed, so the hash stays stable.niceandioniceare left out when missing;ionice -tignores an IO scheduler without priorities. The refresh runs in the background with a 10-minute timeout (SIGTERM, then SIGKILL 10 s later). It is skipped whencache_updated_atis younger than the interval (apt's daily timer already ran) and when any package-manager lock is held, then tried again in 10-15 minutes. A failure (EOL mirrors, no network, an index that failed to download) is logged in one line and retried a cycle later, backing off to 24 hours; it is never a dataset error, becauseupdatesstill reports from the existing cache. A success collects and pushesupdatesandrepositoriesat once (packages, whose origins can change with the lists, follows on its interval). -
Package activity trigger. Every 30 s the daemon
stats the package database (/var/lib/dpkg/status, else/var/lib/rpm/rpmdb.sqlite,/usr/lib/sysimage/rpm/rpmdb.sqlite,/var/lib/rpm/Packages). After a change it waits until the database has not changed for 120 s and no lock is held, then collectspackages,updatesandrepositoriesonce. A longapt upgradekeeps both moving, so it is collected once, after it finished. When a lock has been held for over 2 hours (a hung dpkg), it collects once the database has settled. The metadata refresh only writes the lists and caches, never the database, so it does not trigger it. -
Locks are only inspected, never taken (
pkglock):fcntl(F_GETLK)on a read-only descriptor of/var/lib/dpkg/lock-frontend,/var/lib/dpkg/lock,/var/lib/apt/lists/lock,/var/cache/apt/archives/lock,/var/lib/rpm/.rpm.lock,/usr/lib/sysimage/rpm/.rpm.lockand dnf5's/run/dnf/rpmtransaction.lock(missing files are not created), plus a live-PID check (kill(pid, 0)) of/var/run/yum.pidand dnf 4's/var/cache/dnf/*_lock.pidand/var/lib/dnf/rpmdb_lock.pid. Stale, empty or malformed PID files count as free. The log names the busy lock and its PID. -
Collection never waits on a package manager.
updates, and on yum/dnf hostspackagesandrepositories, are skipped while a lock is held, keeping the previous dataset and any reported error, and retried in 10-15 minutes; after 2 hours of a held lock it runs anyway (apt's simulation usesDebug::NoLocking). yum and dnf, which otherwise wait forever for each other, run with--setopt=exit_on_lock=Trueand a 90-second timeout; a lock they report ("Existing lock", "already locked by", exit 200) also skips the round.
Local overrides in config.json win over the backend:
{ "package_metadata_refresh": { "enabled": false } }
{ "package_metadata_refresh": { "interval": "12h" } }The interval is at least 1 hour.
vhosts sources run only when installed (the binary, /usr/local/psa or DirectAdmin's data/users). A failing source is logged and keeps its items from the last successful run; the dataset reports an error only when every installed source failed. Names that are IP addresses (Apache's fallback name for a vhost without ServerName) and nginx's _ / "" catch-alls are left out. config_file has no line number, so editing one site does not change the others.
Address scopes are public, private (RFC 1918 and IPv6 ULA fc00::/7), shared (carrier-grade NAT 100.64.0.0/10), loopback, link-local, multicast, unspecified and reserved (documentation, benchmarking and other special-purpose ranges).
Payloads hold only values that are stable while the server is unchanged: capacities rather than usage, and no uptime. Ephemeral interfaces (veth*, cali*, tap*, …), IPv6 privacy addresses, loop and zram devices, and pseudo file systems are left out. Without those exclusions the hashes would change on every run.
-
software: normalized products (PHP, MySQL/MariaDB, nginx, Apache, OpenSSL, Node.js, …) from packages and panel builds (/opt/plesk/php/*, DirectAdmin custombuild,ea-php*,/opt/php-*).