极狐GitLab Prometheus 指标

  • Tier: 基础版,专业版,旗舰版
  • Offering: 私有化部署

要启用极狐GitLab Prometheus 指标:

  1. 以拥有管理员访问权限的用户身份登录极狐GitLab。
  2. 在左侧边栏的底部,选择 管理员
  3. 选择 设置 > 指标和性能分析
  4. 找到 指标 - Prometheus 部分,并选择 启用极狐GitLab Prometheus 指标端点
  5. 重启极狐GitLab 以使更改生效。

对于自编译安装,您必须自行配置。

收集指标#

极狐GitLab 监控其自身的内部服务指标,并在 /-/metrics 端点提供这些指标。与其他 Prometheus 导出器不同,要访问这些指标,客户端 IP 地址必须被显式允许

这些指标已启用并为 Linux 软件包 和 Helm chart 安装收集。对于自编译安装,这些指标必须手动启用并由 Prometheus 服务器收集。

要启用和查看来自 Sidekiq 节点的指标,请参见 Sidekiq 指标

可用指标#

History
    • caller_id 在极狐GitLab 15.11 中从 redis_hit_miss_operations_totalredis_cache_generation_duration_seconds 中移除。

以下指标可用:

指标类型描述标签
gitlab_cache_misses_totalCounter10.2缓存读取未命中controlleractionstoreendpoint_id
gitlab_cache_operation_duration_secondsHistogram10.2缓存访问时间operationstoreendpoint_id
gitlab_cache_operations_totalCounter12.2按控制器或操作的缓存操作controlleractionoperationstoreendpoint_id
gitlab_cache_read_multikey_countHistogram15.7多键缓存读取操作中的键计数controlleractionstoreendpoint_id
gitlab_ci_job_token_inbound_accessCounter17.2通过 CI 作业令牌的入站访问计数
gitlab_ci_job_token_authorization_failuresCounter17.11通过 CI 作业令牌的授权尝试失败计数same_root_ancestor
gitlab_ci_pipeline_builder_scoped_variables_durationHistogram14.5创建 CI/CD 作业的作用域变量所需的秒数
gitlab_ci_pipeline_creation_duration_secondsHistogram13.0创建 CI/CD 流水线所需的秒数gitlab
gitlab_ci_pipeline_size_buildsHistogram13.1按流水线来源分组的流水线内构建总数source
gitlab_ci_runner_authentication_success_totalCounter15.2runner 认证成功的总次数type
gitlab_ci_runner_authentication_failure_totalCounter15.2runner 认证失败的总次数
gitlab_ghost_user_migration_lag_secondsGauge15.6鬼用户迁移的最旧计划记录的等待时间(秒)
gitlab_ghost_user_migration_scheduled_records_totalGauge15.6已安排的鬼用户迁移总数
gitlab_ci_active_jobsHistogram14.2创建流水线时的活动作业计数
gitlab_database_transaction_secondsHistogram12.1数据库事务中花费的时间,以秒为单位
gitlab_method_call_duration_secondsHistogram10.2方法调用的真实持续时间controlleractionmodulemethod
gitlab_omniauth_login_totalCounter16.1OmniAuth 登录尝试的总次数omniauth_providerstatus
gitlab_page_out_of_boundsCounter12.8PageLimiter 分页限制命中的计数器controlleractionbot
gitlab_rails_boot_time_secondsGauge14.8Rails 主进程完成启动所用的时间
gitlab_rails_queue_duration_secondsHistogram9.4测量极狐GitLab Workhorse 转发请求到 Rails 的延迟
gitlab_sql_duration_secondsHistogram10.2SQL 执行时间,不包括 SCHEMA 操作和 BEGIN / COMMIT
gitlab_sql_<role>_duration_secondsHistogram13.10SQL 执行时间,不包括 SCHEMA 操作和 BEGIN / COMMIT,按数据库角色(主/副本)分组
gitlab_ruby_threads_max_expected_threadsGauge13.3预期运行并执行应用程序工作的最大线程数
gitlab_ruby_threads_running_threadsGauge13.3按名称运行的 Ruby 线程数
gitlab_transaction_cache_<key>_count_totalCounter10.2Rails 缓存调用的总计数器(每个键)
gitlab_transaction_cache_<key>_duration_totalCounter10.2Rails 缓存调用的总时间(秒)计数器(每个键)
gitlab_transaction_cache_count_totalCounter10.2Rails 缓存调用的总计数器(汇总)
gitlab_transaction_cache_duration_totalCounter10.2Rails 缓存调用的总时间(秒)计数器(汇总)
gitlab_transaction_cache_read_hit_count_totalCounter10.2Rails 缓存调用的缓存命中计数器controlleractionstoreendpoint_id
gitlab_transaction_cache_read_miss_count_totalCounter10.2Rails 缓存调用的缓存未命中计数器controlleractionstoreendpoint_id
gitlab_transaction_duration_secondsHistogram10.2成功请求的持续时间(gitlab_transaction_* 指标)controlleractionendpoint_id
gitlab_transaction_event_build_found_totalCounter9.4API /jobs/request 的构建找到计数器
gitlab_transaction_event_build_invalid_totalCounter9.4API /jobs/request 的构建因并发冲突无效的计数器
gitlab_transaction_event_build_not_found_cached_totalCounter9.4API /jobs/request 的构建未找到的缓存响应计数器
gitlab_transaction_event_build_not_found_totalCounter9.4API /jobs/request 的构建未找到计数器
gitlab_transaction_event_change_default_branch_totalCounter9.4任何存储库的默认分支更改时的计数器
gitlab_transaction_event_create_repository_totalCounter9.4任何存储库创建时的计数器
gitlab_transaction_event_etag_caching_cache_hit_totalCounter9.4ETag 缓存命中计数器endpoint
gitlab_transaction_event_etag_caching_header_missing_totalCounter9.4ETag 缓存未命中 - 缺少标头计数器endpoint
gitlab_transaction_event_etag_caching_key_not_found_totalCounter9.4ETag 缓存未命中 - 未找到键计数器endpoint
gitlab_transaction_event_etag_caching_middleware_used_totalCounter9.4访问 ETag 中间件的计数器endpoint
gitlab_transaction_event_etag_caching_resource_changed_totalCounter9.4ETag 缓存未命中 - 资源更改计数器endpoint
gitlab_transaction_event_fork_repository_totalCounter9.4存储库分支(RepositoryForkWorker)的计数器。仅在源存储库存在时递增
gitlab_transaction_event_import_repository_totalCounter9.4存储库导入(RepositoryImportWorker)的计数器
gitlab_transaction_event_patch_hard_limit_bytes_hit_totalCounter13.9差异补丁大小限制命中计数器
gitlab_transaction_event_push_branch_totalCounter9.4所有分支推送的计数器
gitlab_transaction_event_rails_exception_totalCounter9.4Rails 异常次数的计数器
gitlab_transaction_event_receive_email_totalCounter9.4接收电子邮件的计数器handler
gitlab_transaction_event_remove_branch_totalCounter9.4任何存储库删除分支时的计数器
gitlab_transaction_event_remove_repository_totalCounter9.4存储库被删除时的计数器
gitlab_transaction_event_remove_tag_totalCounter9.4任何存储库的标签被删除时的计数器
gitlab_transaction_event_sidekiq_exception_totalCounter9.4Sidekiq 异常计数器
gitlab_transaction_event_stuck_import_jobs_totalCounter9.4卡住的导入作业计数projects_without_jid_countprojects_with_jid_count
gitlab_transaction_event_update_build_totalCounter9.4更新 API /jobs/request/:id 的构建计数器
gitlab_transaction_new_redis_connections_totalCounter9.4新 Redis 连接计数器
gitlab_transaction_rails_queue_duration_totalCounter9.4测量极狐GitLab Workhorse 转发请求到 Rails 的延迟controlleractionendpoint_id
gitlab_transaction_view_duration_totalCounter9.4视图的持续时间controlleractionviewendpoint_id
gitlab_view_rendering_duration_secondsHistogram10.2视图的持续时间(直方图)controlleractionviewendpoint_id
http_requests_totalCounter9.4Rack 请求计数methodstatus
http_request_duration_secondsHistogram9.4从 rack 中间件成功请求的 HTTP 响应时间method
gitlab_transaction_db_count_totalCounter13.1SQL 调用总数的计数器controlleractionendpoint_id
gitlab_transaction_db_<role>_count_totalCounter13.10按数据库角色(主/副本)分组的 SQL 调用总数的计数器controlleractionendpoint_id
gitlab_transaction_db_write_count_totalCounter13.1写入 SQL 调用总数的计数器controlleractionendpoint_id
gitlab_transaction_db_cached_count_totalCounter13.1缓存 SQL 调用总数的计数器controlleractionendpoint_id
gitlab_transaction_db_<role>_cached_count_totalCounter13.1按数据库角色(主/副本)分组的缓存 SQL 调用总数的计数器controlleractionendpoint_id
gitlab_transaction_db_<role>_wal_count_totalCounter14.0按数据库角色(主/副本)分组的 WAL(预写日志位置)查询总数的计数器controlleractionendpoint_id
gitlab_transaction_db_<role>_wal_cached_count_totalCounter14.1按数据库角色(主/副本)分组的缓存 WAL(预写日志位置)查询总数的计数器controlleractionendpoint_id
http_elasticsearch_requests_duration_secondsHistogram13.1Web 事务期间 Elasticsearch 请求的持续时间。仅专业版和旗舰版。controlleractionendpoint_id
http_elasticsearch_requests_totalCounter13.1Web 事务期间 Elasticsearch 请求计数。仅专业版和旗舰版。controlleractionendpoint_id
pipelines_created_totalCounter9.4创建的流水线计数器sourcepartition_id
rack_uncaught_errors_totalCounter9.4处理 Rack 连接时未捕获错误的计数
user_session_logins_totalCounter9.4自极狐GitLab 启动或重启以来登录的用户数
upload_file_does_not_existCounter10.7上传记录找不到文件的次数
failed_login_captcha_totalGauge11.0登录期间失败的 CAPTCHA 尝试次数
successful_login_captcha_totalGauge11.0登录期间成功的 CAPTCHA 尝试次数
auto_devops_pipelines_completed_totalCounter12.7按状态标记的已完成自动 DevOps 流水线计数
artifact_report_<report_type>_builds_completed_totalCounter15.3按报告类型分组并按状态标记的具有报告类型产物的已完成 CI 构建的计数
gitlab_metrics_dashboard_processing_time_msSummary12.10指标仪表板处理时间(毫秒)service,stages
action_cable_active_connectionsGauge13.4当前连接的 ActionCable WS 客户端数量server_mode
action_cable_broadcasts_totalCounter13.10发出的 ActionCable 广播的数量server_mode
action_cable_pool_min_sizeGauge13.4ActionCable 线程池中的最小工作线程数server_mode
action_cable_pool_max_sizeGauge13.4ActionCable 线程池中的最大工作线程数server_mode
action_cable_pool_current_sizeGauge13.4ActionCable 线程池中当前的工作线程数server_mode
action_cable_pool_largest_sizeGauge13.4ActionCable 线程池中观察到的最大工作线程数server_mode
action_cable_pool_pending_tasksGauge13.4ActionCable 线程池中等待执行的任务数server_mode
action_cable_pool_tasks_totalGauge13.4ActionCable 线程池中执行的任务总数server_mode
gitlab_ci_trace_operations_totalCounter13.4作业跟踪上的不同操作总数operation
gitlab_ci_trace_bytes_totalCounter13.4传输的作业跟踪字节总数
action_cable_single_client_transmissions_totalCounter13.10传输给任何频道中任何客户端的 ActionCable 消息数server_mode
action_cable_subscription_confirmations_totalCounter13.10客户端确认的 ActionCable 订阅数server_mode
action_cable_subscription_rejections_totalCounter13.10客户端拒绝的 ActionCable 订阅数server_mode
action_cable_transmitted_bytes_totalCounter16.0通过 ActionCable 传输的字节总数operationchannel
gitlab_issuable_fast_count_by_state_totalCounter13.5议题合并请求 页面上的行计数操作总数
gitlab_issuable_fast_count_by_state_failures_totalCounter13.5议题合并请求 页面上的软失败行计数操作数量
gitlab_ci_trace_finalize_duration_secondsHistogram13.6作业跟踪块迁移到对象存储的持续时间
gitlab_vulnerability_report_branch_comparison_real_duration_secondsHistogram15.11漏洞报告在默认分支 SQL 查询上的执行持续时间
gitlab_vulnerability_report_branch_comparison_cpu_duration_secondsHistogram15.11漏洞报告在默认分支 SQL 查询上的执行持续时间
gitlab_external_http_totalCounter13.8对外部系统进行的 HTTP 调用总数controlleractionendpoint_id
gitlab_external_http_duration_secondsCounter13.8对外部系统的每个 HTTP 调用所花费的时间(秒)
gitlab_external_http_exception_totalCounter13.8发起外部 HTTP 调用时引发的异常总数
ci_report_parser_duration_secondsHistogram13.9解析 CI/CD 报告产物所需的时间parser
pipeline_graph_link_calculation_duration_secondsHistogram13.9计算链接所花费的总时间,以秒为单位
pipeline_graph_links_totalHistogram13.9每个图的链接数
pipeline_graph_links_per_job_ratioHistogram13.9每个图的链接与作业比率
gitlab_ci_pipeline_security_orchestration_policy_processing_duration_secondsHistogram13.12处理 CI/CD 流水线中的安全策略所需的时间(秒)
gitlab_spamcheck_request_duration_secondsHistogram13.12Rails 和反垃圾邮件引擎之间请求的持续时间
service_desk_thank_you_emailCounter14.0对新服务台电子邮件的电子邮件回复总数
service_desk_new_note_emailCounter14.0新服务台评论的电子邮件通知总数
email_receiver_errorCounter14.1处理传入电子邮件时的错误总数
gitlab_snowplow_events_totalCounter14.1发出的极狐GitLab Snowplow Analytics Instrumentation 事件总数
gitlab_snowplow_failed_events_totalCounter14.1极狐GitLab Snowplow Analytics Instrumentation 事件发射失败总数
gitlab_snowplow_successful_events_totalCounter14.1极狐GitLab Snowplow Analytics Instrumentation 事件发射成功总数
gitlab_ci_build_trace_errors_totalCounter14.4作业跟踪上不同错误类型的总数error_reason
gitlab_presentable_object_cacheless_render_real_duration_secondsHistogram15.3缓存和表示特定 Web 请求对象所花费的实际时间controlleractionendpoint_id
cached_object_operations_totalCounter15.3为特定 Web 请求缓存的对象总数controlleractionendpoint_id
redis_hit_miss_operations_totalCounter15.6Redis 缓存命中和未命中的总数cache_hitcache_identifierfeature_categorybacking_resource
redis_cache_generation_duration_secondsHistogram15.6生成 Redis 缓存所需的时间cache_hitcache_identifierfeature_categorybacking_resource
gitlab_diffs_reorder_real_duration_secondsHistogram15.8在差异批量请求中重新排序差异文件所花费的时间(秒)controlleractionendpoint_id
gitlab_diffs_collection_real_duration_secondsHistogram15.8在差异批量请求中查询合并请求差异文件所花费的时间(秒)controlleractionendpoint_id
gitlab_diffs_comparison_real_duration_secondsHistogram15.8在差异批量请求中获取比较数据所花费的时间(秒)controlleractionendpoint_id
gitlab_diffs_unfoldable_positions_real_duration_secondsHistogram15.8在差异批量请求中获取可展开的注释位置所花费的时间(秒)controlleraction
gitlab_diffs_unfold_real_duration_secondsHistogram15.8在差异批量请求中展开位置所花费的时间(秒)controlleractionendpoint_id
gitlab_diffs_write_cache_real_duration_secondsHistogram15.8在差异批量请求中缓存高亮显示的行和统计信息所花费的时间(秒)controlleractionendpoint_id
gitlab_diffs_highlight_cache_decorate_real_duration_secondsHistogram15.8在差异批量请求中从缓存设置高亮显示行所花费的时间(秒)controlleractionendpoint_id
gitlab_diffs_render_real_duration_secondsHistogram15.8在差异批量请求中序列化和渲染差异所花费的时间(秒)controlleractionendpoint_id
gitlab_memwd_violations_totalCounter15.9Ruby 进程违反内存阈值的总次数
gitlab_memwd_violations_handled_totalCounter15.9处理 Ruby 进程内存违规的总次数
gitlab_sli_rails_request_apdex_totalCounter14.4请求 Apdex 测量总数。有关详细信息,请参见 Rails 请求 SLIsendpoint_idfeature_categoryrequest_urgency
gitlab_sli_rails_request_apdex_success_totalCounter14.4满足其紧急性目标持续时间的成功请求总数。将其除以 gitlab_sli_rails_requests_apdex_total 可获得成功率endpoint_idfeature_categoryrequest_urgency
gitlab_sli_rails_request_error_totalCounter15.7请求错误测量总数。有关详细信息,请参见 Rails 请求 SLIsendpoint_idfeature_categoryrequest_urgencyerror
job_register_attempts_failed_totalCounter9.5runner 注册作业失败的次数
job_register_attempts_totalCounter9.5runner 尝试注册作业的次数
job_queue_duration_secondsHistogram9.5请求处理执行时间
gitlab_ci_queue_operations_totalCounter16.3记录队列中发生的所有操作
gitlab_ci_queue_depth_totalHistogram16.3CI/CD 构建队列相对于操作结果的大小
gitlab_ci_queue_size_totalHistogram16.3初始化 CI/CD 构建队列的大小
gitlab_ci_current_queue_sizeGauge16.3初始化 CI/CD 构建队列的当前大小
gitlab_ci_queue_iteration_duration_secondsHistogram16.3在 CI/CD 队列中找到构建所需的时间
gitlab_ci_queue_retrieval_duration_secondsHistogram16.3执行 SQL 查询以检索构建队列所需的时间
gitlab_connection_pool_sizeGauge16.7连接池的大小
gitlab_connection_pool_available_countGauge16.7池中可用连接数
gitlab_security_policies_scan_result_process_duration_secondsHistogram16.7处理合并请求审批策略所需的时间
gitlab_security_policies_policy_sync_duration_secondsHistogram17.6同步策略配置的策略更改所需的时间
gitlab_security_policies_policy_deletion_duration_secondsHistogram17.6删除与策略相关的配置所需的时间
gitlab_security_policies_policy_creation_duration_secondsHistogram17.6创建与策略相关的配置所需的时间
gitlab_security_policies_sync_opened_merge_requests_duration_secondsHistogram17.6在策略更改后同步已打开的合并请求所需的时间
gitlab_security_policies_scan_execution_configuration_rendering_secondsHistogram17.3渲染扫描执行策略 CI 配置所需的时间
gitlab_security_policies_update_configuration_duration_secondsHistogram17.6为策略配置更改安排同步所需的时间
gitlab_highlight_usageCounter16.8使用 Gitlab::Highlight 的次数used_on
dependency_linker_usageCounter16.8依赖链接器的使用次数used_on
gitlab_keeparound_refs_requested_totalCounter16.10请求创建的 keep-around refs 数量source
gitlab_keeparound_refs_created_totalCounter16.10实际创建的 keep-around refs 数量source
search_advanced_index_repair_totalCounter17.3索引修复操作的数量document_type
search_advanced_boolean_settingsGauge17.3高级搜索布尔设置的当前状态name
gitlab_http_router_rule_totalCounter17.4记录 HTTP 路由器规则的 rule_actionrule_type 的出现次数rule_actionrule_type
gitlab_rack_attack_events_totalCounter17.6由 Rack Attack 处理的事件总数event_typeevent_name
gitlab_rack_attack_throttle_limitGauge17.6报告客户在 Rack Attack 限流之前可以进行的最大请求数event_name
gitlab_rack_attack_throttle_period_secondsGauge17.6报告在 Rack Attack 限流之前计算客户请求的持续时间event_name
gitlab_application_rate_limiter_throttle_utilization_ratioHistogram17.6极狐GitLab 应用速率限制器中限流的利用率。throttle_keypeekfeature_category
gitlab_dependency_path_cte_real_duration_secondsHistogram17.10解析给定组件的祖先依赖路径所花费的时间(秒)。
dependency_path_cte_paths_foundCounter17.10为给定依赖项找到的祖先依赖路径的数量。max_depth_reachedcyclic

