Troubleshoot a running agent

The New Relic Infrastructure agent provides a program called newrelic-infra-ctl to help troubleshoot a running Infrastructure agent. This binary is also included in the installation package, in the same directory as the newrelic-infra default binary.

Upon receiving the newrelic-infra-ctl command, the agent:

  • Enables verbose logs for a period of five minutes, then reverts the log level to its previous setting.
  • Logs all the agent config options.
  • Logs all the integrations config options.
  • Executes a health check for every loaded integration. (A health check is an immediate execution of the integration with extra logs and output validation.)

Linux newrelic-infra-ctl

In Linux systems, the troubleshooting binary is /usr/bin/newrelic-infra-ctl, available in both the package manager or the tarball assisted install methods.

When running on Linux, newrelic-infra-ctl must be executed by either the root user or the same user running the newrelic-infra process.

The newrelic-infra-ctl binary can automatically detect the agent process running in the host. It can also detect whether the agent is running inside a container.

To change the default settings of newrelic-infra-ctl:

To change... Execute
pid newrelic-infra-ctl -pid 14580
cid (when using a containerized version of the agent) newrelic-infra-ctl -cid 8fddbcbb101c
docker-api-version newrelic-infra-ctl -docker-api-version 1.24

Windows newrelic-infra-ctl

In Windows, using the MSI installer, the troubleshooting binary is C:\Program Files\New Relic\newrelic-infra\newrelic-infra-ctl.exe.

In Windows, the agent process is always automatically detected. It does not depend on the pid or the cid.

For more help

Recommendations for learning more: