The OpsRamp Grafana Datasource enables users to push metrics from OpsRamp into Grafana for visualization of time series data. OpsRamp can post metric data from the datacenter, public cloud, Kubernetes, Prometheus, and synthetic resources into Grafana and reduce the amount of Grafana data sources needed to gain visibility into critical infrastructure and applications.
The following diagram shows the time series metrics dataflow between the Cortex Data Lake to the Grafana server:

Version compatibility
Supported Grafana version: 7.5.0 or later.
Prerequisites
- OpsRamp API available
- OpsRamp OAuth2 API Credentials from OpsRamp integrations page and Client Unique ID
- Installed Grafana
Constraints
Per unique metric series, a maximum of 11000 datapoints can be scraped, per interval. For example, the metrics aws_ec2_cpu_utilization{host=lab1,region=us-east-1}
and aws_ec2_cpu_utilization{host=dev2, region=us-east-2a}
are both novel metric series. We support 11000 datapoints, or instances, of these metrics, per scrape.
Create and configure data source
- Log in to the Grafana server with your Grafana login credentials.
- Configure the data source using the configuration editor:

Data Source Property | Description |
---|---|
Name | OpsRamp cloud instance name. Enter name or select default name. |
Metrics URL | Application server URL, format: https://{my-organization}.app.opsramp.com |
Client UniqueId | Organization client ID |
Client API Key | Client API key |
Client API Secret | Client secret API key |
Configure visualization
Use the Query Editor to specify the PromQL query that fetches the time series data:

Query Editor:

Query Editor Property | Description |
---|---|
Metrics | Metric name with hostname, example: `cassandra_cache_requests{host="1arc-pcassd28"`. |
Min step | Lower limit of duration for fetching data points, in seconds. [TBD - improve] |
Resolution | Fractional data point resolution value: 1/nth data points. [TBD - improve] |
Legend | [TBD - need better definition] |
Format | Display chart type:
|
Instant | Select Instant to get only the latest value for the requested time series. |
Examples
Time series chart
Specify {{host}}
as the Legend to display only host label values in a time series chart:

Table chart

Heatmap chart

Install Grafana plugin
Create Grafana API key
Register to https://grafana.com/auth/sign-in and login to create an API key with Plugin Publisher role.
After Login, click on “API Keys” under the security section.
Click on the “Add API Key” button.
Enter
- name -> GRAFANA_API_KEY
- role -> Plugin Publisher
copy to clipboard to use later for the signing process.
Install npx
If not already installed, test npx -v
VERSION=v14.17.6
DISTRO=linux-x64
sudo mkdir -p /opt/opsramp/datasource
sudo wget https://nodejs.org/dist/$VERSION/node-$VERSION-$DISTRO.tar.xz
sudo tar -xJvf node-$VERSION-$DISTRO.tar.xz -C /opt/opsramp/datasource
sudo ln -s /opt/opsramp/datasource/node-v14.17.6-linux-x64/bin/node /usr/bin/node
sudo ln -s /opt/opsramp/datasource/node-v14.17.6-linux-x64/bin/npm /usr/bin/npm
sudo ln -s /opt/opsramp/datasource/node-v14.17.6-linux-x64/bin/npx /usr/bin/npx
Download Opsramp grafana plugin
wget https://opsramp-grafana-plugin.s3.us-east-2.amazonaws.com/opsramp-metrics-datasource.zip
unzip opsramp-metrics-datasource.zip
cd opsramp-metrics-datasource
Sign plugin
export GRAFANA_API_KEY=<YOUR_API_KEY> (created in step 1)
npx @grafana/toolkit plugin:sign --rootUrls http://localhost:3000 (coma separated grafana server URL's)
Integrate signed plugin to grafana server and restart
Normal mode
sudo mv opsramp-metrics-datasource /var/lib/grafana/plugins
sudo systemctl restart grafana-server
Docker mode
docker cp opsramp-metrics-datasource grafana:/var/lib/grafana/plugins/
docker restart grafana
Kubernetes mode
kubectl cp opsramp-metrics-datasource grafana:/var/lib/grafana/plugins/ -n grafana
kubectl delete pod grafana -n <namespace>