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
- Host: GitHub
- URL: https://github.com/genebean/influxdb_downsample_hack
- Owner: genebean
- License: bsd-3-clause
- Created: 2019-06-28T17:23:56.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-28T17:25:35.000Z (over 6 years ago)
- Last Synced: 2025-02-05T13:44:06.755Z (about 1 year ago)
- Topics: downsampling, influxdb
- Language: Shell
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```