Use Akamai Insights Datasource Plugin for Grafana to visualize and observe reporting data. The plugin gets data from the Reporting API v2.
Before using Akamai Insights Datasource Plugin, you need to:
- Install Grafana 7.0 or newer
- Get Akamai API credentials for the Reporting API v2.
Note that your package manager may install an older version, so follow the official documentation on installing Grafana for details of the Grafana installation process for various operation systems.
To use the Reporting API v2, you need to create an API client with authentication credentials. See how to get started.
To create your authentication credentials for the Reporting API:
- Go to Control Center
- Navigate to the Identity & Access page.
- Under Users and API Clients, click Create API client.
- Click Advanced.
- Choose Select APIs.
- Select Reporting API and READ-WRITE access.
- Click Create API client.
- Copy the credentials (client_secret, host, access_token, and client token). You’ll later enter them into your Akamai Insights Datasource Plugin configuration.
Read more about creating authentication credentials. To learn how to apply authentication in a variety of programming languages when using Akamai APIs, refer to Authenticate with EdgeGrid.
Configuration file: /etc/grafana/grafana.ini
Plugin directory: /var/lib/grafana/plugins
Log directory: /var/log/grafana/
- You may have to use 'sudo' to edit the configuration file or to view the log file.
- You may have to change permissons on the 'plugin' directory, for example: sudo chmod 777 /var/lib/grafana/plugins
- Under the plugin directory (/var/lib/grafana/plugins), create a directory called 'akamai-insights-datasource-plugin'.
- From the dist directory, copy these to /var/lib/grafana/plugins/akamai-insights-datasource-plugin:
- LICENSE
- README.md
- img (directory and its contents)
- module.js
- module.js.LICENSE.txt
- module.js.map
- plugin.json
- From the unzipped archive, copy one of these (as appropriate for your hardware) to /var/lib/grafana/plugins/akamai-insights-datasource-plugin:
- gpx_akamai-insights-datasource-plugin_linux_amd64
- gpx_akamai-insights-datasource-plugin_linux_arm
- gpx_akamai-insights-datasource-plugin_linux_arm64
Configuration file: /usr/local/etc/grafana/grafana.ini
Plugin directory: /usr/local/var/lib/grafana/plugins
Log directory: /usr/local/var/log/grafana/
- Under the plugin directory (/usr/local/var/lib/grafana/plugins), create a directory called 'akamai-insights-datasource-plugin'.
- From the unzipped archive, copy these to /usr/local/var/lib/grafana/plugins/akamai-insights-datasource-plugin:
- LICENSE
- README.md
- img (directory and its contents)
- module.js
- module.js.LICENSE.txt
- module.js.map
- plugin.json
- From the unzipped archive, copy this to /var/lib/grafana/plugins/akamai-insights-datasource-plugin:
- gpx_akamai-insights-datasource-plugin_darwin_amd64
Grafana can be installed into any directory (install_dir).
Configuration file: install_dir\conf
Plugin directory: install_dir\data\plugins
Log directory: install_dir\data\log
-
Under the plugin directory (install_dir\data\plugins), create a directory called 'akamai-insights-datasource-plugin'.
-
From the unzipped archive, copy these to install_dir\data\plugins\akamai-insights-datasource-plugin:
- LICENSE
- README.md
- img (directory and its contents)
- module.js
- module.js.LICENSE.txt
- module.js.map
- plugin.json
-
From the unzipped archive, copy this to install_dir\data\plugins\akamai-insights-datasource-plugin:
- gpx_akamai-insights-datasource-plugin_windows_amd64.exe
Read Configuration for configuration directions for each operating system.
- Open the configuration file in a text editor.
- Under the [paths] section header, uncomment plugins by removing the semicolon (;).
- To the right of plugins =, insert the complete path to the plugin directory. NOTE: The plugin directory differs by operating system. For example:
[paths]
# Directory where grafana will automatically scan and look for plugins
plugins = /var/lib/grafana/plugins
- Under the [plugins] section header, uncomment "allow_loading_unsigned_plugins".
- To the right of "allow_loading_unsigned_plugins =", add "akamai-data-plugin" (without quotes). For example:
[plugins]
# Enter a comma-separated list of plugin identifiers to identify plugins that are allowed to be loaded even if they lack a valid signature.
allow_loading_unsigned_plugins = akamai-data-plugin
- Restart Grafana See how to Restart Grafana for each operating system. Under the log directory for your operating system, in "grafana.log", you should see something similar to:
t=2021-03-24T10:31:09-0400 lvl=info msg="Registering plugin" logger=plugins id=akamai-data-plugin
See Troubleshooting for troubleshooting tips.
- Log in to Grafana. The default username/password are: admin/admin.
- Select Configuration (gear icon) -> Data Sources -> Akamai Insights Datasource Plugin
- In the data source configuration panel, enter your Akamai API credentials.
- Save your changes
You can now use the plugin.
- In Grafana, create a new dashboard and add a visualization.
- Select a previously created data source.
- In the Select report data source field, choose a report. You can use all reports, supported by the Reporting API v2.
- Create your report’s query. Select metrics, dimensions, filters, and SortBys for your report. At startup, the plugin loads the default metrics and dimensions for a given report. See the report documentation under Available reports for more information.
- Click Apply.
- Create additional queries, as needed.
You can now monitor your report data.
The plugin lets you use variables of the Query type.
- Add a variable and set its query options. The first dimension you select in the form is then used as the variable value in Grafana.
- Use the created variable in your visualization queries.