An open API service indexing awesome lists of open source software.

https://github.com/genebean/influxdb_downsample_hack

A workaround for InfluxDB CQ's
https://github.com/genebean/influxdb_downsample_hack

downsampling influxdb

Last synced: 11 months ago
JSON representation

A workaround for InfluxDB CQ's

Awesome Lists containing this project

README

          

# InfluxDB Downsampling Hack

It seems that its rather easy to out run what CQ's are capable of downsampling. This repo contains a workaround for this issue that I have been working with InfluxData's support team on.

## Usage

You will need to create a file in the root of this repo called `local_vars` that contains the following information:

```sh
export INFLUX_USERNAME=''
export INFLUX_PASSWORD=''
export INFLUX_URL=''
export KAPACITOR_URL="https://$INFLUX_USERNAME:$INFLUX_PASSWORD@:9092"

export WORKING_DIR=''
```

Once that file is in place, you can run the script like so:

_Running for one database_:

```sh
./influx-ticket-41490.sh source_db_name source_retention_policy_name destination_retention_policy
```

_Running for multiple databases_:

```sh
for db in telegraf_general telegraf_vsphere; do ./influx-ticket-41490.sh $db source_retention_policy_name destination_retention_policy; done
```

### Optional debugging output

setting `DEBUG=true` either as a prefix for the command being run or as an environment variable will enable printing everything that is happening to your terminal. For example:

```sh
DEBUG=true ./influx-ticket-41490.sh source_db_name source_retention_policy_name destination_retention_policy
```