-
Notifications
You must be signed in to change notification settings - Fork 6
Configure a Service Key in the plugin
andreacampo edited this page Nov 4, 2022
·
13 revisions
Once a service key has been created for the SAP Cloud ALM API Instance, it can be used to configure the ALM Grafana Plugin.
Several keys can be created and configured against different instances of the Data Source plugin in the Grafana instance configuration.
As described here, the configuration is based on the definition of a route in the plugin.json file of your plugin directory.
- Select your newly created service key and retrieve the following information:
- endpoints
- Api
- uaa
- clientid
- clientsecret
- url

- Edit the plugin.json file in the plugin directory of the Grafana instance (usually YOUR_PLUGIN_DIR/sap-alm-dp-api-datasource/dist/) and add the following in the
routesection
Note The path to the plugin directory is defined in the configuration file
grafana.ini.
{
"path": "ABC",
"url": "https://eu10.alm.cloud.sap/api/calm-analytics/v1",
"tokenAuth": {
"url": "https://demo-acme.authentication.eu10.hana.ondemand.com/oauth/token",
"params": {
"grant_type": "client_credentials",
"client_id": "XXXXXXXXXXXXXX",
"client_secret": "xxxxxxxxxxxxxxxxx"
}
}
}
- path: three characters that will be used in the plugin configuration to identify this specific credential (e.g. "ABC")
-
url: this is the
endpoints: Apivalue retrieved from the service key followed by "/calm-analytics/v1" (e.g., https://eu10.alm.cloud.sap/api/calm-analytics/v1) -
tokenAuth-url: this is the
uaa: urlvalue retrieved from the service key followed by "/oauth/token" (e.g., https://demo-acme.authentication.eu10.hana.ondemand.com/oauth/token) -
client_id: this is the
uaa: clientidvalue retrieved from the service key -
client_secret: this is the
uaa: clientsecretvalue retrieved from the service key
- Save the
plugin.jsonfile and restart the Grafana instance
Last edit by Andrea CAMPO on November 4 2022