Metrics

The MediaWiki charm exposes workload metrics in the OpenMetrics format through the metrics-endpoint relation, which is part of the COS observability integration. Once the charm is integrated with a metrics consumer such as prometheus-k8s, the metrics described below are scraped and can be queried directly or visualized through the bundled Grafana dashboard.

See also

For more information about the Canonical Observability Stack and its components, refer to the COS documentation.

Apache metrics

The apache-exporter service runs continuously and collects metrics from the Apache /server-status endpoint, which is otherwise only reachable from within the same Kubernetes pod. The exporter publishes them under the apache_* prefix (for example: apache_accesses_total, apache_workers, apache_scoreboard, apache_sent_kilobytes_total, apache_cpuload).

For the full list of exported metrics and their meanings, refer to the Apache exporter documentation.

Native MediaWiki metrics

The charm exposes MediaWiki’s built-in instrumentation through statsd-exporter when a metrics-endpoint consumer is related. Removing the last consumer disables native metrics during workload reconciliation.

The available metrics depend on the MediaWiki version, enabled extensions, and application activity. The charm does not provide additional instrumentation.

Git-sync metrics

  • Source: git-sync

  • Container: git-sync

  • Service: git-sync

The git-sync sidecar synchronizes extensions and skins from a remote Git repository. It is started with the --http-metrics flag so that it exposes its metrics under the git_sync_* prefix (for example: git_sync_count_total and git_sync_duration_seconds), and reports the number and duration of synchronization operations by status.

For more information about the sidecar and its --http-metrics flag, refer to the git-sync documentation.

PHP-FPM metrics

The PHP-FPM status page is scraped in OpenMetrics format. Its listener is reachable over the Kubernetes pod network and is not forwarded through Traefik; the status path remains denied on the public HTTP and HTTPS listeners.

For details about the exported metrics, refer to the PHP-FPM status page documentation.

Shellbox metrics

  • Container: shellbox

  • Services: apache-exporter, apache2

The Shellbox sidecar runs its own Apache and PHP-FPM. Its apache-exporter service publishes Apache metrics under the apache_* prefix, as described in Apache metrics.

PHP-FPM metrics come from PHP-FPM’s built-in status page. They are published under the phpfpm_* prefix (for example: phpfpm_accepted_connections, phpfpm_active_processes, phpfpm_listen_queue, phpfpm_max_children_reached, phpfpm_slow_requests).

For the meaning of each value, refer to the PHP-FPM status page documentation.