Skip to content

Labels for access control

Label-based access control in PMM allows you to manage who has access to metrics based on labels. By creating roles, you can specify which data can be queried based on specific label criteria, for instance, allowing the QA team to view data related to test environments.

With Label-based access control, you can associate multiple labels with a role, ensuring only data from series that match your defined labels is returned.

Standard vs custom labels

PMM supports standard as well as custom labels. PMM automatically assigns standard labels. You can also set standard labels when an object (Node, Service, or Agent) is created. Custom labels are assigned and updated only by a user.

Examples

Label Type Object Label name Example
Standard Node node_id /node_id/123
Service service_type - mysql, mongodb, postgresql etc.
Custom Node, Service, Agent Any string matching regular expression:
[a-zA-Z_][a-zA-Z0-9_]*.
Also, it cannot start with two underscores.
owner=”joe”
_rack=”12345”

Adding labels

You can add custom or standard labels in PMM while adding a service for monitoring in PMM.

Using PMM UI

You can set the labels using User interface as follows:

  1. From the Main menu, navigate to Configuration → Add Service.

  2. Select the service you want to add to PMM for monitoring. The page to add the service opens.

  3. Enter the details such as Hostname, Service name, Port, Username, Password, etc., along with Label or Custom labels.

!

Using pmm-admin

You can also assign labels using pmm-admin.

Get expert help

If you need assistance, you can find comprehensive and free database knowledge on our community forum or blog posts. For professional support and services, contact our Percona Database Experts.


Last update: 2024-02-19