---
title: "InfluxDB integration | Grafana Cloud documentation"
description: "Learn about InfluxDB Grafana Cloud integration."
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

# InfluxDB integration for Grafana Cloud

InfluxDB is a high-performance, open-source, time-series database system designed for handling, analyzing, and visualizing time-series data in real time. InfluxDB is commonly used in various industries, including DevOps and infrastructure monitoring, IoT applications, real-time analytics, and more.

This integration supports InfluxDB OSS 2.7.1+

This integration includes 6 useful alerts and 3 pre-built dashboards to help monitor and visualize InfluxDB metrics and logs.

## Before you begin

#### Metrics

InfluxDB exposes a Prometheus metrics endpoint, `/metrics`, that is enabled by default. To verify that this endpoint is enabled by running the following command on an InfluxDB node:

Bash ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```bash
curl <your-hostname>:<your-influxdb-port>/metrics
```

#### Logs

By default, InfluxDB logs to STDOUT. For Kubernetes and Docker, no additional configuration is required. To monitor InfluxDB logs on Linux, Darwin, or Windows platforms, configure logging to a file.

First, create a log file with proper permissions:

Bash ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```bash
touch /path/to/influxdb.log
chown influxdb /path/to/influxdb.log
```

When starting InfluxDB using the `influxd` daemon or a script, redirect STDOUT to a file on startup:

Bash ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```bash
influxd 1> /path/to/influxdb.log
```

When running InfluxDB using the service manager on Linux, modify the first line of the startup script at `/usr/lib/influxdb/scripts/influxd-systemd-start.sh` to look like this:

Bash ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```bash
/usr/bin/influxd 1> /path/to/influxdb.log &
```

