Metrics and monitoring
Each server exposes Prometheus metrics about its own operation: how many tool calls it handled, how long VCF took to answer, what was rejected and whether the audit log is being delivered. The metrics describe the server, not the monitored infrastructure. Infrastructure data belongs in VCF Operations.
Endpoint
| Item | Value |
|---|---|
| Address | METRICS_LISTEN_ADDRESS, :9090 by default |
| Path | /metrics |
| Format | Prometheus text exposition format |
| Authentication | None inside the cluster network, or a bearer token with METRICS_AUTH_TOKEN |
| Exposure | Cluster-internal. The Helm chart doesn't publish this port through the ingress |
With the Prometheus Operator, enable the ServiceMonitor:
metrics:
enabled: true
serviceMonitor:
enabled: true
interval: 30s
labels:
release: prometheus
Without the operator, scrape it directly:
scrape_configs:
- job_name: vcf-mcp
kubernetes_sd_configs:
- role: pod
namespaces:
names: [vcf-mcp]
relabel_configs:
- source_labels: [__meta_kubernetes_pod_label_app_kubernetes_io_name]
regex: vcf-mcp
action: keep
- source_labels: [__meta_kubernetes_pod_container_port_number]
regex: "9090"
action: keep
Metric catalogue
| Metric | Type | Labels | Description |
|---|---|---|---|
mcp_requests_total | counter | server, tool, tool_type, identity_type, result | Tool calls handled |
mcp_request_duration_seconds | histogram | server, tool | Time to handle a tool call |
mcp_tool_errors_total | counter | server, tool, code | Tool calls that ended with an error |
mcp_policy_denials_total | counter | server, tool, reason | Calls rejected by the policy engine |
mcp_switch_denials_total | counter | server, tool, group | Calls rejected by an operation switch |
mcp_auth_failures_total | counter | server, mode | Failed client authentications |
mcp_confirmations_total | counter | server, tool, result | Confirmation tokens issued, confirmed, expired or rejected |
mcp_confirmations_pending | gauge | server | Confirmation tokens issued and not yet used |
mcp_upstream_requests_total | counter | server, endpoint, status | Calls to a VCF API |
mcp_upstream_duration_seconds | histogram | server, endpoint | Time a VCF API took to answer |
mcp_secret_fetch_total | counter | server, source, result | Credential reads from vault or middleware |
mcp_secret_fetch_duration_seconds | histogram | server, source | Time to read credentials |
mcp_audit_events_total | counter | server, destination, result | Audit records delivered |
mcp_audit_queue_depth | gauge | server, destination | Audit records waiting in the buffer |
mcp_audit_dropped_total | counter | server, destination | Audit records lost because the buffer was full |
mcp_sessions_active | gauge | server, transport | Open MCP sessions |
mcp_tools_exposed | gauge | server, tool_type | Tools currently listed, after switches and policy filtering |
mcp_build_info | gauge | server, version, revision | Always 1. Carries the release in its labels |
Standard process metrics (process_cpu_seconds_total, process_resident_memory_bytes and the rest) are exposed as well.
Labels are deliberately low-cardinality: the tool name is a label, the identity of a user and the identifiers of VCF resources aren't. Per-user and per-resource questions are answered from the audit log, which is built for exactly that and doesn't degrade your Prometheus.
Grafana
A ready dashboard is available: vcf-mcp-grafana-dashboard.json. Import it in Grafana 10 or later and select your Prometheus data source.
| Row | Panels |
|---|---|
| Traffic | Calls per second by server and tool type, call duration p50 and p95, active sessions |
| Errors and denials | Error rate by tool, policy denials, switch denials, authentication failures |
| VCF endpoints | Upstream request rate by status, upstream duration p95 by endpoint, failures by endpoint |
| Audit and secrets | Audit records delivered by destination, buffer depth, dropped records, credential read duration |
Recommended alerts
groups:
- name: vcf-mcp
rules:
- alert: VcfMcpDown
expr: up{job="vcf-mcp"} == 0
for: 5m
labels: { severity: critical }
annotations: { summary: "VCF MCP server is not being scraped" }
- alert: VcfMcpAuditRecordsDropped
expr: increase(mcp_audit_dropped_total[15m]) > 0
labels: { severity: critical }
annotations: { summary: "Audit records were lost, leaving a gap in the audit trail" }
- alert: VcfMcpToolErrorRate
expr: |
sum(rate(mcp_tool_errors_total[10m])) by (server)
/ sum(rate(mcp_requests_total[10m])) by (server) > 0.1
for: 10m
labels: { severity: warning }
annotations: { summary: "More than 10% of tool calls are failing" }
- alert: VcfMcpUpstreamSlow
expr: |
histogram_quantile(0.95,
sum(rate(mcp_upstream_duration_seconds_bucket[10m])) by (le, server)) > 5
for: 15m
labels: { severity: warning }
annotations: { summary: "VCF API responses are slow (p95 above 5s)" }
- alert: VcfMcpAuthFailures
expr: increase(mcp_auth_failures_total[10m]) > 20
labels: { severity: warning }
annotations: { summary: "Repeated authentication failures against an MCP server" }
- alert: VcfMcpSecretFetchFailing
expr: increase(mcp_secret_fetch_total{result="error"}[10m]) > 0
for: 5m
labels: { severity: critical }
annotations: { summary: "Credentials cannot be read from the secret source" }
Health endpoints
| Endpoint | Reports ready when |
|---|---|
/healthz | The process is running and able to serve requests |
/readyz | The VCF endpoint answers, the secret source answers, and the policy engine answers when one is configured |
Kubernetes uses /healthz as the liveness probe and /readyz as the readiness probe, so a server that has lost its VCF endpoint or its secret source is taken out of service instead of returning errors to assistants.