Skip to content

Count number of projects with active Prometheus Service

What does this MR do?

Implements #263521 (closed)

Adds projects_with_prometheus_service_enabled usage ping. To count the number of projects with Prometheus Service activated.

Event added to Event Dictionary

DB Queries

Generated by

::Gitlab::UsageData.count(::PrometheusService.active)
SELECT MIN("services"."id")
FROM "services"
WHERE "services"."type" = 'PrometheusService' AND "services"."active" = TRUE
SELECT MAX("services"."id")
FROM "services"
WHERE "services"."type" = 'PrometheusService' AND "services"."active" = TRUE
SELECT COUNT("services"."id")
FROM "services"
WHERE "services"."type" = 'PrometheusService' AND 
"services"."active" = TRUE AND
"services"."project_id" IS NOT NULL AND
"services"."id" >= 12 AND
"services"."id" < 100000

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Vitali Tatarintev

Merge request reports