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:

Grafana image

Version compatibility

Supported Grafana version: 7.5.0 or later.


  • OpsRamp API available
  • OpsRamp OAuth2 API Credentials from OpsRamp integrations page and Client Unique ID
  • Installed Grafana


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

  1. Log in to the Grafana server with your Grafana login credentials.
  2. Configure the data source using the configuration editor:
Grafana image
Data Source PropertyDescription
NameOpsRamp cloud instance name. Enter name or select default name.
Metrics URLApplication server URL, format: https://{my-organization}
Client UniqueIdOrganization client ID
Client API KeyClient API key
Client API SecretClient secret API key

Configure visualization

Use the Query Editor to specify the PromQL query that fetches the time series data:

Grafana image

Query Editor:

Grafana image
Query Editor PropertyDescription
MetricsMetric name with hostname, example: `cassandra_cache_requests{host="1arc-pcassd28"`.
Min stepLower limit of duration for fetching data points, in seconds. [TBD - improve]
ResolutionFractional data point resolution value: 1/nth data points. [TBD - improve]
Legend[TBD - need better definition]
FormatDisplay chart type:
  • Time series
  • Table
  • Heatmap
InstantSelect Instant to get only the latest value for the requested time series.


Time series chart

Specify {{host}} as the Legend to display only host label values in a time series chart:

Grafana image

Table chart

Grafana image

Heatmap chart

Grafana image

Install Grafana plugin

Create Grafana API key

Register to and login to create an API key with Plugin Publisher role.

  1. After Login, click on “API Keys” under the security section.

  2. Click on the “Add API Key” button.

  3. Enter

    • name -> GRAFANA_API_KEY
    • role -> Plugin Publisher
  4. copy to clipboard to use later for the signing process.

Install npx

If not already installed, test npx -v



sudo mkdir -p /opt/opsramp/datasource
sudo wget$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

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>