What you will learn in this TP
- Create teams and users through the API
- Separate folders per team
- Remove default permissions
- Create a time-limited service account
- Check each profile's access
Introduction #
What you will learn in this section
- Create teams and users through the API
- Separate folders per team
- Remove default permissions
- Create a time-limited service account
- Check each profile's access
Context. Your Grafana is shared by three departments. Today everyone sees and edits everything. You must separate them without creating three instances.
Prerequisites: a machine with Docker and Docker Compose, curl and jq · Estimated time: 60 min
Three teams, three protected folders, one user per team and a service account for CI.Setup #
Guided steps, with their solution.
1. Start Grafana
Why? A throwaway instance lets you test safely.
Start Grafana with Docker Compose and check/api/health.2. Create an admin service account
Why? Scripts must not use the admin account.
With theadminaccount, create thetp-adminservice account (Admin role) and a one-day token.3. Create teams and users
Why? Rights go to teams, never to people one by one.
Create the Production, Infrastructure and Development teams, one user (Viewer role) per team, and add each user to their team.4. One folder per team
Why? Without removing default permissions, every Viewer would see every folder.
Create one folder per team, give edit rights to the owning team and view rights to the Infrastructure team on the Production folder. Replace the default permissions.5. Check access
Why? Separation is proven by acting as each user.
With each user account, list visible folders. Then explain why, in Grafana OSS, the Development team could still query data sources from Explore.
Difficulty level : ●●●○○ (3/5)
My progress
Sign in to track your progress and take notes. Sign in
💬 Recent discussions about this course
- Grafana : une variable « service » qui dépend de la variable « environnement »✓ solved · 1 reply(ies)
Ask a question about this lesson →See all discussions about this course
Course Glossary
Alerting
The process of notifying teams (via email, Slack, Teams) when a specific event, threshold breach, or anomaly is detected.
HTTP Code 200 (OK)
An HTTP status code indicating that the client's request was successfully processed by the server.
HTTP Code 403 (Forbidden)
An HTTP status code indicating that the server understood the request but refuses to authorize it, usually due to a lack of permissions.
HTTP Code 404 (Not Found)
An HTTP status code indicating that the requested resource could not be found on the server.
Grafana
An open-source interactive data visualization platform that allows users to create, explore, and share analytic dashboards from multiple time-series d...
Recommended Articles
Grafana Assistant: AI at the service of observability
Discover Grafana Assistant, Grafana's AI assistant (Cloud, OSS and Enterprise). Learn how this la...
Grafana vs Kibana: which visualization tool to choose?
Discover the fundamental differences between Grafana, the king of multi-source metrics, and Kiban...
Grafana provisioning: automate the management of your dashboards and data sources
Learn how to use Grafana provisioning to manage your configuration (dashboards, data sources, not...
Git Sync in Grafana: version dashboards in GitHub
Sync Grafana dashboards and folders with a GitHub repository: prerequisites, token, setup in Admi...
Mimir: multi-tenancy, limits and runtime configuration
Isolate teams in Mimir: tenants and the X-Scope-OrgID header, gateway authentication, ingestion a...
Synthetic Monitoring in Grafana Cloud
Synthetic Monitoring in Grafana Cloud: HTTP, DNS, TCP, Ping, Traceroute, multi-step, k6 script an...
Application Observability in Grafana Cloud
Application Observability in Grafana Cloud: RED metrics from traces, service map, OpenTelemetry o...
Grafana Loki best practices: labels, queries, storage and costs
Loki best practices: choosing labels and cardinality, structured metadata, efficient LogQL querie...
Grafana IRM: on-call and incidents in Grafana Cloud
Grafana IRM in Grafana Cloud: on-call (OnCall) and incident management (Incident) combined. Alert...