-
Notifications
You must be signed in to change notification settings - Fork 11
InfluxDBv2 installation
smilebasti edited this page Jun 10, 2023
·
5 revisions
npmGrafStats currently uses InfluxDBv2 to store the gathered logs.
A complete installation example is available with the docker-compose.yml file.
If you have to use InfluxDBv1 check the Branch: Influx-v1 It's NOT maintained! Only basics features!
This will set up the admin user and the required organization npmgrafstats and the first bucket to store the data also named and required npmgrafstats.
version: '3.8'
services:
influxdb:
image: influxdb:2.7-alpine
restart: unless-stopped
environment:
DOCKER_INFLUXDB_INIT_MODE: 'setup'
DOCKER_INFLUXDB_INIT_USERNAME: '<replace>'
DOCKER_INFLUXDB_INIT_PASSWORD: '<replace>' # atleast 8 characters
DOCKER_INFLUXDB_INIT_ORG: 'npmgrafstats'
DOCKER_INFLUXDB_INIT_BUCKET: 'npmgrafstats'
volumes:
# Mount for influxdb data directory and configuration
- ./influxdbv2:/var/lib/influxdb2
ports:
- '8086:8086'
You will need two Tokens to write and read Data:
- a write token for the bucket npmgrafstats to set in the enviroment variable for npmGrafStats container
- a read token to display the Data in Grafana as datasource
The token must be created manually via the gui. Select Datasources and then Token.
For original installation instructions see: https://hub.docker.com/_/influxdb/