这是文档下一个版本的Grafana。最新的稳定版本,去最新版本

供应RBAC与Grafana

注意:可以在Grafana企业Grafana云先进

您可以创建、修改或删除自定义角色和创建或删除基本角色分配,通过添加一个或多个YAML的配置文件配置访问控制/目录中。

在启动Grafana执行配置。改变配置文件之后,您可以在运行时重新加载它。你不需要重新启动Grafana服务器为您的更改生效。

在你开始之前:

  • 确保您可以访问文件服务器Grafana正在运行。

使用配置管理和分配RBAC角色:

  1. 登录到Grafana服务器。

  2. 定位Grafana配置文件夹中。

  3. 创建一个新的YAML在以下文件夹:配置/访问控制。例如,配置/访问控制/ custom-roles.yml

  4. RBAC提供细节添加到配置文件中。看到管理RBAC角色分配RBAC角色指令,看到这个角色配置文件示例的一个完整的示例配置文件。

  5. 重新加载配置配置文件。

    关于在运行时重新加载配置配置的更多信息,请参考重新加载配置配置

使用Grafana配置角色配置文件示例

下面的示例显示了一个完整的YAML配置文件:

  • 创建自定义角色
  • 删除自定义角色
  • 更新基本角色权限
  • 将角色分配给团队
  • 取消作业为不同的团队角色

例子

- - - - - - # apiVersion配置文件版本:2 # <列表>的角色列表插入/更新/删除角色:# <字符串,要求>角色的名称你想创建或更新。必需的。——名称:“自定义:用户:作家”# <字符串> uid的角色。对所有组织必须是唯一的。uid: customuserswriter1 # <字符串>描述的作用,信息的目的。描述:创建、读取、写入用户的# < int >版本的角色,Grafana增加时将更新的作用。版本:2 # < int > org id。默认为Grafana如果未指定的默认。orgId: 1 # <列表>列表的权限授予这个角色。权限:# <字符串,要求>操作允许的。——“用户:读取”行动:# <字符串>它适用于范围。 scope: 'users:*' - action: 'users:write' scope: 'users:*' - action: 'users:create' - name: 'custom:global:users:reader' #  overwrite org id and creates a global role. global: true #  state of the role. Defaults to 'present'. If 'absent', role will be deleted. state: 'absent' #  force deletion revoking all grants of the role. force: true - uid: 'basic_editor' version: 2 global: true #  list of roles to copy permissions from. from: - uid: 'basic_editor' global: true - name: 'fixed:users:writer' global: true #  list of the permissions to add/remove on top of the copied ones. permissions: - action: 'users:read' scope: 'users:*' - action: 'users:write' scope: 'users:*' #  state of the permission. Defaults to 'present'. If 'absent', the permission will be removed. state: absent #  list role assignments to teams to create or remove. teams: #  name of the team you want to assign roles to. Required. - name: 'Users writers' #  org id. Will default to Grafana's default if not specified. orgId: 1 #  list of roles to assign to the team roles: #  uid of the role you want to assign to the team. - uid: 'customuserswriter1' #  org id. Will default to Grafana's default if not specified. orgId: 1 #  name of the role you want to assign to the team. - name: 'fixed:users:writer' #  overwrite org id to specify the role is global. global: true #  state of the assignment. Defaults to 'present'. If 'absent', the assignment will be revoked. state: absent

配置与起程拓殖RBAC的设置

Grafana供应