Skip to content

Grafana Plugin

Configure your hosted Grafana installation to interface with Coralogix data.

Overview

Visualize your logs and metrics with familiar functions while accessing all Coralogix data sources automatically and without needing plugins (recommended).

For those wishing to use the Grafana plugin, this tutorial demonstrates how to connect and view your logs and metrics in your Coralogix dashboard using Grafana version 7+.

Connect your logs

1

Navigate to Home > Connection > Data sources > Add data source

2

Select OpenSearch as your data source.

3

Input the following fields:

  • Name. Select a name for your data source.
  • URL. Input the OpenSearch endpoint associated with your Coralogix domain.
  • Skip TLS certification verification. Check to activate.
  • HTTP headers:

    • Header: Authorization
    • Value: Bearer <cx_api_key>
      To use this API you need to create a personal or team API key. It’s recommended to use permission presets, as they are automatically updated with all relevant permissions. Alternatively, you can manually add individual permissions.

      Preset Action Description
      DataQuerying LEGACY-ARCHIVE-QUERIES:EXECUTE
      LOGS.DATA-API#HIGH:READDATA
      LOGS.DATA-API#LOW:READDATA
      METRICS.DATA-API#HIGH:READDATA
      SPANS.DATA-API#HIGH:READDATA
      SPANS.DATA-API#LOW:READDATA
      Query Data from the Archive
      Query Frequent Search Logs
      Query Monitoring & Compliance Logs
      Query Metrics
      Query Frequent Search Spans
      Query Monitoring & Compliance Spans
  • Index name: *

  • Pattern: No pattern
  • Time field name: coralogix.timestamp
4

Click Save & test.

A popup message will inform you if you have configured your data source successfully.

Connect your metrics

As part of Coralogix’s metrics offering, we support querying metric data through the most prevalent time-series query language: PromQL. This allows you to use Coralogix as your metrics backend, add it as a Prometheus data source to your Grafana instance, and update existing dashboards without changing the queries or syntax.

Configure a Prometheus data source in Grafana:

1

Navigate to Home > Connection > Add new connection. Enter Prometheus data source.

2

Click Add new data source.

3

Input the following fields:

Connection

Authentication

  • HTTP headers:
    • Header: Authorization
    • Value: Bearer <cx_api_key> (as mentioned in the Authentication section above)

Advanced Settings

  • Performance
    • Prometheus type: Prometheus
    • Prometheus version: 2.24.x
4

Click Save & test. You should receive a message confirming a successful query to the Prometheus API.

Find out more here.

Useful Docker commands

If you have Grafana installed on a Docker container, use these useful commands to interact with Grafana:

  • List all docker containers
docker ps -a
  • Log in to your Grafana container
sudo docker exec -it "Grafana container ID" /bin/bash
  • Restart Grafana
docker restart "Grafana container ID"

Support

Need help?

Our world-class customer success team is available 24/7 to walk you through your setup and answer any questions that may come up.

Feel free to contact us via our in-app chat or by emailing [email protected].