Servers

In Contrast, you can see servers and configure how they function in development, test, and production environments. You are then able to compare the differences across environments as code travels. Contrast sets up a shell for you to designate servers. Once that’s in place, Contrast can begin to find weaknesses.

Server properties

Each server entry in Contrast represents a Contrast agent that you added to an application. Contrast creates a new, unique server entry when you configure these values for each agent:

  • Server name: The default value is the host name.

  • Server path: The path from which the agent process is running.

  • Server type: The type of server hosting your application.

Using custom properties instead of default ones is useful to avoid duplicate server entries when you don't want those types of entries.

These entries in the Contrast configuration file define custom properties for servers:

# server
# Use the properties in this section to set
# metadata for the server hosting this agent.

server:

  # Override the reported server name.
  name: localhost

  # Override the reported server path.
  path: NEEDS_TO_BE_SET

  # Override the reported server type.
  type: NEEDS_TO_BE_SET

Agent configuration instructions

When you define custom properties for servers, use the configuration instructions for the agent you are using:

Contrast options

The Contrast application provides additional options for server configuration: