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:
- Users
user1
anduser2
are only allowed to see the “CPU Utilization Details” dashboard forserver1
,server2
andpmm-server
; - User
user3
is only allowed to see the “CPU Utilization Details” dashboard forserver3
; - All users are allowed to see MySQL dashboards for any services.
1. First, let’s create users user1
, user2
, and user3
. Their roles should be set to “Viewer”.
2. Now let’s create two folders, Team1
and Team2
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 node_name
variables.
Navigate to “Setting” … “Variables” … “node_name”
Allowed servers are added into the field “Regex”
For Team1: /server1|server2|pmm-server/
For Team2: /server3/
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
Comments
Post a Comment