Skip to main content

Metrics

Each almad process can expose Prometheus metrics for the services it runs. An SSH-only process publishes SSH and instance-wide metrics, so no single host is expected to report the entire catalog.

Metrics use Prometheus exposition format at :3081/metrics. Setting ALMA_METRICS_LISTEN binds that dedicated listener. While it is unset the diagnostic listener serves /metrics itself, so the endpoint is off only when neither listener is bound. See Monitoring for the listener settings, a scrape configuration, and recommended alerting signals.

Reading the catalog​

Query every name exactly as the catalog spells it. Prefixes are not uniform: some metrics carry an alma_ prefix and most do not, and the two forms sit side by side in the same table. Adding or dropping a prefix silently returns an empty result rather than an error.

The Component column identifies the service that publishes each metric. The names match those used throughout the docs. A metric listed under Proxy Service appears only on hosts running almad --proxy-service.

Types follow Prometheus conventions. A counter only rises and resets to zero on restart. Query it with rate() instead of reading it directly. A gauge reports a current value. A histogram publishes _bucket, _sum, and _count series. Use histogram_quantile() to calculate latency percentiles.

Metrics​

Auth Service and backends​

NameTypeComponentDescription
audit_failed_disk_monitoringcounterAlmaForge Audit LogNumber of times disk monitoring failed.
audit_failed_emit_eventscounterAlmaForge Audit LogNumber of times emitting audit events failed.
audit_percentage_disk_space_usedgaugeAlmaForge Audit LogPercentage of disk space used.
audit_server_open_filesgaugeAlmaForge Audit LogNumber of open audit files.
auth_generate_requests_throttled_totalcounterAlmaForge AuthNumber of throttled requests to generate new server keys.
auth_generate_requests_totalcounterAlmaForge AuthNumber of requests to generate new server keys.
auth_generate_requestsgaugeAlmaForge AuthNumber of current generate requests.
auth_generate_secondshistogramAlmaForge AuthLatency for generate requests.
backend_batch_read_requests_totalcountercacheNumber of read requests to the backend.
backend_batch_read_secondshistogramcacheLatency for batch read operations.
backend_batch_write_requests_totalcountercacheNumber of batch write requests to the backend.
backend_batch_write_secondshistogramcacheLatency for backend batch write operations.
backend_read_requests_totalcountercacheNumber of read requests to the backend.
backend_read_secondshistogramcacheLatency for read operations.
backend_requestscountercacheNumber of requests to the backend (reads, writes, and keepalives).
backend_write_requests_totalcountercacheNumber of write requests to the backend.
backend_write_secondshistogramcacheLatency for backend write operations.
backend_batch_read_requests_failed_totalcountercacheNumber of failed batch read requests to the backend.
backend_batch_write_requests_failed_totalcountercacheNumber of failed batch write requests to the backend.
backend_read_requests_failed_totalcountercacheNumber of failed read requests to the backend.
backend_write_requests_failed_totalcountercacheNumber of failed write requests to the backend.
backend_watchers_totalgaugecacheNumber of active backend watchers.
backend_watcher_queues_totalgaugecacheBackend watcher queue sizes.
cluster_name_not_found_totalcounterAlmaForge AuthNumber of times a cluster was not found.
dynamo_requests_totalcounterDynamoDBTotal number of requests to the DynamoDB API.
dynamo_requestscounterDynamoDBTotal number of requests to the DynamoDB API grouped by result.
dynamo_requests_secondshistogramDynamoDBLatency of DynamoDB API requests.
etcd_backend_batch_read_requestscounteretcdNumber of read requests to the etcd database.
etcd_backend_batch_read_secondshistogrametcdLatency for etcd read operations.
etcd_backend_read_requestscounteretcdNumber of read requests to the etcd database.
etcd_backend_read_secondshistogrametcdLatency for etcd read operations.
etcd_backend_tx_requestscounteretcdNumber of transaction requests to the database.
etcd_backend_tx_secondshistogrametcdLatency for etcd transaction operations.
etcd_backend_write_requestscounteretcdNumber of write requests to the database.
etcd_backend_write_secondshistogrametcdLatency for etcd write operations.
alma_etcd_eventscounteretcdTotal number of etcd events processed.
alma_etcd_event_backpressurecounteretcdTotal number of times event processing encountered backpressure.
firestore_events_backend_batch_read_requestscounterGCP Cloud FirestoreNumber of batch read requests to Cloud Firestore events.
firestore_events_backend_batch_read_secondshistogramGCP Cloud FirestoreLatency for Cloud Firestore events batch read operations.
firestore_events_backend_batch_write_requestscounterGCP Cloud FirestoreNumber of batch write requests to Cloud Firestore events.
firestore_events_backend_batch_write_secondshistogramGCP Cloud FirestoreLatency for Cloud Firestore events batch write operations.
firestore_events_backend_write_requestscounterGCP Cloud FirestoreNumber of write requests to Cloud Firestore events.
firestore_events_backend_write_secondshistogramGCP Cloud FirestoreLatency for Cloud Firestore events write operations.
gcs_event_storage_downloads_secondshistogramGCP GCSLatency for GCS download operations.
gcs_event_storage_downloadscounterGCP GCSNumber of downloads from the GCS backend.
gcs_event_storage_uploads_secondshistogramGCP GCSLatency for GCS upload operations.
gcs_event_storage_uploadscounterGCP GCSNumber of uploads to the GCS backend.
grpc_server_started_totalcounterAlmaForge AuthTotal number of RPCs started on the server.
grpc_server_handled_totalcounterAlmaForge AuthTotal number of RPCs completed on the server, regardless of success or failure.
grpc_server_msg_received_totalcounterAlmaForge AuthTotal number of RPC stream messages received on the server.
grpc_server_msg_sent_totalcounterAlmaForge AuthTotal number of gRPC stream messages sent by the server.
heartbeat_connections_received_totalcounterAlmaForge AuthNumber of times the Auth Service received a heartbeat connection.
heartbeats_missed_totalgaugeAlmaForge AuthNumber of heartbeats the Auth Service expected and did not receive.
s3_requests_totalcounterAmazon S3Total number of requests to the S3 API.
s3_requestscounterAmazon S3Total number of requests to the S3 API grouped by result.
s3_requests_secondshistogramAmazon S3Request latency for the S3 API.
alma_audit_emit_eventscounterAlmaForge Audit LogNumber of audit events emitted.
alma_audit_parquetlog_batch_processing_secondshistogramAlmaForge Audit LogDuration of processing single batch of events in the Parquet-format audit log.
alma_audit_parquetlog_s3_flush_secondshistogramAlmaForge Audit LogDuration of flushing parquet files to S3 in Parquet-format audit log.
alma_audit_parquetlog_delete_events_secondshistogramAlmaForge Audit LogDuration of deletion events from SQS in Parquet-format audit log.
alma_audit_parquetlog_batch_sizehistogramAlmaForge Audit LogOverall size of events in single batch in Parquet-format audit log.
alma_audit_parquetlog_batch_countcounterAlmaForge Audit LogTotal number of events in single batch in Parquet-format audit log.
alma_audit_parquetlog_last_processed_timestampgaugeAlmaForge Audit LogNumber of last processing time in Parquet-format audit log.
alma_audit_parquetlog_age_oldest_processed_messagegaugeAlmaForge Audit LogNumber of age of oldest event in Parquet-format audit log.
alma_audit_parquetlog_errors_from_collect_countcounterAlmaForge Audit LogNumber of collect failures in Parquet-format audit log.
alma_access_requests_createdcounterAlmaForge AuthNumber of access requests created, by requested roles and resources.
alma_connected_resourcesgaugeAlmaForge AuthNumber and type of resources connected via keepalives.
alma_device_code_inflightgaugeAlmaForge AuthDevice-authorization records pending approval or exchange. Every interactive login opens one.
alma_device_code_outcome_totalcounterAlmaForge AuthDevice-authorization flows that reached a terminal outcome, grouped by outcome.
alma_device_code_token_latency_secondshistogramAlmaForge AuthLatency of the device-code token endpoint, grouped by outcome.
alma_incomplete_session_uploads_totalgaugeAlmaForge Audit LogNumber of sessions not yet uploaded to the Auth Service.
alma_total_instancesgaugeAlmaForge AuthNumber of instances the Auth Service currently counts in the cluster.
alma_user_certificates_generatedcounterAlmaForge AuthNumber of user certificates issued.
alma_registered_serversgaugeAlmaForge AuthThe number of AlmaForge services that are connected to an Auth Service instance grouped by version.
alma_registered_servers_by_install_methodsgaugeAlmaForge AuthThe number of AlmaForge services that are connected to an Auth Service instance grouped by install methods.
user_login_totalcounterAlmaForge AuthNumber of user logins.
alma_migrationsgaugeAlmaForge AuthTracks for each migration if it is active (1) or not (0).
watcher_event_sizeshistogramcacheOverall size of events emitted.
watcher_eventshistogramcachePer resource size of events emitted.

