-
Notifications
You must be signed in to change notification settings - Fork 22
Using influxDB
Xatkit can make use of an influx 2.x database instead of the internal mapDB one. This page details how to use it.
- A working installation of Xatkit (Check Build Xatkit)
- A working installation of InfluxDB 2.0 or greater (Installing InfluxDB OSS)
If you want to use the docker image for influxDB 2.0+ go to: setup influx for the Xatkit environment (Docker version)
Run influx setup
to create a primary organization and bucket.
If you already have an influxdb instance, consider creating a different bucket/organization for your bots with
influx org create
and
influx bucket create
run influx with
influxd --http-bind-address=:XXXX
More info: https://v2.docs.influxdata.com/v2.0/reference/cli/influx/bucket/ and https://v2.docs.influxdata.com/v2.0/reference/cli/influx/org/, also, worth reading: https://v2.docs.influxdata.com/v2.0/reference/cli/influx/
You can find your token following the steps here
Pull the Docker image with InfluxDB 2.0+:
docker pull quay.io/influxdb/influxdb:2.0.0-beta
Make it run:
docker run -p 8086:9999 \
-v influxdb:/var/lib/influxdb \
-d quay.io/influxdb/influxdb:2.0.0-beta
InfluxDB should be available at http://localhost:8086
- Go to http://localhost:8086
- Set up your initial organization / bucket and get your token
Add the following dependency to your pom.xml
<dependency>
<groupId>com.xatkit</groupId>
<artifactId>xatkit-logs-influx</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
In order to make the bot work with influxDB you will need to set up ALL of the following options.
OPTION | DEFINITION |
---|---|
xatkit.logs.database | com.xatkit.core.recognition.RecognitionMonitorInflux |
xatkit.influx.token | token that connects to the bucket |
xatkit.influx.bucket | influxDB bucket that we want to populate with our bot's data |
xatkit.influx.organization | influxDB defined organization where the bucket belongs |
xatkit.influx.url | Where to find the influxDB database. Default: http://localhost:9999 |
xatkit.influx.bot_id | ID of the bot inside the current bucket. Default: xatkitBot |
Note: By using influxDB, data WON'T be stored in the internal mapDB instance, which means the bot becomes dependant on the influxDB availability to write/store data
- Install influx (Installing InfluxDB OSS)
- Make sure to add the database options in the properties.
- Getting Started
- Configuring your bot
- Integrating an Intent Recognition Provider
- Adding a bot to your website
- Deploying on Slack
- Basic concepts
- Intents and Entities
- States, Transitions, and Context
- Default and Local Fallbacks
- Core Library