Skip to content

Commit 40a6c0b

Browse files
Add additional Teleport metrics (#19473)
* Add additional Teleport metrics In addition to adding the Teleport auth heartbeat_connections_received and teleport_roles metrics, this cleans up a few typos and updates Teleport image and tag used in the docker tests. * fix: sort metadata.csv * fix: add changelog entry * fix: sort metadata.csv --------- Co-authored-by: NouemanKHAL <[email protected]>
1 parent 9c8b98e commit 40a6c0b

File tree

8 files changed

+233
-214
lines changed

8 files changed

+233
-214
lines changed

teleport/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ These endpoints aren't activated by default. To enable the diagnostic HTTP endpo
4949
- type: file
5050
path: /var/log/teleport/teleport.log
5151
source: teleport
52-
service: telepor-service
53-
log_processing_rules:
52+
service: teleport-service
53+
log_processing_rules:
5454
- type: multi_line
5555
name: logs_start_with_date
5656
pattern: \d{4}\-(0?[1-9]|1[012])\-(0?[1-9]|[12][0-9]|3[01])

teleport/changelog.d/19473.added

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add additional Teleport heartbeat_connections_received and teleport_roles metrics

teleport/datadog_checks/teleport/metrics.py

+2
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@
6161
"teleport_migrations": "auth.migrations",
6262
"watcher_event_sizes": "auth.watcher_event_sizes",
6363
"watcher_events": "auth.watcher_events",
64+
"heartbeat_connections_received": "auth.heartbeat_connections_received",
65+
"teleport_roles_total": "auth.roles",
6466
}
6567

6668
AUTH_AUDIT_LOG_METRICS_MAP = {

teleport/metadata.csv

+212-210
Large diffs are not rendered by default.

teleport/tests/common.py

+5
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,13 @@
8484
"auth.grpc_server_msg_sent.count",
8585
"auth.grpc_server_started.count",
8686
"auth.cluster_name_not_found.count",
87+
"auth.connected_resources",
88+
"auth.registered_servers",
89+
"auth.registered_servers_by_install_methods",
8790
"auth.user_login.count",
8891
"auth.migrations",
92+
"auth.heartbeat_connections_received.count",
93+
"auth.roles",
8994
]
9095

9196

teleport/tests/docker/caddy/fixtures/metrics/get.txt

+5
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ auth_generate_seconds_bucket{le="32.768"} 4
4343
auth_generate_seconds_bucket{le="+Inf"} 4
4444
auth_generate_seconds_sum 0.016478917
4545
auth_generate_seconds_count 4
46+
47+
# HELP teleport_roles_total Number of roles that exist in the cluster
48+
# TYPE teleport_roles_total gauge
49+
teleport_roles_total 70
50+
4651
# HELP backend_batch_read_requests_total Number of read requests to the backend
4752
# TYPE backend_batch_read_requests_total counter
4853
backend_batch_read_requests_total{component="backend"} 56

teleport/tests/docker/teleport/docker-compose.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
teleport-service:
3-
image: public.ecr.aws/gravitational/teleport:14.3
3+
image: public.ecr.aws/gravitational/teleport-distroless:17.2
44
ports:
55
- 3000:3000
66
- 3080:3080

teleport/tests/fixtures/metrics.txt

+5-1
Original file line numberDiff line numberDiff line change
@@ -1090,6 +1090,10 @@ auth_generate_seconds_bucket{le="+Inf"} 30
10901090
auth_generate_seconds_sum 33.0
10911091
auth_generate_seconds_count 30
10921092

1093+
# HELP teleport_roles_total Number of roles that exist in the cluster
1094+
# TYPE teleport_roles_total gauge
1095+
teleport_roles_total 70
1096+
10931097
# TYPE teleport_audit_emit_events counter
10941098
teleport_audit_emit_events_total 0
10951099

@@ -1571,4 +1575,4 @@ bpf_lost_command_events{} 320
15711575
bpf_lost_disk_events{} 214
15721576

15731577
# TYPE bpf_lost_network_events counter
1574-
bpf_lost_network_events{} 587
1578+
bpf_lost_network_events{} 587

0 commit comments

Comments
 (0)