Proxy Service​

NameTypeComponentDescription
failed_connect_to_node_attempts_totalcounterAlmaForge ProxyNumber of failed SSH connection attempts to the SSH Service. Use with alma_connect_to_node_attempts_total to get the failure rate.
failed_login_attempts_totalcounterAlmaForge ProxyNumber of failed alma login or alma ssh logins.
grpc_client_started_totalcounterAlmaForge ProxyTotal number of RPCs started on the client.
grpc_client_handled_totalcounterAlmaForge ProxyTotal number of RPCs completed on the client, regardless of success or failure.
grpc_client_msg_received_totalcounterAlmaForge ProxyTotal number of RPC stream messages received on the client.
grpc_client_msg_sent_totalcounterAlmaForge ProxyTotal number of gRPC stream messages sent by the client.
proxy_connection_limit_exceeded_totalcounterAlmaForge ProxyNumber of connections that exceeded the Proxy Service connection limit.
proxy_peer_client_dial_error_totalcounterAlmaForge ProxyTotal number of errors encountered dialing peer Proxy Service instances.
proxy_peer_client_connectionsgaugeAlmaForge ProxyNumber of open connections to peer Proxy Service instances.
proxy_peer_client_rpcgaugeAlmaForge ProxyNumber of current client RPC requests.
proxy_peer_client_rpc_totalcounterAlmaForge ProxyTotal number of client RPC requests.
proxy_peer_client_rpc_duration_secondshistogramAlmaForge ProxyDuration in seconds of RPCs sent by the client.
proxy_peer_client_message_sent_sizehistogramAlmaForge ProxySize of messages sent by the client.
proxy_peer_client_message_received_sizehistogramAlmaForge ProxySize of messages received by the client.
proxy_peer_server_connectionsgaugeAlmaForge ProxyNumber of currently opened connection to peer Proxy Service clients.
proxy_peer_server_rpcgaugeAlmaForge ProxyNumber of current server RPC requests.
proxy_peer_server_rpc_totalcounterAlmaForge ProxyTotal number of server RPC requests.
proxy_peer_server_rpc_duration_secondshistogramAlmaForge ProxyDuration in seconds of RPCs sent by the server.
proxy_peer_server_message_sent_sizehistogramAlmaForge ProxySize of messages sent by the server.
proxy_peer_server_message_received_sizehistogramAlmaForge ProxySize of messages received by the server.
proxy_ssh_sessions_totalgaugeAlmaForge ProxyNumber of active sessions through this Proxy Service instance.
missing_ssh_tunnelsgaugeAlmaForge ProxyNumber of missing SSH tunnels. Used to debug if AlmaForge instances have discovered all Proxy Service instances.
alma_connect_to_node_attempts_totalcounterAlmaForge ProxyNumber of SSH connection attempts to an SSH Service. Use with failed_connect_to_node_attempts_total to get the failure rate.
alma_reverse_ssh_tunnelsgaugeAlmaForge ProxyNumber of reverse SSH tunnels connected to the AlmaForge Proxy Service by AlmaForge instances.
alma_proxy_db_connection_setup_time_secondshistogramAlmaForge ProxyTime to establish connection to DB service from Proxy service.
alma_proxy_db_connection_dial_attempts_totalcounterAlmaForge ProxyNumber of dial attempts from Proxy to DB service made.
alma_proxy_db_connection_dial_failures_totalcounterAlmaForge ProxyNumber of failed dial attempts from Proxy to DB service made.
alma_proxy_db_attempted_servers_totalhistogramAlmaForge ProxyNumber of servers processed during connection attempt to the DB service from Proxy service.
alma_proxy_db_connection_tls_config_time_secondshistogramAlmaForge ProxyTime to fetch TLS configuration for the connection to DB service from Proxy service.
alma_proxy_db_active_connections_totalgaugeAlmaForge ProxyNumber of currently active connections to DB service from Proxy service.
alma_accepted_connections_totalcounterAlmaForge ProxyConnections accepted, by ingress path and service. Separates traffic that arrived through the multiplex from traffic on a dedicated port.
alma_active_connectionsgaugeAlmaForge ProxyConnections currently open, by ingress path and service.
alma_authenticated_accepted_connections_totalcounterAlmaForge ProxyAccepted connections that went on to authenticate. Compare with alma_accepted_connections_total for the failure rate.
alma_authenticated_active_connectionsgaugeAlmaForge ProxyOpen connections that authenticated.
reversetunnel_conn_latencyhistogramAlmaForge ProxyTime to reach an agent over a reverse tunnel, by dial type and connection stage.

