-
Notifications
You must be signed in to change notification settings - Fork 20
Make usage of Grafana Provisioning feature
Grafana supports configuration as code through provisioning. Configuration as code is the practice of storing the configuration of your system as a set of configuration files, which can be reused across environments.
At startup, Grafana loads the configuration files from the provisioning directory and provisions the resources listed in the manifests. The provisioning directory assumes the following structure:
provisioning/
datasources/
<yaml files>
dashboards/
<yaml files>
notifiers/
<yaml files>
For more info about Grafana provisioning feature please check the Provision dashboards and data sources tutorial.
install grafana-8.2.1-1.x86_64.rpm
wget https://dl.grafana.com/oss/release/grafana-8.2.1-1.x86_64.rpm
It’s possible to manage the connection configuration for multiple IBM Storage Scale clusters (data sources) in Grafana by adding a YAML config file in the provisioning/datasources directory. Follow reading Provision an IBM Storage Scale data source.
-
Copy the datasource.yaml file in the provisioning/datasources/ directory of your Grafana instance:
cd /etc/grafana/provisioning/datasources/ svn export https://github.com/IBM/ibm-spectrum-scale-bridge-for-grafana/trunk/examples/grafana_provisioning/datasource.yaml
-
Update the datasource.yaml file for the IBM Storage Scale clusters you want to monitor with this Grafana instance. Note: <host-ip> is the ip of the host running the grafana-bridge.
- name: my_scale_cluster1 type: opentsdb access: proxy url: http://<host-ip>:4242 isDefault: true jsonData: tsdbResolution: 1 tsdbVersion: 2.3 editable: true
You might also be interested in reusing the dashboards from the "Example Dashboards bundle" collection. In this case follow reading Provision the "Example Dashboards bundle" collection with folders structure to Grafana.
-
Copy the Example_Dashboards_bundle directory to your Grafana instance host:
mkdir -p /etc/dashboards cd /etc/dashboards svn export https://github.com/IBM/ibm-spectrum-scale-bridge-for-grafana/trunk/examples/grafana_dashboards/Example_Dashboards_bundle
-
Copy the dashboards.yaml file in the provisioning/dashboards/ directory of your Grafana instance:
cd /etc/grafana/provisioning/dashboards/ svn export https://github.com/IBM/ibm-spectrum-scale-bridge-for-grafana/trunk/examples/grafana_provisioning/dashboards.yaml
-
Update the grafana server config file to set the home dashboard path to the Available_Dashboards.json file
cat /etc/grafana/grafana.ini [dashboards] # Path to the default home dashboard. If this value is empty, then Grafana uses StaticRootPath + "dashboards/home.json" default_home_dashboard_path = /etc/dashboards/Example_Dashboards_bundle/home/Available_Dashboards.json
Start the server with systemd
systemctl daemon-reload
systemctl start grafana-server
systemctl enable grafana-server
Verify that Grafana server has started properly
systemctl status grafana-server
● grafana-server.service - Grafana instance
Loaded: loaded (/usr/lib/systemd/system/grafana-server.service; disabled; vendor preset: disabled)
Active: active (running) since Thu 2021-10-21 22:33:37 CEST; 2 days ago
Docs: http://docs.grafana.org
Main PID: 27888 (grafana-server)
CGroup: /system.slice/grafana-server.service
└─27888 /usr/sbin/grafana-server --config=/etc/grafana/grafana.ini --pidfile=/var/run/grafana/grafana-server.pid --packaging=rpm cfg:default.paths.logs=/var/log/grafana cfg:default.paths.data=/var/lib/..
You should see the Available Dashboards view as soon as you are logged in to the Grafana web interface.
In the sidebar, hover the cursor over the Configuration (gear) icon and click Data Sources. The provisioned data source configuration for your IBM Storage Scale clusters should appear in the list of data sources.
Visit the IBM Storage Scale Knowledge Center for getting more info about the latest product updates
-
- Setup classic Grafana
- Make usage of Grafana Provisioning feature
-
- Installing RedHat community-powered Grafana operator from OperatorHub
- Creating Grafana instance using the RedHat community-powered Grafana-operator
- Creating Grafana Datasorce instance from Custom Resource managed by the RedHat community powered Grafana operator
- Importing the predefined dashboard from the example dashboards collection
- Exploring Grafana WEB interface for CNSA project in a k8s OCP environment
- How to setup Grafana instance to monitor multiple IBM Storage Scale clusters running in a cloud or mixed environment
- API key authentication
- Configurable bridge settings
- CherryPy builtin HTTP server settings
- How to setup HTTPS(SSL) connection
- Start and stop grafana-bridge with systemd