Agent differences
This page lists the places where agent configuration differs.
Settings and sources
Difference | Agent support | What to do |
|---|---|---|
Java system properties ( | Java only | Other agents have no command line or system property source. |
| ||
| Set the URL, or use the agent token. | |
Setting both | Set only one. | |
Environment variables for a few settings | PHP reads environment variables only for some settings, for example not | Set these in the YAML file. |
Hyphenated setting names, such as | Java and Go accept a hyphen or an underscore Node.js needs an underscore Python needs the hyphen | Most organizations set protect rules in the web interface instead. |
| The Node.js agent doesn't start when the value isn't | Use one of the three values in upper case. |
Where each agent looks for a YAML file
Every agent checks CONTRAST_CONFIG_PATH first, and then the following locations, in the order listed.
Tip
/etc/contrast/contrast_security.yaml is the one location that all agents read.
Agent | Locations, in order | Files used |
|---|---|---|
Java |
On Windows, The agent doesn't search the working directory. The | Both files, combined setting by setting. The Java folder file wins. |
Node.js | The working directory. Then Then On Windows, | The first of the three locations that has a file. Inside it, the node folder file and its parent folder file are combined and the node file wins. A file in the working directory hides the others. |
Python | The working directory, then On Windows, Each location accepts both | All files found, combined setting by setting. The earlier location wins. |
PHP |
Each location accepts both The agent doesn't read the working directory, and warns if it finds a file there. | The first file found only. |
Go | The working directory, then The user directory is Go agents don't run on Windows. | The first file found only. |
.NET |
YAML syntax
The PHP agent reads only block style YAML. Don't start the file with
---, and don't use JSON, flow style, anchors or tabs. When it can't read the file, it ignores the logging settings in it.The Python agent requires quote values that look like numbers or booleans. An unquoted
1.10becomes1.1and an unquotedtruebecomesTrue.
Agent logs
The agent log shows the configuration the agent used. The default log name and location differ as follows:
Agent | Default log | What to look for |
|---|---|---|
Java |
| A line that starts The console shows a |
Node.js |
| An Agent configuration line at INFO level that lists the YAML files used. The command |
Python |
|
The command |
PHP |
| The agent doesn't log which file it read. Set Log levels must be in upper case. |
Go |
| A |
.NET | ||
Flex Agent | N/A | Run |
Kubernetes Operator | N/A | Run |