Repository navigation
HTTP REST Api endpoint config
-
/config
- Supported for both: OpenTSDB API and Prometheus API (the endpoint is served on the same port as the API and is protected by the same HTTP Basic Authentication as all other bridge endpoints).
- Allows to read the current bridge configuration, and to update selected configuration parameters while the bridge is running.
- Parameters are grouped by their
config.inisection name. Parameters that are commented-out inconfig.iniare returned with the value"disabled". Secret values (password,apiKeyValue) are never returned or accepted. - Some parameters take effect immediately (e.g.
logLevel,rawCounters,includeDiskData,retryDelay), others are only written to the config file and require a bridge restart (e.g.port,prometheus,protocol, TLS settings). - Changes are persisted only if a custom config file exists. Use
POST /config/initto create it. - For a detailed description of the key categories, response formats, and step-by-step examples refer to How to change config at runtime.
| Method | URL | Description |
|---|---|---|
GET |
/config |
All non-secret settings, grouped by INI section |
GET |
/config?key=<name> |
A single setting (flat {key: value}) |
PATCH |
/config |
Batch-update one or more writable keys |
PUT |
/config?key=<name> |
Update a single writable key. Body: {"value": <value>}
|
GET |
/config/sections |
List available INI section names |
GET |
/config/section/<section> |
All non-secret keys in one INI section |
PATCH |
/config/section/<section> |
Update writable keys scoped to one INI section |
POST |
/config/init |
Create the custom config file so writes are persisted. Optional body: {"path": "<file>"}
|
GET |
/config/validate |
Validate the current live configuration |
POST |
/config/validate |
Dry-run: validate a proposed change without applying it |
Invalid requests (malformed JSON body, missing key or value, unknown key or section) are answered with HTTP status 400 or 404.
Read the whole configuration:
# curl http://10.88.0.178:4242/config -u scale_admin:TXlWZXJ5U3Ryb25nUGFzc3cwcmQhCg== | jq .
{
"basic_auth": {
"enabled": true,
"username": "scale_admin"
},
"connection": {
"protocol": "http"
},
"logging": {
"cpAccessLog": "on",
"cpAccessLogBackups": 10,
"logFile": "zserver.log",
"logLevel": 15,
"logPath": "/var/log/ibm_bridge_for_grafana"
},
"opentsdb_plugin": {
"opentsdbBindIp": "0.0.0.0",
"port": 4242
},
"prometheues_exporter_plugin": {
"promBindIp": "0.0.0.0",
"prometheus": "disabled",
"rawCounters": true
},
"query": {
"includeDiskData": false
},
"server": {
"apiKeyName": "scale_grafana",
"caCertPath": false,
"retryDelay": 60,
"server": "localhost",
"serverPort": 9980
},
"tls": {
"tlsCertFile": "disabled",
"tlsKeyFile": "disabled",
"tlsKeyPath": "disabled"
}
}Read a single parameter:
# curl "http://10.88.0.178:4242/config?key=logLevel" -u scale_admin:TXlWZXJ5U3Ryb25nUGFzc3cwcmQhCg==
{"logLevel": 15}Update a single parameter (applied immediately):
# curl -X PUT -H "Content-Type: application/json" -d '{"value": 5}' "http://10.88.0.178:4242/config?key=logLevel" -u scale_admin:TXlWZXJ5U3Ryb25nUGFzc3cwcmQhCg==
{
"updated": {"logLevel": 5},
"restart_required": {},
"rejected": {},
"persisted": true
}Update multiple parameters at once:
# curl -X PATCH -H "Content-Type: application/json" -d '{"rawCounters": false, "retryDelay": 30}' http://10.88.0.178:4242/config -u scale_admin:TXlWZXJ5U3Ryb25nUGFzc3cwcmQhCg==
{
"updated": {"rawCounters": false, "retryDelay": 30},
"restart_required": {},
"rejected": {},
"persisted": true
}| Field | Description |
|---|---|
updated |
Keys applied to the running process immediately |
restart_required |
Keys written to the config file, but requiring a bridge restart to take effect |
rejected |
Keys refused entirely (secret, unknown or not belonging to the addressed section), with a reason for each |
persisted |
true = written to the config file; false = I/O error; a string = reason why writing was skipped (e.g. no custom config file exists) |
Lists the available INI section names.
# curl http://10.88.0.178:4242/config/sections -u scale_admin:TXlWZXJ5U3Ryb25nUGFzc3cwcmQhCg==
{"sections": ["basic_auth", "connection", "logging", "opentsdb_plugin", "prometheues_exporter_plugin", "query", "server", "tls"]}Reads (GET) or updates (PATCH) the keys of a single INI section. Keys that do not belong to the addressed section are rejected.
# curl http://10.88.0.178:4242/config/section/prometheues_exporter_plugin -u scale_admin:TXlWZXJ5U3Ryb25nUGFzc3cwcmQhCg==
{"promBindIp": "0.0.0.0", "prometheus": "disabled", "rawCounters": true}Creates the custom config file, so that changes done through the PUT and PATCH requests are persisted. Without a request body the file is created at the default location /etc/grafanabridge/config.ini. Returns 201 Created if the file was created and 200 OK if it already exists.
# curl -X POST http://10.88.0.178:4242/config/init -u scale_admin:TXlWZXJ5U3Ryb25nUGFzc3cwcmQhCg==
{"created": true, "path": "/etc/grafanabridge/config.ini"}GET validates the current live configuration. POST merges the keys sent in the JSON body into a copy of the live configuration and validates the result. Nothing is applied or written to disk.
# curl http://10.88.0.178:4242/config/validate -u scale_admin:TXlWZXJ5U3Ryb25nUGFzc3cwcmQhCg==
{"valid": true}# curl -X POST -H "Content-Type: application/json" -d '{"protocol": "https"}' http://10.88.0.178:4242/config/validate -u scale_admin:TXlWZXJ5U3Ryb25nUGFzc3cwcmQhCg==
{"valid": false, "errors": ["Missing certificates in the specified keyPath directory, quitting"], "candidate": {"...": "..."}}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
- How to change config at runtime
- Start and stop grafana-bridge with systemd
- Configure PrometheusExporter for scraping linux sensor metrics
- Refresh IBM Storage Scale cluster configuration data cached by grafana bridge
- Accelerate the PrometheusExporter data retrieval time
- Optimize the performance of PrometheusExporter by using scrape_job params settings
- Grafana Dashboard Panel shows no metric values for a particular entity
- Missing Grafana-Operator on an OpenShift cluster
- Missing CherryPy packages
- What to do if your system is on Python < 3.8
- Grafana-bridge fails to start with Python3.8
- Grafana-bridge container time is different from a host time
- Grafana-bridge container does not return metrics for sensors restricted to a subset of nodes
- Verify that the grafana-bridge returns data as expected
- Grafana-bridge HTTP REST Api interface
- How to monitor performance of the IBM Storage Scale bridge for Grafana