Grafana
Version 22.5 by Peter Wurbs on 2025/04/10 09:29
Content
- Content
- Introduction
- Accessing Grafana
- Users, Projects, Organizations and Roles
- Main Functions
- Metrics of DevOps-as-a-Servic
Introduction
Grafana is an open-source platform for monitoring and visualizing time-series data from sources like Prometheus, Loki, Databases etc. It allows users to create interactive dashboards and alerts to track system performance and trends in real time.
There is good documentation to start using Grafana:
There is a great possibility to play with Grafana using the Grafana Playground.
Accessing Grafana
- Grafana as part of the DevOps-as-a-Service toolchain can be accessed by either
- DevOps Portal Homepage --> Grafana Tile
- or directly use the URL https://grafana-<customer>.devops.t-systems.net
- DevOps Portal Homepage --> Grafana Tile
- Preconditions in DevOps portal to access Grafana:
- A Grafana license must be assigned to the user
- Grafana must be added to the tool list of the project
- If you are not already logged in to another tool in the toolchain, then you have to login using your configured SSO credentials.
- When you see this message after entering your credentials, then you don't have a Grafana license assigned in the DevOps portal:
Users, Projects, Organizations and Roles
- Projects, users and their roles in projects are managed in the DevOps portal, the corresponding functions in Grafana are disabled (UI and API)
- Projects in DevOps portal are mapped to Organizations in Grafana. This means, when there is a new project in the portal having Grafana as a configured tool, then there is a new Grafana "Org". Users assigned to a project in the portal are then assigned to a Grafana Org applying the configured roles.
- Role mapping:
Project Role in DevOps Portal Grafana Organization Role Permissions in Grafana Viewer Viewer Can view dashboards and alerts Developer / Master Editor Can create/edit dashboards and alerts and use the Explore function Admin Admin Has full permissions within the Grafana org, e.g. can setup datasources, manage folders, teams and service accounts A detailed description of the Grafana role model can be found here.
- Role mapping:
- There is an additional permission management possible on folder level. A folder contains a set of dashboards. A project admin can create folders and manage specific permissions for this folder using Grafana. See this link for further information. Folder permissions management is out of scope of the user management in the DevOps portal.
- A project admin is entitled to create and manage "Service Accounts" in Grafana and grant permissions in the specific organization. A Service Account belongs to an Organization (Project) and not to an user. Service Accounts can be used for systems which want to work wit the Grafana API for any automation purposes. See this link for further information. Service Account management is done directly in Grafana and is out of scope of the user management in the DevOps portal.
- If you are assigned to more than one project in the DevOps portal, having Grafana configured as tool, then you can switch between Organizations in Grafana. Go to the top left corner, click on the Org list and select any other Grafana Organization (project), you want to switch to.
When you work in Grafana, always make sure that you chose the intended Organization.
Main Functions
Datasources
- Before you can setup dashboards and alerts, you have to setup datasources. Grafana itself is only a visualization tool, for data gathered via datasources.
- Datasources are created/managed per Grafana Organization.
- The Admin role is required to setup and manage datasources.
- Most common datasources are configured for
- Prometheus to visualize metrics
- Loki to search and visualize logs
- MySQL, PostgreSQL to access and visualize database data
- Many possible datasource types are preinstalled as built-in plugins and can be used
- Datasource are set up via Menu panel --> Connections --> Datasources
- Detailed information can be found via this link.
Explore
- Based on set up datasources, users owning the Edit or Admin role can explore provided data using the "Explore" function.
- "Explore" can be used for:
- Check provided data, contained labels
- Search for specific data
- Quickly execute queries and generate visualization panels
- Generate queries later to be used in dashboards
- "Explore" function can be found in the Menu panel
- Detailed information can be found via this link
Dashboards
- Dashboards are the way to visualize metrics, logs and other data.
- Dashboards are a collection of "Panels". Each panel is of a specific type (stat, time series, table, log...). Many Panel Plugins are preinstalled and can be used.
- Data are displayed based on queries which are the main part of a panel configuration.
- Dashboards can be created and edited by users owning the Editor or Admin role
- "Dashboard" function can be in the Menu panel
- There is a good guideline about the first steps.
- Detailed information can be found via this link.
Alerts
- Based on the data gathered via datasources, alerts can be defined.
- In contrast to the classic alerting, the new Grafana Unified Alerting is set up mostly independent of specific dashboards.
- Alerting configuration is split into
- Alert rules
- Contact points
- Notification policies
- How it works
- Grafana alerting periodically queries data sources and evaluates the condition defined in the alert rule
- If the condition is breached, an alert instance fires
- Firing instances are routed to notification policies based on matching labels
- Notifications are sent out to the contact points specified in the notification policy
- Many contact point types like E-Mail, Teams, Slack, Pushover etc. are available and can be configured.
- "Alerting" function can be in the Menu panel
- Detailed information can be found via this link.