---
title: TeamCity
description: Track builds and understand the performance impact of every deploy.
breadcrumbs: Docs > Integrations > TeamCity
---

# TeamCity
Supported OS Integration version7.4.0
## Overview{% #overview %}

This integration connects to your TeamCity server to submit metrics, service checks, and events, allowing you to monitor the health of your TeamCity projects' build configurations, build runs, server resources, and more.

For more in-depth monitoring of your TeamCity pipelines, check out [CI Pipeline Visibility](https://app.datadoghq.com/ci/getting-started). CI Pipeline Visibility provides granular insights into your user workflow, lets you access detailed Git metadata, and tracks pipeline performance over time.

**Minimum Agent version:** 6.0.0

## Setup{% #setup %}

### Installation{% #installation %}

The TeamCity check is included in the [Datadog Agent](https://app.datadoghq.com/account/settings/agent/latest) package, so you don't need to install anything else on your TeamCity servers.

### Configuration{% #configuration %}

#### Prepare TeamCity{% #prepare-teamcity %}

You can enable Guest login, or identify user credentials for basic HTTP authentication.

##### Guest login{% #guest-login %}

1. [Enable guest login](https://www.jetbrains.com/help/teamcity/enabling-guest-login.html).

1. Enable `Per-project permissions` to allow assigning project-based permissions to the Guest user. See [Changing Authorization Mode](https://www.jetbrains.com/help/teamcity/managing-roles-and-permissions.html#Changing+Authorization+Mode). 

1. Use an existing or create a new Read-only role and add the `View Usage Statistics` permission to the role. See [Managing Roles and Permissions](https://www.jetbrains.com/help/teamcity/managing-roles-and-permissions.html). 

1. *[Optional]* To enable the check to automatically detect build configuration type during event collection, add the `View Build Configuration Settings` permission to the Read-only role. 

1. Assign the Read-only role to the Guest user. See [Assigning Roles to Users](https://www.jetbrains.com/help/teamcity/creating-and-managing-users.html#Assigning+Roles+to+Users).

##### User credentials{% #user-credentials %}

For basic HTTP authentication

- Specify an identified `username` and `password` in the `teamcity.d/conf.yaml` file in the `conf.d/` folder of your [Agent's configuration directory](https://docs.datadoghq.com/agent/guide/agent-configuration-files/#agent-configuration-directory).
- If you encounter an `Access denied. Enable guest authentication or check user permissions.` error, ensure the user has the correct permissions:
  - Per-project and View Usage Statistics permissions enabled.
  - If collecting Agent Workload Statistics, assign the View Agent Details and View Agent Usage Statistics permissions as well.

{% tab title="Host" %}
#### Host{% #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](https://docs.datadoghq.com/agent/guide/agent-configuration-files/#agent-configuration-directory). See the [sample teamcity.d/conf.yaml](https://github.com/DataDog/integrations-core/blob/master/teamcity/datadog_checks/teamcity/data/conf.yaml.example) for all available configuration options:

The TeamCity check offers two methods of data collection. To optimally monitor your TeamCity environment, configure two separate instances to collect metrics from each method.

1. OpenMetrics method (requires Python version 3):

Enable `use_openmetrics: true` to collect metrics from the TeamCity `/metrics` Prometheus endpoint.

   ```yaml
   init_config: 
   
   instances:
    - use_openmetrics: true
   
      ## @param server - string - required
      ## Specify the server name of your TeamCity instance.
      ## Enable Guest Authentication on your instance or specify `username` and `password` to
      ## enable basic HTTP authentication.
      #
      server: http://teamcity.<ACCOUNT_NAME>.com
   ```

To collect [OpenMetrics-compliant](https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md) histogram and summary metrics (available starting in TeamCity Server 2022.10+), add the internal property, `teamcity.metrics.followOpenMetricsSpec=true`. See, [TeamCity Internal Properties](https://www.jetbrains.com/help/teamcity/server-startup-properties.html#TeamCity+Internal+Properties).

TeamCity Server REST API method (requires Python version 3):

Configure a separate instance in the `teamcity.d/conf.yaml` file to collect additional build-specific metrics, service checks, and build status events from the TeamCity server's REST API. Specify your projects and build configurations using the `projects` option.

```yaml
init_config:

instances:
  - server: http://teamcity.<ACCOUNT_NAME>.com

    ## @param projects - mapping - optional
    ## Mapping of TeamCity projects and build configurations to
    ## collect events and metrics from the TeamCity REST API.
    #
    projects:
      <PROJECT_A>:
        include:    
        - <BUILD_CONFIG_A>
        - <BUILD_CONFIG_B>
        exclude:
        - <BUILD_CONFIG_C>
      <PROJECT_B>:
        include:
        - <BUILD_CONFIG_D>
      <PROJECT_C>: {}
```

Customize each project's build configuration monitoring using the optional `include` and `exclude` filters to specify build configuration IDs to include or exclude from monitoring, respectively. Regular expression patterns are supported in the `include` and `exclude` keys to specify build configuration ID matching patterns. If both `include` and `exclude` filters are omitted, all build configurations are monitored for the specified project.

For Python version 2, configure one build configuration ID per instance using the `build_configuration` option:

```yaml
init_config:

instances:
  - server: http://teamcity.<ACCOUNT_NAME>.com

    ## @param projects - mapping - optional
    ## Mapping of TeamCity projects and build configurations to
    ## collect events and metrics from the TeamCity REST API.
    #
    build_configuration: <BUILD_CONFIGURATION_ID>
```

[Restart the Agent](https://docs.datadoghq.com/agent/guide/agent-commands/#start-stop-and-restart-the-agent) to start collecting and sending TeamCity events to Datadog.

##### Log collection{% #log-collection %}

1. Configure TeamCity [logging settings](https://www.jetbrains.com/help/teamcity/teamcity-server-logs.html).

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

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

Clone and edit the [integration pipeline](https://docs.datadoghq.com/logs/log_configuration/pipelines/#integration-pipelines) if you defined different conversion [patterns](https://logging.apache.org/log4j/2.x/manual/layouts.html#Patterns).

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

   ```yaml
   logs_enabled: true
   ```

1. 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](https://github.com/DataDog/integrations-core/blob/master/teamcity/datadog_checks/teamcity/data/conf.yaml.example) for all available configuration options.

   ```yaml
   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
   ```

1. [Restart the Agent](https://docs.datadoghq.com/agent/guide/agent-commands/#start-stop-and-restart-the-agent).

{% /tab %}

{% tab title="Containerized" %}
#### Containerized{% #containerized %}

For containerized environments, see the [Autodiscovery Integration Templates](https://docs.datadoghq.com/agent/kubernetes/integrations/) for guidance on applying the parameters below.

| Parameter            | Value                                               |
| -------------------- | --------------------------------------------------- |
| `<INTEGRATION_NAME>` | `teamcity`                                          |
| `<INIT_CONFIG>`      | blank or `{}`                                       |
| `<INSTANCE_CONFIG>`  | `{"server": "%%host%%", "use_openmetrics": "true"}` |

##### Log collection{% #log-collection %}

Collecting logs is disabled by default in the Datadog Agent. To enable it, see [Kubernetes log collection](https://docs.datadoghq.com/agent/kubernetes/log/).

| Parameter      | Value                    |
| -------------- | ------------------------ |
| `<LOG_CONFIG>` | `{"source": "teamcity"}` |

### CI Pipeline Visibility{% #ci-pipeline-visibility %}

To configure CI Pipeline Visibility, see the [product setup page](https://app.datadoghq.com/ci/setup/pipeline?provider=teamcity). For more details, see [Set up Tracing on a TeamCity Pipeline](https://docs.datadoghq.com/continuous_integration/pipelines/teamcity/).
{% /tab %}

### Validation{% #validation %}

[Run the Agent's `status` subcommand](https://docs.datadoghq.com/agent/guide/agent-commands/#agent-status-and-information) and look for `teamcity` under the Checks section.

## Data Collected{% #data-collected %}

### Metrics{% #metrics %}

|  |
|  |
| **teamcity.agents.cloud.starting**(gauge)                                      | [OpenMetrics] Number of starting and not yet connected cloud agents.                                                                                                                                                                                                                             |
| **teamcity.agents.connected.authorized**(gauge)                                | [OpenMetrics] Number of connected and authorized build agents.                                                                                                                                                                                                                                   |
| **teamcity.agents.running.builds**(gauge)                                      | [OpenMetrics] Number of build agents which are running builds.                                                                                                                                                                                                                                   |
| **teamcity.artifacts\_size**(gauge)                                            | [OpenMetrics] The sum of all artifact file sizes in the artifact directory.*Shown as byte*                                                                                                                                                                                                       |
| **teamcity.build.configs**(gauge)                                              | [OpenMetrics] Number of builds in the database.                                                                                                                                                                                                                                                  |
| **teamcity.build.configs.active**(gauge)                                       | [OpenMetrics] Number of active build configurations.                                                                                                                                                                                                                                             |
| **teamcity.build.configs.composite.active**(gauge)                             | [OpenMetrics] Number of active composite configurations.                                                                                                                                                                                                                                         |
| **teamcity.build.messages.incoming.count**(count)                              | [OpenMetrics] Incoming build agent messages.                                                                                                                                                                                                                                                     |
| **teamcity.build.messages.processing.count**(count)                            | [OpenMetrics] Processed build agent messages.                                                                                                                                                                                                                                                    |
| **teamcity.build.queue.estimates.processing.count**(count)                     | [OpenMetrics] Build queue estimates processing.                                                                                                                                                                                                                                                  |
| **teamcity.build.queue.incoming.count**(count)                                 | [OpenMetrics] Builds added to queue.                                                                                                                                                                                                                                                             |
| **teamcity.build.queue.optimization.time.milliseconds.bucket**(count)          | [OpenMetrics - TeamCity v2022.10+] Build queue optimization time (bucket).*Shown as millisecond*                                                                                                                                                                                                 |
| **teamcity.build.queue.optimization.time.milliseconds.count**(count)           | [OpenMetrics - TeamCity v2022.10+] Build queue optimization time (count).*Shown as millisecond*                                                                                                                                                                                                  |
| **teamcity.build.queue.optimization.time.milliseconds.sum**(count)             | [OpenMetrics - TeamCity v2022.10+] Build queue optimization time (sum).*Shown as millisecond*                                                                                                                                                                                                    |
| **teamcity.build.queue.processing.count**(count)                               | [OpenMetrics] Count of processing builds in build queue.                                                                                                                                                                                                                                         |
| **teamcity.build.service.messages.count**(count)                               | [OpenMetrics] Processed service messages.                                                                                                                                                                                                                                                        |
| **teamcity.build.triggers.execution.milliseconds.bucket**(count)               | [OpenMetrics - TeamCity v2022.10+] Total time spent processing build triggers (bucket).*Shown as millisecond*                                                                                                                                                                                    |
| **teamcity.build.triggers.execution.milliseconds.count**(count)                | [OpenMetrics - TeamCity v2022.10+] Total time spent processing build triggers (count).*Shown as millisecond*                                                                                                                                                                                     |
| **teamcity.build.triggers.execution.milliseconds.sum**(count)                  | [OpenMetrics - TeamCity v2022.10+] Total time spent processing build triggers (sum).*Shown as millisecond*                                                                                                                                                                                       |
| **teamcity.build.triggers.per.type.execution.milliseconds.bucket**(count)      | [OpenMetrics - TeamCity v2022.10+] Time spent processing build triggers of given type (bucket).*Shown as millisecond*                                                                                                                                                                            |
| **teamcity.build.triggers.per.type.execution.milliseconds.count**(count)       | [OpenMetrics - TeamCity v2022.10+] Time spent processing build triggers of given type (count).*Shown as millisecond*                                                                                                                                                                             |
| **teamcity.build.triggers.per.type.execution.milliseconds.sum**(count)         | [OpenMetrics - TeamCity v2022.10+] Time spent processing build triggers of given type (sum).*Shown as millisecond*                                                                                                                                                                               |
| **teamcity.build\_duration**(gauge)                                            | [OpenMetrics] The build duration (all build stages).*Shown as millisecond*                                                                                                                                                                                                                       |
| **teamcity.build\_duration.net\_time**(gauge)                                  | [OpenMetrics] The build steps' duration (excluding the checkout, artifact publishing time, and so on).*Shown as millisecond*                                                                                                                                                                     |
| **teamcity.build\_stage\_duration**(gauge)                                     | [OpenMetrics] The duration of tagged build step. See [https://www.jetbrains.com/help/teamcity/custom-chart.html#Default+Statistics+Values+Provided+by+TeamCity](https://www.jetbrains.com/help/teamcity/custom-chart.html#Default+Statistics+Values+Provided+by+TeamCity).*Shown as millisecond* |
| **teamcity.build\_test\_status**(gauge)                                        | [OpenMetrics] Build test status. 1 - OK; 2 - UNKNOWN; 3 - FAILED.                                                                                                                                                                                                                                |
| **teamcity.building\_hosted\_agents**(gauge)                                   | [OpenMetrics] Number of hosted agents running builds.                                                                                                                                                                                                                                            |
| **teamcity.builds**(gauge)                                                     | [OpenMetrics] Number of builds in the database.                                                                                                                                                                                                                                                  |
| **teamcity.builds.finished.count**(count)                                      | [OpenMetrics] Number of finished builds.                                                                                                                                                                                                                                                         |
| **teamcity.builds.queued**(gauge)                                              | [OpenMetrics] Build queue size.                                                                                                                                                                                                                                                                  |
| **teamcity.builds.running**(gauge)                                             | [OpenMetrics] Number of running builds.                                                                                                                                                                                                                                                          |
| **teamcity.builds.started.count**(count)                                       | [OpenMetrics] Number of started builds.                                                                                                                                                                                                                                                          |
| **teamcity.cache.InvestigationTestRunsHolder.projectScopes**(gauge)            | [OpenMetrics] Number of project scopes in the `InvestigationTestRunsHolder` scopes cache.                                                                                                                                                                                                        |
| **teamcity.cache.InvestigationTestRunsHolder.testNames**(gauge)                | [OpenMetrics] Number of tests in the `InvestigationTestRunsHolder` scopes cache.                                                                                                                                                                                                                 |
| **teamcity.cache.InvestigationTestRunsHolder.testRuns**(gauge)                 | [OpenMetrics] Number of test runs in the `InvestigationTestRunsHolder` cache.                                                                                                                                                                                                                    |
| **teamcity.cloud.active\_nodes**(gauge)                                        | [OpenMetrics] Current number of active cloud-managed nodes.                                                                                                                                                                                                                                      |
| **teamcity.cloud.agent.active\_duration\_afterBuild**(gauge)                   | Duration of time spent by managed agent between build finish and agent termination.*Shown as millisecond*                                                                                                                                                                                        |
| **teamcity.cloud.agent.active\_duration\_beforeBuild**(gauge)                  | Duration of time spent by managed agent before build start.*Shown as millisecond*                                                                                                                                                                                                                |
| **teamcity.cloud.agent.active\_duration\_betweenBuilds**(gauge)                | Duration of time spent by managed agent between builds before agent termination.*Shown as millisecond*                                                                                                                                                                                           |
| **teamcity.cloud.agent.idle\_duration**(gauge)                                 | [OpenMetrics] Duration of time managed agent spent idle.                                                                                                                                                                                                                                         |
| **teamcity.cloud.agent.starting\_duration\_beforeRegister**(gauge)             | Duration of time spent starting cloud agent.*Shown as millisecond*                                                                                                                                                                                                                               |
| **teamcity.cloud.agent.total\_build\_duration**(gauge)                         | Total build duration on managed agent.*Shown as millisecond*                                                                                                                                                                                                                                     |
| **teamcity.cloud.agent.total\_build\_duration\_beforeFinish**(gauge)           | Total build duration on managed agent before build finish.*Shown as millisecond*                                                                                                                                                                                                                 |
| **teamcity.cloud.build\_stuck\_canceled**(gauge)                               | [OpenMetrics] Number of builds stack in the canceling state.                                                                                                                                                                                                                                     |
| **teamcity.cloud.images**(gauge)                                               | [OpenMetrics] Number of cloud images.                                                                                                                                                                                                                                                            |
| **teamcity.cloud.plugins.failed\_loading.count**(count)                        | [OpenMetrics] Number of plugins failed to load.                                                                                                                                                                                                                                                  |
| **teamcity.cloud.server.gc\_usage\_exceeded\_errors**(gauge)                   | [OpenMetrics] Number of GC usage exceeded errors.                                                                                                                                                                                                                                                |
| **teamcity.cloud.server.high\_total\_memory\_errors**(gauge)                   | [OpenMetrics] Number of high memory errors.                                                                                                                                                                                                                                                      |
| **teamcity.cloud.tcc\_plugin\_loaded**(gauge)                                  | [OpenMetrics] Flag indicating TeamCity Cloud Plugin is loaded and running.                                                                                                                                                                                                                       |
| **teamcity.code\_coverage.blocks.covered**(gauge)                              | [OpenMetrics] Number of covered blocks.                                                                                                                                                                                                                                                          |
| **teamcity.code\_coverage.blocks.pct**(gauge)                                  | [OpenMetrics] Block-level code coverage percentage.*Shown as percent*                                                                                                                                                                                                                            |
| **teamcity.code\_coverage.blocks.total**(gauge)                                | [OpenMetrics] Total number of blocks.                                                                                                                                                                                                                                                            |
| **teamcity.code\_coverage.branches.covered**(gauge)                            | [OpenMetrics] Number of covered branches.                                                                                                                                                                                                                                                        |
| **teamcity.code\_coverage.branches.pct**(gauge)                                | [OpenMetrics] Branch coverage percentage.*Shown as percent*                                                                                                                                                                                                                                      |
| **teamcity.code\_coverage.branches.total**(gauge)                              | [OpenMetrics] Total number of branches.                                                                                                                                                                                                                                                          |
| **teamcity.code\_coverage.classes.covered**(gauge)                             | [OpenMetrics] Number of covered classes.                                                                                                                                                                                                                                                         |
| **teamcity.code\_coverage.classes.pct**(gauge)                                 | [OpenMetrics] Class-level code coverage percentage.*Shown as percent*                                                                                                                                                                                                                            |
| **teamcity.code\_coverage.classes.total**(gauge)                               | [OpenMetrics] Total number of classes.                                                                                                                                                                                                                                                           |
| **teamcity.code\_coverage.lines.covered**(gauge)                               | [OpenMetrics] Number of covered lines.                                                                                                                                                                                                                                                           |
| **teamcity.code\_coverage.lines.pct**(gauge)                                   | [OpenMetrics] Line-level code coverage percentage.*Shown as percent*                                                                                                                                                                                                                             |
| **teamcity.code\_coverage.lines.total**(gauge)                                 | [OpenMetrics] Total number of lines.                                                                                                                                                                                                                                                             |
| **teamcity.code\_coverage.methods.covered**(gauge)                             | [OpenMetrics] Number of covered methods.                                                                                                                                                                                                                                                         |
| **teamcity.code\_coverage.methods.pct**(gauge)                                 | [OpenMetrics] Method-level code coverage percentage.*Shown as percent*                                                                                                                                                                                                                           |
| **teamcity.code\_coverage.methods.total**(gauge)                               | [OpenMetrics] Total number of methods.                                                                                                                                                                                                                                                           |
| **teamcity.code\_coverage.statements.covered**(gauge)                          | [OpenMetrics] Number of covered statements.                                                                                                                                                                                                                                                      |
| **teamcity.code\_coverage.statements.pct**(gauge)                              | [OpenMetrics] Statement coverage percentage.*Shown as percent*                                                                                                                                                                                                                                   |
| **teamcity.code\_coverage.statements.total**(gauge)                            | [OpenMetrics] Total number of statements.                                                                                                                                                                                                                                                        |
| **teamcity.cpu.count**(gauge)                                                  | [OpenMetrics] The number of processors available to the Java Virtual Machine.                                                                                                                                                                                                                    |
| **teamcity.cpu.usage.process**(gauge)                                          | [OpenMetrics] The recent cpu usage for the Java Virtual Machine process.                                                                                                                                                                                                                         |
| **teamcity.cpu.usage.system**(gauge)                                           | [OpenMetrics] The recent cpu usage for the whole system.                                                                                                                                                                                                                                         |
| **teamcity.current\_full\_agent\_wait\_instances**(gauge)                      | [OpenMetrics] Current full agent waiting instances.                                                                                                                                                                                                                                              |
| **teamcity.current\_full\_agent\_wait\_time\_max**(gauge)                      | [OpenMetrics] Current max full agent waiting time.                                                                                                                                                                                                                                               |
| **teamcity.current\_full\_agent\_wait\_time\_total**(gauge)                    | [OpenMetrics] Current total full agent waiting time.                                                                                                                                                                                                                                             |
| **teamcity.database.connections.active**(gauge)                                | [OpenMetrics] Number of active database connections.                                                                                                                                                                                                                                             |
| **teamcity.db.table.writes.count**(count)                                      | [OpenMetrics] Writes to `build_data_storage` DB table.                                                                                                                                                                                                                                           |
| **teamcity.disk\_usage.artifacts.bytes**(gauge)                                | [OpenMetrics] Artifacts disk usage.                                                                                                                                                                                                                                                              |
| **teamcity.disk\_usage.logs.bytes**(gauge)                                     | [OpenMetrics] Build logs disk usage.                                                                                                                                                                                                                                                             |
| **teamcity.duplicator\_stats**(gauge)                                          | [OpenMetrics] Number of code duplicates found.                                                                                                                                                                                                                                                   |
| **teamcity.executors.asyncXmlRpc.activeTasks**(gauge)                          | [OpenMetrics] Running executor tasks for `asyncXmlRpc`.                                                                                                                                                                                                                                          |
| **teamcity.executors.asyncXmlRpc.completedTasks**(gauge)                       | [OpenMetrics] Completed executor tasks for `asyncXmlRpc`.                                                                                                                                                                                                                                        |
| **teamcity.executors.asyncXmlRpc.maxQueueCapacity**(gauge)                     | [OpenMetrics] Queue capacity for `asyncXmlRpc`.                                                                                                                                                                                                                                                  |
| **teamcity.executors.asyncXmlRpc.poolSize**(gauge)                             | [OpenMetrics] Pool size for `asyncXmlRpc`.                                                                                                                                                                                                                                                       |
| **teamcity.executors.asyncXmlRpc.queuedTasks**(gauge)                          | [OpenMetrics] Number of queued tasks for `asyncXmlRpc`.                                                                                                                                                                                                                                          |
| **teamcity.executors.asyncXmlRpc.rejectsCount**(gauge)                         | [OpenMetrics] Rejection count for adding tasks to `asyncXmlRpc`.                                                                                                                                                                                                                                 |
| **teamcity.executors.baseVcsExecutor.activeTasks**(gauge)                      | [OpenMetrics] Running executor tasks for `baseVcsExecutor`.                                                                                                                                                                                                                                      |
| **teamcity.executors.baseVcsExecutor.completedTasks**(gauge)                   | [OpenMetrics] Completed executor tasks for `baseVcsExecutor`.                                                                                                                                                                                                                                    |
| **teamcity.executors.baseVcsExecutor.maxQueueCapacity**(gauge)                 | [OpenMetrics] Queue capacity for `baseVcsExecutor`.                                                                                                                                                                                                                                              |
| **teamcity.executors.baseVcsExecutor.poolSize**(gauge)                         | [OpenMetrics] Pool size for `baseVcsExecutor`.                                                                                                                                                                                                                                                   |
| **teamcity.executors.baseVcsExecutor.queuedTasks**(gauge)                      | [OpenMetrics] Number of queued tasks for `baseVcsExecutor`.                                                                                                                                                                                                                                      |
| **teamcity.executors.baseVcsExecutor.rejectsCount**(gauge)                     | [OpenMetrics] Rejection count for adding tasks to `baseVcsExecutor`.                                                                                                                                                                                                                             |
| **teamcity.executors.cleanupExecutor.activeTasks**(gauge)                      | [OpenMetrics] Running executor tasks for `cleanupExecutor`.                                                                                                                                                                                                                                      |
| **teamcity.executors.cleanupExecutor.completedTasks**(gauge)                   | [OpenMetrics] Completed executor tasks for `cleanupExecutor`.                                                                                                                                                                                                                                    |
| **teamcity.executors.cleanupExecutor.maxQueueCapacity**(gauge)                 | [OpenMetrics] Queue capacity for `cleanupExecutor`.                                                                                                                                                                                                                                              |
| **teamcity.executors.cleanupExecutor.poolSize**(gauge)                         | [OpenMetrics] Pool size for `cleanupExecutor`.                                                                                                                                                                                                                                                   |
| **teamcity.executors.cleanupExecutor.queuedTasks**(gauge)                      | [OpenMetrics] Number of queued tasks for `cleanupExecutor`.                                                                                                                                                                                                                                      |
| **teamcity.executors.cleanupExecutor.rejectsCount**(gauge)                     | [OpenMetrics] Rejection count for adding tasks to `cleanupExecutor`.                                                                                                                                                                                                                             |
| **teamcity.executors.lowPriorityExecutor.activeTasks**(gauge)                  | [OpenMetrics] Running executor tasks for `lowPriorityExecutor`.                                                                                                                                                                                                                                  |
| **teamcity.executors.lowPriorityExecutor.completedTasks**(gauge)               | [OpenMetrics] Completed executor tasks for `lowPriorityExecutor`.                                                                                                                                                                                                                                |
| **teamcity.executors.lowPriorityExecutor.maxQueueCapacity**(gauge)             | [OpenMetrics] Queue capacity for `lowPriorityExecutor`.                                                                                                                                                                                                                                          |
| **teamcity.executors.lowPriorityExecutor.poolSize**(gauge)                     | [OpenMetrics] Pool size for `lowPriorityExecutor`.                                                                                                                                                                                                                                               |
| **teamcity.executors.lowPriorityExecutor.queuedTasks**(gauge)                  | [OpenMetrics] Number of queued tasks for `lowPriorityExecutor`.                                                                                                                                                                                                                                  |
| **teamcity.executors.lowPriorityExecutor.rejectsCount**(gauge)                 | [OpenMetrics] Rejection count for adding tasks to `lowPriorityExecutor`.                                                                                                                                                                                                                         |
| **teamcity.executors.normalExecutor.activeTasks**(gauge)                       | [OpenMetrics] Running executor tasks for `normalExecutor`.                                                                                                                                                                                                                                       |
| **teamcity.executors.normalExecutor.completedTasks**(gauge)                    | [OpenMetrics] Completed executor tasks for `normalExecutor`.                                                                                                                                                                                                                                     |
| **teamcity.executors.normalExecutor.maxQueueCapacity**(gauge)                  | [OpenMetrics] Queue capacity for `normalExecutor`.                                                                                                                                                                                                                                               |
| **teamcity.executors.normalExecutor.poolSize**(gauge)                          | [OpenMetrics] Pool size for `normalExecutor`.                                                                                                                                                                                                                                                    |
| **teamcity.executors.normalExecutor.queuedTasks**(gauge)                       | [OpenMetrics] Number of queued tasks for `normalExecutor`.                                                                                                                                                                                                                                       |
| **teamcity.executors.normalExecutor.rejectsCount**(gauge)                      | [OpenMetrics] Rejection count for adding tasks to `normalExecutor`.                                                                                                                                                                                                                              |
| **teamcity.executors.periodicalVcsExecutor.activeTasks**(gauge)                | [OpenMetrics] Running executor tasks for `periodicalVcsExecutor`.                                                                                                                                                                                                                                |
| **teamcity.executors.periodicalVcsExecutor.completedTasks**(gauge)             | [OpenMetrics] Completed executor tasks for `periodicalVcsExecutor`.                                                                                                                                                                                                                              |
| **teamcity.executors.periodicalVcsExecutor.maxQueueCapacity**(gauge)           | [OpenMetrics] Queue capacity for `periodicalVcsExecutor`.                                                                                                                                                                                                                                        |
| **teamcity.executors.periodicalVcsExecutor.poolSize**(gauge)                   | [OpenMetrics] Pool size for `periodicalVcsExecutor`.                                                                                                                                                                                                                                             |
| **teamcity.executors.periodicalVcsExecutor.queuedTasks**(gauge)                | [OpenMetrics] Number of queued tasks for `periodicalVcsExecutor`.                                                                                                                                                                                                                                |
| **teamcity.executors.periodicalVcsExecutor.rejectsCount**(gauge)               | [OpenMetrics] Rejection count for adding tasks to `periodicalVcsExecutor`.                                                                                                                                                                                                                       |
| **teamcity.executors.tomcatHttpThreadPool.activeTasks**(gauge)                 | [OpenMetrics] Number of Apache Tomcat HTTP thread pool active threads.                                                                                                                                                                                                                           |
| **teamcity.executors.tomcatHttpThreadPool.poolSize**(gauge)                    | [OpenMetrics] Apache Tomcat HTTP thread pool size.                                                                                                                                                                                                                                               |
| **teamcity.executors.triggersExecutor.activeTasks**(gauge)                     | [OpenMetrics] Running executor tasks for `triggersExecutor`.                                                                                                                                                                                                                                     |
| **teamcity.executors.triggersExecutor.completedTasks**(gauge)                  | [OpenMetrics] Completed executor tasks for `triggersExecutor`.                                                                                                                                                                                                                                   |
| **teamcity.executors.triggersExecutor.maxQueueCapacity**(gauge)                | [OpenMetrics] Queue capacity for `triggersExecutor`.                                                                                                                                                                                                                                             |
| **teamcity.executors.triggersExecutor.poolSize**(gauge)                        | [OpenMetrics] Pool size for `triggersExecutor`.                                                                                                                                                                                                                                                  |
| **teamcity.executors.triggersExecutor.queuedTasks**(gauge)                     | [OpenMetrics] Number of queued tasks for `triggersExecutor`.                                                                                                                                                                                                                                     |
| **teamcity.executors.triggersExecutor.rejectsCount**(gauge)                    | [OpenMetrics] Rejection count for adding tasks to `triggersExecutor`.                                                                                                                                                                                                                            |
| **teamcity.failed\_test\_count**(gauge)                                        | [OpenMetrics] The number of failed tests in the build.                                                                                                                                                                                                                                           |
| **teamcity.finishingBuild.buildFinishDelay.milliseconds.bucket**(count)        | [OpenMetrics - TeamCity v2022.10+] Time spent since the server received buildFinish from the agent and a moment when the build has been finished by the server (bucket).*Shown as millisecond*                                                                                                   |
| **teamcity.finishingBuild.buildFinishDelay.milliseconds.count**(count)         | [OpenMetrics - TeamCity v2022.10+] Time spent since the server received buildFinish from the agent and a moment when the build has been finished by the server (count).*Shown as millisecond*                                                                                                    |
| **teamcity.finishingBuild.buildFinishDelay.milliseconds.sum**(count)           | [OpenMetrics - TeamCity v2022.10+] Time spent since the server received buildFinish from the agent and a moment when the build has been finished by the server (sum).*Shown as millisecond*                                                                                                      |
| **teamcity.full.agent.waiting.time.milliseconds.bucket**(count)                | [OpenMetrics - TeamCity v2022.10+] Full agent waiting time (bucket).*Shown as millisecond*                                                                                                                                                                                                       |
| **teamcity.full.agent.waiting.time.milliseconds.count**(count)                 | [OpenMetrics - TeamCity v2022.10+] Full agent waiting time (count).*Shown as millisecond*                                                                                                                                                                                                        |
| **teamcity.full.agent.waiting.time.milliseconds.sum**(count)                   | [OpenMetrics - TeamCity v2022.10+] Full agent waiting time (sum).*Shown as millisecond*                                                                                                                                                                                                          |
| **teamcity.full\_agent\_wait\_time.quantile**(gauge)                           | [OpenMetrics] Full agent waiting time quantiles.                                                                                                                                                                                                                                                 |
| **teamcity.http.requests.duration.milliseconds.bucket**(count)                 | [OpenMetrics - TeamCity v2022.10+] Duration of http requests to the server (bucket).*Shown as millisecond*                                                                                                                                                                                       |
| **teamcity.http.requests.duration.milliseconds.count**(count)                  | [OpenMetrics - TeamCity v2022.10+] Duration of http requests to the server (count).*Shown as millisecond*                                                                                                                                                                                        |
| **teamcity.http.requests.duration.milliseconds.sum**(count)                    | [OpenMetrics - TeamCity v2022.10+] Duration of http requests to the server (sum).*Shown as millisecond*                                                                                                                                                                                          |
| **teamcity.httpSessions.active**(gauge)                                        | [OpenMetrics] Number of active HTTP sessions.                                                                                                                                                                                                                                                    |
| **teamcity.ignored\_test\_count**(gauge)                                       | [OpenMetrics] Number of ignored tests in the build.                                                                                                                                                                                                                                              |
| **teamcity.inspection\_stats\_e**(gauge)                                       | [OpenMetrics] The number of inspection errors in the build.                                                                                                                                                                                                                                      |
| **teamcity.inspection\_stats\_w**(gauge)                                       | [OpenMetrics] The number of inspection warnings in the build.                                                                                                                                                                                                                                    |
| **teamcity.io.build.log.reads.bytes.count**(count)                             | [OpenMetrics] Build log read bytes count.*Shown as byte*                                                                                                                                                                                                                                         |
| **teamcity.io.build.log.writes.bytes.count**(count)                            | [OpenMetrics] Build log written bytes count.*Shown as byte*                                                                                                                                                                                                                                      |
| **teamcity.io.build.patch.writes.bytes.count**(count)                          | [OpenMetrics] An estimate of the memory that the Java Virtual Machine is using for this buffer pool.*Shown as byte*                                                                                                                                                                              |
| **teamcity.jvm.buffer.memory.used.bytes**(gauge)                               | [OpenMetrics] Estimated memory used by the Java Virtual Machine for this buffer pool.*Shown as byte*                                                                                                                                                                                             |
| **teamcity.jvm.buffer.total.capacity.bytes**(gauge)                            | [OpenMetrics] An estimate of the total capacity of the buffers in this pool.*Shown as byte*                                                                                                                                                                                                      |
| **teamcity.jvm.buffers\_count**(gauge)                                         | [OpenMetrics] Estimated number of buffers in the pool.                                                                                                                                                                                                                                           |
| **teamcity.jvm.gc.count**(gauge)                                               | [OpenMetrics] Number of GC calls.                                                                                                                                                                                                                                                                |
| **teamcity.jvm.gc.duration.total.milliseconds**(gauge)                         | [OpenMetrics] Total GC duration since JVM start.*Shown as millisecond*                                                                                                                                                                                                                           |
| **teamcity.jvm.gc.live.data.size.bytes**(gauge)                                | [OpenMetrics] Size of old generation memory pool after a full GC.                                                                                                                                                                                                                                |
| **teamcity.jvm.gc.max.data.size.bytes**(gauge)                                 | [OpenMetrics] Max size of old generation memory pool.                                                                                                                                                                                                                                            |
| **teamcity.jvm.gc.memory.allocated.bytes.count**(count)                        | [OpenMetrics] Count incremented for an increase in the size of the young generation memory pool between GC calls.                                                                                                                                                                                |
| **teamcity.jvm.gc.memory.promoted.bytes.count**(count)                         | [OpenMetrics] Count of positive increases in the size of the old generation memory pool between GC calls.                                                                                                                                                                                        |
| **teamcity.jvm.memory.committed.bytes**(gauge)                                 | [OpenMetrics] The amount of memory in bytes that is committed for the Java virtual machine to use.                                                                                                                                                                                               |
| **teamcity.jvm.memory.max.bytes**(gauge)                                       | [OpenMetrics] The maximum amount of memory in bytes that can be used for memory management.                                                                                                                                                                                                      |
| **teamcity.jvm.memory.used.bytes**(gauge)                                      | [OpenMetrics] The amount of used memory.                                                                                                                                                                                                                                                         |
| **teamcity.jvm.threads**(gauge)                                                | [OpenMetrics] The current number of live threads including both daemon and non-daemon threads.                                                                                                                                                                                                   |
| **teamcity.jvm.threads.daemon**(gauge)                                         | [OpenMetrics] The current number of live daemon threads.                                                                                                                                                                                                                                         |
| **teamcity.node.events.processing.count**(count)                               | [OpenMetrics] Number of multi-node events processing.                                                                                                                                                                                                                                            |
| **teamcity.node.events.publishing.count**(count)                               | [OpenMetrics] Number of multi-node events publishing.                                                                                                                                                                                                                                            |
| **teamcity.node.events.unprocessed**(gauge)                                    | [OpenMetrics] Current number of unprocessed multi-node events.                                                                                                                                                                                                                                   |
| **teamcity.node.tasks.accepted.count**(count)                                  | [OpenMetrics] Multi-node tasks accepted.                                                                                                                                                                                                                                                         |
| **teamcity.node.tasks.finished.count**(count)                                  | [OpenMetrics] Multi-node tasks finished.                                                                                                                                                                                                                                                         |
| **teamcity.node.tasks.pending**(gauge)                                         | [OpenMetrics] Current number of pending multi-node tasks.                                                                                                                                                                                                                                        |
| **teamcity.passed\_test\_count**(gauge)                                        | [OpenMetrics] The number of successfully passed tests in the build.                                                                                                                                                                                                                              |
| **teamcity.process.queue.milliseconds.count**(count)                           | [OpenMetrics - TeamCity v2022.10+] Count of time to process build queue and start builds.*Shown as millisecond*                                                                                                                                                                                  |
| **teamcity.process.queue.milliseconds.sum**(count)                             | [OpenMetrics - TeamCity v2022.10+] Sum of time to process build queue and start builds.*Shown as millisecond*                                                                                                                                                                                    |
| **teamcity.process.queue.parts.milliseconds.count**(count)                     | [OpenMetrics - TeamCity v2022.10+] Count of time spent on builds optimization while processing the build queue.*Shown as millisecond*                                                                                                                                                            |
| **teamcity.process.queue.parts.milliseconds.sum**(count)                       | [OpenMetrics - TeamCity v2022.10+] Sum of time spent on builds optimization while processing the build queue.*Shown as millisecond*                                                                                                                                                              |
| **teamcity.process.websocket.send.pending.messages.milliseconds.count**(count) | [OpenMetrics - TeamCity v2022.10+] Count of time to send all pending WebSocket messages to UI.*Shown as millisecond*                                                                                                                                                                             |
| **teamcity.process.websocket.send.pending.messages.milliseconds.sum**(count)   | [OpenMetrics - TeamCity v2022.10+] Sum of time to send all pending WebSocket messages to UI.*Shown as millisecond*                                                                                                                                                                               |
| **teamcity.projects**(gauge)                                                   | [OpenMetrics] Number of projects.                                                                                                                                                                                                                                                                |
| **teamcity.projects.active**(gauge)                                            | [OpenMetrics] Number of active projects.                                                                                                                                                                                                                                                         |
| **teamcity.pullRequests.batch.time.milliseconds.count**(count)                 | [OpenMetrics - TeamCity v2022.10+] Count of pull request retrieval, batch, duration.*Shown as millisecond*                                                                                                                                                                                       |
| **teamcity.pullRequests.batch.time.milliseconds.sum**(count)                   | [OpenMetrics - TeamCity v2022.10+] Sum of pull request retrieval, batch, duration.*Shown as millisecond*                                                                                                                                                                                         |
| **teamcity.pullRequests.single.time.milliseconds.count**(count)                | [OpenMetrics - TeamCity v2022.10+] Count of pull request retrieval, individual, duration.*Shown as millisecond*                                                                                                                                                                                  |
| **teamcity.pullRequests.single.time.milliseconds.sum**(count)                  | [OpenMetrics - TeamCity v2022.10+] Sum of pull request retrieval, individual, duration.*Shown as millisecond*                                                                                                                                                                                    |
| **teamcity.queue\_wait\_reason**(gauge)                                        | [OpenMetrics] Queue wait time tagged by wait reason.*Shown as millisecond*                                                                                                                                                                                                                       |
| **teamcity.queuedBuild.waitingTime.milliseconds.bucket**(count)                | [OpenMetrics - TeamCity v2022.10+] Time spent by a build waiting in the queue due to a particular reason (bucket).*Shown as millisecond*                                                                                                                                                         |
| **teamcity.queuedBuild.waitingTime.milliseconds.count**(count)                 | [OpenMetrics - TeamCity v2022.10+] Time spent by a build waiting in the queue due to a particular reason (count).*Shown as millisecond*                                                                                                                                                          |
| **teamcity.queuedBuild.waitingTime.milliseconds.sum**(count)                   | [OpenMetrics - TeamCity v2022.10+] Time spent by a build waiting in the queue due to a particular reason (sum).*Shown as millisecond*                                                                                                                                                            |
| **teamcity.runningBuilds.UnprocessedMessages**(gauge)                          | [OpenMetrics] The number of build log messages received from the build agents but not yet processed.                                                                                                                                                                                             |
| **teamcity.server.cleanup.lastFinished.finishTimestamp.milliseconds**(gauge)   | [OpenMetrics] When the last finished cleanup was finished.*Shown as millisecond*                                                                                                                                                                                                                 |
| **teamcity.server.cleanup.lastFinished.startTimestamp.milliseconds**(gauge)    | [OpenMetrics] When the last finished cleanup was started.*Shown as millisecond*                                                                                                                                                                                                                  |
| **teamcity.server.cleanup.lastStarted.startTimestamp.milliseconds**(gauge)     | [OpenMetrics] When the last cleanup was started.*Shown as millisecond*                                                                                                                                                                                                                           |
| **teamcity.server.uptime.milliseconds**(gauge)                                 | [OpenMetrics] Time since the server process started initializing.*Shown as millisecond*                                                                                                                                                                                                          |
| **teamcity.server\_side\_build\_finishing**(gauge)                             | [OpenMetrics] The duration of server side build finishing.                                                                                                                                                                                                                                       |
| **teamcity.startingBuild.buildStartDelay.milliseconds.bucket**(count)          | [OpenMetrics - TeamCity v2022.10+] Time passed after the build was removed from the queue but before the start of the checking for changes operation (bucket).*Shown as millisecond*                                                                                                             |
| **teamcity.startingBuild.buildStartDelay.milliseconds.count**(count)           | [OpenMetrics - TeamCity v2022.10+] Time passed after the build was removed from the queue but before the start of the checking for changes operation (count).*Shown as millisecond*                                                                                                              |
| **teamcity.startingBuild.buildStartDelay.milliseconds.sum**(count)             | [OpenMetrics - TeamCity v2022.10+] Time passed after the build was removed from the queue but before the start of the checking for changes operation (sum).*Shown as millisecond*                                                                                                                |
| **teamcity.startingBuild.runBuildDelay.milliseconds.bucket**(count)            | [OpenMetrics - TeamCity v2022.10+] Time spent while preparing the starting build data and passing it to an agent (bucket).*Shown as millisecond*                                                                                                                                                 |
| **teamcity.startingBuild.runBuildDelay.milliseconds.count**(count)             | [OpenMetrics - TeamCity v2022.10+] Time spent while preparing the starting build data and passing it to an agent (count).*Shown as millisecond*                                                                                                                                                  |
| **teamcity.startingBuild.runBuildDelay.milliseconds.sum**(count)               | [OpenMetrics - TeamCity v2022.10+] Time spent while preparing the starting build data and passing it to an agent (sum).*Shown as millisecond*                                                                                                                                                    |
| **teamcity.success\_rate**(gauge)                                              | [OpenMetrics] An indicator of the build's success. `0` - failed, `1` - successful.                                                                                                                                                                                                               |
| **teamcity.system.load.average.1m**(gauge)                                     | [OpenMetrics] The sum of the number of runnable entities queued to available processors and the number of runnable entities.                                                                                                                                                                     |
| **teamcity.time\_spent\_in\_queue**(gauge)                                     | [OpenMetrics] Duration of time the build was staying in the queue.*Shown as millisecond*                                                                                                                                                                                                         |
| **teamcity.total\_test\_count**(gauge)                                         | [OpenMetrics] The total number of tests in the build.                                                                                                                                                                                                                                            |
| **teamcity.users.active**(gauge)                                               | [OpenMetrics] Number of unique user sessions within the preceding hour.                                                                                                                                                                                                                          |
| **teamcity.vcs.changes.checking.milliseconds.bucket**(count)                   | [OpenMetrics - TeamCity v2022.10+] Duration of checking for changes operation (bucket).*Shown as millisecond*                                                                                                                                                                                    |
| **teamcity.vcs.changes.checking.milliseconds.count**(count)                    | [OpenMetrics - TeamCity v2022.10+] Duration of checking for changes operation (count).*Shown as millisecond*                                                                                                                                                                                     |
| **teamcity.vcs.changes.checking.milliseconds.sum**(count)                      | [OpenMetrics - TeamCity v2022.10+] Duration of checking for changes operation (sum).*Shown as millisecond*                                                                                                                                                                                       |
| **teamcity.vcs.get.current.state.calls.count**(count)                          | [OpenMetrics] VCS state requests.                                                                                                                                                                                                                                                                |
| **teamcity.vcs.git.fetch.duration.milliseconds.bucket**(count)                 | [OpenMetrics - TeamCity v2022.10+] Git fetch operations duration (bucket).*Shown as millisecond*                                                                                                                                                                                                 |
| **teamcity.vcs.git.fetch.duration.milliseconds.count**(count)                  | [OpenMetrics - TeamCity v2022.10+] Git fetch operations duration (count).*Shown as millisecond*                                                                                                                                                                                                  |
| **teamcity.vcs.git.fetch.duration.milliseconds.sum**(count)                    | [OpenMetrics - TeamCity v2022.10+] Git fetch operations duration (sum).*Shown as millisecond*                                                                                                                                                                                                    |
| **teamcity.vcsChangesCollection.delay.milliseconds.count**(count)              | [OpenMetrics - TeamCity v2022.10+] Count of delay of the checking for changes operations invoked by: Starting build or build chain.*Shown as millisecond*                                                                                                                                        |
| **teamcity.vcsChangesCollection.delay.milliseconds.sum**(count)                | [OpenMetrics - TeamCity v2022.10+] Sum of delay of the checking for changes operations invoked by: Starting build or build chain.*Shown as millisecond*                                                                                                                                          |
| **teamcity.vcsRootInstances.active**(gauge)                                    | [OpenMetrics] Number of active VCS root instances.                                                                                                                                                                                                                                               |
| **teamcity.vcsRoots**(gauge)                                                   | [OpenMetrics] Number of VCS roots.                                                                                                                                                                                                                                                               |

### Events{% #events %}

TeamCity events representing successful and failed builds are forwarded to Datadog.

### Service Checks{% #service-checks %}

**teamcity.openmetrics.health**

Returns `CRITICAL` if the Agent is unable to connect to the OpenMetrics endpoint, otherwise returns `OK`.

*Statuses: ok, critical*

**teamcity.build.status**

Returns `CRITICAL` if the finished build has a status of FAILURE. Returns `OK` otherwise. Only emitted by the TeamCity REST instance.

*Statuses: ok, critical*

**teamcity.build.problems**

Returns `WARNING` if the finished build has encountered a problem. Returns `OK` otherwise. Only emitted by the TeamCity REST instance.

*Statuses: ok, warning*

**teamcity.test.results**

Returns `CRITICAL` if the finished build test has encountered a problem, `WARNING` if it has encountered a warning, or `UNKNOWN` if it has encountered an unknown problem. Returns `OK` otherwise. Only emitted by the TeamCity REST instance.

*Statuses: ok, warning, critical, unknown*

## Troubleshooting{% #troubleshooting %}

Need help? Contact [Datadog support](https://docs.datadoghq.com/help/).

## Further Reading{% #further-reading %}

- [TeamCity blog](https://www.datadoghq.com/blog/track-performance-impact-of-code-changes-with-teamcity-and-datadog)
