Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional Teleport metrics #19473

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions teleport/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ These endpoints aren't activated by default. To enable the diagnostic HTTP endpo
- type: file
path: /var/log/teleport/teleport.log
source: teleport
service: telepor-service
log_processing_rules:
service: teleport-service
log_processing_rules:
- type: multi_line
name: logs_start_with_date
pattern: \d{4}\-(0?[1-9]|1[012])\-(0?[1-9]|[12][0-9]|3[01])
Expand Down
2 changes: 2 additions & 0 deletions teleport/datadog_checks/teleport/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
"teleport_migrations": "auth.migrations",
"watcher_event_sizes": "auth.watcher_event_sizes",
"watcher_events": "auth.watcher_events",
"heartbeat_connections_received": "auth.heartbeat_connections_received",
"teleport_roles_total": "auth.roles",
}

AUTH_AUDIT_LOG_METRICS_MAP = {
Expand Down
2 changes: 2 additions & 0 deletions teleport/metadata.csv
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ teleport.auth.migrations,gauge,,,,"Tracks for each migration if it is active (1)
teleport.auth.registered_servers,gauge,,,,"The number of Teleport services that are connected to an Auth Service instance grouped by version.",0,teleport,,
teleport.auth.registered_servers_by_install_methods,gauge,,,,"The number of Teleport services that are connected to an Auth Service instance grouped by install methods.",0,teleport,,
teleport.auth.user_login,count,,,,"Number of user logins.",0,teleport,,
teleport.auth.heartbeat_connections_received,count,,,,"Number of times auth received a heartbeat connection.",0,teleport,,
teleport.auth.roles,gauge,,,,"Number of roles that exist in the cluster.",0,teleport,,
teleport.bpf.lost_command_events,count,,,,"Number of lost command events.",0,teleport,,
teleport.bpf.lost_disk_events,count,,,,"Number of lost disk events.",0,teleport,,
teleport.bpf.lost_network_events,count,,,,"Number of lost network events.",0,teleport,,
Expand Down
5 changes: 5 additions & 0 deletions teleport/tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,13 @@
"auth.grpc_server_msg_sent.count",
"auth.grpc_server_started.count",
"auth.cluster_name_not_found.count",
"auth.connected_resources",
"auth.registered_servers",
"auth.registered_servers_by_install_methods",
"auth.user_login.count",
"auth.migrations",
"auth.heartbeat_connections_received.count",
"auth.roles",
]


Expand Down
5 changes: 5 additions & 0 deletions teleport/tests/docker/caddy/fixtures/metrics/get.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ auth_generate_seconds_bucket{le="32.768"} 4
auth_generate_seconds_bucket{le="+Inf"} 4
auth_generate_seconds_sum 0.016478917
auth_generate_seconds_count 4

# HELP teleport_roles_total Number of roles that exist in the cluster
# TYPE teleport_roles_total gauge
teleport_roles_total 70

# HELP backend_batch_read_requests_total Number of read requests to the backend
# TYPE backend_batch_read_requests_total counter
backend_batch_read_requests_total{component="backend"} 56
Expand Down
2 changes: 1 addition & 1 deletion teleport/tests/docker/teleport/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
teleport-service:
image: public.ecr.aws/gravitational/teleport:14.3
image: public.ecr.aws/gravitational/teleport-distroless:17.2
ports:
- 3000:3000
- 3080:3080
Expand Down
6 changes: 5 additions & 1 deletion teleport/tests/fixtures/metrics.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1090,6 +1090,10 @@ auth_generate_seconds_bucket{le="+Inf"} 30
auth_generate_seconds_sum 33.0
auth_generate_seconds_count 30

# HELP teleport_roles_total Number of roles that exist in the cluster
# TYPE teleport_roles_total gauge
teleport_roles_total 70

# TYPE teleport_audit_emit_events counter
teleport_audit_emit_events_total 0

Expand Down Expand Up @@ -1571,4 +1575,4 @@ bpf_lost_command_events{} 320
bpf_lost_disk_events{} 214

# TYPE bpf_lost_network_events counter
bpf_lost_network_events{} 587
bpf_lost_network_events{} 587
Loading