The Simplest Way to Make Prometheus and Teamcity Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

You pair prometheus and teamcity by letting the monitoring server read build metrics on a timer. This setup tracks build queues, agent status, and run times in one dashboard. Engineering teams depend on fast build pipelines to ship code on time. When a build agent stalls, developers wait in line and lose focus. Linking your build server to your time-series database makes these delays visible right away. You can spot slow test suites and busy agents before the whole queue backs up. How data an

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

You pair prometheus and teamcity by letting the monitoring server read build metrics on a timer. This setup tracks build queues, agent status, and run times in one dashboard.

Engineering teams depend on fast build pipelines to ship code on time. When a build agent stalls, developers wait in line and lose focus. Linking your build server to your time-series database makes these delays visible right away. You can spot slow test suites and busy agents before the whole queue backs up.

How data and roles flow between prometheus and teamcity

The build server tracks internal stats about projects, queues, and connected build agents. It puts these numbers on a special web page made for metric collectors. Your monitoring server visits this page every few seconds to read the latest numbers.

To keep this data safe, the build server asks for a secret key first. You create a user account on the build server just for reading metrics. Then you generate an access key for that user account. You give this key to the monitoring server so it can log in.

Once the monitoring server logs in, it pulls the build stats over your network. It saves each number with a timestamp and labels for the project or agent. From there, teams write alert rules to catch long queues or offline agents. When a metric crosses a limit, the alert system sends a message to the team.

Common failure modes and how to scope network paths

Many teams make mistakes when they set up the metric user account. They often reuse a shared admin account instead of making a new role. If someone steals that admin key, they can change build code or read secrets. You should always create a role that can only read server metrics.

Another common problem is tracking too many details at once. If you label metrics with every single build number, your database grows too fast. High label counts slow down queries and use up all your disk space. Stick to broad labels like project names, build steps, and agent pools.

End-to-End Encryption + Prometheus Security: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Network rules also need tight limits between the two tools. The build server should not open its metric page to the whole company network. Set up firewall rules so only the monitoring server IP can reach that port. Turn on encrypted traffic so nobody on the network can read the access key.

Keeping build keys and queries safe

Access keys for metric collection often sit untouched for years. If an engineer leaves the team, old keys might stay active in config files. Teams need a clear plan to rotate these keys on a regular schedule. You should also check access logs to see who reads the metric page.

Engineers also log in to both tools to fix broken builds during an incident. When people share accounts to check logs, you lose track of who did what. Tying every human login to a single identity provider fixes this gap. You get a clean audit trail for both build changes and metric queries.

Govern statements and responses across databases and APIs

Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.

First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.

Frequently asked questions

How does the monitoring server get data from the build server?

The monitoring server pulls data from a web endpoint on the build server. It uses a read-only access token to log in on a set schedule.

What build metrics should our team track first?

Start by tracking build queue length, active agent count, and average build duration. These three signals tell you right away if developers are waiting on slow pipelines.

Why did our metric database slow down after adding build stats?

You likely included unique build IDs or commit hashes as metric labels. Remove those high-volume labels so the database does not create millions of data series.

The query runs. The emails stay hidden.