Wiki source code of Grafana

Version 22.5 by Peter Wurbs on 2025/04/10 09:29

Hide last authors
Peter Wurbs 6.1 1 (% class="wikigeneratedid" %)
2 [[image:https://logowik.com/content/uploads/images/grafana-icon4114.logowik.com.webp||alt="Grafana Icon Logo PNG vector in SVG, PDF, AI, CDR format" data-xwiki-image-style-alignment="end" height="107" width="143"]]
3
4 = Content =
5
Peter Wurbs 5.1 6 {{toc/}}
7
Peter Wurbs 7.1 8 = Introduction =
Peter Wurbs 3.1 9
Peter Wurbs 4.1 10 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.
Peter Wurbs 7.1 11
Peter Wurbs 8.1 12 [[Vendor Page>>https://grafana.com/]]
Peter Wurbs 7.1 13
14 There is good documentation to start using Grafana:
15
16 [[Grafana Documentation>>https://grafana.com/docs/grafana/latest/?utm_source=grafana_gettingstarted]]
17
18 [[Grafana Tutorials>>https://grafana.com/tutorials/?utm_source=grafana_gettingstarted]]
19
Peter Wurbs 13.1 20 There is a great possibility to play with Grafana using the [[Grafana Playground>>https://play.grafana.org/d/bdnahipisghdsa/getting-started-with-grafana-play?orgId=1]].
21
Peter Wurbs 8.1 22 = Accessing Grafana =
23
Peter Wurbs 11.1 24 * Grafana as part of the DevOps-as-a-Service toolchain can be accessed by either
25 ** DevOps Portal Homepage ~-~-> Grafana Tile
Peter Wurbs 9.1 26 [[image:1744266164249-840.png]]
Peter Wurbs 11.1 27 ** or directly use the URL [[https:~~/~~/grafana-<customer~>.devops.t-systems.net>>https://grafana-<customer>.devops.t-systems.net]]
Peter Wurbs 13.1 28 * Preconditions in DevOps portal to access Grafana:
29 ** A Grafana license must be assigned to the user
30 ** Grafana must be added to the tool list of the project
Peter Wurbs 11.1 31 * If you are not already logged in to another tool in the toolchain, then you have to login using your configured SSO credentials.
32 * When you see this message after entering your credentials, then you don't have a Grafana license assigned in the DevOps portal:
Peter Wurbs 8.1 33 [[image:1744266590219-161.png||height="242" width="293"]]
34
Peter Wurbs 9.1 35 = Users, Projects, Organizations and Roles =
Peter Wurbs 8.1 36
Peter Wurbs 11.1 37 * Projects, users and their roles in projects are managed in the DevOps portal, the corresponding functions in Grafana are disabled (UI and API)
Peter Wurbs 9.1 38 * 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.
Peter Wurbs 10.1 39 ** Role mapping: (((
40 |=Project Role in DevOps Portal|=Grafana Organization Role|=Permissions in Grafana
Peter Wurbs 11.1 41 |Viewer|Viewer|Can view dashboards and alerts
42 |Developer / Master|Editor|Can create/edit dashboards and alerts and use the Explore function
43 |Admin|Admin|Has full permissions within the Grafana org, e.g. can setup datasources, manage folders, teams and service accounts
Peter Wurbs 10.1 44
Peter Wurbs 11.1 45 A detailed description of the Grafana role model can be found [[here>>https://grafana.com/docs/grafana/latest/administration/roles-and-permissions/]].
Peter Wurbs 10.1 46 )))
Peter Wurbs 11.1 47 * 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 >>https://grafana.com/docs/grafana/latest/dashboards/manage-dashboards/#create-a-dashboard-folder]]for further information. Folder permissions management is out of scope of the user management in the DevOps portal.
Peter Wurbs 12.1 48 * 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 >>https://grafana.com/docs/grafana/latest/administration/service-accounts/]]for further information. Service Account management is done directly in Grafana and is out of scope of the user management in the DevOps portal.
Peter Wurbs 13.1 49 * 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.
50 **When you work in Grafana, always make sure that you chose the intended Organization.**
51 [[image:1744272203893-682.png||height="272" width="255"]]
Peter Wurbs 8.1 52
Peter Wurbs 14.1 53 = Main Functions =
54
55 == Datasources ==
56
57 * Before you can setup dashboards and alerts, you have to setup datasources. Grafana itself is only a visualization tool, for data gathered via datasources.
58 * Datasources are created/managed per Grafana Organization.
59 * The Admin role is required to setup and manage datasources.
60 * (% class="box warningmessage" %)
61 (((
62 When a datasource is available in an Organization, every user assigned to this Organization (Project) with Admin or Edit role can access/explore the data provided by this datasource.
63 )))
64 * Most common datasources are configured for
65 ** Prometheus to visualize metrics
66 ** Loki to search and visualize logs
67 ** MySQL, PostgreSQL to access and visualize database data
68 * Many possible datasource types are preinstalled as built-in plugins and can be used
Peter Wurbs 18.13 69 * Datasource are set up via Menu panel ~-~-> Connections ~-~-> Datasources
Peter Wurbs 17.1 70 [[image:1744273328067-517.png||height="273" width="222"]]
Peter Wurbs 18.1 71 * Detailed information can be found via this [[link>>https://grafana.com/docs/grafana/latest/datasources/]].
Peter Wurbs 18.2 72
73 == Explore ==
74
Peter Wurbs 18.8 75 * Based on set up datasources, users owning the Edit or Admin role can explore provided data using the "Explore" function.
76 * "Explore" can be used for:
Peter Wurbs 18.10 77 ** Check provided data, contained labels
Peter Wurbs 18.13 78 ** Search for specific data
Peter Wurbs 18.12 79 ** Quickly execute queries and generate visualization panels
Peter Wurbs 18.13 80 ** Generate queries later to be used in dashboards
Peter Wurbs 20.10 81 * "Explore" function can be found in the Menu panel
Peter Wurbs 18.14 82 * Detailed information can be found via this [[link>>https://grafana.com/docs/grafana/latest/explore/]]
Peter Wurbs 20.1 83
84 == Dashboards ==
85
Peter Wurbs 20.3 86 * Dashboards are the way to visualize metrics, logs and other data.
Peter Wurbs 20.9 87 * 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.
Peter Wurbs 20.4 88 * Data are displayed based on queries which are the main part of a panel configuration.
89 * Dashboards can be created and edited by users owning the Editor or Admin role
Peter Wurbs 20.10 90 * "Dashboard" function can be in the Menu panel
Peter Wurbs 21.2 91 * There is a good [[guideline >>https://grafana.com/docs/grafana/latest/getting-started/build-first-dashboard/]]about the first steps.
Peter Wurbs 20.10 92 * Detailed information can be found via this [[link>>https://grafana.com/docs/grafana/latest/dashboards/build-dashboards/]].
Peter Wurbs 21.2 93
94 == Alerts ==
95
Peter Wurbs 21.3 96 * Based on the data gathered via datasources, alerts can be defined.
97 * In contrast to the classic alerting, the new Grafana Unified Alerting is set up mostly independent of specific dashboards.
Peter Wurbs 21.4 98 * Alerting configuration is split into
99 ** Alert rules
100 ** Contact points
101 ** Notification policies
Peter Wurbs 21.5 102 * How it works
103 ** Grafana alerting periodically queries data sources and evaluates the condition defined in the alert rule
104 ** If the condition is breached, an alert instance fires
105 ** Firing instances are routed to notification policies based on matching labels
106 ** Notifications are sent out to the contact points specified in the notification policy
Peter Wurbs 22.2 107 ** [[image:1744277362911-905.png||height="169" width="514"]]
Peter Wurbs 21.7 108 * Many contact point types like E-Mail, Teams, Slack, Pushover etc. are available and can be configured.
109 * "Alerting" function can be in the Menu panel
Peter Wurbs 22.2 110 * Detailed information can be found via this [[link>>https://grafana.com/docs/grafana/latest/alerting/]].
111
Peter Wurbs 22.5 112 = Metrics of DevOps-as-a-Servic =