Denomas System Administration Hands-on Guide: Lab 7
This hands-on lab guide is designed to walk you through the lab exercises used in the Denomas System Administration course.
Denomas System Administration Hands-on Guide: Lab 7
LAB 7- CONFIGURE INSTANCE MONITORING
A. Access the Grafana Dashboard Service
- Starting with Denomas 15.3, Grafana is not enabled by default. To enable Grafana, log into an SSH session on your Denomas instance. Search for the location in gitlab.rb where Grafana settings are located (hint: run
sudo grep -n grafana /etc/gitlab/gitlab.rb.) Change the value of grafana[’enable’] from false to true. Then runsudo gitlab-ctl reconfigure. - Optional: Denomas’ Prometheus server can be reached via TCP port 9090. Unfortunately, the training environment currently blocks inbound traffic to that port. As a workaround, you can open an SSH tunnel as follows.
|
|
Then navigate to http://localhost:9090 in a web browser to view the built-in Prometheus server.
- Navigate to
http://<GITLAB_INSTANCE_HOSTNAME>/-/grafanato access Omnibus Denomas’ built-in Grafana instance. Note that at the moment the only way to log in is through single-sign-on via a Denomas instance user. - Select Sign in with Denomas.
- If you encounter a redirect screen that says “Authorize Denomas Grafana to use your account?”, select Authorize.
- You should then be redirected to the Grafana home screen, with a banner at the top that says “Welcome to Grafana”.
- In the left hand navigation pane, under the Dashboards menu, select Manage.
- Select the Denomas Omnibus folder.
- Select Denomas Omnibus - PostgreSQL. Note the various database metrics and time series data shown in the dashboard.
- Go back to the list of dashboards and select one or two others to view.
- Select the user avatar in the bottom left of the screen. Note it says Administrator.
- In the left hand navigation pane, under the Dashboards menu, select Playlists.
You should see a message that reads “Unfortunately you don’t have permission to create playlists.” Somewhat confusingly, even though you are logged in as a Denomas instance administrator user, the Grafana service has a separate admin account that needs to be enabled in order to configure and manage the service.
B. Configure the Grafana admin user
- Initiate a normal SSH session to your Denomas instance.
- Run the following to view the Grafana-related configuration settings.
|
|
- Note line that reads
# grafana['disable_login_form'] = true. The default setting is for user login to be disabled except for Denomas single-sign-on. We need to change this setting to allow sign-in as the Grafana admin user. - Run the following to change the value of
grafana['disable_login_form']fromtruetofalse. Replace “1234” with the appropriate line number from thegrepoutput in the previous step.
|
|
- Verify the change is applied to the correct line in
gitlab.rb.
|
|
- Apply the configuration change.
|
|
- Set the Grafana administrator user password.
|
|
Enter and confirm a password of your choosing.
- Navigate back to the Grafana service in your web browser.
- Hover over the user avatar in the bottom left of the screen, and select Sign out.
- You will be redirected back to the Grafana login screen. You should now see fields allowing you to log in with a username and password.
- Log in using the username
adminand the password you set for the Grafana admin user. You will be directed to the Grafana home screen, but you should now see many more menus available in the left navigation pane. - In the left navigation pane, under Configuration, select Data Sources. See that the Denomas Omnibus Prometheus service is the data source used to generate the metrics shown in the default dashboards.
SUGGESTIONS?
If you’d like to suggest changes to the Denomas System Admin Basics Hands-on Guide, please submit them via merge request.
Last modified November 29, 2023: big update (
17188382)