For up-to-date information on logging to a file in InfluxDB, refer to [this documentation](https://docs.influxdata.com/influxdb/v2/admin/logs/#configure-your-influxdb-log-location).

## Install InfluxDB integration for Grafana Cloud

1. In your Grafana Cloud stack, click **Connections** in the left-hand menu.
2. Find **InfluxDB** and click its tile to open the integration.
3. Review the prerequisites in the **Configuration Details** tab and set up Grafana Alloy to send InfluxDB metrics and logs to your Grafana Cloud instance.
4. Click **Install** to add this integration’s pre-built dashboards and alerts to your Grafana Cloud instance, and you can start monitoring your InfluxDB setup.

## Configuration snippets for Grafana Alloy

### Advanced mode

The following snippets provide examples to guide you through the configuration process.

To instruct Grafana Alloy to scrape your InfluxDB instances, **manually** copy and append the snippets to your alloy configuration file, then follow subsequent instructions.

### Advanced metrics snippets

Alloy ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```alloy
prometheus.scrape "metrics_integrations_integrations_influxdb" {
	targets = [{
		__address__      = "constants.hostname:<port>",
		influxdb_cluster = "<your-cluster-name>",
		instance         = constants.hostname,
	}]
	forward_to = [prometheus.remote_write.metrics_service.receiver]
	job_name   = "integrations/influxdb"
}
```

To monitor your InfluxDB instance, you must use a [discovery.relabel](/docs/alloy/latest/reference/components/discovery.relabel/) component to discover your InfluxDB Prometheus endpoint and apply appropriate labels, followed by a [prometheus.scrape](/docs/alloy/latest/reference/components/prometheus.scrape) component to scrape it.

Configure the following properties within each `discovery.relabel` component:

- `__address__`: The address to your InfluxDB Prometheus metrics endpoint.
- `instance` label: `constants.hostname` sets the `instance` label to your Grafana Alloy server hostname. If that is not suitable, change it to a value uniquely identifies this InfluxDB instance. Make sure this label value is the same for all telemetry data collected for this instance.
- `influxdb_cluster` label must be set to a value that identifies your InfluxDB cluster.

If you have multiple InfluxDB servers to scrape, configure one `discovery.relabel` for each and scrape them by including each under `targets` within the `prometheus.scrape` component.

### Advanced logs snippets

#### darwin

Alloy ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```alloy
local.file_match "logs_integrations_integrations_influxdb" {
	path_targets = [{
		__address__      = "<hostname>",
		__path__         = "/var/log/influxdb/influxdb.log",
		influxdb_cluster = "<your-cluster-name>",
		instance         = constants.hostname,
		job              = "integrations/influxdb",
	}]
}

loki.process "logs_integrations_integrations_influxdb" {
	forward_to = [loki.write.grafana_cloud_loki.receiver]

	stage.multiline {
		firstline     = "ts=\\d{4}"
		max_lines     = 0
		max_wait_time = "3s"
	}

	stage.regex {
		expression = "ts=(\\S+) lvl=(?P<level>\\w+) msg=.* log_id=(\\S+) (service=\"{0,1}(?P<service>\\S+) ){0,1}(engine=(?P<engine>\\S*) ){0,1}.*$"
	}

	stage.labels {
		values = {
			engine  = null,
			level   = null,
			service = null,
		}
	}
}

loki.source.file "logs_integrations_integrations_influxdb" {
	targets    = local.file_match.logs_integrations_integrations_influxdb.targets
	forward_to = [loki.process.logs_integrations_integrations_influxdb.receiver]
}
```

To monitor your InfluxDB instance logs, you will use a combination of the following components:

- [local.file\_match](/docs/alloy/latest/reference/components/local.file_match) defines where to find the log file to be scraped. Change the following properties according to your environment:
  
  - `__address__`: The InfluxDB instance address
  - `__path__`: The path to the log file.
  - `instance` label: `constants.hostname` sets the `instance` label to your Grafana Alloy server hostname. If that is not suitable, change it to a value uniquely identifies this InfluxDB instance. Make sure this label value is the same for all telemetry data collected for this instance.
  - `influxdb_cluster` label must be set to a value that identifies your InfluxDB cluster.
- [loki.process](/docs/alloy/latest/reference/components/loki.process) defines how to process logs before sending it to Loki.
- [loki.source.file](/docs/alloy/latest/reference/components/loki.source.file) sends logs to Loki.

#### linux

Alloy ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```alloy
local.file_match "logs_integrations_integrations_influxdb" {
	path_targets = [{
		__address__      = "<hostname>",
		__path__         = "/var/log/influxdb/influxdb.log",
		influxdb_cluster = "<your-cluster-name>",
		instance         = constants.hostname,
		job              = "integrations/influxdb",
	}]
}

loki.process "logs_integrations_integrations_influxdb" {
	forward_to = [loki.write.grafana_cloud_loki.receiver]

	stage.multiline {
		firstline     = "ts=\\d{4}"
		max_lines     = 0
		max_wait_time = "3s"
	}

	stage.regex {
		expression = "ts=(\\S+) lvl=(?P<level>\\w+) msg=.* log_id=(\\S+) (service=\"{0,1}(?P<service>\\S+) ){0,1}(engine=(?P<engine>\\S*) ){0,1}.*$"
	}

	stage.labels {
		values = {
			engine  = null,
			level   = null,
			service = null,
		}
	}
}

loki.source.file "logs_integrations_integrations_influxdb" {
	targets    = local.file_match.logs_integrations_integrations_influxdb.targets
	forward_to = [loki.process.logs_integrations_integrations_influxdb.receiver]
}
```

To monitor your InfluxDB instance logs, you will use a combination of the following components:

- [local.file\_match](/docs/alloy/latest/reference/components/local.file_match) defines where to find the log file to be scraped. Change the following properties according to your environment:
  
  - `__address__`: The InfluxDB instance address
  - `__path__`: The path to the log file.
  - `instance` label: `constants.hostname` sets the `instance` label to your Grafana Alloy server hostname. If that is not suitable, change it to a value uniquely identifies this InfluxDB instance. Make sure this label value is the same for all telemetry data collected for this instance.
  - `influxdb_cluster` label must be set to a value that identifies your InfluxDB cluster.
- [loki.process](/docs/alloy/latest/reference/components/loki.process) defines how to process logs before sending it to Loki.
- [loki.source.file](/docs/alloy/latest/reference/components/loki.source.file) sends logs to Loki.

#### windows

Alloy ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```alloy
local.file_match "logs_integrations_integrations_influxdb" {
	path_targets = [{
		__address__      = "<hostname>",
		__path__         = "/var/log/influxdb/influxdb.log",
		influxdb_cluster = "<your-cluster-name>",
		instance         = constants.hostname,
		job              = "integrations/influxdb",
	}]
}

loki.process "logs_integrations_integrations_influxdb" {
	forward_to = [loki.write.grafana_cloud_loki.receiver]

	stage.multiline {
		firstline     = "ts=\\d{4}"
		max_lines     = 0
		max_wait_time = "3s"
	}

	stage.regex {
		expression = "ts=(\\S+) lvl=(?P<level>\\w+) msg=.* log_id=(\\S+) (service=\"{0,1}(?P<service>\\S+) ){0,1}(engine=(?P<engine>\\S*) ){0,1}.*$"
	}

	stage.labels {
		values = {
			engine  = null,
			level   = null,
			service = null,
		}
	}
}

loki.source.file "logs_integrations_integrations_influxdb" {
	targets    = local.file_match.logs_integrations_integrations_influxdb.targets
	forward_to = [loki.process.logs_integrations_integrations_influxdb.receiver]
}
```

To monitor your InfluxDB instance logs, you will use a combination of the following components:

- [local.file\_match](/docs/alloy/latest/reference/components/local.file_match) defines where to find the log file to be scraped. Change the following properties according to your environment:
  
  - `__address__`: The InfluxDB instance address
  - `__path__`: The path to the log file.
  - `instance` label: `constants.hostname` sets the `instance` label to your Grafana Alloy server hostname. If that is not suitable, change it to a value uniquely identifies this InfluxDB instance. Make sure this label value is the same for all telemetry data collected for this instance.
  - `influxdb_cluster` label must be set to a value that identifies your InfluxDB cluster.
- [loki.process](/docs/alloy/latest/reference/components/loki.process) defines how to process logs before sending it to Loki.
- [loki.source.file](/docs/alloy/latest/reference/components/loki.source.file) sends logs to Loki.

## Dashboards

The InfluxDB integration installs the following dashboards in your Grafana Cloud instance to help monitor your system.

- InfluxDB cluster overview
- InfluxDB instance overview
- InfluxDB logs

**InfluxDB cluster overview (queries)**

**InfluxDB cluster overview (tasks)**

**InfluxDB cluster overview (Go)**

## Alerts

The InfluxDB integration includes the following useful alerts:

Expand table

| Alert                                | Description                                                                                                                                                      |
|--------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| InfluxDBWarningTaskHighFailureRate   | Warning: Automated data processing tasks are failing at a high rate.                                                                                             |
| InfluxDBCriticalTaskHighFailureRate  | Critical: Automated data processing tasks are failing at a critical rate.                                                                                        |
| InfluxDBHighBusyWorkerPercentage     | Critical: There is a high percentage of busy workers.                                                                                                            |
| InfluxDBHighHeapMemoryUsage          | Critical: There is a high amount of heap memory being used.                                                                                                      |
| InfluxDBHighAverageAPIRequestLatency | Critical: Average API request latency is too high. High latency will negatively affect system performance, degrading data availability and precision.            |
| InfluxDBSlowAverageIQLExecutionTime  | Warning: InfluxQL execution times are too slow. Slow query execution times will negatively affect system performance, degrading data availability and precision. |

## Metrics

The most important metrics provided by the InfluxDB integration, which are used on the pre-built dashboards and Prometheus alerts, are as follows:

- boltdb\_reads\_total
- boltdb\_writes\_total
- go\_gc\_duration\_seconds\_sum
- go\_memstats\_gc\_cpu\_fraction
- go\_memstats\_heap\_alloc\_bytes
- go\_memstats\_heap\_idle\_bytes
- go\_memstats\_last\_gc\_time\_seconds
- go\_threads
- http\_api\_request\_duration\_seconds\_bucket
- http\_api\_request\_duration\_seconds\_sum
- http\_api\_requests\_total
- http\_query\_request\_bytes
- http\_query\_request\_count
- http\_query\_response\_bytes
- http\_write\_request\_bytes
- http\_write\_request\_count
- http\_write\_response\_bytes
- influxdb\_buckets\_total
- influxdb\_dashboards\_total
- influxdb\_remotes\_total
- influxdb\_replications\_total
- influxdb\_scrapers\_total
- influxdb\_uptime\_seconds
- influxdb\_users\_total
- influxql\_service\_executing\_duration\_seconds\_sum
- influxql\_service\_requests\_total
- qc\_compiling\_active
- qc\_executing\_active
- qc\_queueing\_active
- task\_executor\_total\_runs\_active
- task\_executor\_workers\_busy
- task\_scheduler\_current\_execution
- task\_scheduler\_total\_execute\_failure
- task\_scheduler\_total\_execution\_calls
- task\_scheduler\_total\_schedule\_calls
- task\_scheduler\_total\_schedule\_fails
- up

## Changelog

md ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```md
# 1.1.0 - April 2026

- Updated dashboards to follow new stylistic standards
- Renamed alert 'InfluxDBWarningTaskSchedulerHighFailureRate (Warning)' to 'InfluxDBWarningTaskHighFailureRate (Warning)'
- Renamed alert 'InfluxDBCriticalTaskSchedulerHighFailureRate (Critical)' to 'InfluxDBCriticalTaskHighFailureRate (Critical)'

# 1.0.1 - November 2024

- Update status panel check queries

# 1.0.0 - January 2023

- Initial release
```

## Cost

By connecting your InfluxDB instance to Grafana Cloud, you might incur charges. To view information on the number of active series that your Grafana Cloud account uses for metrics included in each Cloud tier, see [Active series and dpm usage](/docs/grafana-cloud/fundamentals/active-series-and-dpm/) and [Cloud tier pricing](/products/cloud/pricing/).
