Page MenuHomePhabricator

Qlever Prometheus Metrics
Closed, ResolvedPublic

Description

Qlever introduced Prometheus metrics export with MR 2817 (Demo Dashboard).

We should make use of these metrics. Enabling Kubernetes to fetch the metrics is as easy as adding the corresponding port with a name ending in -metrics.

AC:

  • The wdqs-qlever container is configured for Kubernetes to fetch the metrics
  • We report metrics in Grafana to track latency, memory, cpu, iops status during rebuild and swap

Details

Event Timeline

Example:

$ curl localhost:7001/metrics
# HELP qlever_index_rebuild_in_progress Whether an index rebuild is currently in progress (1) or not (0)
# TYPE qlever_index_rebuild_in_progress gauge
qlever_index_rebuild_in_progress 0
# HELP qlever_server_start_time_seconds Unix timestamp when the QLever server was started
# TYPE qlever_server_start_time_seconds gauge
qlever_server_start_time_seconds 1785233567
# HELP qlever_index_load_time_seconds Unix timestamp when the current index was loaded
# TYPE qlever_index_load_time_seconds gauge
qlever_index_load_time_seconds 1785233567
# HELP qlever_delta_triples Number of triples that are updated relative to the index
# TYPE qlever_delta_triples gauge
qlever_delta_triples 0
# HELP qlever_sparql_operation_running Number of SPARQL operations currently being processed
# TYPE qlever_sparql_operation_running gauge
qlever_sparql_operation_running{operation="query"} 0
qlever_sparql_operation_running{operation="update"} 0
# HELP qlever_memory_cache_used_bytes Memory used for caching
# TYPE qlever_memory_cache_used_bytes gauge
qlever_memory_cache_used_bytes 0
# HELP qlever_sparql_operation_finished_total Number of SPARQL operations successfully finished since server start
# TYPE qlever_sparql_operation_finished_total counter
qlever_sparql_operation_finished_total{operation="query"} 0
qlever_sparql_operation_finished_total{operation="update"} 0
# HELP qlever_memory_query_available_bytes Available memory for query processing
# TYPE qlever_memory_query_available_bytes gauge
qlever_memory_query_available_bytes 120000000000
# HELP qlever_sparql_operation_started_total Number of SPARQL operations started since server start
# TYPE qlever_sparql_operation_started_total counter
qlever_sparql_operation_started_total{operation="query"} 0
qlever_sparql_operation_started_total{operation="update"} 0
# HELP qlever_http_errors_total Errors during the execution of non SPARQL operations
# TYPE qlever_http_errors_total counter
qlever_http_errors_total{type="internal"} 0
qlever_http_errors_total{type="http"} 0
# HELP qlever_sparql_operation_errors_total Errors during the execution of SPARQL operations
# TYPE qlever_sparql_operation_errors_total counter
qlever_sparql_operation_errors_total{type="system_error"} 0
qlever_sparql_operation_errors_total{type="internal"} 0
qlever_sparql_operation_errors_total{type="syntax"} 0
qlever_sparql_operation_errors_total{type="timeout"} 0
qlever_sparql_operation_errors_total{type="send_streamable_response"} 0
qlever_sparql_operation_errors_total{type="protocol"} 0
qlever_sparql_operation_errors_total{type="in_use"} 0
# HELP qlever_memory_query_limit_bytes Memory allocated for query processing
# TYPE qlever_memory_query_limit_bytes gauge
qlever_memory_query_limit_bytes 120000000000
# HELP qlever_memory_cache_limit_bytes Memory allocated for caching
# TYPE qlever_memory_cache_limit_bytes gauge
qlever_memory_cache_limit_bytes 32000000000
trueg triaged this task as High priority.Jul 29 2026, 2:17 PM
trueg moved this task from Incoming to Backlog on the Wikidata Platform Team board.
trueg changed the task status from Open to In Progress.Aug 4 2026, 8:40 AM
trueg claimed this task.
trueg moved this task from Backlog to Sprint 07 (2026/07/07 on the Wikidata Platform Team board.

Change #1321948 had a related patch set uploaded (by Trueg; author: Trueg):

[operations/deployment-charts@master] WDQS: Enable prometheus metrics on Qlever

https://gerrit.wikimedia.org/r/1321948

Qlever metrics are now exposed and tracked in the WIP WDQS grafana board. The Qlever endpoint does not expose all metrics mentioned in the AC though.

Change #1321948 merged by jenkins-bot:

[operations/deployment-charts@master] WDQS: Enable prometheus metrics on Qlever

https://gerrit.wikimedia.org/r/1321948

@trueg Do we know the path to the remaining metrics in the AC?