Database Service​

NameTypeComponentDescription
alma_db_messages_from_client_totalcounterAlmaForge Database ServiceNumber of messages (packets) received from the DB client.
alma_db_messages_from_server_totalcounterAlmaForge Database ServiceNumber of messages (packets) received from the DB server.
alma_db_method_call_count_totalcounterAlmaForge Database ServiceNumber of times a DB method was called.
alma_db_method_call_latency_secondshistogramAlmaForge Database ServiceCall latency for database method calls.
alma_db_initialized_connections_totalcounterAlmaForge Database ServiceNumber of initialized DB connections.
alma_db_active_connections_totalgaugeAlmaForge Database ServiceNumber of active DB connections.
alma_db_connection_durations_secondshistogramAlmaForge Database ServiceDuration of DB connection.
alma_db_connection_setup_time_secondshistogramAlmaForge Database ServiceTime to establish a database connection before handling requests.
alma_db_errors_totalcounterAlmaForge Database ServiceNumber of synthetic DB errors sent to the client.

Kubernetes Access​

The following tables identify all metrics available in the proxy service if Kubernetes access is enabled.

Client​

The following table identifies all metrics the Kubernetes Proxy records for its connections to the upstream that serves a cluster, which is an agent running the Kubernetes Service.

NameTypeComponentDescription
alma_kubernetes_client_in_flight_requestsgaugeAlmaForge Kubernetes ProxyIn-flight requests waiting for the upstream response.
alma_kubernetes_client_requests_totalcounterAlmaForge Kubernetes ProxyTotal number of requests sent to the upstream AlmaForge proxy, kube_service or Kubernetes Cluster servers.
alma_kubernetes_client_tls_duration_secondshistogramAlmaForge Kubernetes ProxyLatency distribution of TLS handshakes.
alma_kubernetes_client_got_conn_duration_secondshistogramAlmaForge Kubernetes ProxyLatency distribution of time to dial to the upstream server - using reverse tunnel or direct dialer.
alma_kubernetes_client_first_byte_response_duration_secondshistogramAlmaForge Kubernetes ProxyLatency distribution of time to receive the first response byte from the upstream server.
alma_kubernetes_client_request_duration_secondshistogramAlmaForge Kubernetes ProxyLatency distribution of the upstream request time.

