Setup the IBM Spectrum Scale Performance Monitoring Bridge for classic IBM Spectrum Scale devices - IBM/ibm-spectrum-scale-bridge-for-grafana GitHub Wiki
Step 1. Ensure that IBM Storage Scale meets prerequisite conditions
The IBM Storage Scale system must run 5.1.9.4 or above. For older releases please check the SUPPORT_ MATRIX containing an overview about all grafana-bridge versions and related backend code levels.
The bridge works in permanent communication with the pmcollector. Therefore it is recommended to install and run this tool directly on a pmcollector node.
In a multi-collector environment, there is no need to run the bridge on each pmcollector node separately, provided that they are configured in federated mode. Federation basically allows collectors to connect and collaborate with their peer collectors. If the peers have been specified, any query for measurement data must be directed to any of the collectors listed in the peer definition. The chosen collector will collect and assemble a response based on all relevant data from all collectors. For more information, please read Performance Monitoring tool overview.
On the collector node the CherryPy Python package needs to be installed. For getting CherryPy packages on your machine follow this instructions. It is important to note that the IBM Storage Scale Bridge for Grafana requires Python to be at a minimum level of 3.8 (recommended 3.9). Read What to do if your system is on Python < 3.8 for a possible solution.
Step 2. Set up the IBM Storage Scale Performance Monitoring Bridge
Download the latest version in your favourite directory on the collector node.
Alternatively you can clone the source code including not published changes (This is not recommended way for environments in Production):
# git clone https://github.com/IBM/ibm-spectrum-scale-bridge-for-grafana.git grafana-bridge
Depending on whether you want to display the IBM Storage Scale metrics directly in the Grafana dashboard or export them to the Prometheus database, you must enable the corresponding communication port in the config.ini file. You can also monitor the performance data simultaneously with Grafana and write it to the Prometheus database.
Open the config.ini in write mode
# vi ./grafana-bridge/source/config.ini
Uncomment the port in the "OpenTSDB API Connection Defaults" section if you want to analyse the metrics with Grafana.
##################### OpenTSDB API Connection Defaults ########################
[opentsdb_plugin]
# Port number the bridge listening on for Grafana data requests over
# OpentTSDB plugin
#
# 4242 - for HTTP connections
# 8443 - for HTTPS connections
# (Default: 4242)
# port = 4242
To activate the Prometheus Exporter, change the settings in the "Prometheus Exporter API Connection Defaults" section.
##################### Prometheus Exporter API Connection Defaults #############
[prometheues_exporter_plugin]
# Port number the bridge listening on for Prometheus server requests;
# prometheus = 9250
The IBM Storage Scale Performance Monitoring bridge for Grafana provides several configuration options for secure HTTP/S communication. The default protocol is set to HTTP with Basic Authentication. You will need to generate Base64 encoded password string and store it in the config.ini before starting the bridge.
##################### API Basic Authentication ################################
[basic_auth]
# Basic authentication is enabled by default.
# It is recommended to leave Basic Authentication enabled, especially when
# connecting via HTTP. The bridge will validate the username and password
# from `Authorization` header of every incoming http request.
enabled = True
# user name used for bridge api http/s basic authentication
username = scale_admin
# Base64 encoded password string used for bridge api http/s basic authentication
# Example string encoding via cli:
# $ echo "MyVeryStrongPassw0rd!" |base64
# TXlWZXJ5U3Ryb25nUGFzc3cwcmQhCg==
#
# password = TXlWZXJ5U3Ryb25nUGFzc3cwcmQhCg==
#
# alternatively you can store a Base64 encoded string in a file
# and specify the file location as the basic authentication password, f.e:
# password = /etc/bridge_auth/basic_scale-21
Note You can increase the security of API communication by switching to the HTTPS protocol. In this case you will need to generate an SSL key and certificate and specify their location in the API SSL OAuth section.
Step 3. Start the IBM Storage Scale Performance Monitoring Bridge
Start the bridge application by issuing:
# cd ./grafana-bridge/source/
# python3 zimonGrafanaIntf.py --apiKeyValue
You will be prompted by a command line interface to provide the 'password'. Enter the scale_grafana API key value(32 hexadecimal digits sequence). You can also pass the key value directly (not recommended) by the zimonGrafanaIntf.py script invocation following the '--apiKeyValue' input parameter name. Alternatively, store the key value in the config.ini file. For more options configuring and invoking the API key for an IBM Storage Scale Performance Monitoring Bridge please read the WiKi article.
You can also set up the systemd service to automatically start and stop the IBM Storage Scale Bridge for Grafana during system startup/shutdown. Read more about enabling the provided grafana-bridge.service file here.
If the bridge did establish the connection to the specified pmcollector and the initialization of the metadata was performed successfully, you should get the message "server started" at the end of line. Otherwise check the zserver.log stored in the zimonGrafanaIntf directory. Additionally, check the pmcollector service running properly by issuing:
# systemctl status pmcollector