Infrastructure agent behavior

With the Infrastructure agent, you can monitor not only individual servers, but also understand how your service performs as a whole. Infrastructure supports Amazon Linux, CentOS, Debian, RHEL, and Ubuntu as well as Windows Server. All of these agent versions exhibit a common set of behaviors.

Service

As of Infrastructure agent v1.5.59, the agent bundles a binary named newrelic-infra-service. This binary can be managed by the OS service manager.

At service startup time, this binary spawns (executes) the usual newrelic-infra process and supervises its child execution. Therefore agent service process should never be restarted, unless triggered via OS service manager.

Startup

During startup the agent will:

  • Register a signal handler.
  • Set the loggers.
  • Load the configuration from file, environment variables, and call arguments.
  • Register plugins for harvesting inventory, samplers, and integrations.
  • StatsD integrationwith http_server_enabled" Open an http port (by default, 8001) for receiving data.

Startup duration before harvesting and sending data is usually less than six seconds.

Monitoring and resource caps

By default, the Infrastructure agent runs in a single core. Every second it checks if there are events to send and, if there are, it sends them to the New Relic collector. Events that may be sent include:

For descriptions of the default Infrastructure events and their collection frequencies, see Infrastructure events.

Integration data

Integration monitoring is done by executing integration commands at given intervals (set in the config files) and reading their stout/err. The more integrations you enable, the greater the footprint of the agent. For more information, see the documentation for specific integrations.

Shutdown

When a shutdown signal is received, the agent stops all the registered plugins and integration processes.

Maintenance

The agent runs as a service. On installation, we set up all the service manager-required files, such as the systemD. service file. In case of a catastrophic failure, the service manager configuration will restart the agent.

There are no automatic updates to agents. To install a new agent version:

  • Linux: Manually install agent versions through the appropriate package manager (APT, yum, Zypper).
  • Windows: Manually download the msi package and install it with msiexec.exe.

Retry behavior

If a request made to the ingest service is unsuccessful, the payload is discarded; subsequent requests follow an exponential backoff pattern until one succeeds. For inventory, we store the deltas between system states in cache files. On failure, these deltas are not deleted but are reused on requests that follow.

For more help

Recommendations for learning more: