Teamcity

Supported OS Linux Windows

Integrationv2.2.0

Overview

This check watches for successful build-related events and sends them to Datadog.

Unlike most Agent checks, this one doesn’t collect any metrics-just events.

Setup

Installation

The Teamcity check is included in the Datadog Agent package, so you don’t need to install anything else on your Teamcity servers.

Configuration

Prepare Teamcity

To prepare Teamcity, see Enabling Guest Login.

Host

To configure this check for an Agent running on a host:

Edit the teamcity.d/conf.yaml in the conf.d/ folder at the root of your Agent’s configuration directory. See the sample teamcity.d/conf.yaml for all available configuration options:

init_config:

instances:
  - name: My Website
    server: teamcity.mycompany.com

    # the internal build ID of the build configuration you wish to track
    build_configuration: MyWebsite_Deploy

Add an item like the above to instances for each build configuration you want to track.

Restart the Agent to start collecting and sending Teamcity events to Datadog.

Log collection
  1. Configure Teamcity logs settings.

  2. By default, Datadog’s integration pipeline supports the following kind of log format:

    [2020-09-10 21:21:37,486]   INFO -  jetbrains.buildServer.STARTUP - Current stage: System is ready
    

    Clone and edit the integration pipeline if you defined different conversion patterns.

  3. Collecting logs is disabled by default in the Datadog Agent. Enable it in your datadog.yaml file:

    logs_enabled: true
    
  4. Uncomment the following configuration block in your teamcity.d/conf.yaml file. Change the path parameter value based on your environment. See the sample teamcity.d/conf.yaml for all available configuration options.

    logs:
      - type: file
        path: /opt/teamcity/logs/teamcity-server.log
        source: teamcity
      - type: file
        path: /opt/teamcity/logs/teamcity-activities.log
        source: teamcity
      - type: file
        path: /opt/teamcity/logs/teamcity-vcs.log
        source: teamcity
      - type: file
        path: /opt/teamcity/logs/teamcity-cleanup.log
        source: teamcity
      - type: file
        path: /opt/teamcity/logs/teamcity-notifications.log
        source: teamcity
      - type: file
        path: /opt/teamcity/logs/teamcity-ws.log
        source: teamcity
    
  5. Restart the Agent.

Containerized

For containerized environments, see the Autodiscovery Integration Templates for guidance on applying the parameters below.

ParameterValue
<INTEGRATION_NAME>teamcity
<INIT_CONFIG>blank or {}
<INSTANCE_CONFIG>{"name": "<BUILD_NAME>", "server":"%%host%%", "build_configuration":"<BUILD_CONFIGURATION_ID>"}
Log collection

Collecting logs is disabled by default in the Datadog Agent. To enable it, see Kubernetes log collection.

ParameterValue
<LOG_CONFIG>{"source": "teamcity"}

Validation

Run the Agent’s status subcommand and look for teamcity under the Checks section.

Data Collected

Metrics

The Teamcity check does not include any metrics.

Events

Teamcity events representing successful builds are forwarded to Datadog.

Service Checks

The Teamcity check does not include any service checks.

Troubleshooting

Need help? Contact Datadog support.

Further Reading