# Grafana plugin

Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fuser-guides%2Fvisualizations%2Fgrafana-plugin.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fuser-guides%2Fvisualizations%2Fgrafana-plugin.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

Configure your [hosted Grafana](https://docs-docusaurus.kinsta.page/user-guides/visualizations/hosted-grafana-view/.md) installation to interface with Coralogix data.

## Overview[​](#overview "Direct link to 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[​](#connect-your-logs "Direct link to 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**. Choose the <!-- -->https\://api./data/os-api<!-- --> endpoint that corresponds to your Coralogix [domain](https://docs-docusaurus.kinsta.page/user-guides/account-management/account-settings/coralogix-domain/.md) using the domain selector at the top of the page.

* **Skip TLS certification verification**. Check to activate.

* **HTTP headers**:

  * Header: `Authorization`

  * Value: `Bearer <cx_api_key>`<br />To use this API you need to [create](https://docs-docusaurus.kinsta.page/user-guides/account-management/api-keys/api-keys/.md) 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`<br />`LOGS.DATA-API#HIGH:READDATA`<br />`LOGS.DATA-API#LOW:READDATA`<br />`METRICS.DATA-API#HIGH:READDATA`<br />`SPANS.DATA-API#HIGH:READDATA`<br />`SPANS.DATA-API#LOW:READDATA` | Query Data from the Archive<br />Query Frequent Search Logs<br />Query Monitoring & Compliance Logs<br />Query Metrics<br />Query Frequent Search Spans<br />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[​](#connect-your-metrics "Direct link to 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](https://grafana.com/docs/grafana/latest/datasources/prometheus/) 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**

* Prometheus server URL: Choose the
  <!-- -->
  https\://api./metrics
  <!-- -->
  endpoint that corresponds to your Coralogix [domain](https://docs-docusaurus.kinsta.page/user-guides/account-management/account-settings/coralogix-domain/.md) using the domain selector at the top of the page.

**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](https://grafana.com/docs/grafana/latest/datasources/prometheus/).

## Useful Docker commands[​](#useful-docker-commands "Direct link to 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"
```

## Additional resources[​](#additional-resources "Direct link to Additional resources")

|                     |                                                                                                 |
| ------------------- | ----------------------------------------------------------------------------------------------- |
| Coralogix Endpoints | [Coralogix Endpoints](https://docs-docusaurus.kinsta.page/integrations/coralogix-endpoints/.md) |