Server​

The following table identifies all metrics available for incoming connections.

NameTypeComponentDescription
alma_kubernetes_server_in_flight_requestsgaugeAlmaForge Kubernetes ProxyIn-flight requests currently handled by the server.
alma_kubernetes_server_api_requests_totalcounterAlmaForge Kubernetes ProxyTotal number of requests handled by the server.
alma_kubernetes_server_request_duration_secondshistogramAlmaForge Kubernetes ProxyLatency distribution of the total request time.
alma_kubernetes_server_response_size_byteshistogramAlmaForge Kubernetes ProxyDistribution of the response size.
alma_kubernetes_server_exec_in_flight_sessionsgaugeAlmaForge Kubernetes ProxyNumber of active kubectl exec sessions.
alma_kubernetes_server_exec_sessions_totalcounterAlmaForge Kubernetes ProxyTotal number of kubectl exec sessions.
alma_kubernetes_server_portforward_in_flight_sessionsgaugeAlmaForge Kubernetes ProxyNumber of active kubectl portforward sessions.
alma_kubernetes_server_portforward_sessions_totalcounterAlmaForge Kubernetes ProxyTotal number of kubectl port-forward sessions.
alma_kubernetes_server_join_in_flight_sessionsgaugeAlmaForge Kubernetes ProxyNumber of active joining sessions,
alma_kubernetes_server_join_sessions_totalcounterAlmaForge Kubernetes ProxyTotal number of joining sessions.

