Skip to content

nfsstat check fails on startup: bundled nfsiostat binary shipped as 'nfsiosat' in agent 7.77.2 #49058

@cseifert-ddw

Description

@cseifert-ddw

Summary

The Datadog agent 7.77.2 ships its bundled nfsiostat binary with a typo in the filename — nfsiosat (missing the trailing t) — causing the nfsstat check to fail on every startup.

Steps to reproduce

  1. Install Datadog agent 7.77.2
  2. Enable the nfsstat check with default config (no nfsiostat_path set)
  3. Start the agent

Expected behavior

The nfsstat check initializes successfully using the bundled binary at /opt/datadog-agent/embedded/sbin/nfsiostat.

Actual behavior

The check fails with:

Instance #initialization[ERROR]: {"Core Check Loader":"Check nfsstat not found in Catalog","Python Check Loader":"could not configure check instance for python check nfsstat: could not invoke 'nfsstat' python check constructor. New constructor API returned:\nTraceback (most recent call last):\n  File \"/opt/datadog-agent/embedded/lib/python3.13/site-packages/datadog_checks/nfsstat/nfsstat.py\", line 28, in __init__\n    raise Exception(\nException: nfsstat check requires nfsiostat be installed, please install it (through nfs-utils) or set the path to the installed version"}

Root cause

The bundled binary is present but misnamed:

$ ls -la /opt/datadog-agent/embedded/sbin/ | grep nfs
-rwxr-xr-x.  1 dd-agent dd-agent   23930 Mar 31 17:13 nfsiosat

The check code in nfsstat.py looks for /opt/datadog-agent/embedded/sbin/nfsiostat (correct spelling), which does not exist, so it falls through to the error. This appears to have been introduced by the Bazel build migration for nfsiostat (PRs #45526 / #45528).

Environment

  • Agent version: 7.77.2
  • OS: Amazon Linux 2023
  • Previous agent version 7.76.1 is unaffected (binary correctly named nfsiostat)

Workaround

Set nfsiostat_path in init_config to point to the system binary:

init_config:
  nfsiostat_path: /usr/sbin/nfsiostat

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions