Setup Teams/Users With Limited Access in Percona Monitoring and Management
From time to time we are asked how to limit users to viewing only some dashboards or servers in Percona Monitoring and Management (PMM). Here are some hints on how to do this.
Let’s imagine you want the following:
user2are only allowed to see the “CPU Utilization Details” dashboard for
user3is only allowed to see the “CPU Utilization Details” dashboard for
- All users are allowed to see MySQL dashboards for any services.
1. First, let’s create users
user3. Their roles should be set to “Viewer”.
2. Now let’s create two folders,
3. We limit folder access on “Team1” to User1/User2, and folder “Team2” to User3
4. Viewer (Role) has to be excluded for all original folders except for MySQL. In our situation, all users are allowed access to MySQL dashboards.
5. Now we make copies of the “CPU Utilization Details” dashboard in folders “Team1” and “Team2”
So now users can view only dashboards in folder “MySQL” and “Team1″/”Team2”. In the next step, we will apply limits by servers.
6. We are going to limit servers for dashboards to new folders. To do this, we must modify the
Navigate to “Setting” … “Variables” … “node_name”
Allowed servers are added into the field “Regex”
That’s it. Let’s login as user1 and check what we’ve got.
(Please notice that the Home dashboard is located in the folder “Internal” so it’s not allowed for our users either. So the list of allowed dashboards can be accessed through the left menu only.)
As we can see, MySQL dashboards and “CPU Utilization Details” dashboards are accessible. But let’s also check the servers in the dropdown list of the last dashboard.
So it’s correct; User1 can see data for pmm-server.
You can read more about this in the official Grafana documentation, in the section “Manage users“. Also, please keep in mind that users with “Editor” role have access to dashboards settings and can remove or modify regex filtering for servers/services. So it’s better to avoid assigning the “Editor” role to users in the provided solution.
by Vadim Yalovets via Percona Database Performance Blog