AlmaForge SSH Service​

NameTypeComponentDescription
user_max_concurrent_sessions_hit_totalcounterAlmaForge SSHNumber of times a user exceeded their concurrent session limit.

AlmaForge Kubernetes Service​

The following table identifies all metrics the Kubernetes Service records for its connections to the upstream, which is always a Kubernetes cluster.

NameTypeComponentDescription
alma_kubernetes_client_in_flight_requestsgaugeAlmaForge Kubernetes ServiceIn-flight requests waiting for the upstream response.
alma_kubernetes_client_requests_totalcounterAlmaForge Kubernetes ServiceTotal number of requests sent to the upstream Proxy Service, Kubernetes Service, or Kubernetes Cluster servers.
alma_kubernetes_client_tls_duration_secondshistogramAlmaForge Kubernetes ServiceLatency distribution of TLS handshakes.
alma_kubernetes_client_got_conn_duration_secondshistogramAlmaForge Kubernetes ServiceLatency distribution of time to dial to the upstream server - using reversetunnel or direct dialer.
alma_kubernetes_client_first_byte_response_duration_secondshistogramAlmaForge Kubernetes ServiceLatency distribution of time to receive the first response byte from the upstream server.
alma_kubernetes_client_request_duration_secondshistogramAlmaForge Kubernetes ServiceLatency distribution of the upstream request time.

The following table identifies all metrics available for incoming connections.

NameTypeComponentDescription
alma_kubernetes_server_in_flight_requestsgaugeAlmaForge Kubernetes ServiceIn-flight requests currently handled by the server.
alma_kubernetes_server_api_requests_totalcounterAlmaForge Kubernetes ServiceTotal number of requests handled by the server.
alma_kubernetes_server_request_duration_secondshistogramAlmaForge Kubernetes ServiceLatency distribution of the total request time.
alma_kubernetes_server_response_size_byteshistogramAlmaForge Kubernetes ServiceDistribution of the response size.
alma_kubernetes_server_exec_in_flight_sessionsgaugeAlmaForge Kubernetes ServiceNumber of active kubectl exec sessions.
alma_kubernetes_server_exec_sessions_totalcounterAlmaForge Kubernetes ServiceTotal number of kubectl exec sessions.
alma_kubernetes_server_portforward_in_flight_sessionsgaugeAlmaForge Kubernetes ServiceNumber of active kubectl portforward sessions.
alma_kubernetes_server_portforward_sessions_totalcounterAlmaForge Kubernetes ServiceTotal number of kubectl port-forward sessions.
alma_kubernetes_server_join_in_flight_sessionsgaugeAlmaForge Kubernetes ServiceNumber of active joining sessions,
alma_kubernetes_server_join_sessions_totalcounterAlmaForge Kubernetes ServiceTotal number of joining sessions.

All AlmaForge instances​

NameTypeComponentDescription
process_stategaugeAlmaForgeState of the almad process: 0 - ok, 1 - recovering, 2 - degraded, 3 - starting.
certificate_mismatch_totalcounterAlmaForgeNumber of SSH server login failures due to a certificate mismatch.
rxcounterAlmaForgeNumber of bytes received during an SSH connection.
server_interactive_sessions_totalgaugeAlmaForgeNumber of active sessions.
alma_build_infogaugeAlmaForgeProvides build information of AlmaForge including gitref (git describe --long --tags), Go version, and AlmaForge version. The value of this gauge will always be 1.
alma_cache_eventscounterAlmaForgeNumber of events received by a AlmaForge service cache. AlmaForge's Auth Service, Proxy Service, and other services cache incoming events related to their service.
alma_cache_stale_eventscounterAlmaForgeNumber of stale events received by a AlmaForge service cache. A high percentage of stale events can indicate a degraded backend.
txcounterAlmaForgeNumber of bytes transmitted during an SSH connection.

