Skip to content

ROX-28326: Custom Prometheus metrics #95141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: rhacs-docs-main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions _topic_maps/_topic_map.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ Topics:
File: managing-preview-features
- Name: Configuring and integrating the RHACS plugin with Red Hat Developer Hub
File: configuring-and-integrating-the-rhacs-plugin-with-red-hat-developer-hub
- Name: Configuring Custom Prometheus metrics
File: configure-custom-prometheus-metrics
---
Name: Operating
Dir: operating
Expand Down
48 changes: 48 additions & 0 deletions configuration/configure-custom-prometheus-metrics.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[id="configure-custom-prometheus-metrics"]
= Configuring custom Prometheus metrics
include::modules/common-attributes.adoc[]
:context: configure-custom-prometheus-metrics

toc::[]

[role="_abstract"]
With {product-title}, you can enable some Prometheus metrics to be exposed on the `/metrics` path of the central API endpoint.

The available metric categories include:

* Image vulnerabilities.

Each category is configured with a data gathering period and a list of metrics. A metric is associated with a set of labels.

[NOTE]
====
The `/metrics` path is accessible for API tokens with Administration resource view permissions. The values of the labels are subject to Scoped Access Control.
====

The currently enabled metrics, if any, are shown on the *System Configuration* page of the *Platform Configuration* section of the {product-title} UI. In edit mode, the UI allows you to enable or disable one of the predefined metrics.

The `/v1/config` API allows for configuring metrics with custom metric names and a custom set of labels.

Accepted image vulnerability labels:

* Cluster
* Namespace
* Deployment
* IsPlatformWorkload
* ImageID
* ImageRegistry
* ImageRemote
* ImageTag
* Component
* ComponentVersion
* OperatingSystem
* CVE
* CVSS
* Severity
* SeverityV2
* SeverityV3
* IsFixable

[role="_additional-resources"]
.Additional resources
* xref:modules/rbac-resource-definitions.adoc[Resource definitions]