There are several ways to install Grafana, including as a Docker container. However, we will use the rpm-based setup because it is less complicated.
Download the Grafana RPM from the Grafana download site.
wget https://dl.grafana.com/oss/release/grafana-9.4.7-1.x86_64.rpm
Install Grafana.
rpm -i --nodeps grafana-9.4.7-1.x86_64.rpm
Modify the Grafana configuration file located at /etc/grafana/grafana.ini to set the default port.
########### Server ##########; [server] # Protocol (http, https, h2, socket) protocol=http # The ip address to bind to, empty will bind to all interfaces ;http_addr = # The http port to use http_port = 4000
The edirapi docker image uses port 3000 by default, but if you install Grafana on an OES 2023 Server with UMC installed, it will instead utilize port 3000. In this instance, we switch the port to 4000 and this port must be added in the firewall allowed services.
Start the Grafana Service.
systemctl start grafana-server.service
Prerequisites:
Before configuring the Grafana dashboard for Node Exporter and cAdvsior ensure to integrate the Metric Endpoints. See,Section 4.0, How to Integrate Metric Endpoints (targets).
Login to http://<server_ip_of grafana>:4000 with default user credentials (admin/admin).
Add the Prometheus data source to Grafana:
Navigate to Configuration > Datasource > Add datasource in the Grafana sidebar.
Select Prometheus as the type.
Set the appropriate Prometheus server URL (for example, http://localhost:9090/).
Adjust other data source settings as required (for example, choosing the right access method).
Click Save & Test to save the new data source.
NOTE:In case of failure, ensure the service is up and running and that the correct port number has been added to the firewall.
Go to the Grafana Community where you can find numerous ready-made dashboards that can be imported and utilized in your environment.
NOTE:Grafana dashboard provides different templates for cAdvisor and Node Exporter.
Select the required ready-made dashboards from and copy the ID of the dashboard.
Import the dashboard using the available template in Grafana labs.
Navigate to Home > Dashboard > +import in the Grafana sidebar.
In Import via grafana.com field, enter the copied ID of the ready-made dashboard, and click Load.
Figure 3-1 Grafana Dashboard
From Host drop-down list, select the server for viewing the respective dashboard results.