---
title: Validate config file settings with nrdiag
source: https://docs.newrelic.com/docs/new-relic-solutions/solve-common-issues/diagnostics-cli-nrdiag/validate-config-file-settings-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](https://github.com/newrelic/newrelic-diagnostics-cli/issues/new?assignees=&labels=enhancement%2C+needs-triage&template=enhancement.md&title=).

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 [#deployments]

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:

```shell
./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.

![Screenshot of a terminal window showing command output. The agent_enabled setting is called out as incorrect.](https://docs.newrelic.com/images/agent_enabled.webp "agent_enabled.png")

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.
