介绍
Grafana 是一个出色的画图工具。可以添加丰富的数据源,包括有Zabbix数据源,Prometheus数据源,Mysql数据源等等。并且有他自己的查询语法。要玩好它也是不容易的。
官方文档: Grafana documentation | Grafana documentation
三个权限
(1)Admin Role
- Can add, edit, and delete data sources.
- Can add and edit users and teams in their organization.
- Can add, edit, and delete folders containing dashboards for data sources associated with their organization.
- Can configure app plugins and organization settings.
- Can do everything allowed by the Editor role.
(2)Edit Role
- Can view, add, and edit dashboards, panels, and alert rules in dashboards they have access to. This can be disabled on specific folders and dashboards.
- Can create, update, or delete playlists.
- Can access Explore.
- Can add, edit, or delete alert notification channels.
- Cannot add, edit, or delete data sources.
- Cannot manage other organizations, users, and teams.
(3)Viewer Role
- Can view any dashboard they have access to. This can be disabled on specific folders and dashboards.
- Cannot add, edit, or delete data sources.
- Cannot add, edit, or delete dashboards or panels.
- Cannot create, update, or delete playlists.
- Cannot add, edit, or delete alert notification channels.
- Cannot access Explore.
- Cannot manage other organizations, users, and teams.
权限控制
(1)添加用户
Congiuration---> user--> Invite User
添加的用户默认是 Main org,如果我们设置角色为 view 的话,这个组织里所有的大盘默认可以看见。
(2)添加用户组
Congiuration---> Teams--> New Team
(3) 将用户添加到相应的组
(4) Configuration里的用户和Server Admin的用户需要一一对应。
需求
需求1:
比如我们运维新建了很多大盘,但是有些开发的负责人想要看某些项目的状态指标,比如服务器的流量,CPU的使用率,JVM等信息。但是运维人员并不想要他能看所有的大盘。也就是说不同的业务开发项目组。
解决方法(一):
只能看到对应的开发大盘,不能看其他的大盘。设置方法如下,我们把默认的 Main org 盘去掉曲线,然后新建一个 Dev org的组,设置权限为 viewer。然后我们新的组织里设置添加大盘就行了。
当然你可以导出原有的Main-org的大盘到新的 Dev-Org 大盘。