Wiki source code of Grafana

Version 32.3 by Peter Wurbs on 2025/04/14 12:07

Show last authors
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
6 {{toc/}}
7
8 = Introduction =
9
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.
11
12 [[Vendor Page>>https://grafana.com/]]
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
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
22 = Accessing Grafana =
23
24 * Grafana as part of the DevOps-as-a-Service toolchain can be accessed by either
25 ** DevOps Portal Homepage → Grafana Tile
26 [[image:1744266164249-840.png]]
27 ** or directly use the URL [[https:~~/~~/grafana-<customer~>.devops.t-systems.net>>https://grafana-<customer>.devops.t-systems.net]]
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
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:
33 [[image:1744266590219-161.png||height="242" width="293"]]
34
35 = Users, Projects and Roles =
36
37 * Projects, users and their roles in projects are managed in the DevOps portal, the corresponding functions in Grafana are disabled (UI and API)
38
39 (% class="box warningmessage" %)
40 (((
41 ⚠ **Note**
42 Projects in DevOps portal are mapped to Grafana Organization.
43 )))
44
45 * 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.
46 ** Role mapping: (((
47 |=Project Role in DevOps Portal|=Grafana Organization Role|=Permissions in Grafana
48 |Viewer|Viewer|Can view dashboards and alerts
49 |Developer / Master|Editor|Can create/edit dashboards and alerts and use the Explore function
50 |Admin|Admin|Has full permissions within the Grafana org, e.g. can setup datasources, manage folders, teams and service accounts
51
52 A detailed description of the Grafana role model can be found [[here>>https://grafana.com/docs/grafana/latest/administration/roles-and-permissions/]].
53 )))
54 * 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.
55 * 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.
56 * 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.
57 [[image:1744272203893-682.png||height="272" width="255"]]
58
59 (% class="box warningmessage" %)
60 (((
61 ⚠ **Note**
62 When you work in Grafana, always make sure that you chose the intended Organization.
63 )))
64
65 = Main Functions =
66
67 == Datasources ==
68
69 * Before you can setup dashboards and alerts, you have to setup datasources. Grafana itself is only a visualization tool, for data gathered via datasources.
70 * Datasources are created/managed per Grafana Organization.
71 * The Admin role is required to setup and manage datasources.
72
73 (% class="box warningmessage" %)
74 (((
75 ⚠ **Note**
76 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.
77 )))
78
79 * Most common datasources are configured for
80 ** Prometheus to visualize metrics
81 ** Loki to search and visualize logs
82 ** MySQL, PostgreSQL to access and visualize database data
83 * Many possible datasource types are preinstalled as built-in plugins and can be used
84 * Datasource are set up via Menu panel ~-~-> Connections ~-~-> Datasources
85 [[image:1744273328067-517.png||height="273" width="222"]]
86 * Detailed information can be found via this [[link>>https://grafana.com/docs/grafana/latest/datasources/]].
87
88 == Explore ==
89
90 * Based on set up datasources, users owning the Edit or Admin role can explore provided data using the "Explore" function.
91 * "Explore" can be used for:
92 ** Check provided data, contained labels
93 ** Search for specific data
94 ** Quickly execute queries and generate visualization panels
95 ** Generate queries later to be used in dashboards
96 * "Explore" function can be found in the Menu panel
97 * Detailed information can be found via this [[link>>https://grafana.com/docs/grafana/latest/explore/]]
98
99 == Dashboards ==
100
101 * Dashboards are the way to visualize metrics, logs and other data.
102 * 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.
103 * Data are displayed based on queries which are the main part of a panel configuration.
104 * Dashboards can be created and edited by users owning the Editor or Admin role
105 * "Dashboard" function can be in the Menu panel
106 * There is a good [[guideline >>https://grafana.com/docs/grafana/latest/getting-started/build-first-dashboard/]]about the first steps.
107 * Detailed information can be found via this [[link>>https://grafana.com/docs/grafana/latest/dashboards/build-dashboards/]].
108
109 == Alerts ==
110
111 * Based on the data gathered via datasources, alerts can be defined.
112 * In contrast to the classic alerting, the new Grafana Unified Alerting is set up mostly independent of specific dashboards.
113 * Alerting configuration is split into
114 ** Alert rules
115 ** Contact points
116 ** Notification policies
117 * How it works
118 ** Grafana alerting periodically queries data sources and evaluates the condition defined in the alert rule
119 ** If the condition is breached, an alert instance fires
120 ** Firing instances are routed to notification policies based on matching labels
121 ** Notifications are sent out to the contact points specified in the notification policy
122 ** [[image:1744277362911-905.png||height="169" width="514"]]
123 * Many contact point types like E-Mail, Teams, Slack, Pushover etc. are available and can be configured.
124 * "Alerting" function can be in the Menu panel
125 * Detailed information can be found via this [[link>>https://grafana.com/docs/grafana/latest/alerting/]].
126
127 = Metrics of DevOps-as-a-Service Toolchain =
128
129 * As part of the Grafana deployment, preconfigured and standardized dashboards are provided to show relevant data about the DevOps-as-a-Service toolchain
130 * These dashboards are located in the MainOrg.
131 * To access them:
132 ** Switch to the MainOrg in the Org list on the top left corner.
133 ** Click on Dashboards in the left Menu pane
134 ** Click on folder "DevOps-as-a-Service Metrics"
135 ** Choose the dashboard you want to see
136 ** [[image:1744278056971-203.png||height="285" width="826"]]
137 ** Alternatively, you can use the link in the "Useful Links" panel of the Grafana Home page.
138 [[image:1744285635938-113.png||height="127" width="350"]]
139
140 (% class="box warningmessage" %)
141 (((
142 ⚠ **Note**
143 Every user assigned a Grafana license in the DevOps portal is able to access them, independent of any project assignment.
144 )))