Go runtime metrics​

These metrics are surfaced by the Go runtime and are not specific to AlmaForge.

NameTypeComponentDescription
go_gc_duration_secondssummaryInternal GoA summary of GC invocation durations.
go_goroutinesgaugeInternal GoNumber of goroutines that currently exist.
go_infogaugeInternal GoInformation about the Go environment.
go_memstats_alloc_bytes_totalcounterInternal GoTotal number of bytes allocated, even if freed.
go_memstats_alloc_bytesgaugeInternal GoNumber of bytes allocated and still in use.
go_memstats_buck_hash_sys_bytesgaugeInternal GoNumber of bytes used by the profiling bucket hash table.
go_memstats_frees_totalcounterInternal GoTotal number of frees.
go_memstats_gc_cpu_fractiongaugeInternal GoThe fraction of this program's available CPU time used by the GC since the program started.
go_memstats_gc_sys_bytesgaugeInternal GoNumber of bytes used for garbage collection system metadata.
go_memstats_heap_alloc_bytesgaugeInternal GoNumber of heap bytes allocated and still in use.
go_memstats_heap_idle_bytesgaugeInternal GoNumber of heap bytes waiting to be used.
go_memstats_heap_inuse_bytesgaugeInternal GoNumber of heap bytes that are in use.
go_memstats_heap_objectsgaugeInternal GoNumber of allocated objects.
go_memstats_heap_released_bytesgaugeInternal GoNumber of heap bytes released to the OS.
go_memstats_heap_sys_bytesgaugeInternal GoNumber of heap bytes obtained from the system.
go_memstats_last_gc_time_secondsgaugeInternal GoNumber of seconds since the Unix epoch of the last garbage collection.
go_memstats_lookups_totalcounterInternal GoTotal number of pointer lookups.
go_memstats_mallocs_totalcounterInternal GoTotal number of mallocs.
go_memstats_mcache_inuse_bytesgaugeInternal GoNumber of bytes in use by mcache structures.
go_memstats_mcache_sys_bytesgaugeInternal GoNumber of bytes used for mcache structures obtained from system.
go_memstats_mspan_inuse_bytesgaugeInternal GoNumber of bytes in use by mspan structures.
go_memstats_mspan_sys_bytesgaugeInternal GoNumber of bytes used for mspan structures obtained from system.
go_memstats_next_gc_bytesgaugeInternal GoNumber of heap bytes when next the garbage collection will take place.
go_memstats_other_sys_bytesgaugeInternal GoNumber of bytes used for other system allocations.
go_memstats_stack_inuse_bytesgaugeInternal GoNumber of bytes in use by the stack allocator.
go_memstats_stack_sys_bytesgaugeInternal GoNumber of bytes obtained from the system for stack allocator.
go_memstats_sys_bytesgaugeInternal GoNumber of bytes obtained from the system.
go_threadsgaugeInternal GoNumber of OS threads created.
process_cpu_seconds_totalcounterInternal GoTotal user and system CPU time spent in seconds.
process_max_fdsgaugeInternal GoMaximum number of open file descriptors.
process_open_fdsgaugeInternal GoNumber of open file descriptors.
process_resident_memory_bytesgaugeInternal GoResident memory size in bytes.
process_start_time_secondsgaugeInternal GoStart time of the process since the Unix epoch in seconds.
process_virtual_memory_bytesgaugeInternal GoVirtual memory size in bytes.
process_virtual_memory_max_bytesgaugeInternal GoMaximum amount of virtual memory available in bytes.

Prometheus​

NameTypeComponentDescription
promhttp_metric_handler_requests_in_flightgaugeprometheusCurrent number of scrapes being served.
promhttp_metric_handler_requests_totalcounterprometheusTotal number of scrapes by HTTP status code.

References​

  • Monitoring: endpoints, scrape configuration, and the signals worth alerting on.
  • Networking: every port almad listens on, including the metrics and diagnostic listeners.
  • Audit Events: records of user and system activity rather than process performance.
  • Scaling: how to act on saturation signals.