由功能标志控制的指标#

以下指标可以由功能标志控制:

指标功能标志
gitlab_view_rendering_duration_secondsprometheus_metrics_view_instrumentation
gitlab_ci_queue_depth_totalgitlab_ci_builds_queuing_metrics
gitlab_ci_queue_sizegitlab_ci_builds_queuing_metrics
gitlab_ci_queue_size_totalgitlab_ci_builds_queuing_metrics
gitlab_ci_queue_iteration_duration_secondsgitlab_ci_builds_queuing_metrics
gitlab_ci_current_queue_sizegitlab_ci_builds_queuing_metrics
gitlab_ci_queue_retrieval_duration_secondsgitlab_ci_builds_queuing_metrics
gitlab_ci_queue_active_runners_totalgitlab_ci_builds_queuing_metrics

Praefect 指标#

您可以配置 Praefect 以报告指标。有关可用指标的信息,请参阅相关文档

Sidekiq 指标#

Sidekiq 作业也可以收集指标,如果启用了 Sidekiq 导出器,则可以访问这些指标:例如,使用 gitlab.yml 中的 monitoring.sidekiq_exporter 配置选项。这些指标从配置的端口的 /metrics 路径提供。

指标类型描述标签
sidekiq_jobs_cpu_secondsHistogram12.4运行 Sidekiq 作业所需的 CPU 时间(秒)queueboundaryexternal_dependenciesfeature_categoryjob_statusurgency
sidekiq_jobs_completion_secondsHistogram12.2完成 Sidekiq 作业所需的时间(秒)queueboundaryexternal_dependenciesfeature_categoryjob_statusurgency
sidekiq_jobs_db_secondsHistogram12.9运行 Sidekiq 作业所需的数据库时间(秒)queueboundaryexternal_dependenciesfeature_categoryjob_statusurgency
sidekiq_jobs_gitaly_secondsHistogram12.9运行 Sidekiq 作业所需的 Gitaly 时间(秒)queueboundaryexternal_dependenciesfeature_categoryjob_statusurgency
sidekiq_redis_requests_duration_secondsHistogram13.1Sidekiq 作业查询 Redis 服务器所花费的时间(秒)queueboundaryexternal_dependenciesfeature_categoryjob_statusurgency
sidekiq_elasticsearch_requests_duration_secondsHistogram13.1Sidekiq 作业请求 Elasticsearch 服务器所花费的时间(秒)queueboundaryexternal_dependenciesfeature_categoryjob_statusurgency
sidekiq_jobs_queue_duration_secondsHistogram12.5Sidekiq 作业在执行前排队的时间(秒)queueboundaryexternal_dependenciesfeature_categoryurgency
sidekiq_jobs_failed_totalCounter12.2Sidekiq 作业失败次数queueboundaryexternal_dependenciesfeature_categoryurgency
sidekiq_jobs_retried_totalCounter12.2Sidekiq 作业重试次数queueboundaryexternal_dependenciesfeature_categoryurgency
sidekiq_jobs_interrupted_totalCounter15.2Sidekiq 作业中断次数queueboundaryexternal_dependenciesfeature_categoryurgency
sidekiq_jobs_dead_totalCounter13.7Sidekiq 死亡作业(已用尽重试次数的作业)queueboundaryexternal_dependenciesfeature_categoryurgency
sidekiq_redis_requests_totalCounter13.1Sidekiq 作业执行期间的 Redis 请求queueboundaryexternal_dependenciesfeature_categoryjob_statusurgency
sidekiq_elasticsearch_requests_totalCounter13.1Sidekiq 作业执行期间的 Elasticsearch 请求queueboundaryexternal_dependenciesfeature_categoryjob_statusurgency
sidekiq_jobs_skipped_totalCounter16.2启用 drop_sidekiq_jobs 功能标志或禁用 run_sidekiq_jobs 功能标志时跳过的作业数workeractionfeature_categoryreason
sidekiq_running_jobsGauge12.2正在运行的 Sidekiq 作业数量queueboundaryexternal_dependenciesfeature_categoryurgency
sidekiq_concurrencyGauge12.5Sidekiq 作业的最大数量
sidekiq_mem_total_bytesGauge15.3分配给占用对象槽的对象和需要 malloc 的对象的字节数
sidekiq_concurrency_limit_queue_jobsGauge17.3并发限制队列中等待的 Sidekiq 作业数worker
sidekiq_concurrency_limit_max_concurrent_jobsGauge17.3最大并发运行 Sidekiq 作业数worker
sidekiq_concurrency_limit_deferred_jobs_totalCounter17.3延迟的 Sidekiq 作业总数worker
sidekiq_concurrency_limit_queue_jobs_totalCounter17.6用于计算由于并发限制而在等待队列中的作业数量的代理。它必须被解释为 max(idelta(sidekiq_concurrency_limit_queue_jobs_total[1m)) 以查看总队列大小。与其他计数器不同,此计数器的总体 rate 无意义。worker
sidekiq_concurrency_limit_current_concurrent_jobs_totalCounter17.6用于计算并发运行作业数量的代理。它必须被解释为 max(idelta(sidekiq_concurrency_limit_current_concurrent_jobs_total[1m)) 以查看并发作业的数量。与其他计数器不同,此计数器的总体 rate 无意义。worker
geo_db_replication_lag_secondsGauge10.2数据库复制延迟(秒)url
geo_repositoriesGauge10.2计划在 18.0 中删除。被 geo_project_repositories 取代。主服务器上可用的存储库总数url
geo_lfs_objectsGauge10.2主服务器上的 LFS 对象数量url
geo_lfs_objects_checksummedGauge14.6在主服务器上成功计算校验和的 LFS 对象数量url
geo_lfs_objects_checksum_failedGauge14.6在主服务器上计算校验和失败的 LFS 对象数量url
geo_lfs_objects_checksum_totalGauge14.6需要在主服务器上计算校验和的 LFS 对象数量url
geo_lfs_objects_syncedGauge10.2在次服务器上同步的可同步 LFS 对象数量url
geo_lfs_objects_failedGauge10.2在次服务器上同步失败的可同步 LFS 对象数量url
geo_lfs_objects_registryGauge14.6注册表中的 LFS 对象数量url
geo_lfs_objects_verifiedGauge14.6在次服务器上成功验证的 LFS 对象数量url
geo_lfs_objects_verification_failedGauge14.6在次服务器上验证失败的 LFS 对象数量url
geo_lfs_objects_verification_totalGauge14.6尝试在次服务器上验证的 LFS 对象数量url
geo_last_event_idGauge10.2主服务器上最新事件日志条目的数据库 IDurl
geo_last_event_timestampGauge10.2主服务器上最新事件日志条目的 UNIX 时间戳url
geo_cursor_last_event_idGauge10.2次服务器处理的事件日志的最后数据库 IDurl
geo_cursor_last_event_timestampGauge10.2次服务器处理的事件日志的最后 UNIX 时间戳url
geo_status_failed_totalCounter10.2从 Geo 节点检索状态失败的次数url
geo_last_successful_status_check_timestampGauge10.2状态成功更新的最后时间戳url
geo_package_filesGauge13.0主服务器上的软件包文件数url
geo_package_files_checksummedGauge13.0在主服务器上计算校验和的软件包文件数url
geo_package_files_checksum_failedGauge13.0在主服务器上计算校验和失败的软件包文件数url
geo_package_files_syncedGauge13.3在次服务器上同步的可同步软件包文件数url
geo_package_files_failedGauge13.3在次服务器上同步失败的可同步软件包文件数url
geo_package_files_registryGauge13.3注册表中的软件包文件数url
geo_terraform_state_versionsGauge13.5主服务器上的 Terraform 状态版本数url
geo_terraform_state_versions_checksummedGauge13.5在主服务器上成功计算校验和的 Terraform 状态版本数url
geo_terraform_state_versions_checksum_failed仪表盘指标(Gauge)13.5在主节点上无法计算校验和的 Terraform 状态版本数量url
geo_terraform_state_versions_checksum_total仪表盘指标(Gauge)13.12在主节点上需要计算校验和的 Terraform 状态版本数量url
geo_terraform_state_versions_synced仪表盘指标(Gauge)13.5在从节点上已同步的可同步 Terraform 状态版本数量url
geo_terraform_state_versions_failed仪表盘指标(Gauge)13.5在从节点上同步失败的可同步 Terraform 状态版本数量url
geo_terraform_state_versions_registry仪表盘指标(Gauge)13.5注册表中的 Terraform 状态版本数量url
geo_terraform_state_versions_verified仪表盘指标(Gauge)13.12在从节点上已成功验证的 Terraform 状态版本数量url
geo_terraform_state_versions_verification_failed仪表盘指标(Gauge)13.12在从节点上验证失败的 Terraform 状态版本数量url
geo_terraform_state_versions_verification_total仪表盘指标(Gauge)13.12在从节点上需要尝试验证的 Terraform 状态版本数量url
global_search_bulk_cron_queue_size仪表盘指标(Gauge)12.10已弃用,计划在 18.0 版本中移除。已被 search_advanced_bulk_cron_queue_size 取代。等待同步到 Elasticsearch 的增量数据库更新数量
global_search_bulk_cron_initial_queue_size仪表盘指标(Gauge)13.1已弃用,计划在 18.0 版本中移除。已被 search_advanced_bulk_cron_initial_queue_size 取代。等待同步到 Elasticsearch 的初始数据库更新数量
global_search_awaiting_indexing_queue_size仪表盘指标(Gauge)13.2已弃用,计划在 18.0 版本中移除。已被 search_advanced_awaiting_indexing_queue_size 取代。在索引暂停时等待同步到 Elasticsearch 的数据库更新数量
search_advanced_bulk_cron_queue_size仪表盘指标(Gauge)17.6等待同步到 Elasticsearch 的增量数据库更新数量
search_advanced_bulk_cron_initial_queue_size仪表盘指标(Gauge)17.6等待同步到 Elasticsearch 的初始数据库更新数量
search_advanced_bulk_cron_embedding_queue_size仪表盘指标(Gauge)17.6等待同步到 Elasticsearch 的嵌入更新数量
search_advanced_awaiting_indexing_queue_size仪表盘指标(Gauge)17.6在索引暂停时等待同步到 Elasticsearch 的数据库更新数量
geo_merge_request_diffs仪表盘指标(Gauge)13.4主节点上的合并请求差异数量url
geo_merge_request_diffs_checksum_total仪表盘指标(Gauge)13.12主节点上需要计算校验和的合并请求差异数量url
geo_merge_request_diffs_checksummed仪表盘指标(Gauge)13.4主节点上已成功计算校验和的合并请求差异数量url
geo_merge_request_diffs_checksum_failed仪表盘指标(Gauge)13.4主节点上无法计算校验和的合并请求差异数量url
geo_merge_request_diffs_synced仪表盘指标(Gauge)13.4从节点上已同步的可同步合并请求差异数量url
geo_merge_request_diffs_failed仪表盘指标(Gauge)13.4从节点上同步失败的可同步合并请求差异数量url
geo_merge_request_diffs_registry仪表盘指标(Gauge)13.4注册表中的合并请求差异数量url
geo_merge_request_diffs_verification_total仪表盘指标(Gauge)13.12在从节点上需要尝试验证的合并请求差异数量url
geo_merge_request_diffs_verified仪表盘指标(Gauge)13.12在从节点上已成功验证的合并请求差异数量url
geo_merge_request_diffs_verification_failed仪表盘指标(Gauge)13.12在从节点上验证失败的合并请求差异数量url
geo_snippet_repositories仪表盘指标(Gauge)13.4主节点上的代码片段仓库数量url
geo_snippet_repositories_checksummed仪表盘指标(Gauge)13.4主节点上已计算校验和的代码片段仓库数量url
geo_snippet_repositories_checksum_failed仪表盘指标(Gauge)13.4主节点上无法计算校验和的代码片段仓库数量url
geo_snippet_repositories_synced仪表盘指标(Gauge)13.4从节点上已同步的可同步代码片段仓库数量url
geo_snippet_repositories_failed仪表盘指标(Gauge)13.4从节点上同步失败的可同步代码片段仓库数量url
geo_snippet_repositories_registry仪表盘指标(Gauge)13.4注册表中的可同步代码片段仓库数量url
geo_group_wiki_repositories仪表盘指标(Gauge)13.10主节点上的群组维基仓库数量url
geo_group_wiki_repositories_checksum_total仪表盘指标(Gauge)16.3主节点上需要计算校验和的群组维基仓库数量url
geo_group_wiki_repositories_checksummed仪表盘指标(Gauge)13.10主节点上已成功计算校验和的群组维基仓库数量url
geo_group_wiki_repositories_checksum_failed仪表盘指标(Gauge)13.10主节点上无法计算校验和的群组维基仓库数量url
geo_group_wiki_repositories_synced仪表盘指标(Gauge)13.10从节点上已同步的可同步群组维基仓库数量url
geo_group_wiki_repositories_failed仪表盘指标(Gauge)13.10从节点上同步失败的可同步群组维基仓库数量url
geo_group_wiki_repositories_registry仪表盘指标(Gauge)13.10注册表中的群组维基仓库数量url
geo_group_wiki_repositories_verification_total仪表盘指标(Gauge)16.3在从节点上需要尝试验证的群组维基仓库数量url
geo_group_wiki_repositories_verified仪表盘指标(Gauge)16.3在从节点上已成功验证的群组维基仓库数量url
geo_group_wiki_repositories_verification_failed仪表盘指标(Gauge)16.3在从节点上验证失败的群组维基仓库数量url
geo_pages_deployments仪表盘指标(Gauge)14.3主节点上的页面部署数量url
geo_pages_deployments_checksum_total仪表盘指标(Gauge)14.6主节点上需要计算校验和的页面部署数量url
geo_pages_deployments_checksummed仪表盘指标(Gauge)14.6主节点上已成功计算校验和的页面部署数量url
geo_pages_deployments_checksum_failed仪表盘指标(Gauge)14.6主节点上无法计算校验和的页面部署数量url
geo_pages_deployments_synced仪表盘指标(Gauge)14.3从节点上已同步的可同步页面部署数量url
geo_pages_deployments_failed仪表盘指标(Gauge)14.3从节点上同步失败的可同步页面部署数量url
geo_pages_deployments_registry仪表盘指标(Gauge)14.3注册表中的页面部署数量url
geo_pages_deployments_verification_total仪表盘指标(Gauge)14.6在从节点上需要尝试验证的页面部署数量url
geo_pages_deployments_verified仪表盘指标(Gauge)14.6在从节点上已成功验证的页面部署数量url
geo_pages_deployments_verification_failed仪表盘指标(Gauge)14.6在从节点上验证失败的页面部署数量url
geo_job_artifacts仪表盘指标(Gauge)14.8主节点上的作业工件数量url
geo_job_artifacts_checksum_total仪表盘指标(Gauge)14.8在主节点上需要计算校验和的作业工件数量url
geo_job_artifacts_checksummed仪表盘指标(Gauge)14.8在主节点上已成功计算校验和的作业工件数量url
geo_job_artifacts_checksum_failed仪表盘指标(Gauge)14.8在主节点上无法计算校验和的作业工件数量url
geo_job_artifacts_synced仪表盘指标(Gauge)14.8在从节点上已同步的可同步作业工件数量url
geo_job_artifacts_failed仪表盘指标(Gauge)14.8在从节点上同步失败的可同步作业工件数量url
geo_job_artifacts_registry仪表盘指标(Gauge)14.8注册表中的作业工件数量url
geo_job_artifacts_verification_total仪表盘指标(Gauge)14.8在从节点上需要尝试验证的作业工件数量url
geo_job_artifacts_verified仪表盘指标(Gauge)14.8在从节点上已成功验证的作业工件数量url
geo_job_artifacts_verification_failed仪表盘指标(Gauge)14.8在从节点上验证失败的作业工件数量url
limited_capacity_worker_running_jobs仪表盘指标(Gauge)13.5正在运行的作业数量worker
limited_capacity_worker_max_running_jobs仪表盘指标(Gauge)13.5可运行的最大作业数量worker
limited_capacity_worker_remaining_work_count仪表盘指标(Gauge)13.5等待入队的作业数量worker
destroyed_job_artifacts_count_total计数器(Counter)13.6已销毁的过期作业工件数量
destroyed_pipeline_artifacts_count_total计数器(Counter)13.8已销毁的过期流水线工件数量
极狐gitlab_optimistic_locking_retries直方图(Histogram)13.10执行乐观重试锁的重试次数
geo_uploads仪表盘指标(Gauge)14.1主节点上的上传数量url
geo_uploads_synced仪表盘指标(Gauge)14.1从节点上已同步的可同步上传数量url
geo_uploads_failed仪表盘指标(Gauge)14.1从节点上同步失败的可同步上传数量url
geo_uploads_registry仪表盘指标(Gauge)14.1注册表中的上传数量url
geo_uploads_checksum_total仪表盘指标(Gauge)14.6在主节点上需要计算校验和的上传数量url
geo_uploads_checksummed仪表盘指标(Gauge)14.6在主节点上已成功计算校验和的上传数量url
geo_uploads_checksum_failed仪表盘指标(Gauge)14.6在主节点上无法计算校验和的上传数量url
geo_uploads_verification_total仪表盘指标(Gauge)14.6在从节点上需要尝试验证的上传数量url
geo_uploads_verified仪表盘指标(Gauge)14.6在从节点上已成功验证的上传数量url
geo_uploads_verification_failed仪表盘指标(Gauge)14.6在从节点上验证失败的上传数量url
geo_container_repositories仪表盘指标(Gauge)15.4主节点上的容器仓库数量url
geo_container_repositories_synced仪表盘指标(Gauge)15.4从节点上已同步的可同步容器仓库数量url
geo_container_repositories_failed仪表盘指标(Gauge)15.4从节点上同步失败的可同步容器仓库数量url
geo_container_repositories_registry仪表盘指标(Gauge)15.4注册表中的容器仓库数量url
geo_container_repositories_checksum_total仪表盘指标(Gauge)15.10在主节点上已成功计算校验和的容器仓库数量url
geo_container_repositories_checksummed仪表盘指标(Gauge)15.10在主节点上尝试计算校验和的容器仓库数量url
geo_container_repositories_checksum_failed仪表盘指标(Gauge)15.10在主节点上无法计算校验和的容器仓库数量url
geo_container_repositories_verification_total仪表盘指标(Gauge)15.10在从节点上尝试进行验证的容器仓库数量url
geo_container_repositories_verified仪表盘指标(Gauge)15.10在从节点上已验证的容器仓库数量url
geo_container_repositories_verification_failed仪表盘指标(Gauge)15.10在从节点上验证失败的容器仓库数量url
geo_ci_secure_files仪表盘指标(Gauge)15.3主节点上的持续集成(CI)安全文件数量url
geo_ci_secure_files_checksum_total仪表盘指标(Gauge)15.3在主节点上需要计算校验和的持续集成(CI)安全文件数量url
geo_ci_secure_files_checksummed仪表盘指标(Gauge)15.3在主节点上已成功计算url

数据库负载均衡指标#

  1. Tier: 专业版, 旗舰版
  2. Offering: 私有化部署

以下指标可用:

MetricTypeSinceDescriptionLabels
db_load_balancing_hosts仪表盘指标(Gauge)12.3当前负载均衡主机的数量
sidekiq_load_balancing_count计数器(Counter)13.11使用数据一致性设置为“粘性(:sticky)”或“延迟(:delayed)”的负载均衡的 Sidekiq 作业数量队列(queue), 边界(boundary), 外部依赖(external_dependencies), 功能类别(feature_category), 作业状态(job_status), 紧急程度(urgency), 数据一致性(data_consistency), 负载均衡策略(load_balancing_strategy)
gitlab_transaction_caught_up_replica_pick_count_total计数器(Counter)14.1针对已赶上的副本的搜索尝试次数结果(result)

数据库分区指标#

  1. Tier: 专业版, 旗舰版
  2. Offering: 私有化部署

以下指标可用:

指标类型自版本描述
db_partitions_present仪表盘指标(Gauge)13.4当前存在的数据库分区数量
db_partitions_missing仪表盘指标(Gauge)13.4当前预期存在但实际缺失的数据库分区数量

连接池指标#

这些指标记录了数据库连接池的状态,并且所有指标都有这些标签:

  1. class - 被记录的 Ruby 类。
    • ActiveRecord::Base 是主数据库连接。
    • Geo::TrackingBase 是连接到 Geo 跟踪数据库的,如果启用的话。
  2. host - 用于连接到数据库的主机名。
  3. port - 用于连接到数据库的端口。
指标类型自版本描述
gitlab_database_connection_pool_size仪表盘指标(Gauge)13.0数据库连接池的总容量
gitlab_database_connection_pool_connections仪表盘指标(Gauge)13.0连接池中当前的连接数量
gitlab_database_connection_pool_busy仪表盘指标(Gauge)13.0正在使用且所属对象仍存活的连接数量
gitlab_database_connection_pool_dead仪表盘指标(Gauge)13.0正在使用但所属对象已失效的连接数量
gitlab_database_connection_pool_idle仪表盘指标(Gauge)13.0未被使用的连接数量
gitlab_database_connection_pool_waiting仪表盘指标(Gauge)13.0当前正在此队列中等待的线程数量

Ruby 指标#

一些基本的 Ruby 运行指标可用:

指标类型自版本描述
ruby_gc_duration_seconds计数器(Counter)11.1Ruby 进行垃圾回收(GC)所花费的时间
ruby_gc_stat_...仪表盘指标(Gauge)11.1来自 GC.stat 的各种指标
ruby_gc_stat_ext_heap_fragmentation仪表盘指标(Gauge)15.2Ruby 堆的碎片化程度,以存活对象与伊甸园槽位的比例衡量(范围从 0 到 1)
ruby_file_descriptors仪表盘指标(Gauge)11.1每个进程的文件描述符数量
ruby_sampler_duration_seconds计数器(Counter)11.1收集统计信息所花费的时间
ruby_process_cpu_seconds_total仪表盘指标(Gauge)12.0每个进程的 CPU 总使用时间
ruby_process_max_fds仪表盘指标(Gauge)12.0每个进程可打开的最大文件描述符数量
ruby_process_resident_memory_bytes仪表盘指标(Gauge)12.0进程的内存使用量(常驻集大小,RSS)
ruby_process_resident_anon_memory_bytes仪表盘指标(Gauge)15.6进程的匿名内存使用量(常驻集大小,RSS)
ruby_process_resident_file_memory_bytes仪表盘指标(Gauge)15.6进程由文件支持的内存使用量(常驻集大小,RSS)
ruby_process_unique_memory_bytes仪表盘指标(Gauge)13.0进程的内存使用量(唯一集大小,USS)
ruby_process_proportional_memory_bytes仪表盘指标(Gauge)13.0进程的内存使用量(比例集大小,PSS)
ruby_process_start_time_seconds仪表盘指标(Gauge)12.0进程启动时间的 UNIX 时间戳

Puma 指标#

指标类型自版本描述
puma_workers仪表盘指标(Gauge)12.0工作进程的总数
puma_running_workers仪表盘指标(Gauge)12.0已启动的工作进程数量
puma_stale_workers仪表盘指标(Gauge)12.0旧的工作进程数量
puma_running仪表盘指标(Gauge)12.0正在运行的线程数量
puma_queued_connections仪表盘指标(Gauge)12.0该工作进程的“待处理”集合中等待工作线程处理的连接数量
puma_active_connections仪表盘指标(Gauge)12.0正在处理请求的线程数量
puma_pool_capacity仪表盘指标(Gauge)12.0该工作进程当前能够处理的请求数量
puma_max_threads仪表盘指标(Gauge)12.0工作线程的最大数量
puma_idle_threads仪表盘指标(Gauge)12.0已生成但未处理请求的线程数量

Redis 指标#

这些客户端指标旨在补充 Redis 服务器指标。这些指标根据每个Redis 实例分解。这些指标都有一个 storage 标签,指示 Redis 实例。例如,cacheshared_state

指标类型自版本描述
gitlab_redis_client_exceptions_total计数器13.2Redis 客户端异常的数量,按异常类细分
gitlab_redis_client_requests_total计数器13.2Redis 客户端请求的数量
gitlab_redis_client_requests_duration_seconds直方图13.2Redis 请求延迟,不包括阻塞命令
gitlab_redis_client_redirections_total计数器15.10Redis 集群 MOVED/ASK 重定向的数量,按重定向类型细分
gitlab_redis_client_requests_pipelined_commands直方图16.4发送到单个 Redis 服务器的每个管道中的命令数量
gitlab_redis_client_pipeline_redirections_count直方图17.0管道中 Redis 集群重定向的数量

Git LFS 指标#

用于跟踪各种 Git LFS 功能的指标。

指标类型自版本描述
gitlab_sli_lfs_update_objects_total计数器16.10总共更新的大文件存储(LFS)对象数量
gitlab_sli_lfs_update_objects_error_total计数器16.10总共更新 LFS 对象时出现的错误数量
gitlab_sli_lfs_check_objects_total计数器16.10总共检查的 LFS 对象数量
gitlab_sli_lfs_check_objects_error_total计数器16.10总共检查 LFS 对象时出现的错误数量
gitlab_sli_lfs_validate_link_objects_total计数器16.10总共验证的 LFS 链接对象数量
gitlab_sli_lfs_validate_link_objects_error_total计数器16.10总共验证 LFS 链接对象时出现的错误数量

指标共享目录#

极狐GitLab Prometheus 客户端需要一个目录来存储在多进程服务之间共享的指标数据。这些文件在所有运行于 Puma 服务器的实例之间共享。该目录必须可供所有运行的 Puma 的进程访问,否则指标无法正常工作。

该目录的位置是通过环境变量 prometheus_multiproc_dir 配置的。为了获得最佳性能,请在 tmpfs 中创建此目录。

如果使用 Linux 软件包安装极狐GitLab,并且 tmpfs 可用,那么极狐GitLab 会为您配置指标目录。