Skip to main content

Servers

In Contrast, you can see servers and configure how they function in development, test (QA), 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 settings

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

To define custom settings for servers, use these entries in the Contrast configuration file:

  • 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 values for these settings instead of default ones is useful if you want to avoid duplicate server entries.

Configure the server environment with this setting:

  • Server environment: The environment in which you want to use this server.

    The valid values are DEVELOPMENT, QA, and PRODUCTION. These values are case-insensitive. The default value is DEVELOPMENT.

Contrast agents automatically recognize all supported server types.  If the server type is not automatically recognized, it may be due to the agent running with an unsupported technology.  Please review the Supported Technologies section for the respective agent. Running in unsupported environments may affect the functionality of some features like route discovery.

Settings in a configuration file

These are the server settings that you customize in a configuration file.

# server
# Use the settings 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

  # Override the reported server environment.
  # environment: DEVELOPMENT

Agent configuration instructions

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

Contrast options

The Contrast web interface provides additional options for server configuration: