跳转到内容

Metrics Catalog

指标由独立 metrics listener 暴露。启用方式见 Metrics 监控

Terminal window
curl -fsS \
-H "Authorization: Bearer $METRICS_TOKEN" \
http://localhost:9090/metrics
指标类型Labels含义
http_requests_totalcountermethod, path, statusHTTP 请求数
http_request_duration_secondshistogrammethod, pathHTTP 请求耗时
http_error_rate_totalcountermethod, path, error_typeHTTP 错误数
http_requests_in_flightgaugenone正在处理的 HTTP 请求
websocket_connections_activegaugenone当前 WebSocket 连接
websocket_connections_totalcounterstatusWebSocket 建连次数
websocket_messages_totalcounterdirection, typeWebSocket 消息数
websocket_errors_totalcountererror_typeWebSocket 错误数
websocket_connection_duration_secondshistogramnoneWebSocket 连接持续时间
users_onlinegaugenone在线用户
rooms_activegaugenone活跃房间
指标类型Labels含义
db_query_duration_secondshistogramoperation, table数据库查询耗时
db_operations_totalcounteroperation, table, result数据库操作数
db_connections_activegaugenone活跃数据库连接
db_connections_idlegaugenone空闲数据库连接
db_connections_waitinggaugenone等待数据库连接的请求
db_pool_utilization_ratiogaugepool连接池利用率,取值 0 到 1
db_connection_acquire_duration_secondshistogrampool获取连接耗时
db_query_errors_totalcounteroperation, error_type数据库查询错误数
cache_hits_totalcountercache_type, level缓存命中数
cache_misses_totalcountercache_type, level缓存未命中数
cache_evictions_totalcountercache_type缓存淘汰数
cache_errors_totalcountercache_type, operation缓存操作错误数
cache_fill_duration_secondshistogramcache_type缓存填充耗时
指标类型Labels含义
chat_messages_totalcounternone持久化聊天消息数
synctv_file_object_delete_attempts_totalcounterorigin, backend文件对象删除尝试数
synctv_file_object_delete_failures_totalcounterorigin, backend文件对象删除失败数
synctv_file_cleanup_jobs_duegaugenone到期等待重试的文件清理任务数
synctv_file_cleanup_jobs_totalcounteraction, origin, backend文件清理重试任务动作数
playlist_items_totalcounternone播放列表项新增数
webrtc_peers_activegaugenone活跃 WebRTC peer
active_connectionsgaugenone活跃连接
spawned_task_panics_totalcountertask_namespawn_monitored 捕获的后台任务 panic
rate_limit_checks_totalcounterbackend, category限流检查数
rate_limit_rejections_totalcounterbackend, category限流拒绝数
rate_limit_redis_fallbacks_totalcountercategoryRedis 限流失败后的内存降级次数
指标类型Labels含义
synctv_cluster_connections_totalgaugenone当前节点的集群连接
synctv_realtime_events_published_totalcounterevent_type已发布实时事件
synctv_realtime_events_received_totalcounterevent_type已接收实时事件
synctv_realtime_events_dropped_totalcounterreason被丢弃的实时事件
synctv_cluster_heartbeat_failuresgaugenone连续 heartbeat 失败数
synctv_node_active_roomsgaugenone当前节点活跃房间
synctv_cluster_node_health_statusgaugenone节点健康状态,1 表示 healthy
synctv_cluster_leader_election_stategaugenoneleader election 状态,1 表示 leader
synctv_cluster_leader_election_epochgaugenone当前 leader epoch
synctv_cluster_leader_election_consecutive_failuresgaugenone连续选主失败数
synctv_cluster_epoch_mismatch_quarantinegaugenoneepoch mismatch 隔离状态
synctv_cluster_redis_pubsub_healthgaugenoneRedis pub/sub 连接健康状态
synctv_cluster_member_countgaugenone集群成员数
synctv_cluster_sync_errors_totalcountererror_type集群同步错误数
指标类型Labels含义
stream_relay_duration_secondshistogramstream_typestream relay 操作耗时
active_relay_streamsgaugenone活跃 relay stream
stream_errors_totalcounterstream_type, error_typestream 错误数
streamhub_restarts_totalcounterreasonStreamHub event loop 重启次数
livestream_active_publishersgaugenone活跃直播 publisher
livestream_active_viewersgaugenone活跃直播 viewer
livestream_bytes_totalcounterdirection直播传输字节数
livestream_stream_duration_secondshistogramstream_type直播 session 持续时间
livestream_pull_errors_totalcountererror_type直播拉流错误数
livestream_relay_frame_drops_totalcounternonebackpressure 导致的 relay 丢帧
gop_cache_sizegaugenone当前 GOP cache 条目数
gop_cache_drops_totalcounternoneGOP cache 淘汰数
gop_cache_memory_bytesgaugenoneGOP cache 内存占用
livestream_flv_slow_client_terminations_totalcounternoneFLV 慢客户端断开次数