匿名身份验证
您可以通过在配置文件中启用匿名访问,使 Grafana 无需任何登录即可访问。
注意
在 Grafana Enterprise 中,匿名用户作为活跃用户收费
开始之前
要查看设备,您需要
- 通常仅授予服务器管理员的 users:read 权限,允许您读取用户和设备标签页。
匿名设备
匿名设备功能增强了对 Grafana 实例中匿名访问的管理和监控。此功能是正在进行的努力的一部分,旨在提供对匿名使用情况的更多控制和透明度。
用户现在可以查看匿名使用统计信息,包括过去 30 天内的设备和用户数量。
- 前往 管理 -> 用户 访问匿名设备标签页。
- 使用统计页面 -> 使用和统计页面新增一项统计数据,显示过去 30 天的活跃匿名设备。
默认情况下,匿名设备的数量不受限制。配置选项 device_limit 允许您强制限制匿名设备的数量。这使您能够更好地控制 Grafana 实例内的使用情况,并将使用量保持在环境限制范围内。达到限制后,任何尝试访问 Grafana 的新设备都将被拒绝访问。
对于版本 10.2、10.3、10.4,要显示匿名用户和设备,您需要启用功能开关 displayAnonymousStats
[feature_toggles]
enable = displayAnonymousStats
配置
示例
[auth.anonymous]
enabled = true
# Organization name that should be used for unauthenticated users
org_name = Main Org.
# Role for unauthenticated users, other valid values are `Editor` and `Admin`
org_role = Viewer
# Hide the Grafana version text from the footer and help tooltip for unauthenticated users (default: false)
hide_version = true
# Setting this limits the number of anonymous devices in your instance. Any new anonymous devices added after the limit has been reached will be denied access.
device_limit =
如果您在 Grafana UI 中更改了组织名称,此设置需要更新以匹配新名称。