• EnglishEspañol日本語한국어Português
  • Log inStart now

Validate config file settings with nrdiag

The Diagnostics CLI includes detailed configuration setting validation for the Java agent's newrelic.yml file. To request support for other New Relic agents, use our GitHub template.

If you run nrdiag in the usual manner (on the system running your application with the New Relic agent already installed), the new validation is applied automatically, and any warnings also automatically appear.

Deployment example

You can also use this feature as a linter to validate a config file before deployment. To do this, run the appropriate task and provide the path to your config file.

For example, if your newrelic.yml and nrdiag are both in the current directory, run the following command to lint the config file:

./nrdiag -t Java/Config/ValidateSettings -c newrelic.yml

Here is an example of the output for an incorrect setting. The agent_enabled setting in this case has a value of yes, but the Java agent only accepts the values true or false. This misconfiguration will prevent the agent from running.

If you enable your Java agent incorrectly, the Diagnostics CLI returns a message like this, describing what setting needs to be updated and how it needs to be changed.

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.