From 5378a4038b14ef100eb68e1e93bdae94886bd559 Mon Sep 17 00:00:00 2001
From: Sheldan <5037282+Sheldan@users.noreply.github.com>
Date: Fri, 22 Sep 2023 00:44:40 +0200
Subject: [PATCH] [OPB-xxx] adding configuration and changing structure for k8s
deployment
---
.github/workflows/build.yml | 11 +-
.github/workflows/release.yml | 36 +-
Tiltfile | 40 +
application/database/pom.xml | 34 -
.../database/src/main/assembly/liquibase.xml | 18 -
.../resources/migrations/1.5.4/collection.xml | 10 -
.../1.5.4/structure/grafana_user.xml | 19 -
.../migrations/1.5.4/structure/structure.xml | 10 -
.../main/resources/migrations/changeLog.xml | 10 -
.../main/resources/migrations/dbchangelog.xsd | 1386 -----
application/executable/Dockerfile | 10 +
application/executable/pom.xml | 1 +
.../bot/executable/SecurityConfig.java | 18 +
.../resources/application-local.properties | 21 -
.../src/main/resources/application.properties | 14 +-
.../faq/models/database/FAQChannelGroup.java | 2 +-
.../database/FAQChannelGroupCommand.java | 2 +-
.../faq/models/database/FAQCommand.java | 2 +-
.../faq/models/database/FAQCommandAlias.java | 2 +-
.../models/database/FAQCommandResponse.java | 2 +-
.../database/embed/ChannelGroupCommandId.java | 4 +-
.../database/embed/CommandResponseId.java | 4 +-
.../database/embed/FAQCommandAliasId.java | 4 +-
.../modules/news/model/database/NewsPost.java | 2 +-
.../NewsPostManagementServiceBean.java | 2 +-
.../model/database/ReferralUserInAServer.java | 2 +-
.../lights/models/database/LightsRole.java | 2 +-
application/pom.xml | 1 -
deployment/docker-compose/pom.xml | 34 -
.../src/main/assembly/docker-compose.xml | 19 -
.../docker-compose/src/main/resources/.env | 32 -
.../src/main/resources/README.md | 10 -
.../src/main/resources/docker-compose.yml | 150 -
.../main/resources/fill-prometheus-file.sh | 5 -
.../res/prometheus-scrapper-password | 1 -
deployment/helm/oneplus-bot/.helmignore | 23 +
deployment/helm/oneplus-bot/Chart.yaml | 24 +
.../configuration/grafana/config.yaml | 4 +
.../oneplus-bot-discord-dashboard.json | 939 ++++
.../grafana/oneplus-bot-log-dashboard.json | 238 +
.../helm/oneplus-bot/templates/_helpers.tpl | 62 +
.../helm/oneplus-bot/templates/api-keys.yaml | 7 +
.../templates/db-config-deployment-job.yaml | 69 +
.../oneplus-bot/templates/db-credentials.yaml | 13 +
.../oneplus-bot/templates/deployment.yaml | 106 +
.../grafana-dashboard-deployment.yaml | 42 +
.../helm/oneplus-bot/templates/service.yaml | 19 +
.../oneplus-bot/templates/serviceaccount.yaml | 12 +
.../templates/template-deployment-job.yaml | 69 +
deployment/helm/oneplus-bot/values.yaml | 125 +
deployment/image-packaging/pom.xml | 177 +-
.../image-packaging/src/main/docker/.env | 8 +-
.../src/main/docker/database/Dockerfile | 5 -
.../src/main/docker/database/sql/init.sql | 1 -
.../src/main/docker/db-data/Dockerfile | 6 +
.../config/artifact_versions.json | 14 -
.../src/main/docker/db-data/config/move.sh | 2 +
.../src/main/docker/deployment/Dockerfile | 8 -
.../src/main/docker/docker-compose.yml | 49 +-
.../src/main/docker/grafana/Dockerfile | 6 -
.../src/main/docker/grafana/config.ini | 2 -
.../grafana/dashboards/jvm-dashboard.json | 1561 ------
.../grafana/dashboards/oneplus-bot-logs.json | 65 -
.../oneplus-bot-stats-dashboard.json | 4696 -----------------
.../oneplus-bot-status-dashboard.json | 1100 ----
.../grafana/provisioning/dashboards/all.yml | 6 -
.../grafana/provisioning/datasources/all.yml | 29 -
.../src/main/docker/loki/Dockerfile | 4 -
.../src/main/docker/loki/loki.yml | 66 -
.../src/main/docker/oneplusbot/Dockerfile | 6 +-
.../src/main/docker/pgAdmin/Dockerfile | 5 -
.../main/docker/pgAdmin/config/servers.json | 13 -
.../src/main/docker/prometheus/Dockerfile | 4 -
.../src/main/docker/prometheus/prometheus.yml | 17 -
.../src/main/docker/promtail/Dockerfile | 4 -
.../src/main/docker/promtail/promtail.yaml | 17 -
.../src/main/docker/template-data/Dockerfile | 7 +
.../config/artifact_versions.json | 17 +
.../main/docker/template-data/config/move.sh | 2 +
.../infrastructure/terraform/.gitignore | 29 -
.../terraform/.terraform.lock.hcl | 23 -
deployment/infrastructure/terraform/cloud.tf | 10 -
deployment/infrastructure/terraform/main.tf | 7 -
deployment/infrastructure/terraform/output.tf | 4 -
.../infrastructure/terraform/variables.tf | 3 -
deployment/pom.xml | 1 -
pom.xml | 10 +-
87 files changed, 2007 insertions(+), 9649 deletions(-)
create mode 100644 Tiltfile
delete mode 100644 application/database/pom.xml
delete mode 100644 application/database/src/main/assembly/liquibase.xml
delete mode 100644 application/database/src/main/resources/migrations/1.5.4/collection.xml
delete mode 100644 application/database/src/main/resources/migrations/1.5.4/structure/grafana_user.xml
delete mode 100644 application/database/src/main/resources/migrations/1.5.4/structure/structure.xml
delete mode 100644 application/database/src/main/resources/migrations/changeLog.xml
delete mode 100644 application/database/src/main/resources/migrations/dbchangelog.xsd
create mode 100644 application/executable/Dockerfile
create mode 100644 application/executable/src/main/java/dev/sheldan/oneplus/bot/executable/SecurityConfig.java
delete mode 100644 application/executable/src/main/resources/application-local.properties
delete mode 100644 deployment/docker-compose/pom.xml
delete mode 100644 deployment/docker-compose/src/main/assembly/docker-compose.xml
delete mode 100644 deployment/docker-compose/src/main/resources/.env
delete mode 100644 deployment/docker-compose/src/main/resources/README.md
delete mode 100644 deployment/docker-compose/src/main/resources/docker-compose.yml
delete mode 100755 deployment/docker-compose/src/main/resources/fill-prometheus-file.sh
delete mode 100644 deployment/docker-compose/src/main/resources/res/prometheus-scrapper-password
create mode 100644 deployment/helm/oneplus-bot/.helmignore
create mode 100644 deployment/helm/oneplus-bot/Chart.yaml
create mode 100644 deployment/helm/oneplus-bot/configuration/grafana/config.yaml
create mode 100644 deployment/helm/oneplus-bot/configuration/grafana/oneplus-bot-discord-dashboard.json
create mode 100644 deployment/helm/oneplus-bot/configuration/grafana/oneplus-bot-log-dashboard.json
create mode 100644 deployment/helm/oneplus-bot/templates/_helpers.tpl
create mode 100644 deployment/helm/oneplus-bot/templates/api-keys.yaml
create mode 100644 deployment/helm/oneplus-bot/templates/db-config-deployment-job.yaml
create mode 100644 deployment/helm/oneplus-bot/templates/db-credentials.yaml
create mode 100644 deployment/helm/oneplus-bot/templates/deployment.yaml
create mode 100644 deployment/helm/oneplus-bot/templates/grafana-dashboard-deployment.yaml
create mode 100644 deployment/helm/oneplus-bot/templates/service.yaml
create mode 100644 deployment/helm/oneplus-bot/templates/serviceaccount.yaml
create mode 100644 deployment/helm/oneplus-bot/templates/template-deployment-job.yaml
create mode 100644 deployment/helm/oneplus-bot/values.yaml
delete mode 100644 deployment/image-packaging/src/main/docker/database/Dockerfile
delete mode 100644 deployment/image-packaging/src/main/docker/database/sql/init.sql
create mode 100644 deployment/image-packaging/src/main/docker/db-data/Dockerfile
rename deployment/image-packaging/src/main/docker/{deployment => db-data}/config/artifact_versions.json (63%)
create mode 100644 deployment/image-packaging/src/main/docker/db-data/config/move.sh
delete mode 100644 deployment/image-packaging/src/main/docker/deployment/Dockerfile
delete mode 100644 deployment/image-packaging/src/main/docker/grafana/Dockerfile
delete mode 100644 deployment/image-packaging/src/main/docker/grafana/config.ini
delete mode 100644 deployment/image-packaging/src/main/docker/grafana/dashboards/jvm-dashboard.json
delete mode 100644 deployment/image-packaging/src/main/docker/grafana/dashboards/oneplus-bot-logs.json
delete mode 100644 deployment/image-packaging/src/main/docker/grafana/dashboards/oneplus-bot-stats-dashboard.json
delete mode 100644 deployment/image-packaging/src/main/docker/grafana/dashboards/oneplus-bot-status-dashboard.json
delete mode 100644 deployment/image-packaging/src/main/docker/grafana/provisioning/dashboards/all.yml
delete mode 100644 deployment/image-packaging/src/main/docker/grafana/provisioning/datasources/all.yml
delete mode 100644 deployment/image-packaging/src/main/docker/loki/Dockerfile
delete mode 100644 deployment/image-packaging/src/main/docker/loki/loki.yml
delete mode 100644 deployment/image-packaging/src/main/docker/pgAdmin/Dockerfile
delete mode 100644 deployment/image-packaging/src/main/docker/pgAdmin/config/servers.json
delete mode 100644 deployment/image-packaging/src/main/docker/prometheus/Dockerfile
delete mode 100644 deployment/image-packaging/src/main/docker/prometheus/prometheus.yml
delete mode 100644 deployment/image-packaging/src/main/docker/promtail/Dockerfile
delete mode 100644 deployment/image-packaging/src/main/docker/promtail/promtail.yaml
create mode 100644 deployment/image-packaging/src/main/docker/template-data/Dockerfile
create mode 100644 deployment/image-packaging/src/main/docker/template-data/config/artifact_versions.json
create mode 100644 deployment/image-packaging/src/main/docker/template-data/config/move.sh
delete mode 100644 deployment/infrastructure/terraform/.gitignore
delete mode 100644 deployment/infrastructure/terraform/.terraform.lock.hcl
delete mode 100644 deployment/infrastructure/terraform/cloud.tf
delete mode 100644 deployment/infrastructure/terraform/main.tf
delete mode 100644 deployment/infrastructure/terraform/output.tf
delete mode 100644 deployment/infrastructure/terraform/variables.tf
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 1d8f511..0034274 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -17,11 +17,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
- - name: Set up JDK 1.8
- uses: actions/setup-java@v1
+ - uses: actions/checkout@v3
with:
- java-version: 1.8
+ persist-credentials: false
+ - name: Set up JDK 17
+ uses: actions/setup-java@v3
+ with:
+ distribution: 'corretto'
+ java-version: 17
- name: Build with Maven
run: mvn -s settings.xml -B install --file pom.xml
env:
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 480cc1f..e828603 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -6,13 +6,14 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
with:
persist-credentials: false
- name: Set up Java for publishing to GitHub Packages
- uses: actions/setup-java@v1
+ uses: actions/setup-java@v3
with:
- java-version: 1.8
+ distribution: 'corretto'
+ java-version: 17
- name: Load current version
id: version
run: echo "version=$(mvn -s settings.xml --file pom.xml -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_ENV
@@ -22,17 +23,26 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
user: Sheldan
token: ${{ secrets.ABSTRACTO_PAT }}
- - name: Login to GitHub Packages Docker Registry
- uses: docker/login-action@v1
+ - name: Login to Harbor
+ uses: docker/login-action@v2
+ with:
+ registry: harbor.sheldan.dev
+ username: ${{ secrets.HARBOR_USERNAME }}
+ password: ${{ secrets.HARBOR_TOKEN }}
+ - name: Load env files
+ id: dotenv
+ uses: falti/dotenv-action@v1.0.4
with:
- registry: docker.pkg.github.com
- username: ${{ github.repository_owner }}
- password: ${{ secrets.GITHUB_TOKEN }}
- - name: Push deployment container
+ path: ./deployment/image-packaging/src/main/docker
+ - name: Push container
working-directory: ./deployment/image-packaging/src/main/docker
run: docker-compose build && docker-compose push
env:
- REGISTRY_PREFIX: docker.pkg.github.com/sheldan/oneplusbot/
- VERSION: ${{ env.version }}
- ABSTRACTO_VERSION: 1.4.20
- ABSTRACTO_REGISTRY_PREFIX: docker.pkg.github.com/sheldan/abstracto/
\ No newline at end of file
+ REGISTRY_PREFIX: ${{ steps.dotenv.outputs.registry_prefix }}
+ VERSION: ${{ steps.dotenv.outputs.version }}
+ - name: Helm push
+ working-directory: ./deployment/helm/
+ run: |-
+ helm registry login -u ${{ secrets.HARBOR_USERNAME }} -p ${{ secrets.HARBOR_TOKEN }} harbor.sheldan.dev
+ helm package oneplus-bot
+ helm push oneplus-bot*.tgz oci://harbor.sheldan.dev/oneplus-bot
diff --git a/Tiltfile b/Tiltfile
new file mode 100644
index 0000000..dcb7dd3
--- /dev/null
+++ b/Tiltfile
@@ -0,0 +1,40 @@
+allow_k8s_contexts('k8s-cluster')
+
+load('ext://restart_process', 'docker_build_with_restart')
+registry = 'harbor.sheldan.dev/oneplus-bot/'
+
+local_resource(
+ 'oneplus-bot-java-compile',
+ 'mvn install && ' +
+ 'rm -rf application/executable/target/jar-staging && ' +
+ 'unzip -o application/executable/target/oneplus-bot-exec.jar -d application/executable/target/jar-staging && ' +
+ 'rsync --delete --inplace --checksum -r application/executable/target/jar-staging/ application/executable/target/jar && ' +
+ 'mkdir application/executable/target/jar/snapshots && ' +
+ 'rsync --delete --inplace --checksum -r application/executable/target/jar/BOOT-INF/lib/*-SNAPSHOT.jar application/executable/target/jar/snapshots && ' +
+ 'rm -f application/executable/target/jar/BOOT-INF/lib/*-SNAPSHOT.jar ',
+ deps=['pom.xml'])
+
+docker_build_with_restart(
+ registry + 'oneplus-bot',
+ './application/executable/target/jar',
+ entrypoint=['java', '-noverify', '-cp', '.:./lib/*', 'dev.sheldan.oneplus.bot.executable.Application'],
+ dockerfile='./application/executable/Dockerfile',
+ live_update=[
+ sync('./application/executable/target/jar/BOOT-INF/lib', '/app/lib'),
+ sync('./application/executable/target/jar/META-INF', '/app/META-INF'),
+ sync('./application/executable/target/jar/BOOT-INF/classes', '/app'),
+ sync('./application/executable/target/jar/snapshots', '/app/lib')
+ ],
+)
+
+docker_build(registry + 'oneplus-bot-db-data', 'deployment/image-packaging/src/main/docker/db-data/')
+docker_build(registry + 'oneplus-bot-template-data', 'deployment/image-packaging/src/main/docker/template-data/')
+
+
+k8s_yaml(helm('deployment/helm/oneplus-bot', values=
+['./../OnePlusBot-environments/argocd/apps/oneplus-bot/values/local/values.yaml',
+'secrets://./../OnePlusBot-environments/argocd/apps/oneplus-bot/values/local/values.secrets.yaml']
+))
+
+local_resource('fetch-packages', 'mvn install -f deployment/image-packaging/pom.xml', auto_init=False, trigger_mode = TRIGGER_MODE_MANUAL)
+k8s_resource('chart-oneplus-bot', port_forwards='5005:5005')
\ No newline at end of file
diff --git a/application/database/pom.xml b/application/database/pom.xml
deleted file mode 100644
index c42ded9..0000000
--- a/application/database/pom.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
- dev.sheldan.oneplus.bot.application
- application
- 1.6.6-SNAPSHOT
-
- 4.0.0
-
- database
-
-
-
-
- maven-assembly-plugin
-
-
- src/main/assembly/liquibase.xml
-
-
-
-
- make-assembly
- package
-
- single
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/application/database/src/main/assembly/liquibase.xml b/application/database/src/main/assembly/liquibase.xml
deleted file mode 100644
index 8b4774f..0000000
--- a/application/database/src/main/assembly/liquibase.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
- liquibase
-
- zip
-
- false
-
-
- .
- ${project.basedir}/src/main/resources/migrations
-
- **/*
-
-
-
-
\ No newline at end of file
diff --git a/application/database/src/main/resources/migrations/1.5.4/collection.xml b/application/database/src/main/resources/migrations/1.5.4/collection.xml
deleted file mode 100644
index f320d27..0000000
--- a/application/database/src/main/resources/migrations/1.5.4/collection.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/application/database/src/main/resources/migrations/1.5.4/structure/grafana_user.xml b/application/database/src/main/resources/migrations/1.5.4/structure/grafana_user.xml
deleted file mode 100644
index 468a3df..0000000
--- a/application/database/src/main/resources/migrations/1.5.4/structure/grafana_user.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
- CREATE USER ${abstractografanadbuser} WITH PASSWORD '${abstractografanadbpass}';
- GRANT CONNECT ON DATABASE abstracto TO ${abstractografanadbuser};
- GRANT USAGE ON SCHEMA abstracto TO ${abstractografanadbuser};
- GRANT SELECT ON ALL TABLES IN SCHEMA abstracto TO ${abstractografanadbuser};
- ALTER DEFAULT PRIVILEGES IN SCHEMA abstracto
- GRANT SELECT ON TABLES TO ${abstractografanadbuser};
-
-
-
\ No newline at end of file
diff --git a/application/database/src/main/resources/migrations/1.5.4/structure/structure.xml b/application/database/src/main/resources/migrations/1.5.4/structure/structure.xml
deleted file mode 100644
index c94db99..0000000
--- a/application/database/src/main/resources/migrations/1.5.4/structure/structure.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/application/database/src/main/resources/migrations/changeLog.xml b/application/database/src/main/resources/migrations/changeLog.xml
deleted file mode 100644
index 38352c3..0000000
--- a/application/database/src/main/resources/migrations/changeLog.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/application/database/src/main/resources/migrations/dbchangelog.xsd b/application/database/src/main/resources/migrations/dbchangelog.xsd
deleted file mode 100644
index 83483a5..0000000
--- a/application/database/src/main/resources/migrations/dbchangelog.xsd
+++ /dev/null
@@ -1,1386 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- Extension to standard XSD boolean type to allow ${} parameters
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Extension to standard XSD integer type to allow ${} parameters
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- onChangeLogPreconditionOnSqlOutput determines what should
- happen when evaluating this precondition in updateSQL mode. TEST: Run
- precondition, FAIL: Fail precondition, IGNORE: Skip precondition check
- [DEFAULT]
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Used with valueClobFile to specify file encoding explicitly.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- true for a cycling sequence, false for a non-cycling sequence.
- Default is false.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/application/executable/Dockerfile b/application/executable/Dockerfile
new file mode 100644
index 0000000..d006394
--- /dev/null
+++ b/application/executable/Dockerfile
@@ -0,0 +1,10 @@
+FROM amazoncorretto:17.0.8-alpine3.18
+RUN apk add entr
+
+WORKDIR /app
+ADD BOOT-INF/lib/ /app/lib
+ADD snapshots/ /app/lib
+ADD META-INF /app/META-INF
+ADD BOOT-INF/classes /app
+
+ENTRYPOINT java -cp .:./lib/* dev.sheldan.oneplus.bot.executable.Application
\ No newline at end of file
diff --git a/application/executable/pom.xml b/application/executable/pom.xml
index 0556b8b..4fe0668 100644
--- a/application/executable/pom.xml
+++ b/application/executable/pom.xml
@@ -14,6 +14,7 @@
+ oneplus-bot
org.springframework.boot
diff --git a/application/executable/src/main/java/dev/sheldan/oneplus/bot/executable/SecurityConfig.java b/application/executable/src/main/java/dev/sheldan/oneplus/bot/executable/SecurityConfig.java
new file mode 100644
index 0000000..14c3e83
--- /dev/null
+++ b/application/executable/src/main/java/dev/sheldan/oneplus/bot/executable/SecurityConfig.java
@@ -0,0 +1,18 @@
+package dev.sheldan.oneplus.bot.executable;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.web.SecurityFilterChain;
+
+@Configuration
+public class SecurityConfig {
+
+ @Bean
+ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
+ http.authorizeHttpRequests((authorize) -> authorize
+ .anyRequest().permitAll());
+ return http.build();
+ }
+
+}
diff --git a/application/executable/src/main/resources/application-local.properties b/application/executable/src/main/resources/application-local.properties
deleted file mode 100644
index a69cee8..0000000
--- a/application/executable/src/main/resources/application-local.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-spring.datasource.url=jdbc:postgresql://localhost:5432/abstracto
-spring.datasource.username= abstracto
-spring.datasource.password= abstracto
-spring.jpa.properties.hibernate.default_schema=abstracto
-spring.quartz.jdbc.initialize-schema=never
-
-spring.jpa.hibernate.ddl-auto = none
-
-spring.jpa.show-sql = false
-
-spring.jpa.properties.hibernate.format_sql = true
-log4j.logger.org.hibernate.SQL=trace
-log4j.logger.org.hibernate.type.descriptor.sql=trace
-log4j.logger.org.hibernate.type=trace
-
-management.metrics.tags.application=oneplus-bot
-spring.security.user.name=abstracto
-spring.security.user.password=password
-spring.security.user.roles=USER
-
-spring.application.name=OnePlusBot
\ No newline at end of file
diff --git a/application/executable/src/main/resources/application.properties b/application/executable/src/main/resources/application.properties
index 17d308d..7c7b6f2 100644
--- a/application/executable/src/main/resources/application.properties
+++ b/application/executable/src/main/resources/application.properties
@@ -1,11 +1,13 @@
spring.datasource.url=jdbc:postgresql://${DB_HOST}:${DB_PORT}/${DB_NAME}
spring.datasource.username= ${DB_USER}
spring.datasource.password= ${DB_PASS}
-spring.jpa.hibernate.default_schema=${DB_NAME}
+spring.jpa.hibernate.default_schema=abstracto
+spring.jpa.properties.hibernate.default_schema=abstracto
spring.quartz.jdbc.initialize-schema=never
-management.metrics.tags.application=oneplus-bot
-spring.security.user.name= ${REST_USER_NAME}
-spring.security.user.password= ${REST_PASSWORD}
-spring.security.user.roles=USER
+management.metrics.tags.application=OnePlusBot
+management.endpoint.health.probes.enabled=true
+management.health.livenessState.enabled=true
+management.health.readinessState.enabled=true
+spring.application.name=OnePlusBot
-spring.application.name=OnePlusBot
\ No newline at end of file
+spring.main.allow-circular-references=true
\ No newline at end of file
diff --git a/application/oneplus-bot-modules/faq/src/main/java/dev/sheldan/oneplus/bot/modules/faq/models/database/FAQChannelGroup.java b/application/oneplus-bot-modules/faq/src/main/java/dev/sheldan/oneplus/bot/modules/faq/models/database/FAQChannelGroup.java
index 0329785..eb95f54 100644
--- a/application/oneplus-bot-modules/faq/src/main/java/dev/sheldan/oneplus/bot/modules/faq/models/database/FAQChannelGroup.java
+++ b/application/oneplus-bot-modules/faq/src/main/java/dev/sheldan/oneplus/bot/modules/faq/models/database/FAQChannelGroup.java
@@ -3,7 +3,7 @@ package dev.sheldan.oneplus.bot.modules.faq.models.database;
import dev.sheldan.abstracto.core.models.database.AChannelGroup;
import lombok.*;
-import javax.persistence.*;
+import jakarta.persistence.*;
import java.time.Instant;
@Builder
diff --git a/application/oneplus-bot-modules/faq/src/main/java/dev/sheldan/oneplus/bot/modules/faq/models/database/FAQChannelGroupCommand.java b/application/oneplus-bot-modules/faq/src/main/java/dev/sheldan/oneplus/bot/modules/faq/models/database/FAQChannelGroupCommand.java
index de3c285..2e1fc2a 100644
--- a/application/oneplus-bot-modules/faq/src/main/java/dev/sheldan/oneplus/bot/modules/faq/models/database/FAQChannelGroupCommand.java
+++ b/application/oneplus-bot-modules/faq/src/main/java/dev/sheldan/oneplus/bot/modules/faq/models/database/FAQChannelGroupCommand.java
@@ -3,7 +3,7 @@ package dev.sheldan.oneplus.bot.modules.faq.models.database;
import dev.sheldan.oneplus.bot.modules.faq.models.database.embed.ChannelGroupCommandId;
import lombok.*;
-import javax.persistence.*;
+import jakarta.persistence.*;
import java.io.Serializable;
import java.time.Instant;
import java.util.ArrayList;
diff --git a/application/oneplus-bot-modules/faq/src/main/java/dev/sheldan/oneplus/bot/modules/faq/models/database/FAQCommand.java b/application/oneplus-bot-modules/faq/src/main/java/dev/sheldan/oneplus/bot/modules/faq/models/database/FAQCommand.java
index c5c3f49..e10dd79 100644
--- a/application/oneplus-bot-modules/faq/src/main/java/dev/sheldan/oneplus/bot/modules/faq/models/database/FAQCommand.java
+++ b/application/oneplus-bot-modules/faq/src/main/java/dev/sheldan/oneplus/bot/modules/faq/models/database/FAQCommand.java
@@ -3,7 +3,7 @@ package dev.sheldan.oneplus.bot.modules.faq.models.database;
import dev.sheldan.abstracto.core.models.database.AServer;
import lombok.*;
-import javax.persistence.*;
+import jakarta.persistence.*;
import java.io.Serializable;
import java.time.Instant;
import java.util.ArrayList;
diff --git a/application/oneplus-bot-modules/faq/src/main/java/dev/sheldan/oneplus/bot/modules/faq/models/database/FAQCommandAlias.java b/application/oneplus-bot-modules/faq/src/main/java/dev/sheldan/oneplus/bot/modules/faq/models/database/FAQCommandAlias.java
index b169e98..fd8f773 100644
--- a/application/oneplus-bot-modules/faq/src/main/java/dev/sheldan/oneplus/bot/modules/faq/models/database/FAQCommandAlias.java
+++ b/application/oneplus-bot-modules/faq/src/main/java/dev/sheldan/oneplus/bot/modules/faq/models/database/FAQCommandAlias.java
@@ -3,7 +3,7 @@ package dev.sheldan.oneplus.bot.modules.faq.models.database;
import dev.sheldan.oneplus.bot.modules.faq.models.database.embed.FAQCommandAliasId;
import lombok.*;
-import javax.persistence.*;
+import jakarta.persistence.*;
import java.io.Serializable;
import java.time.Instant;
diff --git a/application/oneplus-bot-modules/faq/src/main/java/dev/sheldan/oneplus/bot/modules/faq/models/database/FAQCommandResponse.java b/application/oneplus-bot-modules/faq/src/main/java/dev/sheldan/oneplus/bot/modules/faq/models/database/FAQCommandResponse.java
index 7771258..d05b161 100644
--- a/application/oneplus-bot-modules/faq/src/main/java/dev/sheldan/oneplus/bot/modules/faq/models/database/FAQCommandResponse.java
+++ b/application/oneplus-bot-modules/faq/src/main/java/dev/sheldan/oneplus/bot/modules/faq/models/database/FAQCommandResponse.java
@@ -3,7 +3,7 @@ package dev.sheldan.oneplus.bot.modules.faq.models.database;
import dev.sheldan.oneplus.bot.modules.faq.models.database.embed.CommandResponseId;
import lombok.*;
-import javax.persistence.*;
+import jakarta.persistence.*;
import java.time.Instant;
@Builder
diff --git a/application/oneplus-bot-modules/faq/src/main/java/dev/sheldan/oneplus/bot/modules/faq/models/database/embed/ChannelGroupCommandId.java b/application/oneplus-bot-modules/faq/src/main/java/dev/sheldan/oneplus/bot/modules/faq/models/database/embed/ChannelGroupCommandId.java
index 979251d..2ee8275 100644
--- a/application/oneplus-bot-modules/faq/src/main/java/dev/sheldan/oneplus/bot/modules/faq/models/database/embed/ChannelGroupCommandId.java
+++ b/application/oneplus-bot-modules/faq/src/main/java/dev/sheldan/oneplus/bot/modules/faq/models/database/embed/ChannelGroupCommandId.java
@@ -2,8 +2,8 @@ package dev.sheldan.oneplus.bot.modules.faq.models.database.embed;
import lombok.*;
-import javax.persistence.Column;
-import javax.persistence.Embeddable;
+import jakarta.persistence.Column;
+import jakarta.persistence.Embeddable;
import java.io.Serializable;
@Embeddable
diff --git a/application/oneplus-bot-modules/faq/src/main/java/dev/sheldan/oneplus/bot/modules/faq/models/database/embed/CommandResponseId.java b/application/oneplus-bot-modules/faq/src/main/java/dev/sheldan/oneplus/bot/modules/faq/models/database/embed/CommandResponseId.java
index 56ae46b..ec60b8e 100644
--- a/application/oneplus-bot-modules/faq/src/main/java/dev/sheldan/oneplus/bot/modules/faq/models/database/embed/CommandResponseId.java
+++ b/application/oneplus-bot-modules/faq/src/main/java/dev/sheldan/oneplus/bot/modules/faq/models/database/embed/CommandResponseId.java
@@ -2,8 +2,8 @@ package dev.sheldan.oneplus.bot.modules.faq.models.database.embed;
import lombok.*;
-import javax.persistence.Column;
-import javax.persistence.Embeddable;
+import jakarta.persistence.Column;
+import jakarta.persistence.Embeddable;
import java.io.Serializable;
@Embeddable
diff --git a/application/oneplus-bot-modules/faq/src/main/java/dev/sheldan/oneplus/bot/modules/faq/models/database/embed/FAQCommandAliasId.java b/application/oneplus-bot-modules/faq/src/main/java/dev/sheldan/oneplus/bot/modules/faq/models/database/embed/FAQCommandAliasId.java
index 3b37c66..d872c98 100644
--- a/application/oneplus-bot-modules/faq/src/main/java/dev/sheldan/oneplus/bot/modules/faq/models/database/embed/FAQCommandAliasId.java
+++ b/application/oneplus-bot-modules/faq/src/main/java/dev/sheldan/oneplus/bot/modules/faq/models/database/embed/FAQCommandAliasId.java
@@ -2,8 +2,8 @@ package dev.sheldan.oneplus.bot.modules.faq.models.database.embed;
import lombok.*;
-import javax.persistence.Column;
-import javax.persistence.Embeddable;
+import jakarta.persistence.Column;
+import jakarta.persistence.Embeddable;
import java.io.Serializable;
@Embeddable
diff --git a/application/oneplus-bot-modules/news/src/main/java/dev/sheldan/oneplus/bot/modules/news/model/database/NewsPost.java b/application/oneplus-bot-modules/news/src/main/java/dev/sheldan/oneplus/bot/modules/news/model/database/NewsPost.java
index 75717ab..8939994 100644
--- a/application/oneplus-bot-modules/news/src/main/java/dev/sheldan/oneplus/bot/modules/news/model/database/NewsPost.java
+++ b/application/oneplus-bot-modules/news/src/main/java/dev/sheldan/oneplus/bot/modules/news/model/database/NewsPost.java
@@ -5,7 +5,7 @@ import dev.sheldan.abstracto.core.models.database.AServer;
import dev.sheldan.abstracto.core.models.database.AUserInAServer;
import lombok.*;
-import javax.persistence.*;
+import jakarta.persistence.*;
import java.time.Instant;
@Builder
diff --git a/application/oneplus-bot-modules/news/src/main/java/dev/sheldan/oneplus/bot/modules/news/service/management/NewsPostManagementServiceBean.java b/application/oneplus-bot-modules/news/src/main/java/dev/sheldan/oneplus/bot/modules/news/service/management/NewsPostManagementServiceBean.java
index ea2c94d..4daec71 100644
--- a/application/oneplus-bot-modules/news/src/main/java/dev/sheldan/oneplus/bot/modules/news/service/management/NewsPostManagementServiceBean.java
+++ b/application/oneplus-bot-modules/news/src/main/java/dev/sheldan/oneplus/bot/modules/news/service/management/NewsPostManagementServiceBean.java
@@ -6,12 +6,12 @@ import dev.sheldan.abstracto.core.service.management.UserInServerManagementServi
import dev.sheldan.oneplus.bot.modules.news.exception.NewsPostNotFoundException;
import dev.sheldan.oneplus.bot.modules.news.model.database.NewsPost;
import dev.sheldan.oneplus.bot.modules.news.repository.NewsPostRepository;
+import jakarta.persistence.*;
import lombok.extern.slf4j.Slf4j;
import net.dv8tion.jda.api.entities.Message;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
-import javax.persistence.EntityManager;
import java.time.Instant;
import java.util.List;
import java.util.Optional;
diff --git a/application/oneplus-bot-modules/referral/src/main/java/dev/sheldan/oneplus/bot/modules/referral/model/database/ReferralUserInAServer.java b/application/oneplus-bot-modules/referral/src/main/java/dev/sheldan/oneplus/bot/modules/referral/model/database/ReferralUserInAServer.java
index af24f99..91c5a25 100644
--- a/application/oneplus-bot-modules/referral/src/main/java/dev/sheldan/oneplus/bot/modules/referral/model/database/ReferralUserInAServer.java
+++ b/application/oneplus-bot-modules/referral/src/main/java/dev/sheldan/oneplus/bot/modules/referral/model/database/ReferralUserInAServer.java
@@ -4,7 +4,7 @@ import dev.sheldan.abstracto.core.models.database.AServer;
import dev.sheldan.abstracto.core.models.database.AUserInAServer;
import lombok.*;
-import javax.persistence.*;
+import jakarta.persistence.*;
import java.time.Instant;
@Builder
diff --git a/application/oneplus-bot-modules/seasonal/src/main/java/dev/sheldan/oneplus/bot/modules/seasonal/lights/models/database/LightsRole.java b/application/oneplus-bot-modules/seasonal/src/main/java/dev/sheldan/oneplus/bot/modules/seasonal/lights/models/database/LightsRole.java
index e748b26..991557c 100644
--- a/application/oneplus-bot-modules/seasonal/src/main/java/dev/sheldan/oneplus/bot/modules/seasonal/lights/models/database/LightsRole.java
+++ b/application/oneplus-bot-modules/seasonal/src/main/java/dev/sheldan/oneplus/bot/modules/seasonal/lights/models/database/LightsRole.java
@@ -4,7 +4,7 @@ import dev.sheldan.abstracto.core.models.database.ARole;
import dev.sheldan.abstracto.core.models.database.AServer;
import lombok.*;
-import javax.persistence.*;
+import jakarta.persistence.*;
@Builder
@Entity
diff --git a/application/pom.xml b/application/pom.xml
index faf8813..52e1cc5 100644
--- a/application/pom.xml
+++ b/application/pom.xml
@@ -16,7 +16,6 @@
executable
oneplus-bot-customizations
oneplus-bot-modules
- database
diff --git a/deployment/docker-compose/pom.xml b/deployment/docker-compose/pom.xml
deleted file mode 100644
index e492bef..0000000
--- a/deployment/docker-compose/pom.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
- dev.sheldan.oneplus.bot.deployment
- deployment
- 1.6.6-SNAPSHOT
-
- 4.0.0
-
- pom
- docker-compose
-
-
-
-
- maven-assembly-plugin
-
-
- assembly-docker-compose-configuration
- package
-
- single
-
-
-
- src/main/assembly/docker-compose.xml
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/deployment/docker-compose/src/main/assembly/docker-compose.xml b/deployment/docker-compose/src/main/assembly/docker-compose.xml
deleted file mode 100644
index 370bed3..0000000
--- a/deployment/docker-compose/src/main/assembly/docker-compose.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-
- docker-compose
-
- zip
-
- false
-
-
- ./docker-compose
- ${project.basedir}/src/main/resources/
-
- **/*
-
- true
-
-
-
\ No newline at end of file
diff --git a/deployment/docker-compose/src/main/resources/.env b/deployment/docker-compose/src/main/resources/.env
deleted file mode 100644
index b67565d..0000000
--- a/deployment/docker-compose/src/main/resources/.env
+++ /dev/null
@@ -1,32 +0,0 @@
-# database configuration
-DATABASE_HOST=database
-DATABASE_PORT=5432
-DATABASE_USER=abstracto
-DATABASE_NAME=abstracto
-DATABASE_PASSWORD=abstracto
-GRAFANA_DATABASE_PASSWORD=grafana
-GRAFANA_DATABASE_USER=grafana
-# deployment configuration, whether or not the container should execute the parts on startup
-EXECUTE_DEPLOYMENT=true
-EXECUTE_LIQUIBASE=true
-EXECUTE_TEMPLATES=true
-# whether or not remote debug should be enabled on the application
-REMOTE_DEBUG=false
-DEBUG_PORT=5005
-TOMCAT_PORT=8080
-# authentication for actuator endpoints
-REST_USER_NAME=abstracto
-REST_PASSWORD=password
-# port grafana will be reachable
-GRAFANA_PORT=3000
-# port prometheus will be reachable
-LOKI_PORT=3100
-PROMETHEUS_PORT=9090
-# port pg admin will be reachable
-PGADMIN_PORT=5050
-# default authentication for pg admin
-PGADMIN_DEFAULT_EMAIL=sheldan@sheldan.dev
-PGADMIN_DEFAULT_PASSWORD=admin
-TOKEN=
-YOUTUBE_API_KEY=
-ONEPLUS_BOT_VERSION=1.6.5
\ No newline at end of file
diff --git a/deployment/docker-compose/src/main/resources/README.md b/deployment/docker-compose/src/main/resources/README.md
deleted file mode 100644
index 11c7647..0000000
--- a/deployment/docker-compose/src/main/resources/README.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# Setup for local docker-compose deployment
-
-* Install docker [here](https://docs.docker.com/get-docker/)
-* Install docker-compose [here](https://docs.docker.com/compose/install/).
-* Execute `docker-compose build` in `image-packaging`.
-* Fill out values in `.env` for token and database password. There are some default values, but token is required to be changed.
-* Execute `fill-prometheus-file-sh` in order to populate the prometheus config with the correct password (https://github.com/prometheus/prometheus/issues/2357)
-* Execute `docker-compose up` in this directory and wait for completion.
-* Per default pgAdmin is available on `localhost:5050` with the configured user and password. It will contain a configuration in the servers list.
-
diff --git a/deployment/docker-compose/src/main/resources/docker-compose.yml b/deployment/docker-compose/src/main/resources/docker-compose.yml
deleted file mode 100644
index a61961c..0000000
--- a/deployment/docker-compose/src/main/resources/docker-compose.yml
+++ /dev/null
@@ -1,150 +0,0 @@
-version: '3.7'
-
-services:
- db:
- image: ${REGISTRY_PREFIX}oneplus_bot_database:${ONEPLUS_BOT_VERSION}
- container_name: database
- restart: always
- environment:
- POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
- POSTGRES_USER: ${DATABASE_USER}
- ports:
- - "127.0.0.1:${DATABASE_PORT}:5432"
- networks:
- - oneplusbot
- volumes:
- - db-data:/var/lib/postgresql/data
- deployment_container:
- container_name: deployment
- image: ${REGISTRY_PREFIX}oneplus_bot_deployment:${ONEPLUS_BOT_VERSION}
- depends_on:
- - db
- environment:
- DB_PASS: ${DATABASE_PASSWORD}
- DB_HOST: ${DATABASE_HOST}
- DB_PORT: ${DATABASE_PORT}
- DB_USER: ${DATABASE_USER}
- DB_NAME: ${DATABASE_NAME}
- ABSTRACTO_GRAFANA_DB_PASS: ${GRAFANA_DATABASE_PASSWORD}
- ABSTRACTO_GRAFANA_DB_USER: ${GRAFANA_DATABASE_USER}
- EXECUTE_DEPLOYMENT: ${EXECUTE_DEPLOYMENT}
- EXECUTE_LIQUIBASE: ${EXECUTE_LIQUIBASE}
- EXECUTE_TEMPLATES: ${EXECUTE_TEMPLATES}
- LIQUIBASE_PATH: ${LIQUIBASE_PATH:-/liquibase}
- POSTGRES_DRIVER_PATH: ${EXECUTE_DEPLOYMENT:-/postgres/driver.jar}
- WAIT_HOSTS: ${DATABASE_HOST}:${DATABASE_PORT}
- networks:
- - oneplusbot
- bot:
- image: ${REGISTRY_PREFIX}oneplus_bot:${ONEPLUS_BOT_VERSION}
- depends_on:
- - db
- - deployment_container
- restart: on-failure
- container_name: oneplusbot
- environment:
- TOKEN: ${TOKEN}
- REMOTE_DEBUG: ${REMOTE_DEBUG}
- DB_PASS: ${DATABASE_PASSWORD}
- DB_HOST: ${DATABASE_HOST}
- DB_PORT: ${DATABASE_PORT}
- DB_USER: ${DATABASE_USER}
- DB_NAME: ${DATABASE_NAME}
- REST_USER_NAME: ${REST_USER_NAME}
- REST_PASSWORD: ${REST_PASSWORD}
- YOUTUBE_API_KEY: ${YOUTUBE_API_KEY}
- DEBRA_DONATION_NOTIFICATION_SERVER_ID: ${DEBRA_DONATION_NOTIFICATION_SERVER_ID}
- TWITCH_CLIENT_ID: ${TWITCH_CLIENT_ID}
- TWITCH_SECRET: ${TWITCH_SECRET}
- OPEN_WEATHER_MAP_API_KEY: ${OPEN_WEATHER_MAP_API_KEY}
- command: sh -c "while ping -c1 deployment_container &>/dev/null; do sleep 1; done; echo 'Liquibase finished!' && ./start.sh"
- ports:
- - "127.0.0.1:${DEBUG_PORT}:5005"
- - "127.0.0.1:${TOMCAT_PORT}:8080"
- networks:
- - oneplusbot
- volumes:
- - bot-logs:/logs
- - ./config:/config
- pgadmin:
- container_name: pgadmin
- image: ${REGISTRY_PREFIX}oneplus_bot_pg_admin:${ONEPLUS_BOT_VERSION}
- depends_on:
- - db
- environment:
- PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
- PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
- ports:
- - "127.0.0.1:${PGADMIN_PORT}:80"
- restart: unless-stopped
- networks:
- - oneplusbot
- prometheus:
- container_name: prometheus
- image: ${REGISTRY_PREFIX}oneplus_bot_prometheus:${ONEPLUS_BOT_VERSION}
- depends_on:
- - bot
- ports:
- - "127.0.0.1:${PROMETHEUS_PORT}:9090"
- restart: unless-stopped
- networks:
- - oneplusbot
- volumes:
- - ./res/prometheus-scrapper-password-filled:/etc/prometheus/micrometer_password
- - prometheus-data:/prometheus
- grafana:
- container_name: grafana
- image: ${REGISTRY_PREFIX}oneplus_bot_grafana:${ONEPLUS_BOT_VERSION}
- depends_on:
- - prometheus
- - bot
- ports:
- - "127.0.0.1:${GRAFANA_PORT}:3000"
- restart: unless-stopped
- environment:
- DB_PASS: ${GRAFANA_DATABASE_PASSWORD}
- DB_HOST: ${DATABASE_HOST}
- DB_PORT: ${DATABASE_PORT}
- DB_USER: ${GRAFANA_DATABASE_USER}
- DB_NAME: ${DATABASE_NAME}
- PROMETHEUS_HOST: 'prometheus'
- PROMETHEUS_PORT: 9090
- LOKI_HOST: 'loki'
- LOKI_PORT: ${LOKI_PORT}
- volumes:
- - grafana-user-data:/var/lib/grafana
- networks:
- - oneplusbot
- promtail:
- container_name: promtail
- image: ${REGISTRY_PREFIX}oneplus_bot_promtail:${ONEPLUS_BOT_VERSION}
- depends_on:
- - bot
- restart: unless-stopped
- command: -config.file=/mnt/config/promtail-config.yaml
- volumes:
- - bot-logs:/logs
- networks:
- - oneplusbot
- loki:
- container_name: loki
- image: ${REGISTRY_PREFIX}oneplus_bot_loki:${ONEPLUS_BOT_VERSION}
- depends_on:
- - promtail
- command: -config.file=/mnt/config/loki-config.yaml
- ports:
- - "127.0.0.1:${LOKI_PORT}:3100"
- restart: unless-stopped
- networks:
- - oneplusbot
-
-networks:
- oneplusbot:
- driver: bridge
- name: oneplusbot-network
-
-volumes:
- db-data:
- grafana-user-data:
- prometheus-data:
- bot-logs:
\ No newline at end of file
diff --git a/deployment/docker-compose/src/main/resources/fill-prometheus-file.sh b/deployment/docker-compose/src/main/resources/fill-prometheus-file.sh
deleted file mode 100755
index d070780..0000000
--- a/deployment/docker-compose/src/main/resources/fill-prometheus-file.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-set -o allexport
-source .env
-set +o allexport
-envsubst < res/prometheus-scrapper-password > res/prometheus-scrapper-password-filled
\ No newline at end of file
diff --git a/deployment/docker-compose/src/main/resources/res/prometheus-scrapper-password b/deployment/docker-compose/src/main/resources/res/prometheus-scrapper-password
deleted file mode 100644
index 70b2df2..0000000
--- a/deployment/docker-compose/src/main/resources/res/prometheus-scrapper-password
+++ /dev/null
@@ -1 +0,0 @@
-${REST_PASSWORD}
\ No newline at end of file
diff --git a/deployment/helm/oneplus-bot/.helmignore b/deployment/helm/oneplus-bot/.helmignore
new file mode 100644
index 0000000..0e8a0eb
--- /dev/null
+++ b/deployment/helm/oneplus-bot/.helmignore
@@ -0,0 +1,23 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*.orig
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
diff --git a/deployment/helm/oneplus-bot/Chart.yaml b/deployment/helm/oneplus-bot/Chart.yaml
new file mode 100644
index 0000000..ca719fe
--- /dev/null
+++ b/deployment/helm/oneplus-bot/Chart.yaml
@@ -0,0 +1,24 @@
+apiVersion: v2
+name: oneplus-bot
+description: A Helm chart for Kubernetes
+
+# A chart can be either an 'application' or a 'library' chart.
+#
+# Application charts are a collection of templates that can be packaged into versioned archives
+# to be deployed.
+#
+# Library charts provide useful utilities or functions for the chart developer. They're included as
+# a dependency of application charts to inject those utilities and functions into the rendering
+# pipeline. Library charts do not define any templates and therefore cannot be deployed.
+type: application
+
+# This is the chart version. This version number should be incremented each time you make changes
+# to the chart and its templates, including the app version.
+# Versions are expected to follow Semantic Versioning (https://semver.org/)
+version: 1.6.6
+
+# This is the version number of the application being deployed. This version number should be
+# incremented each time you make changes to the application. Versions are not expected to
+# follow Semantic Versioning. They should reflect the version the application is using.
+# It is recommended to use it with quotes.
+appVersion: "1.6.6"
diff --git a/deployment/helm/oneplus-bot/configuration/grafana/config.yaml b/deployment/helm/oneplus-bot/configuration/grafana/config.yaml
new file mode 100644
index 0000000..ff2f84b
--- /dev/null
+++ b/deployment/helm/oneplus-bot/configuration/grafana/config.yaml
@@ -0,0 +1,4 @@
+base_url: {{ $.Values.grafanaDeployment.grafana.host }}
+username: {{ $.Values.grafanaDeployment.grafana.basicAuth.username }}
+password: {{ $.Values.grafanaDeployment.grafana.basicAuth.password }}
+folder_name: OnePlusBot
\ No newline at end of file
diff --git a/deployment/helm/oneplus-bot/configuration/grafana/oneplus-bot-discord-dashboard.json b/deployment/helm/oneplus-bot/configuration/grafana/oneplus-bot-discord-dashboard.json
new file mode 100644
index 0000000..f235dc7
--- /dev/null
+++ b/deployment/helm/oneplus-bot/configuration/grafana/oneplus-bot-discord-dashboard.json
@@ -0,0 +1,939 @@
+{
+ "dashboard": {
+ "annotations": {
+ "list": [
+ {
+ "builtIn": 1,
+ "datasource": {
+ "type": "grafana",
+ "uid": "-- Grafana --"
+ },
+ "enable": true,
+ "hide": true,
+ "iconColor": "rgba(0, 211, 255, 1)",
+ "name": "Annotations & Alerts",
+ "type": "dashboard"
+ }
+ ]
+ },
+ "editable": true,
+ "fiscalYearStartMonth": 0,
+ "graphTooltip": 0,
+ "links": [],
+ "liveNow": false,
+ "panels": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "prometheus"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 0,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "insertNulls": false,
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 0
+ },
+ "id": 1,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "prometheus"
+ },
+ "editorMode": "code",
+ "expr": "increase(discord_api_interactions_total{namespace=\"oneplus-bot\"}[1m]) /2",
+ "instant": false,
+ "legendFormat": "{{ "{{" }} action {{ "}}" }}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Discord API Interaction",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "prometheus"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 0,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "insertNulls": false,
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 12,
+ "y": 0
+ },
+ "id": 2,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "prometheus"
+ },
+ "editorMode": "code",
+ "expr": "increase(command_processed_total{namespace=\"oneplus-bot\"}[1m]) / 2",
+ "instant": false,
+ "legendFormat": "{{ "{{" }}type{{ "}}" }}-{{ "{{" }}status{{ "}}" }}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Commands processed",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "prometheus"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 0,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "insertNulls": false,
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 8
+ },
+ "id": 3,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "prometheus"
+ },
+ "editorMode": "code",
+ "expr": "increase(message_total{namespace=\"oneplus-bot\"}[1m]) / 2",
+ "instant": false,
+ "legendFormat": "{{ "{{" }} action {{ "}}" }}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Message events",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "prometheus"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 0,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "insertNulls": false,
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 12,
+ "y": 8
+ },
+ "id": 4,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "prometheus"
+ },
+ "editorMode": "code",
+ "expr": "increase(okhttp_request_total{namespace=\"oneplus-bot\"}[1m]) / 2",
+ "instant": false,
+ "legendFormat": "{{ "{{" }} http_code {{ "}}" }}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "HTTP Reponse codes",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "prometheus"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 0,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "insertNulls": false,
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 16
+ },
+ "id": 5,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "prometheus"
+ },
+ "editorMode": "code",
+ "expr": "increase(cache_evictions_total{application=\"$application\", cache=\"messages\", namespace=\"oneplus-bot\"}[1m]) / 2",
+ "instant": false,
+ "legendFormat": "Cache evictions",
+ "range": true,
+ "refId": "A"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "prometheus"
+ },
+ "editorMode": "code",
+ "expr": "increase(cache_gets_total{application=\"$application\", cache=\"messages\", namespace=\"oneplus-bot\"}[1m]) / 2",
+ "hide": false,
+ "instant": false,
+ "legendFormat": "Cache gets {{ "{{" }} result {{ "}}" }}",
+ "range": true,
+ "refId": "B"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "prometheus"
+ },
+ "editorMode": "code",
+ "expr": "increase(cache_puts_total{application=\"$application\", cache=\"messages\", namespace=\"oneplus-bot\"}[1m]) / 2",
+ "hide": false,
+ "instant": false,
+ "legendFormat": "Cache puts",
+ "range": true,
+ "refId": "C"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "prometheus"
+ },
+ "editorMode": "code",
+ "expr": "increase(cache_removals{application=\"$application\", cache=\"messages\", namespace=\"oneplus-bot\"}[1m]) / 2",
+ "hide": false,
+ "instant": false,
+ "legendFormat": "Cache removals",
+ "range": true,
+ "refId": "D"
+ }
+ ],
+ "title": "Message cache statistic",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "prometheus"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 0,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "insertNulls": false,
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 12,
+ "y": 16
+ },
+ "id": 6,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "prometheus"
+ },
+ "editorMode": "code",
+ "expr": "discord_gateway_ping{namespace=\"oneplus-bot\"}",
+ "instant": false,
+ "legendFormat": "Gateway ping",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Gateway ping",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "prometheus"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 0,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "insertNulls": false,
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 24
+ },
+ "id": 7,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "prometheus"
+ },
+ "editorMode": "code",
+ "expr": "increase(starboard_stars_total{namespace=\"oneplus-bot\"}[1m]) / 2",
+ "instant": false,
+ "legendFormat": "{{ "{{" }} action {{ "}}" }}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Starboard reactions",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "prometheus"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 0,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "insertNulls": false,
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 12,
+ "y": 24
+ },
+ "id": 8,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "prometheus"
+ },
+ "editorMode": "code",
+ "expr": "increase(emote_usages_total{namespace=\"oneplus-bot\"}[1m]) / 2",
+ "instant": false,
+ "legendFormat": "Used emotes",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Used tracked emotes",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "prometheus"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 0,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "insertNulls": false,
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 16,
+ "w": 24,
+ "x": 0,
+ "y": 32
+ },
+ "id": 9,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "prometheus"
+ },
+ "editorMode": "code",
+ "expr": "increase(jda_event_total{namespace=\"oneplus-bot\"}[1m]) / 2",
+ "instant": false,
+ "legendFormat": "{{ "{{" }} event_class {{ "}}" }}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "JDA Events",
+ "type": "timeseries"
+ }
+ ],
+ "refresh": "",
+ "schemaVersion": 38,
+ "style": "dark",
+ "tags": [],
+ "templating": {
+ "list": [
+ {
+ "hide": 2,
+ "label": "",
+ "name": "application",
+ "query": "OnePlusBot",
+ "skipUrlSync": false,
+ "type": "constant"
+ }
+ ]
+ },
+ "time": {
+ "from": "now-30m",
+ "to": "now"
+ },
+ "timepicker": {},
+ "timezone": "",
+ "title": "OnePlusBot Discord status",
+ "uid": "a7b3297d-972e-4dbd-9223-88d589817d34",
+ "version": 2,
+ "weekStart": ""
+ },
+ "overwrite": true
+}
diff --git a/deployment/helm/oneplus-bot/configuration/grafana/oneplus-bot-log-dashboard.json b/deployment/helm/oneplus-bot/configuration/grafana/oneplus-bot-log-dashboard.json
new file mode 100644
index 0000000..6dba13e
--- /dev/null
+++ b/deployment/helm/oneplus-bot/configuration/grafana/oneplus-bot-log-dashboard.json
@@ -0,0 +1,238 @@
+{
+ "dashboard": {
+ "annotations": {
+ "list": [
+ {
+ "builtIn": 1,
+ "datasource": {
+ "type": "grafana",
+ "uid": "-- Grafana --"
+ },
+ "enable": true,
+ "hide": true,
+ "iconColor": "rgba(0, 211, 255, 1)",
+ "name": "Annotations & Alerts",
+ "type": "dashboard"
+ }
+ ]
+ },
+ "description": "Overview over logging outputs of OnePlusBot",
+ "editable": true,
+ "fiscalYearStartMonth": 0,
+ "graphTooltip": 0,
+ "links": [],
+ "liveNow": false,
+ "panels": [
+ {
+ "datasource": {
+ "type": "loki",
+ "uid": "loki"
+ },
+ "description": "Display logs and search for logs",
+ "gridPos": {
+ "h": 13,
+ "w": 24,
+ "x": 0,
+ "y": 0
+ },
+ "id": 4,
+ "options": {
+ "dedupStrategy": "none",
+ "enableLogDetails": true,
+ "prettifyLogMessage": false,
+ "showCommonLabels": false,
+ "showLabels": false,
+ "showTime": false,
+ "sortOrder": "Ascending",
+ "wrapLogMessage": true
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "loki",
+ "uid": "loki"
+ },
+ "editorMode": "builder",
+ "expr": "{app=\"OnePlusBot\", namespace=\"oneplus-bot\"} |= `$logFilter`",
+ "maxLines": 5000,
+ "queryType": "range",
+ "refId": "A"
+ }
+ ],
+ "title": "OnePlusBot Logs",
+ "type": "logs"
+ },
+ {
+ "datasource": {
+ "type": "loki",
+ "uid": "loki"
+ },
+ "description": "Any line on level ERROR",
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 13
+ },
+ "id": 2,
+ "options": {
+ "dedupStrategy": "none",
+ "enableLogDetails": true,
+ "prettifyLogMessage": false,
+ "showCommonLabels": false,
+ "showLabels": false,
+ "showTime": false,
+ "sortOrder": "Ascending",
+ "wrapLogMessage": true
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "loki",
+ "uid": "loki"
+ },
+ "editorMode": "code",
+ "expr": "{app=\"OnePlusBot\", namespace=\"oneplus-bot\"} |= \"ERROR\"",
+ "maxLines": 5000,
+ "queryType": "range",
+ "refId": "A"
+ }
+ ],
+ "title": "OnePlusBot Error Logs",
+ "type": "logs"
+ },
+ {
+ "datasource": {
+ "type": "loki",
+ "uid": "loki"
+ },
+ "description": "Number of log events",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 0,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "insertNulls": false,
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 12,
+ "y": 13
+ },
+ "id": 3,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "loki",
+ "uid": "loki"
+ },
+ "editorMode": "code",
+ "expr": "rate({app=\"OnePlusBot\", namespace=\"oneplus-bot\"}[$__interval])",
+ "queryType": "range",
+ "refId": "A"
+ }
+ ],
+ "title": "Log Rate",
+ "type": "timeseries"
+ }
+ ],
+ "refresh": "",
+ "schemaVersion": 38,
+ "style": "dark",
+ "tags": [],
+ "templating": {
+ "list": [
+ {
+ "current": {
+ "selected": false,
+ "text": "",
+ "value": ""
+ },
+ "description": "What to search in the logs",
+ "hide": 0,
+ "name": "logFilter",
+ "options": [
+ {
+ "selected": true,
+ "text": "",
+ "value": ""
+ }
+ ],
+ "query": "",
+ "skipUrlSync": false,
+ "type": "textbox"
+ }
+ ]
+ },
+ "time": {
+ "from": "now-30m",
+ "to": "now"
+ },
+ "timepicker": {},
+ "timezone": "",
+ "title": "OnePlus Bot Logs",
+ "uid": "a5b429af-860c-4438-a575-24bed6dcba09",
+ "version": 2,
+ "weekStart": ""
+ },
+ "overwrite": true
+}
\ No newline at end of file
diff --git a/deployment/helm/oneplus-bot/templates/_helpers.tpl b/deployment/helm/oneplus-bot/templates/_helpers.tpl
new file mode 100644
index 0000000..5824dea
--- /dev/null
+++ b/deployment/helm/oneplus-bot/templates/_helpers.tpl
@@ -0,0 +1,62 @@
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "oneplusBot.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
+{{- end }}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "oneplusBot.fullname" -}}
+{{- if .Values.fullnameOverride }}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
+{{- else }}
+{{- $name := default .Chart.Name .Values.nameOverride }}
+{{- if contains $name .Release.Name }}
+{{- .Release.Name | trunc 63 | trimSuffix "-" }}
+{{- else }}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
+{{- end }}
+{{- end }}
+{{- end }}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "oneplusBot.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
+{{- end }}
+
+{{/*
+Common labels
+*/}}
+{{- define "oneplusBot.labels" -}}
+helm.sh/chart: {{ include "oneplusBot.chart" . }}
+{{ include "oneplusBot.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end }}
+
+{{/*
+Selector labels
+*/}}
+{{- define "oneplusBot.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "oneplusBot.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end }}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "oneplusBot.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create }}
+{{- default (include "oneplusBot.fullname" .) .Values.serviceAccount.name }}
+{{- else }}
+{{- default "default" .Values.serviceAccount.name }}
+{{- end }}
+{{- end }}
diff --git a/deployment/helm/oneplus-bot/templates/api-keys.yaml b/deployment/helm/oneplus-bot/templates/api-keys.yaml
new file mode 100644
index 0000000..7c7dd30
--- /dev/null
+++ b/deployment/helm/oneplus-bot/templates/api-keys.yaml
@@ -0,0 +1,7 @@
+apiVersion: v1
+kind: Secret
+metadata:
+ name: api-keys
+data:
+ discordToken: {{ $.Values.apiKeys.discord.token | b64enc }} # b64enc is needed, because a stringData secret field cannot hold numeric values
+ youtubeApiKey: {{ $.Values.apiKeys.youtube.apiKey | b64enc }}
\ No newline at end of file
diff --git a/deployment/helm/oneplus-bot/templates/db-config-deployment-job.yaml b/deployment/helm/oneplus-bot/templates/db-config-deployment-job.yaml
new file mode 100644
index 0000000..ca963da
--- /dev/null
+++ b/deployment/helm/oneplus-bot/templates/db-config-deployment-job.yaml
@@ -0,0 +1,69 @@
+{{- if .Values.dbConfigDeployment.enabled -}}
+apiVersion: batch/v1
+kind: Job
+metadata:
+{{- $deploymentJobName := print ((include "oneplusBot.fullname" .) | trunc 39) "-db-config-deployment-job" }}
+ name: {{ $deploymentJobName | trunc 63 }}
+ annotations:
+ "helm.sh/hook": pre-upgrade,pre-install
+ "helm.sh/hook-weight": "-5"
+ "helm.sh/hook-delete-policy": hook-succeeded
+spec:
+ template:
+ spec:
+ {{- with .Values.imagePullSecrets }}
+ imagePullSecrets:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ containers:
+ - name: db-config-deployment-job
+ image: "{{ $.Values.dbConfigDeployment.repository }}/{{ $.Values.dbConfigDeployment.image }}:{{ $.Values.dbConfigDeployment.tag | default .Chart.AppVersion}}"
+ imagePullPolicy: {{ $.Values.dbConfigDeployment.pullPolicy }}
+ args:
+ - "/var/db-config/"
+ env:
+ - name: DB_PASS
+ valueFrom:
+ secretKeyRef:
+ name: db-credentials
+ key: dbPassword
+ - name: DB_HOST
+ valueFrom:
+ secretKeyRef:
+ name: db-credentials
+ key: dbHost
+ - name: DB_PORT
+ valueFrom:
+ secretKeyRef:
+ name: db-credentials
+ key: dbPort
+ - name: DB_USER
+ valueFrom:
+ secretKeyRef:
+ name: db-credentials
+ key: dbUser
+ - name: DB_NAME
+ valueFrom:
+ secretKeyRef:
+ name: db-credentials
+ key: dbName
+ - name: DB_SCHEME
+ value: "abstracto"
+ volumeMounts:
+ - mountPath: "/var/db-config/"
+ name: database-config-mount
+ restartPolicy: Never
+ initContainers:
+ - name: database-config-data
+ image: "{{ $.Values.dbConfigDeploymentData.repository }}/{{ $.Values.dbConfigDeploymentData.image }}:{{ $.Values.dbConfigDeploymentData.tag | default .Chart.AppVersion}}"
+ imagePullPolicy: {{ $.Values.dbConfigDeploymentData.pullPolicy }}
+ volumeMounts:
+ - mountPath: "/var/run-config"
+ name: database-config-mount
+ volumes:
+ - name: database-config-mount
+ emptyDir: {}
+ backoffLimit: 4
+{{- end }}
+
+
diff --git a/deployment/helm/oneplus-bot/templates/db-credentials.yaml b/deployment/helm/oneplus-bot/templates/db-credentials.yaml
new file mode 100644
index 0000000..9d7f00e
--- /dev/null
+++ b/deployment/helm/oneplus-bot/templates/db-credentials.yaml
@@ -0,0 +1,13 @@
+apiVersion: v1
+kind: Secret
+metadata:
+ name: db-credentials
+ annotations:
+ "helm.sh/hook": pre-upgrade,pre-install
+ "helm.sh/hook-weight": "-6"
+data:
+ dbPassword: {{ $.Values.dbCredentials.password | b64enc }} # b64enc is needed, because a stringData secret field cannot hold numeric values
+ dbUser: {{ $.Values.dbCredentials.userName | b64enc }}
+ dbHost: {{ $.Values.dbCredentials.host | b64enc }}
+ dbPort: {{ $.Values.dbCredentials.port | b64enc }}
+ dbName: {{ $.Values.dbCredentials.name | b64enc }}
\ No newline at end of file
diff --git a/deployment/helm/oneplus-bot/templates/deployment.yaml b/deployment/helm/oneplus-bot/templates/deployment.yaml
new file mode 100644
index 0000000..417e51c
--- /dev/null
+++ b/deployment/helm/oneplus-bot/templates/deployment.yaml
@@ -0,0 +1,106 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: {{ include "oneplusBot.fullname" . }}
+ labels:
+ {{- include "oneplusBot.labels" . | nindent 4 }}
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ {{- include "oneplusBot.selectorLabels" . | nindent 6 }}
+ template:
+ metadata:
+ {{- with .Values.podAnnotations }}
+ annotations:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ labels:
+ {{- include "oneplusBot.selectorLabels" . | nindent 8 }}
+ spec:
+ {{- with .Values.imagePullSecrets }}
+ imagePullSecrets:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ serviceAccountName: {{ include "oneplusBot.serviceAccountName" . }}
+ securityContext:
+ {{- toYaml .Values.podSecurityContext | nindent 8 }}
+ containers:
+ - name: {{ .Chart.Name }}
+ securityContext:
+ {{- toYaml .Values.securityContext | nindent 12 }}
+ image: "{{ .Values.bot.repository }}/{{ .Values.bot.image }}:{{ .Values.bot.tag | default .Chart.AppVersion }}"
+ imagePullPolicy: {{ .Values.bot.pullPolicy }}
+ env:
+ - name: DB_PASS
+ valueFrom:
+ secretKeyRef:
+ name: db-credentials
+ key: dbPassword
+ - name: DB_HOST
+ valueFrom:
+ secretKeyRef:
+ name: db-credentials
+ key: dbHost
+ - name: DB_PORT
+ valueFrom:
+ secretKeyRef:
+ name: db-credentials
+ key: dbPort
+ - name: DB_USER
+ valueFrom:
+ secretKeyRef:
+ name: db-credentials
+ key: dbUser
+ - name: DB_NAME
+ valueFrom:
+ secretKeyRef:
+ name: db-credentials
+ key: dbName
+ - name: TOKEN
+ valueFrom:
+ secretKeyRef:
+ name: api-keys
+ key: discordToken
+ - name: OPEN_WEATHER_MAP_API_KEY
+ value: "placeholder" # a value is required, if the webservices module is loaded, but weather not used
+ - name: YOUTUBE_API_KEY
+ valueFrom:
+ secretKeyRef:
+ name: api-keys
+ key: youtubeApiKey
+ ports:
+ - name: http
+ containerPort: {{ .Values.service.port }}
+ protocol: TCP
+ - name: debug
+ containerPort: 5005
+ protocol: TCP
+ livenessProbe:
+ httpGet:
+ path: /actuator/health/liveness
+ port: 8080
+ initialDelaySeconds: {{ $.Values.bot.livenessProbe.initialDelaySeconds }}
+ periodSeconds: {{ $.Values.bot.livenessProbe.periodSeconds }}
+ failureThreshold: {{ $.Values.bot.livenessProbe.failureThreshold }}
+ readinessProbe:
+ httpGet:
+ path: /actuator/health/readiness
+ port: 8080
+ initialDelaySeconds: {{ $.Values.bot.readinessProbe.initialDelaySeconds }}
+ periodSeconds: {{ $.Values.bot.readinessProbe.periodSeconds }}
+ failureThreshold: {{ $.Values.bot.readinessProbe.failureThreshold }}
+ resources:
+ {{- toYaml .Values.resources | nindent 12 }}
+ {{- with .Values.nodeSelector }}
+ nodeSelector:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.affinity }}
+ affinity:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.tolerations }}
+ tolerations:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
diff --git a/deployment/helm/oneplus-bot/templates/grafana-dashboard-deployment.yaml b/deployment/helm/oneplus-bot/templates/grafana-dashboard-deployment.yaml
new file mode 100644
index 0000000..d7448cb
--- /dev/null
+++ b/deployment/helm/oneplus-bot/templates/grafana-dashboard-deployment.yaml
@@ -0,0 +1,42 @@
+{{- if $.Values.grafanaDeployment.enabled }}
+apiVersion: batch/v1
+kind: Job
+metadata:
+ name: grafana-dashboard-deployment-job
+ annotations:
+ "helm.sh/hook": post-install
+ "helm.sh/hook-weight": "-4"
+ "helm.sh/hook-delete-policy": hook-succeeded
+spec:
+ template:
+ spec:
+ {{- with .Values.imagePullSecrets }}
+ imagePullSecrets:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ containers:
+ - name: template-deployment-job
+ image: "{{ $.Values.grafanaDeployment.repository }}/{{ $.Values.grafanaDeployment.image }}:{{ $.Values.grafanaDeployment.tag }}"
+ imagePullPolicy: {{ $.Values.grafanaDeployment.pullPolicy }}
+ args:
+ - "/var/userconfig"
+ volumeMounts:
+ - mountPath: "/var/userconfig"
+ name: grafana-dashboard-config
+ readOnly: true
+ volumes:
+ - name: grafana-dashboard-config
+ secret:
+ secretName: grafana-dashboard-config
+ restartPolicy: Never
+ backoffLimit: 4
+---
+apiVersion: v1
+kind: Secret
+metadata:
+ name: grafana-dashboard-config
+data:
+ config.yaml: {{ (tpl (.Files.Get "configuration/grafana/config.yaml") . ) | b64enc }}
+ log-dashboard.json: {{ (tpl (.Files.Get "configuration/grafana/oneplus-bot-log-dashboard.json") . ) | b64enc }}
+ discord-dashboard.json: {{ (tpl (.Files.Get "configuration/grafana/oneplus-bot-discord-dashboard.json") . ) | b64enc }}
+{{- end }}
\ No newline at end of file
diff --git a/deployment/helm/oneplus-bot/templates/service.yaml b/deployment/helm/oneplus-bot/templates/service.yaml
new file mode 100644
index 0000000..0397440
--- /dev/null
+++ b/deployment/helm/oneplus-bot/templates/service.yaml
@@ -0,0 +1,19 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "oneplusBot.fullname" . }}
+ labels:
+ {{- include "oneplusBot.labels" . | nindent 4 }}
+ {{- with .Values.service.annotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+spec:
+ type: {{ .Values.service.type }}
+ ports:
+ - port: {{ .Values.service.port }}
+ targetPort: http
+ protocol: TCP
+ name: http
+ selector:
+ {{- include "oneplusBot.selectorLabels" . | nindent 4 }}
diff --git a/deployment/helm/oneplus-bot/templates/serviceaccount.yaml b/deployment/helm/oneplus-bot/templates/serviceaccount.yaml
new file mode 100644
index 0000000..b94083f
--- /dev/null
+++ b/deployment/helm/oneplus-bot/templates/serviceaccount.yaml
@@ -0,0 +1,12 @@
+{{- if .Values.serviceAccount.create -}}
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ name: {{ include "oneplusBot.serviceAccountName" . }}
+ labels:
+ {{- include "oneplusBot.labels" . | nindent 4 }}
+ {{- with .Values.serviceAccount.annotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+{{- end }}
diff --git a/deployment/helm/oneplus-bot/templates/template-deployment-job.yaml b/deployment/helm/oneplus-bot/templates/template-deployment-job.yaml
new file mode 100644
index 0000000..79d66e3
--- /dev/null
+++ b/deployment/helm/oneplus-bot/templates/template-deployment-job.yaml
@@ -0,0 +1,69 @@
+{{- if .Values.dbConfigDeployment.enabled -}}
+apiVersion: batch/v1
+kind: Job
+metadata:
+{{- $deploymentJobName := print ((include "oneplusBot.fullname" .) | trunc 39) "-template-deployment-job" }}
+ name: {{ $deploymentJobName | trunc 63 }}
+ annotations:
+ "helm.sh/hook": pre-upgrade,pre-install
+ "helm.sh/hook-weight": "-4"
+ "helm.sh/hook-delete-policy": hook-succeeded
+spec:
+ template:
+ spec:
+ {{- with .Values.imagePullSecrets }}
+ imagePullSecrets:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ containers:
+ - name: template-deployment-job
+ image: "{{ $.Values.templateDeployment.repository }}/{{ $.Values.templateDeployment.image }}:{{ $.Values.templateDeployment.tag | default .Chart.AppVersion }}"
+ imagePullPolicy: {{ $.Values.templateDeployment.pullPolicy }}
+ args:
+ - "/var/template-config/"
+ env:
+ - name: DB_PASS
+ valueFrom:
+ secretKeyRef:
+ name: db-credentials
+ key: dbPassword
+ - name: DB_HOST
+ valueFrom:
+ secretKeyRef:
+ name: db-credentials
+ key: dbHost
+ - name: DB_PORT
+ valueFrom:
+ secretKeyRef:
+ name: db-credentials
+ key: dbPort
+ - name: DB_USER
+ valueFrom:
+ secretKeyRef:
+ name: db-credentials
+ key: dbUser
+ - name: DB_NAME
+ valueFrom:
+ secretKeyRef:
+ name: db-credentials
+ key: dbName
+ - name: DB_SCHEME
+ value: "abstracto."
+ volumeMounts:
+ - mountPath: "/var/template-config/"
+ name: template-config-mount
+ initContainers:
+ - name: database-config-data
+ image: "{{ $.Values.templateDeploymentData.repository }}/{{ $.Values.templateDeploymentData.image }}:{{ $.Values.templateDeploymentData.tag | default .Chart.AppVersion}}"
+ imagePullPolicy: {{ $.Values.templateDeploymentData.pullPolicy }}
+ volumeMounts:
+ - mountPath: "/var/run-config"
+ name: template-config-mount
+ volumes:
+ - name: template-config-mount
+ emptyDir: {}
+ restartPolicy: Never
+ backoffLimit: 4
+{{- end }}
+
+
diff --git a/deployment/helm/oneplus-bot/values.yaml b/deployment/helm/oneplus-bot/values.yaml
new file mode 100644
index 0000000..eceac37
--- /dev/null
+++ b/deployment/helm/oneplus-bot/values.yaml
@@ -0,0 +1,125 @@
+# Default values for oneplus-bot.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+replicaCount: 1
+
+bot:
+ repository: harbor.sheldan.dev/oneplus-bot
+ pullPolicy: IfNotPresent
+ image: oneplus-bot
+ tag: 1.6.6
+ livenessProbe:
+ initialDelaySeconds: 60
+ periodSeconds: 5
+ failureThreshold: 3
+ readinessProbe:
+ initialDelaySeconds: 60
+ periodSeconds: 5
+ failureThreshold: 3
+
+templateDeployment:
+ enabled: true
+ repository: harbor.sheldan.dev/abstracto
+ pullPolicy: Always
+ image: abstracto-template-deployment
+ tag: 1.5.9
+
+templateDeploymentData:
+ repository: harbor.sheldan.dev/oneplus-bot
+ pullPolicy: Always
+ image: oneplus-bot-template-data
+ tag: 1.4.17
+
+dbConfigDeployment:
+ enabled: true
+ repository: harbor.sheldan.dev/abstracto
+ pullPolicy: Always
+ image: abstracto-db-deployment
+ tag: 1.5.9
+
+dbConfigDeploymentData:
+ repository: harbor.sheldan.dev/oneplus-bot
+ pullPolicy: Always
+ image: oneplus-bot-db-data
+ tag: 1.4.17
+
+dbCredentials:
+ host:
+ port:
+ userName:
+ password:
+ name:
+
+grafanaDeployment:
+ repository: harbor.sheldan.dev/grafana-tools
+ pullPolicy: Always
+ image: grafana-dashboard-deployment
+ tag: 0.0.2
+ enabled: true
+ grafana:
+ host:
+ basicAuth:
+ username:
+ password:
+
+apiKeys:
+ discord:
+ token:
+ youtube:
+ apiKey:
+ openWeatherMap:
+ apiKey:
+ twitch:
+ secret:
+ clientId:
+
+
+imagePullSecrets:
+nameOverride: ""
+fullnameOverride: ""
+
+serviceAccount:
+ # Specifies whether a service account should be created
+ create: true
+ # Annotations to add to the service account
+ annotations: {}
+ # The name of the service account to use.
+ # If not set and create is true, a name is generated using the fullname template
+ name: ""
+
+podAnnotations: {}
+
+podSecurityContext: {}
+ # fsGroup: 2000
+
+securityContext: {}
+ # capabilities:
+ # drop:
+ # - ALL
+ # readOnlyRootFilesystem: true
+ # runAsNonRoot: true
+ # runAsUser: 1000
+
+service:
+ type: ClusterIP
+ port: 8080
+ annotations:
+ prometheus.io/scrape: "true"
+ prometheus.io/path: "/actuator/prometheus"
+ prometheus.io/port: "8080"
+
+resources:
+ limits:
+ cpu:
+ memory:
+ requests:
+ cpu:
+ memory:
+
+
+nodeSelector: {}
+
+tolerations: []
+
+affinity: {}
diff --git a/deployment/image-packaging/pom.xml b/deployment/image-packaging/pom.xml
index 2da59d8..c8fc371 100644
--- a/deployment/image-packaging/pom.xml
+++ b/deployment/image-packaging/pom.xml
@@ -49,7 +49,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/template-artifacts/
+ ${file.basedir}/template-data/template-artifacts/
core.zip
@@ -59,7 +59,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/template-artifacts/
+ ${file.basedir}/template-data/template-artifacts/
experience-tracking.zip
@@ -69,7 +69,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/template-artifacts/
+ ${file.basedir}/template-data/template-artifacts/
assignable-roles.zip
@@ -79,7 +79,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/template-artifacts/
+ ${file.basedir}/template-data/template-artifacts/
anti-raid.zip
@@ -89,7 +89,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/template-artifacts/
+ ${file.basedir}/template-data/template-artifacts/
voice-channel-context.zip
@@ -99,7 +99,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/template-artifacts/
+ ${file.basedir}/template-data/template-artifacts/
modmail.zip
@@ -109,7 +109,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/template-artifacts/
+ ${file.basedir}/template-data/template-artifacts/
moderation.zip
@@ -119,7 +119,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/template-artifacts/
+ ${file.basedir}/template-data/template-artifacts/
entertainment.zip
@@ -128,7 +128,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/template-artifacts/
+ ${file.basedir}/template-data/template-artifacts/
link-embed.zip
@@ -137,7 +137,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/template-artifacts/
+ ${file.basedir}/template-data/template-artifacts/
starboard.zip
@@ -146,7 +146,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/template-artifacts/
+ ${file.basedir}/template-data/template-artifacts/
utility.zip
@@ -156,7 +156,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/template-artifacts/
+ ${file.basedir}/template-data/template-artifacts/
webservices.zip
@@ -166,7 +166,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/template-artifacts/
+ ${file.basedir}/template-data/template-artifacts/
remind.zip
@@ -176,7 +176,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/template-artifacts/
+ ${file.basedir}/template-data/template-artifacts/
suggestion.zip
@@ -186,7 +186,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/template-artifacts/
+ ${file.basedir}/template-data/template-artifacts/
invite-filter.zip
@@ -196,7 +196,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/template-artifacts/
+ ${file.basedir}/template-data/template-artifacts/
statistic.zip
@@ -206,7 +206,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/template-artifacts/
+ ${file.basedir}/template-data/template-artifacts/
logging.zip
@@ -216,7 +216,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/template-artifacts/
+ ${file.basedir}/template-data/template-artifacts/
profanity-filter.zip
@@ -226,7 +226,7 @@
${project.version}
zip
true
- ${file.basedir}/deployment/template-artifacts/
+ ${file.basedir}/template-data/template-artifacts/
starboard-custom.zip
@@ -236,7 +236,7 @@
${project.version}
zip
true
- ${file.basedir}/deployment/template-artifacts/
+ ${file.basedir}/template-data/template-artifacts/
news.zip
@@ -246,7 +246,7 @@
${project.version}
zip
true
- ${file.basedir}/deployment/template-artifacts/
+ ${file.basedir}/template-data/template-artifacts/
referral.zip
@@ -256,7 +256,7 @@
${project.version}
zip
true
- ${file.basedir}/deployment/template-artifacts/
+ ${file.basedir}/template-data/template-artifacts/
faq.zip
@@ -268,7 +268,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/translation-artifacts/
+ ${file.basedir}/template-data/translation-artifacts/
core.zip
@@ -278,7 +278,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/translation-artifacts/
+ ${file.basedir}/template-data/translation-artifacts/
modmail.zip
@@ -288,7 +288,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/translation-artifacts/
+ ${file.basedir}/template-data/translation-artifacts/
assignable-roles.zip
@@ -298,7 +298,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/translation-artifacts/
+ ${file.basedir}/template-data/translation-artifacts/
anti-raid.zip
@@ -308,7 +308,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/translation-artifacts/
+ ${file.basedir}/template-data/translation-artifacts/
voice-channel-context.zip
@@ -318,7 +318,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/translation-artifacts/
+ ${file.basedir}/template-data/translation-artifacts/
utility.zip
@@ -328,7 +328,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/translation-artifacts/
+ ${file.basedir}/template-data/translation-artifacts/
experience-tracking.zip
@@ -338,7 +338,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/translation-artifacts/
+ ${file.basedir}/template-data/translation-artifacts/
entertainment.zip
@@ -348,7 +348,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/translation-artifacts/
+ ${file.basedir}/template-data/translation-artifacts/
moderation.zip
@@ -358,7 +358,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/translation-artifacts/
+ ${file.basedir}/template-data/translation-artifacts/
link-embed.zip
@@ -368,7 +368,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/translation-artifacts/
+ ${file.basedir}/template-data/translation-artifacts/
starboard.zip
@@ -378,7 +378,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/translation-artifacts/
+ ${file.basedir}/template-data/translation-artifacts/
webservices.zip
@@ -388,7 +388,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/translation-artifacts/
+ ${file.basedir}/template-data/translation-artifacts/
remind.zip
@@ -398,7 +398,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/translation-artifacts/
+ ${file.basedir}/template-data/translation-artifacts/
suggestion.zip
@@ -408,7 +408,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/translation-artifacts/
+ ${file.basedir}/template-data/translation-artifacts/
invite-filter.zip
@@ -418,7 +418,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/translation-artifacts/
+ ${file.basedir}/template-data/translation-artifacts/
statistic.zip
@@ -428,7 +428,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/translation-artifacts/
+ ${file.basedir}/template-data/translation-artifacts/
profanity-filter.zip
@@ -438,7 +438,7 @@
${abstracto.templates.version}
zip
true
- ${file.basedir}/deployment/translation-artifacts/
+ ${file.basedir}/template-data/translation-artifacts/
logging.zip
@@ -448,7 +448,7 @@
${project.version}
zip
true
- ${file.basedir}/deployment/translation-artifacts/
+ ${file.basedir}/template-data/translation-artifacts/
starboard-custom.zip
@@ -458,7 +458,7 @@
${project.version}
zip
true
- ${file.basedir}/deployment/translation-artifacts/
+ ${file.basedir}/template-data/translation-artifacts/
moderation-custom.zip
@@ -468,7 +468,7 @@
${project.version}
zip
true
- ${file.basedir}/deployment/translation-artifacts/
+ ${file.basedir}/template-data/translation-artifacts/
dynamic-activity-custom-translations.zip
@@ -479,7 +479,7 @@
${project.version}
zip
true
- ${file.basedir}/deployment/translation-artifacts/
+ ${file.basedir}/template-data/translation-artifacts/
news.zip
@@ -489,7 +489,7 @@
${project.version}
zip
true
- ${file.basedir}/deployment/translation-artifacts/
+ ${file.basedir}/template-data/translation-artifacts/
setup.zip
@@ -499,7 +499,7 @@
${project.version}
zip
true
- ${file.basedir}/deployment/translation-artifacts/
+ ${file.basedir}/template-data/translation-artifacts/
referral.zip
@@ -509,7 +509,7 @@
${project.version}
zip
true
- ${file.basedir}/deployment/translation-artifacts/
+ ${file.basedir}/template-data/translation-artifacts/
seasonal.zip
@@ -519,7 +519,7 @@
${project.version}
zip
true
- ${file.basedir}/deployment/translation-artifacts/
+ ${file.basedir}/template-data/translation-artifacts/
faq.zip
@@ -531,7 +531,7 @@
liquibase
zip
true
- ${file.basedir}/deployment/liquibase-artifacts/
+ ${file.basedir}/db-data/liquibase-artifacts/
scheduling.zip
@@ -542,7 +542,7 @@
liquibase
zip
true
- ${file.basedir}/deployment/liquibase-artifacts/
+ ${file.basedir}/db-data/liquibase-artifacts/
core.zip
@@ -553,7 +553,7 @@
liquibase
zip
true
- ${file.basedir}/deployment/liquibase-artifacts/
+ ${file.basedir}/db-data/liquibase-artifacts/
assignable-roles.zip
@@ -564,7 +564,7 @@
liquibase
zip
true
- ${file.basedir}/deployment/liquibase-artifacts/
+ ${file.basedir}/db-data/liquibase-artifacts/
anti-raid.zip
@@ -575,7 +575,7 @@
liquibase
zip
true
- ${file.basedir}/deployment/liquibase-artifacts/
+ ${file.basedir}/db-data/liquibase-artifacts/
voice-channel-context.zip
@@ -586,7 +586,7 @@
liquibase
zip
true
- ${file.basedir}/deployment/liquibase-artifacts/
+ ${file.basedir}/db-data/liquibase-artifacts/
dynamic-activity.zip
@@ -597,7 +597,7 @@
liquibase
zip
true
- ${file.basedir}/deployment/liquibase-artifacts/
+ ${file.basedir}/db-data/liquibase-artifacts/
modmail.zip
@@ -608,7 +608,7 @@
liquibase
zip
true
- ${file.basedir}/deployment/liquibase-artifacts/
+ ${file.basedir}/db-data/liquibase-artifacts/
moderation.zip
@@ -619,7 +619,7 @@
liquibase
zip
true
- ${file.basedir}/deployment/liquibase-artifacts/
+ ${file.basedir}/db-data/liquibase-artifacts/
experience-tracking.zip
@@ -630,7 +630,7 @@
liquibase
zip
true
- ${file.basedir}/deployment/liquibase-artifacts/
+ ${file.basedir}/db-data/liquibase-artifacts/
entertainment.zip
@@ -641,7 +641,7 @@
liquibase
zip
true
- ${file.basedir}/deployment/liquibase-artifacts/
+ ${file.basedir}/db-data/liquibase-artifacts/
link-embed.zip
@@ -652,7 +652,7 @@
liquibase
zip
true
- ${file.basedir}/deployment/liquibase-artifacts/
+ ${file.basedir}/db-data/liquibase-artifacts/
starboard.zip
@@ -664,7 +664,7 @@
liquibase
zip
true
- ${file.basedir}/deployment/liquibase-artifacts/
+ ${file.basedir}/db-data/liquibase-artifacts/
utility.zip
@@ -675,7 +675,7 @@
liquibase
zip
true
- ${file.basedir}/deployment/liquibase-artifacts/
+ ${file.basedir}/db-data/liquibase-artifacts/
webservices.zip
@@ -686,7 +686,7 @@
liquibase
zip
true
- ${file.basedir}/deployment/liquibase-artifacts/
+ ${file.basedir}/db-data/liquibase-artifacts/
remind.zip
@@ -697,7 +697,7 @@
liquibase
zip
true
- ${file.basedir}/deployment/liquibase-artifacts/
+ ${file.basedir}/db-data/liquibase-artifacts/
suggestion.zip
@@ -708,7 +708,7 @@
liquibase
zip
true
- ${file.basedir}/deployment/liquibase-artifacts/
+ ${file.basedir}/db-data/liquibase-artifacts/
invite-filter.zip
@@ -719,7 +719,7 @@
liquibase
zip
true
- ${file.basedir}/deployment/liquibase-artifacts/
+ ${file.basedir}/db-data/liquibase-artifacts/
statistic.zip
@@ -730,7 +730,7 @@
liquibase
zip
true
- ${file.basedir}/deployment/liquibase-artifacts/
+ ${file.basedir}/db-data/liquibase-artifacts/
profanity-filter.zip
@@ -741,7 +741,7 @@
liquibase
zip
true
- ${file.basedir}/deployment/liquibase-artifacts/
+ ${file.basedir}/db-data/liquibase-artifacts/
logging.zip
@@ -753,7 +753,7 @@
liquibase
zip
true
- ${file.basedir}/deployment/liquibase-artifacts/
+ ${file.basedir}/db-data/liquibase-artifacts/
starboard-custom.zip
@@ -764,7 +764,7 @@
liquibase
zip
true
- ${file.basedir}/deployment/liquibase-artifacts/
+ ${file.basedir}/db-data/liquibase-artifacts/
moderation-custom.zip
@@ -775,7 +775,7 @@
liquibase
zip
true
- ${file.basedir}/deployment/liquibase-artifacts/
+ ${file.basedir}/db-data/liquibase-artifacts/
dynamic-activity-custom.zip
@@ -786,7 +786,7 @@
liquibase
zip
true
- ${file.basedir}/deployment/liquibase-artifacts/
+ ${file.basedir}/db-data/liquibase-artifacts/
news.zip
@@ -797,7 +797,7 @@
liquibase
zip
true
- ${file.basedir}/deployment/liquibase-artifacts/
+ ${file.basedir}/db-data/liquibase-artifacts/
setup.zip
@@ -808,7 +808,7 @@
liquibase
zip
true
- ${file.basedir}/deployment/liquibase-artifacts/
+ ${file.basedir}/db-data/liquibase-artifacts/
referral.zip
@@ -819,7 +819,7 @@
liquibase
zip
true
- ${file.basedir}/deployment/liquibase-artifacts/
+ ${file.basedir}/db-data/liquibase-artifacts/
faq.zip
@@ -830,21 +830,10 @@
liquibase
zip
true
- ${file.basedir}/deployment/liquibase-artifacts/
+ ${file.basedir}/db-data/liquibase-artifacts/
seasonal.zip
-
- dev.sheldan.oneplus.bot.application
- database
- ${project.version}
- liquibase
- zip
- true
- ${file.basedir}/deployment/liquibase-artifacts/
- database.zip
-
-
@@ -853,7 +842,7 @@
${project.version}
zip
true
- ${file.basedir}/deployment/template-artifacts/
+ ${file.basedir}/template-data/template-artifacts/
overrides-templates-core.zip
@@ -863,7 +852,7 @@
${project.version}
zip
true
- ${file.basedir}/deployment/template-artifacts/
+ ${file.basedir}/template-data/template-artifacts/
overrides-templates-webservices.zip
@@ -873,7 +862,7 @@
${project.version}
zip
true
- ${file.basedir}/deployment/template-artifacts/
+ ${file.basedir}/template-data/template-artifacts/
overrides-templates-logging.zip
@@ -884,7 +873,7 @@
${project.version}
zip
true
- ${file.basedir}/deployment/template-artifacts/
+ ${file.basedir}/template-data/template-artifacts/
overrides-templates-statistic.zip
@@ -894,7 +883,7 @@
${project.version}
zip
true
- ${file.basedir}/deployment/template-artifacts/
+ ${file.basedir}/template-data/template-artifacts/
overrides-templates-modmail.zip
@@ -904,7 +893,7 @@
${project.version}
zip
true
- ${file.basedir}/deployment/template-artifacts/
+ ${file.basedir}/template-data/template-artifacts/
overrides-templates-moderation.zip
@@ -915,7 +904,7 @@
${project.version}
zip
true
- ${file.basedir}/deployment/translation-artifacts/
+ ${file.basedir}/template-data/translation-artifacts/
overrides-translation-moderation.zip
diff --git a/deployment/image-packaging/src/main/docker/.env b/deployment/image-packaging/src/main/docker/.env
index a889c55..fe72082 100644
--- a/deployment/image-packaging/src/main/docker/.env
+++ b/deployment/image-packaging/src/main/docker/.env
@@ -1,6 +1,2 @@
-PROMTAIL_VERSION=2.2.1
-LOKI_VERSION=2.2.1
-PROMETHEUS_VERSION=v2.28.1
-PG_ADMIN_VERSION=5.5
-GRAFANA_VERSION=8.0.6
-POSTGRES_VERSION=13.3-buster
\ No newline at end of file
+REGISTRY_PREFIX=harbor.sheldan.dev/oneplus-bot/
+VERSION=1.6.6
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/database/Dockerfile b/deployment/image-packaging/src/main/docker/database/Dockerfile
deleted file mode 100644
index 78e491a..0000000
--- a/deployment/image-packaging/src/main/docker/database/Dockerfile
+++ /dev/null
@@ -1,5 +0,0 @@
-ARG POSTGRES_VERSION
-FROM postgres:${POSTGRES_VERSION}
-MAINTAINER Sheldan
-VOLUME /tmp
-ADD sql/init.sql /docker-entrypoint-initdb.d/init.sql
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/database/sql/init.sql b/deployment/image-packaging/src/main/docker/database/sql/init.sql
deleted file mode 100644
index 176cd93..0000000
--- a/deployment/image-packaging/src/main/docker/database/sql/init.sql
+++ /dev/null
@@ -1 +0,0 @@
-CREATE SCHEMA abstracto
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/db-data/Dockerfile b/deployment/image-packaging/src/main/docker/db-data/Dockerfile
new file mode 100644
index 0000000..d9712b0
--- /dev/null
+++ b/deployment/image-packaging/src/main/docker/db-data/Dockerfile
@@ -0,0 +1,6 @@
+FROM alpine:3.18.0
+MAINTAINER Sheldan
+ADD config/ /var/db-config/
+ADD liquibase-artifacts /var/db-config/liquibase-zips
+
+CMD ["/bin/sh", "/var/db-config/move.sh"]
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/deployment/config/artifact_versions.json b/deployment/image-packaging/src/main/docker/db-data/config/artifact_versions.json
similarity index 63%
rename from deployment/image-packaging/src/main/docker/deployment/config/artifact_versions.json
rename to deployment/image-packaging/src/main/docker/db-data/config/artifact_versions.json
index 634fb9d..ae843e9 100644
--- a/deployment/image-packaging/src/main/docker/deployment/config/artifact_versions.json
+++ b/deployment/image-packaging/src/main/docker/db-data/config/artifact_versions.json
@@ -1,17 +1,4 @@
{
- "template_artifacts": ["utility", "core", "entertainment", "starboard", "link-embed", "webservices", "remind", "logging",
- "suggestion", "invite-filter", "profanity-filter", "statistic", "experience-tracking", "moderation", "modmail", "assignable-roles",
- "voice-channel-context", "anti-raid",
- "starboard-custom",
- "overrides-templates-webservices", "overrides-templates-core", "overrides-templates-logging", "overrides-templates-statistic",
- "overrides-templates-modmail", "overrides-templates-moderation",
- "news", "referral", "faq"],
- "translation_artifacts": ["utility", "core", "entertainment", "starboard", "link-embed", "webservices", "suggestion",
- "remind", "logging", "invite-filter", "profanity-filter", "statistic", "experience-tracking", "moderation", "modmail", "assignable-roles",
- "voice-channel-context", "anti-raid",
- "starboard-custom", "dynamic-activity-custom-translations", "moderation-custom",
- "overrides-translation-moderation",
- "news", "setup", "referral", "faq", "seasonal"],
"liquibase_artifacts": [
{ "zip": "scheduling", "file": "scheduling-changeLog.xml" },
{ "zip": "core", "file": "core-changeLog.xml" },
@@ -34,7 +21,6 @@
{ "zip": "anti-raid", "file": "antiRaid-changeLog.xml"},
{ "zip": "dynamic-activity", "file": "dynamicActivity-changeLog.xml"},
{ "zip": "setup", "file": "setup-changeLog.xml"},
- { "zip": "database", "file": "changeLog.xml"},
{ "zip": "referral", "file": "referral-changeLog.xml"},
{ "zip": "starboard-custom", "file": "starboard-custom-changeLog.xml"},
{ "zip": "moderation-custom", "file": "moderation-custom-changeLog.xml"},
diff --git a/deployment/image-packaging/src/main/docker/db-data/config/move.sh b/deployment/image-packaging/src/main/docker/db-data/config/move.sh
new file mode 100644
index 0000000..94e34a3
--- /dev/null
+++ b/deployment/image-packaging/src/main/docker/db-data/config/move.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+mv /var/db-config/* /var/run-config/
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/deployment/Dockerfile b/deployment/image-packaging/src/main/docker/deployment/Dockerfile
deleted file mode 100644
index 3a793ea..0000000
--- a/deployment/image-packaging/src/main/docker/deployment/Dockerfile
+++ /dev/null
@@ -1,8 +0,0 @@
-ARG ABSTRACTO_REGISTRY_PREFIX
-ARG ABSTRACTO_VERSION=latest
-FROM ${ABSTRACTO_REGISTRY_PREFIX}abstracto_deployment:${ABSTRACTO_VERSION:-latest}
-MAINTAINER Sheldan
-ADD template-artifacts /templates
-ADD translation-artifacts /translations
-ADD liquibase-artifacts /liquibase-zips
-ADD config /
diff --git a/deployment/image-packaging/src/main/docker/docker-compose.yml b/deployment/image-packaging/src/main/docker/docker-compose.yml
index 6380c08..3b72325 100644
--- a/deployment/image-packaging/src/main/docker/docker-compose.yml
+++ b/deployment/image-packaging/src/main/docker/docker-compose.yml
@@ -4,47 +4,12 @@ services:
bot:
build:
context: oneplusbot
- image: ${REGISTRY_PREFIX}oneplus_bot:${VERSION:-latest}
- database:
+ image: ${REGISTRY_PREFIX}oneplus-bot:${VERSION:-latest}
+ db-data:
build:
- context: database
- args:
- POSTGRES_VERSION: ${POSTGRES_VERSION}
- image: ${REGISTRY_PREFIX}oneplus_bot_database:${VERSION:-latest}
- pg_admin:
+ context: db-data
+ image: ${REGISTRY_PREFIX}oneplus-bot-db-data:${VERSION:-latest}
+ template-data:
build:
- context: pgAdmin
- args:
- PG_ADMIN_VERSION: ${PG_ADMIN_VERSION}
- image: ${REGISTRY_PREFIX}oneplus_bot_pg_admin:${VERSION:-latest}
- deployment_container:
- build:
- context: deployment
- args:
- ABSTRACTO_REGISTRY_PREFIX: ${ABSTRACTO_REGISTRY_PREFIX}
- ABSTRACTO_VERSION: ${ABSTRACTO_VERSION}
- image: ${REGISTRY_PREFIX}oneplus_bot_deployment:${VERSION:-latest}
- prometheus:
- build:
- context: prometheus
- args:
- PROMETHEUS_VERSION: ${PROMETHEUS_VERSION}
- image: ${REGISTRY_PREFIX}oneplus_bot_prometheus:${VERSION:-latest}
- grafana:
- build:
- context: grafana
- args:
- GRAFANA_VERSION: ${GRAFANA_VERSION}
- image: ${REGISTRY_PREFIX}oneplus_bot_grafana:${VERSION:-latest}
- promtail:
- build:
- context: promtail
- args:
- PROMTAIL_VERSION: ${PROMTAIL_VERSION}
- image: ${REGISTRY_PREFIX}oneplus_bot_promtail:${VERSION:-latest}
- loki:
- build:
- context: loki
- args:
- LOKI_VERSION: ${LOKI_VERSION}
- image: ${REGISTRY_PREFIX}oneplus_bot_loki:${VERSION:-latest}
+ context: template-data
+ image: ${REGISTRY_PREFIX}oneplus-bot-template-data:${VERSION:-latest}
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/grafana/Dockerfile b/deployment/image-packaging/src/main/docker/grafana/Dockerfile
deleted file mode 100644
index 7897174..0000000
--- a/deployment/image-packaging/src/main/docker/grafana/Dockerfile
+++ /dev/null
@@ -1,6 +0,0 @@
-ARG GRAFANA_VERSION
-FROM grafana/grafana:${GRAFANA_VERSION}
-MAINTAINER Sheldan
-ADD ./provisioning /etc/grafana/provisioning
-ADD ./config.ini /etc/grafana/config.ini
-ADD ./dashboards /var/lib/grafana/dashboards
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/grafana/config.ini b/deployment/image-packaging/src/main/docker/grafana/config.ini
deleted file mode 100644
index 4980ea8..0000000
--- a/deployment/image-packaging/src/main/docker/grafana/config.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[paths]
-provisioning = conf/provisioning
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/grafana/dashboards/jvm-dashboard.json b/deployment/image-packaging/src/main/docker/grafana/dashboards/jvm-dashboard.json
deleted file mode 100644
index 90d02b5..0000000
--- a/deployment/image-packaging/src/main/docker/grafana/dashboards/jvm-dashboard.json
+++ /dev/null
@@ -1,1561 +0,0 @@
-{
- "annotations": {
- "list": [
- {
- "builtIn": 1,
- "datasource": "-- Grafana --",
- "enable": true,
- "hide": true,
- "iconColor": "rgba(0, 211, 255, 1)",
- "limit": 100,
- "name": "Annotations & Alerts",
- "showIn": 0,
- "type": "dashboard"
- }
- ]
- },
- "description": "Dashboard for OnePlus Bot spring boot monitoring (adapted from https://grafana.com/grafana/dashboards/4701)",
- "editable": true,
- "gnetId": null,
- "graphTooltip": 1,
- "id": 2,
- "iteration": 1612052492351,
- "links": [],
- "panels": [
- {
- "collapsed": false,
- "datasource": null,
- "gridPos": {
- "h": 1,
- "w": 24,
- "x": 0,
- "y": 0
- },
- "id": 125,
- "panels": [],
- "repeat": null,
- "title": "Overview",
- "type": "row"
- },
- {
- "cacheTimeout": null,
- "colorBackground": false,
- "colorValue": true,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "datasource": "prometheus",
- "decimals": 1,
- "editable": true,
- "error": false,
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "format": "s",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "gridPos": {
- "h": 3,
- "w": 6,
- "x": 0,
- "y": 1
- },
- "height": "",
- "id": 63,
- "interval": null,
- "links": [],
- "mappingType": 1,
- "mappingTypes": [
- {
- "name": "value to text",
- "value": 1
- },
- {
- "name": "range to text",
- "value": 2
- }
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "70%",
- "rangeMaps": [
- {
- "from": "null",
- "text": "N/A",
- "to": "null"
- }
- ],
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "tableColumn": "",
- "targets": [
- {
- "expr": "process_uptime_seconds{application=\"$application\"}",
- "format": "time_series",
- "interval": "",
- "intervalFactor": 2,
- "legendFormat": "",
- "metric": "",
- "refId": "A",
- "step": 14400
- }
- ],
- "thresholds": "",
- "title": "Uptime",
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "op": "=",
- "text": "N/A",
- "value": "null"
- }
- ],
- "valueName": "current"
- },
- {
- "cacheTimeout": null,
- "colorBackground": false,
- "colorValue": true,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "datasource": "prometheus",
- "decimals": null,
- "editable": true,
- "error": false,
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "format": "dateTimeAsIso",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "gridPos": {
- "h": 3,
- "w": 6,
- "x": 6,
- "y": 1
- },
- "height": "",
- "id": 92,
- "interval": null,
- "links": [],
- "mappingType": 1,
- "mappingTypes": [
- {
- "name": "value to text",
- "value": 1
- },
- {
- "name": "range to text",
- "value": 2
- }
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "70%",
- "rangeMaps": [
- {
- "from": "null",
- "text": "N/A",
- "to": "null"
- }
- ],
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "tableColumn": "",
- "targets": [
- {
- "expr": "process_start_time_seconds{application=\"$application\"}*1000",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "",
- "metric": "",
- "refId": "A",
- "step": 14400
- }
- ],
- "thresholds": "",
- "title": "Start time",
- "type": "singlestat",
- "valueFontSize": "70%",
- "valueMaps": [
- {
- "op": "=",
- "text": "N/A",
- "value": "null"
- }
- ],
- "valueName": "current"
- },
- {
- "cacheTimeout": null,
- "colorBackground": false,
- "colorValue": true,
- "colors": [
- "rgba(50, 172, 45, 0.97)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(245, 54, 54, 0.9)"
- ],
- "datasource": "prometheus",
- "decimals": 2,
- "editable": true,
- "error": false,
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "format": "percent",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "gridPos": {
- "h": 3,
- "w": 6,
- "x": 12,
- "y": 1
- },
- "id": 65,
- "interval": null,
- "links": [],
- "mappingType": 1,
- "mappingTypes": [
- {
- "name": "value to text",
- "value": 1
- },
- {
- "name": "range to text",
- "value": 2
- }
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "70%",
- "rangeMaps": [
- {
- "from": "null",
- "text": "N/A",
- "to": "null"
- }
- ],
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "tableColumn": "",
- "targets": [
- {
- "expr": "sum(jvm_memory_used_bytes{application=\"$application\", area=\"heap\"})*100/sum(jvm_memory_max_bytes{application=\"$application\", area=\"heap\"})",
- "format": "time_series",
- "interval": "",
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A",
- "step": 14400
- }
- ],
- "thresholds": "70,90",
- "title": "Heap used",
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "op": "=",
- "text": "N/A",
- "value": "null"
- }
- ],
- "valueName": "current"
- },
- {
- "cacheTimeout": null,
- "colorBackground": false,
- "colorValue": true,
- "colors": [
- "rgba(50, 172, 45, 0.97)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(245, 54, 54, 0.9)"
- ],
- "datasource": "prometheus",
- "decimals": 2,
- "editable": true,
- "error": false,
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "format": "percent",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "gridPos": {
- "h": 3,
- "w": 6,
- "x": 18,
- "y": 1
- },
- "id": 75,
- "interval": null,
- "links": [],
- "mappingType": 2,
- "mappingTypes": [
- {
- "name": "value to text",
- "value": 1
- },
- {
- "name": "range to text",
- "value": 2
- }
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "70%",
- "rangeMaps": [
- {
- "from": "null",
- "text": "N/A",
- "to": "null"
- },
- {
- "from": "-99999999999999999999999999999999",
- "text": "N/A",
- "to": "0"
- }
- ],
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "tableColumn": "",
- "targets": [
- {
- "expr": "sum(jvm_memory_used_bytes{application=\"$application\", area=\"nonheap\"})*100/sum(jvm_memory_max_bytes{application=\"$application\",area=\"nonheap\"})",
- "format": "time_series",
- "interval": "",
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A",
- "step": 14400
- }
- ],
- "thresholds": "70,90",
- "title": "Non-Heap used",
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "op": "=",
- "text": "N/A",
- "value": "null"
- },
- {
- "op": "=",
- "text": "x",
- "value": ""
- }
- ],
- "valueName": "current"
- },
- {
- "collapsed": false,
- "datasource": null,
- "gridPos": {
- "h": 1,
- "w": 24,
- "x": 0,
- "y": 4
- },
- "id": 127,
- "panels": [],
- "repeat": null,
- "title": "Memory",
- "type": "row"
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "prometheus",
- "editable": true,
- "error": false,
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fill": 1,
- "fillGradient": 0,
- "grid": {
- "leftLogBase": 1,
- "leftMax": null,
- "leftMin": null,
- "rightLogBase": 1,
- "rightMax": null,
- "rightMin": null
- },
- "gridPos": {
- "h": 7,
- "w": 6,
- "x": 0,
- "y": 5
- },
- "hiddenSeries": false,
- "id": 24,
- "legend": {
- "avg": false,
- "current": true,
- "max": true,
- "min": false,
- "show": true,
- "total": false,
- "values": true
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "options": {
- "alertThreshold": true
- },
- "percentage": false,
- "pluginVersion": "7.3.7",
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(jvm_memory_used_bytes{application=\"$application\", area=\"heap\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "used",
- "metric": "",
- "refId": "A",
- "step": 2400
- },
- {
- "expr": "sum(jvm_memory_committed_bytes{application=\"$application\", area=\"heap\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "committed",
- "refId": "B",
- "step": 2400
- },
- {
- "expr": "sum(jvm_memory_max_bytes{application=\"$application\", area=\"heap\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "max",
- "refId": "C",
- "step": 2400
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "JVM Heap",
- "tooltip": {
- "msResolution": false,
- "shared": true,
- "sort": 0,
- "value_type": "cumulative"
- },
- "type": "graph",
- "x-axis": true,
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "y-axis": true,
- "y_formats": [
- "mbytes",
- "short"
- ],
- "yaxes": [
- {
- "format": "bytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "prometheus",
- "editable": true,
- "error": false,
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fill": 1,
- "fillGradient": 0,
- "grid": {
- "leftLogBase": 1,
- "leftMax": null,
- "leftMin": null,
- "rightLogBase": 1,
- "rightMax": null,
- "rightMin": null
- },
- "gridPos": {
- "h": 7,
- "w": 6,
- "x": 6,
- "y": 5
- },
- "hiddenSeries": false,
- "id": 25,
- "legend": {
- "avg": false,
- "current": true,
- "max": true,
- "min": false,
- "show": true,
- "total": false,
- "values": true
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "options": {
- "alertThreshold": true
- },
- "percentage": false,
- "pluginVersion": "7.3.7",
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(jvm_memory_used_bytes{application=\"$application\", area=\"nonheap\"})",
- "format": "time_series",
- "interval": "",
- "intervalFactor": 2,
- "legendFormat": "used",
- "metric": "",
- "refId": "A",
- "step": 2400
- },
- {
- "expr": "sum(jvm_memory_committed_bytes{application=\"$application\", area=\"nonheap\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "committed",
- "refId": "B",
- "step": 2400
- },
- {
- "expr": "sum(jvm_memory_max_bytes{application=\"$application\", area=\"nonheap\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "max",
- "refId": "C",
- "step": 2400
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "JVM Non-Heap",
- "tooltip": {
- "msResolution": false,
- "shared": true,
- "sort": 0,
- "value_type": "cumulative"
- },
- "type": "graph",
- "x-axis": true,
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "y-axis": true,
- "y_formats": [
- "mbytes",
- "short"
- ],
- "yaxes": [
- {
- "format": "bytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "prometheus",
- "editable": true,
- "error": false,
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fill": 1,
- "fillGradient": 0,
- "grid": {
- "leftLogBase": 1,
- "leftMax": null,
- "leftMin": null,
- "rightLogBase": 1,
- "rightMax": null,
- "rightMin": null
- },
- "gridPos": {
- "h": 7,
- "w": 6,
- "x": 12,
- "y": 5
- },
- "hiddenSeries": false,
- "id": 26,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": true,
- "max": true,
- "min": false,
- "show": true,
- "total": false,
- "values": true
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "options": {
- "alertThreshold": true
- },
- "percentage": false,
- "pluginVersion": "7.3.7",
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(jvm_memory_used_bytes{application=\"$application\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "used",
- "metric": "",
- "refId": "A",
- "step": 2400
- },
- {
- "expr": "sum(jvm_memory_committed_bytes{application=\"$application\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "committed",
- "refId": "B",
- "step": 2400
- },
- {
- "expr": "sum(jvm_memory_max_bytes{application=\"$application\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "max",
- "refId": "C",
- "step": 2400
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "JVM Total",
- "tooltip": {
- "msResolution": false,
- "shared": true,
- "sort": 0,
- "value_type": "cumulative"
- },
- "type": "graph",
- "x-axis": true,
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "y-axis": true,
- "y_formats": [
- "mbytes",
- "short"
- ],
- "yaxes": [
- {
- "format": "bytes",
- "label": "",
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "aliasColors": {
- "debug": "#1F78C1",
- "error": "#BF1B00",
- "info": "#508642",
- "trace": "#6ED0E0",
- "warn": "#EAB839"
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "prometheus",
- "editable": true,
- "error": false,
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fill": 1,
- "fillGradient": 0,
- "grid": {
- "leftLogBase": 1,
- "leftMax": null,
- "leftMin": null,
- "rightLogBase": 1,
- "rightMax": null,
- "rightMin": null
- },
- "gridPos": {
- "h": 7,
- "w": 24,
- "x": 0,
- "y": 12
- },
- "height": "",
- "hiddenSeries": false,
- "id": 91,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": true,
- "hideEmpty": false,
- "hideZero": false,
- "max": true,
- "min": false,
- "rightSide": false,
- "show": true,
- "total": false,
- "values": true
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "options": {
- "alertThreshold": true
- },
- "percentage": true,
- "pluginVersion": "7.3.7",
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [
- {
- "alias": "error",
- "yaxis": 1
- },
- {
- "alias": "warn",
- "yaxis": 1
- }
- ],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "increase(logback_events_total{application=\"$application\"}[1m])",
- "format": "time_series",
- "interval": "",
- "intervalFactor": 2,
- "legendFormat": "{{level}}",
- "metric": "",
- "refId": "A",
- "step": 1200
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "Log Events",
- "tooltip": {
- "msResolution": false,
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "x-axis": true,
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "y-axis": true,
- "y_formats": [
- "short",
- "short"
- ],
- "yaxes": [
- {
- "decimals": 0,
- "format": "opm",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": "0",
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "collapsed": false,
- "datasource": null,
- "gridPos": {
- "h": 1,
- "w": 24,
- "x": 0,
- "y": 19
- },
- "id": 128,
- "panels": [],
- "repeat": null,
- "title": "CPU & Load",
- "type": "row"
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "prometheus",
- "editable": true,
- "error": false,
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fill": 1,
- "fillGradient": 0,
- "grid": {
- "leftLogBase": 1,
- "leftMax": null,
- "leftMin": null,
- "rightLogBase": 1,
- "rightMax": null,
- "rightMin": null
- },
- "gridPos": {
- "h": 7,
- "w": 6,
- "x": 0,
- "y": 20
- },
- "hiddenSeries": false,
- "id": 106,
- "legend": {
- "avg": false,
- "current": true,
- "max": true,
- "min": false,
- "show": true,
- "total": false,
- "values": true
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "options": {
- "alertThreshold": true
- },
- "percentage": false,
- "pluginVersion": "7.3.7",
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "system_cpu_usage{application=\"$application\"}",
- "format": "time_series",
- "hide": false,
- "intervalFactor": 1,
- "legendFormat": "system",
- "metric": "",
- "refId": "A",
- "step": 2400
- },
- {
- "expr": "process_cpu_usage{application=\"$application\"}",
- "format": "time_series",
- "hide": false,
- "intervalFactor": 1,
- "legendFormat": "process",
- "refId": "B"
- },
- {
- "expr": "avg_over_time(process_cpu_usage{application=\"$application\"}[1h])",
- "format": "time_series",
- "hide": false,
- "intervalFactor": 1,
- "legendFormat": "process-1h",
- "refId": "C"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "CPU Usage",
- "tooltip": {
- "msResolution": false,
- "shared": true,
- "sort": 0,
- "value_type": "cumulative"
- },
- "type": "graph",
- "x-axis": true,
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "y-axis": true,
- "y_formats": [
- "short",
- "short"
- ],
- "yaxes": [
- {
- "decimals": 1,
- "format": "percentunit",
- "label": "",
- "logBase": 1,
- "max": "1",
- "min": 0,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "prometheus",
- "editable": true,
- "error": false,
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fill": 1,
- "fillGradient": 0,
- "grid": {
- "leftLogBase": 1,
- "leftMax": null,
- "leftMin": null,
- "rightLogBase": 1,
- "rightMax": null,
- "rightMin": null
- },
- "gridPos": {
- "h": 7,
- "w": 6,
- "x": 6,
- "y": 20
- },
- "hiddenSeries": false,
- "id": 93,
- "legend": {
- "avg": false,
- "current": true,
- "max": true,
- "min": false,
- "show": true,
- "total": false,
- "values": true
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "options": {
- "alertThreshold": true
- },
- "percentage": false,
- "pluginVersion": "7.3.7",
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "system_load_average_1m{application=\"$application\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "system-1m",
- "metric": "",
- "refId": "A",
- "step": 2400
- },
- {
- "expr": "system_cpu_count{application=\"$application\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "cpus",
- "refId": "B"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "Load",
- "tooltip": {
- "msResolution": false,
- "shared": true,
- "sort": 0,
- "value_type": "cumulative"
- },
- "type": "graph",
- "x-axis": true,
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "y-axis": true,
- "y_formats": [
- "short",
- "short"
- ],
- "yaxes": [
- {
- "decimals": 1,
- "format": "short",
- "label": "",
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "prometheus",
- "editable": true,
- "error": false,
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fill": 1,
- "fillGradient": 0,
- "grid": {
- "leftLogBase": 1,
- "leftMax": null,
- "leftMin": null,
- "rightLogBase": 1,
- "rightMax": null,
- "rightMin": null
- },
- "gridPos": {
- "h": 7,
- "w": 6,
- "x": 12,
- "y": 20
- },
- "hiddenSeries": false,
- "id": 32,
- "legend": {
- "avg": false,
- "current": true,
- "max": true,
- "min": false,
- "show": true,
- "total": false,
- "values": true
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "options": {
- "alertThreshold": true
- },
- "percentage": false,
- "pluginVersion": "7.3.7",
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "jvm_threads_live_threads{application=\"$application\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "live",
- "metric": "",
- "refId": "A",
- "step": 2400
- },
- {
- "expr": "jvm_threads_daemon_threads{application=\"$application\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "daemon",
- "metric": "",
- "refId": "B",
- "step": 2400
- },
- {
- "expr": "jvm_threads_peak_threads{application=\"$application\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "peak",
- "refId": "C",
- "step": 2400
- },
- {
- "expr": "process_threads{application=\"$application\"}",
- "format": "time_series",
- "interval": "",
- "intervalFactor": 2,
- "legendFormat": "process",
- "refId": "D",
- "step": 2400
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "Threads",
- "tooltip": {
- "msResolution": false,
- "shared": true,
- "sort": 0,
- "value_type": "cumulative"
- },
- "type": "graph",
- "x-axis": true,
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "y-axis": true,
- "y_formats": [
- "short",
- "short"
- ],
- "yaxes": [
- {
- "decimals": 0,
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "aliasColors": {
- "blocked": "#bf1b00",
- "new": "#fce2de",
- "runnable": "#7eb26d",
- "terminated": "#511749",
- "timed-waiting": "#c15c17",
- "waiting": "#eab839"
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "prometheus",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 7,
- "w": 6,
- "x": 18,
- "y": 20
- },
- "hiddenSeries": false,
- "id": 124,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": true,
- "max": true,
- "min": false,
- "rightSide": false,
- "show": true,
- "total": false,
- "values": true
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "options": {
- "alertThreshold": true
- },
- "percentage": false,
- "pluginVersion": "7.3.7",
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "jvm_threads_states_threads{application=\"$application\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{state}}",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "Thread States",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- }
- ],
- "refresh": "30s",
- "schemaVersion": 26,
- "style": "dark",
- "tags": [],
- "templating": {
- "list": [
- {
- "allValue": null,
- "current": {
- "selected": true,
- "text": "oneplusbot",
- "value": "oneplusbot"
- },
- "datasource": "prometheus",
- "definition": "",
- "error": null,
- "hide": 0,
- "includeAll": false,
- "label": "Application",
- "multi": false,
- "name": "application",
- "options": [],
- "query": "label_values(application)",
- "refresh": 2,
- "regex": "",
- "skipUrlSync": false,
- "sort": 0,
- "tagValuesQuery": "",
- "tags": [],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- }
- ]
- },
- "time": {
- "from": "now-1h",
- "to": "now"
- },
- "timepicker": {
- "now": true,
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m",
- "15m",
- "30m",
- "1h"
- ],
- "time_options": [
- "5m",
- "15m",
- "1h",
- "6h",
- "12h",
- "24h",
- "2d",
- "7d"
- ]
- },
- "timezone": "browser",
- "title": "JVM (Micrometer)",
- "uid": "YryNLtLMk",
- "version": 1
-}
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/grafana/dashboards/oneplus-bot-logs.json b/deployment/image-packaging/src/main/docker/grafana/dashboards/oneplus-bot-logs.json
deleted file mode 100644
index d2657f0..0000000
--- a/deployment/image-packaging/src/main/docker/grafana/dashboards/oneplus-bot-logs.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- "annotations": {
- "list": [
- {
- "builtIn": 1,
- "datasource": "-- Grafana --",
- "enable": true,
- "hide": true,
- "iconColor": "rgba(0, 211, 255, 1)",
- "name": "Annotations & Alerts",
- "type": "dashboard"
- }
- ]
- },
- "editable": true,
- "gnetId": null,
- "graphTooltip": 0,
- "id": 4,
- "links": [],
- "panels": [
- {
- "datasource": "Loki",
- "gridPos": {
- "h": 14,
- "w": 24,
- "x": 0,
- "y": 0
- },
- "id": 2,
- "options": {
- "dedupStrategy": "none",
- "enableLogDetails": true,
- "showLabels": false,
- "showTime": false,
- "sortOrder": "Descending",
- "wrapLogMessage": true
- },
- "targets": [
- {
- "expr": "{job=\"oneplus-bot-logs\", filename=\"/logs/log.log\"}",
- "queryType": "randomWalk",
- "refId": "A"
- }
- ],
- "title": "OnePlus Bot logs",
- "type": "logs"
- }
- ],
- "refresh": "",
- "schemaVersion": 30,
- "style": "dark",
- "tags": [],
- "templating": {
- "list": []
- },
- "time": {
- "from": "now-3h",
- "to": "now"
- },
- "timepicker": {},
- "timezone": "",
- "title": "OnePlus Bot logs",
- "uid": "1uGb0q4nz",
- "version": 2
-}
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/grafana/dashboards/oneplus-bot-stats-dashboard.json b/deployment/image-packaging/src/main/docker/grafana/dashboards/oneplus-bot-stats-dashboard.json
deleted file mode 100644
index 80124ec..0000000
--- a/deployment/image-packaging/src/main/docker/grafana/dashboards/oneplus-bot-stats-dashboard.json
+++ /dev/null
@@ -1,4696 +0,0 @@
-{
- "annotations": {
- "list": [
- {
- "builtIn": 1,
- "datasource": "-- Grafana --",
- "enable": true,
- "hide": true,
- "iconColor": "rgba(0, 211, 255, 1)",
- "name": "Annotations & Alerts",
- "type": "dashboard"
- }
- ]
- },
- "editable": true,
- "gnetId": null,
- "graphTooltip": 0,
- "id": 3,
- "links": [],
- "panels": [
- {
- "collapsed": false,
- "datasource": null,
- "gridPos": {
- "h": 1,
- "w": 24,
- "x": 0,
- "y": 0
- },
- "id": 7,
- "panels": [],
- "title": "Core",
- "type": "row"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 2,
- "x": 0,
- "y": 1
- },
- "id": 3,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.auser\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Users",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 2,
- "x": 2,
- "y": 1
- },
- "id": 4,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.user_in_server\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Users In Servers",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 2,
- "x": 4,
- "y": 1
- },
- "id": 5,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.command\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Commands",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 2,
- "x": 6,
- "y": 1
- },
- "id": 10,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.template\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Templates",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 4,
- "x": 8,
- "y": 1
- },
- "id": 12,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1) as existing\nFROM\n abstracto.channel\nWHERE \ndeleted = false\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- },
- {
- "format": "table",
- "group": [],
- "hide": false,
- "metricColumn": "none",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1) as deleted\nFROM\n abstracto.channel\nWHERE \ndeleted = true\n",
- "refId": "B",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Channels",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 4,
- "x": 12,
- "y": 1
- },
- "id": 13,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1) as existing\nFROM\n abstracto.role\nwhere\ndeleted = false\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- },
- {
- "format": "table",
- "group": [],
- "hide": false,
- "metricColumn": "none",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1) as deleted\nFROM\n abstracto.role\nwhere\ndeleted = true",
- "refId": "B",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Roles",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 2,
- "x": 16,
- "y": 1
- },
- "id": 14,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.channel_group\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Channel groups",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 2,
- "x": 18,
- "y": 1
- },
- "id": 15,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.posttarget\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Posttargets",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 4,
- "x": 20,
- "y": 1
- },
- "id": 16,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1) as group\nFROM\n abstracto.profanity_group\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- },
- {
- "format": "table",
- "group": [],
- "hide": false,
- "metricColumn": "none",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1) as regex\nFROM\n abstracto.profanity_regex\n\n",
- "refId": "B",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Profanity config",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 4,
- "x": 0,
- "y": 3
- },
- "id": 19,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.emote\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Configured Emotes",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 4,
- "x": 4,
- "y": 3
- },
- "id": 76,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.channel_in_group\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Channel in channel groups",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 4,
- "x": 8,
- "y": 3
- },
- "id": 22,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.qrtz_simple_triggers\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Scheduled triggers",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 4,
- "x": 12,
- "y": 3
- },
- "id": 75,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.custom_template\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Custom templates",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 4,
- "x": 20,
- "y": 3
- },
- "id": 18,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1) AS \"Buttons\"\n \nFROM abstracto.component_payload\nWHERE type = 'BUTTON'",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- },
- {
- "format": "table",
- "group": [],
- "hide": false,
- "metricColumn": "none",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1) AS \"Selections\"\n \nFROM abstracto.component_payload\nWHERE type = 'SELECTION'",
- "refId": "B",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Components",
- "type": "stat"
- },
- {
- "collapsed": false,
- "datasource": null,
- "gridPos": {
- "h": 1,
- "w": 24,
- "x": 0,
- "y": 5
- },
- "id": 9,
- "panels": [],
- "title": "Moderation",
- "type": "row"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 4,
- "x": 0,
- "y": 6
- },
- "id": 2,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1) as \"Decayed\"\nFROM\n abstracto.warning\nWHERE decayed = true\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- },
- {
- "format": "table",
- "group": [],
- "hide": false,
- "metricColumn": "none",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1) as \"Active\"\nFROM\n abstracto.warning\nWHERE decayed = false\n",
- "refId": "B",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Warnings",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 2,
- "x": 4,
- "y": 6
- },
- "id": 21,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.user_note\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "User notes",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 4,
- "x": 6,
- "y": 6
- },
- "id": 23,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1) as \"Active\"\nFROM\n abstracto.mute\nWHERE mute_ended = false",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- },
- {
- "format": "table",
- "group": [],
- "hide": false,
- "metricColumn": "none",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1) as \"Ended\"\nFROM\n abstracto.mute\nWHERE mute_ended = true",
- "refId": "B",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Mutes",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 2,
- "x": 10,
- "y": 6
- },
- "id": 24,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.filtered_invite_link\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Filtered invites",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 2,
- "x": 12,
- "y": 6
- },
- "id": 66,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.reaction_report\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Reaction reports",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 3,
- "x": 14,
- "y": 6
- },
- "id": 78,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.profanity_use\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Profanity used",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 3,
- "x": 17,
- "y": 6
- },
- "id": 79,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.profanity_use\nWHERE \n verified = true\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Profanity verified",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 3,
- "x": 20,
- "y": 6
- },
- "id": 77,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.profanity_use\nWHERE \n confirmed = true\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Profanity confirmed",
- "type": "stat"
- },
- {
- "collapsed": false,
- "datasource": null,
- "gridPos": {
- "h": 1,
- "w": 24,
- "x": 0,
- "y": 8
- },
- "id": 26,
- "panels": [],
- "title": "Starboard",
- "type": "row"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 2,
- "x": 0,
- "y": 9
- },
- "id": 27,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.starboard_post\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Starboard posts",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 2,
- "x": 2,
- "y": 9
- },
- "id": 28,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.starboard_post_reaction\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Given stars",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 2,
- "x": 4,
- "y": 9
- },
- "id": 29,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "with starred_users as (\nSELECT\n count(1) as count\nFROM\n abstracto.starboard_post\n GROUP BY author_user_in_server_id\n)\nSELECT count(1) from starred_users",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Starred users",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 2,
- "x": 6,
- "y": 9
- },
- "id": 30,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "with starring_users as (\nSELECT\n count(1) as count\nFROM\n abstracto.starboard_post_reaction\n GROUP BY reactor_user_in_server_id\n)\nSELECT count(1) from starring_users",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Starring users",
- "type": "stat"
- },
- {
- "collapsed": false,
- "datasource": null,
- "gridPos": {
- "h": 1,
- "w": 24,
- "x": 0,
- "y": 11
- },
- "id": 35,
- "panels": [],
- "title": "Modmail",
- "type": "row"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 3,
- "x": 0,
- "y": 12
- },
- "id": 40,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.mod_mail_thread\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Modmail threads",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 3,
- "x": 3,
- "y": 12
- },
- "id": 37,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.mod_mail_message\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Modmail messages",
- "type": "stat"
- },
- {
- "collapsed": false,
- "datasource": null,
- "gridPos": {
- "h": 1,
- "w": 24,
- "x": 0,
- "y": 14
- },
- "id": 46,
- "panels": [],
- "title": "Experience details",
- "type": "row"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 3,
- "x": 0,
- "y": 15
- },
- "id": 36,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.user_experience\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Users with experience",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "custom": {
- "align": null,
- "filterable": false
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 8,
- "w": 6,
- "x": 3,
- "y": 15
- },
- "id": 44,
- "options": {
- "showHeader": true
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [
- {
- "params": [
- "$__interval",
- "none"
- ],
- "type": "time"
- }
- ],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT \n role_id as \"Role ID\",\n count(1) as \"Member count\"\nFROM \n abstracto.user_experience\n GROUP BY role_id",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "role_id"
- ],
- "type": "column"
- },
- {
- "params": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "params": [
- "role_id"
- ],
- "type": "alias"
- }
- ]
- ],
- "table": "abstracto.user_experience",
- "timeColumn": "created",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Experience roles",
- "type": "table"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 3,
- "x": 0,
- "y": 17
- },
- "id": 41,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n(\nSELECT\n count(1)\nFROM\n abstracto.user_in_server\n)\n-\n(\nSELECT\n count(1)\nFROM\n abstracto.user_experience\n)",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Users without experience",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 3,
- "x": 0,
- "y": 19
- },
- "id": 42,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT \n count(1)\nFROM\n abstracto.user_experience\nWHERE role_id IS NULL",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Users without role",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 3,
- "x": 0,
- "y": 21
- },
- "id": 65,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.experience_role\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Experience roles",
- "type": "stat"
- },
- {
- "collapsed": false,
- "datasource": null,
- "gridPos": {
- "h": 1,
- "w": 24,
- "x": 0,
- "y": 23
- },
- "id": 48,
- "panels": [],
- "title": "Emote tracking",
- "type": "row"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 2,
- "x": 0,
- "y": 24
- },
- "id": 49,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.tracked_emote\nWHERE \n tracking_enabled = true\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Tracked",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 2,
- "x": 2,
- "y": 24
- },
- "id": 50,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.tracked_emote\nWHERE \n tracking_enabled = false\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Untracked",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 3,
- "x": 4,
- "y": 24
- },
- "id": 51,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.tracked_emote\nWHERE \n deleted = true\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Deleted Tracked emotes",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 3,
- "x": 7,
- "y": 24
- },
- "id": 52,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.tracked_emote\nWHERE \n animated = true\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Animated Tracked emotes",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 3,
- "x": 10,
- "y": 24
- },
- "id": 53,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.tracked_emote\nWHERE \n external = true\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "External Tracked emotes",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 3,
- "x": 13,
- "y": 24
- },
- "id": 54,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.used_emote\nWHERE \n use_date = CURRENT_DATE\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Emote usage today",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 3,
- "x": 16,
- "y": 24
- },
- "id": 55,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.used_emote\nWHERE \n use_date > CURRENT_DATE - 7\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Emote usage last week",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 2,
- "x": 19,
- "y": 24
- },
- "id": 56,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n sum(amount)\nFROM\n abstracto.used_Emote\n\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Total emote usage",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 3,
- "x": 21,
- "y": 24
- },
- "id": 57,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n max(amount)\nFROM\n abstracto.used_Emote\n\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Max emote usage",
- "type": "stat"
- },
- {
- "collapsed": true,
- "datasource": null,
- "gridPos": {
- "h": 1,
- "w": 24,
- "x": 0,
- "y": 26
- },
- "id": 71,
- "panels": [
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 3,
- "x": 0,
- "y": 11
- },
- "id": 72,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.assignable_role\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Assignable roles",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 3,
- "x": 3,
- "y": 11
- },
- "id": 73,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.assigned_role_in_user\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Assigned roles",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 3,
- "x": 6,
- "y": 11
- },
- "id": 74,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.assignable_role_place\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Assignable role places",
- "type": "stat"
- }
- ],
- "title": "Assignable roles",
- "type": "row"
- },
- {
- "collapsed": true,
- "datasource": null,
- "gridPos": {
- "h": 1,
- "w": 24,
- "x": 0,
- "y": 27
- },
- "id": 59,
- "panels": [
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 3,
- "x": 0,
- "y": 12
- },
- "id": 60,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.news_post\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Tracked news posts",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 3,
- "x": 3,
- "y": 12
- },
- "id": 61,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n sum(uses)\nFROM\n abstracto.faq_channel_group_command\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "FAQ usages",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 3,
- "x": 6,
- "y": 12
- },
- "id": 62,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.faq_command\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "FAQ commands",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 3,
- "x": 9,
- "y": 12
- },
- "id": 63,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.faq_command_response\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "FAQ responses",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 3,
- "x": 12,
- "y": 12
- },
- "id": 64,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.faq_channel_group\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "FAQ channel groups",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 3,
- "x": 15,
- "y": 12
- },
- "id": 67,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.referral_user_in_server\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Referral users",
- "type": "stat"
- }
- ],
- "title": "OnePlus Bot custom",
- "type": "row"
- },
- {
- "collapsed": true,
- "datasource": null,
- "gridPos": {
- "h": 1,
- "w": 24,
- "x": 0,
- "y": 28
- },
- "id": 32,
- "panels": [
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 3,
- "x": 0,
- "y": 13
- },
- "id": 33,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.embedded_message\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Embedded messages",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 3,
- "x": 3,
- "y": 13
- },
- "id": 68,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.reminder\nWHERE \n reminded = false\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Active reminders",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 3,
- "x": 6,
- "y": 13
- },
- "id": 69,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.reminder\nWHERE \n reminded = true\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Past reminders",
- "type": "stat"
- },
- {
- "datasource": "postgres-db",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 3,
- "x": 9,
- "y": 13
- },
- "id": 80,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "7.5.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "SELECT\n count(1)\nFROM\n abstracto.suggestion\n\n",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Suggestions",
- "type": "stat"
- }
- ],
- "title": "Various",
- "type": "row"
- }
- ],
- "schemaVersion": 27,
- "style": "dark",
- "tags": [],
- "templating": {
- "list": []
- },
- "time": {
- "from": "now-6h",
- "to": "now"
- },
- "timepicker": {
- "hidden": true,
- "refresh_intervals": [
- "15m",
- "30m",
- "1h",
- "2h",
- "1d"
- ]
- },
- "timezone": "",
- "title": "OnePlusBot stats",
- "uid": "wtTZMAZ7z",
- "version": 9
-}
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/grafana/dashboards/oneplus-bot-status-dashboard.json b/deployment/image-packaging/src/main/docker/grafana/dashboards/oneplus-bot-status-dashboard.json
deleted file mode 100644
index 0979c59..0000000
--- a/deployment/image-packaging/src/main/docker/grafana/dashboards/oneplus-bot-status-dashboard.json
+++ /dev/null
@@ -1,1100 +0,0 @@
-{
- "annotations": {
- "list": [
- {
- "builtIn": 1,
- "datasource": "-- Grafana --",
- "enable": true,
- "hide": true,
- "iconColor": "rgba(0, 211, 255, 1)",
- "name": "Annotations & Alerts",
- "type": "dashboard"
- }
- ]
- },
- "editable": true,
- "gnetId": null,
- "graphTooltip": 1,
- "iteration": 1627217870213,
- "links": [],
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "prometheus",
- "fieldConfig": {
- "defaults": {},
- "overrides": []
- },
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 8,
- "w": 12,
- "x": 0,
- "y": 0
- },
- "hiddenSeries": false,
- "id": 16,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "options": {
- "alertThreshold": true
- },
- "percentage": false,
- "pluginVersion": "7.5.7",
- "pointradius": 2,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "increase(discord_api_interactions_total[1m])",
- "interval": "",
- "legendFormat": "{{ action }}",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "Discord API Interaction",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "prometheus",
- "fieldConfig": {
- "defaults": {},
- "overrides": []
- },
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 8,
- "w": 12,
- "x": 12,
- "y": 0
- },
- "hiddenSeries": false,
- "id": 4,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "options": {
- "alertThreshold": true
- },
- "percentage": false,
- "pluginVersion": "7.5.7",
- "pointradius": 2,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "increase(command_processed_total[1m])",
- "interval": "",
- "legendFormat": "{{status}}",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "Commands processed",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "prometheus",
- "fieldConfig": {
- "defaults": {},
- "overrides": []
- },
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 8,
- "w": 12,
- "x": 0,
- "y": 8
- },
- "hiddenSeries": false,
- "id": 2,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "options": {
- "alertThreshold": true
- },
- "percentage": false,
- "pluginVersion": "7.5.7",
- "pointradius": 2,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "increase(message_total[1m])",
- "interval": "",
- "legendFormat": "{{ action }}",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "Message events",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "prometheus",
- "fieldConfig": {
- "defaults": {},
- "overrides": []
- },
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 8,
- "w": 12,
- "x": 12,
- "y": 8
- },
- "hiddenSeries": false,
- "id": 26,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "options": {
- "alertThreshold": true
- },
- "percentage": false,
- "pluginVersion": "7.5.7",
- "pointradius": 2,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "increase(okhttp_request_total[1m])",
- "interval": "",
- "legendFormat": "{{ http_code }}",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "HTTP Reponse codes",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "prometheus",
- "fieldConfig": {
- "defaults": {},
- "overrides": []
- },
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 7,
- "w": 12,
- "x": 0,
- "y": 16
- },
- "hiddenSeries": false,
- "id": 30,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "options": {
- "alertThreshold": true
- },
- "percentage": false,
- "pluginVersion": "7.5.7",
- "pointradius": 2,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "exemplar": true,
- "expr": "increase(cache_evictions_total{application=\"$application\", cache=\"messages\"}[1m])",
- "interval": "",
- "legendFormat": "Cache evictions",
- "refId": "A"
- },
- {
- "exemplar": true,
- "expr": "increase(cache_gets_total{application=\"$application\", cache=\"messages\"}[1m])",
- "hide": false,
- "interval": "",
- "legendFormat": "Cache gets {{ result }}",
- "refId": "B"
- },
- {
- "exemplar": true,
- "expr": "increase(cache_puts_total{application=\"$application\", cache=\"messages\"}[1m])",
- "hide": false,
- "interval": "",
- "legendFormat": "Cache puts",
- "refId": "C"
- },
- {
- "exemplar": true,
- "expr": "increase(cache_removals{application=\"$application\", cache=\"messages\"}[1m])",
- "hide": false,
- "interval": "",
- "legendFormat": "Cache removals",
- "refId": "D"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "Cache statistic",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "prometheus",
- "fieldConfig": {
- "defaults": {},
- "overrides": []
- },
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 7,
- "w": 12,
- "x": 12,
- "y": 16
- },
- "hiddenSeries": false,
- "id": 32,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "options": {
- "alertThreshold": true
- },
- "percentage": false,
- "pluginVersion": "7.5.7",
- "pointradius": 2,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "exemplar": true,
- "expr": "discord_gateway_ping",
- "interval": "",
- "legendFormat": "Gateway ping",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "Gateway ping",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "prometheus",
- "fieldConfig": {
- "defaults": {},
- "overrides": []
- },
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 7,
- "w": 6,
- "x": 0,
- "y": 23
- },
- "hiddenSeries": false,
- "id": 8,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "options": {
- "alertThreshold": true
- },
- "percentage": false,
- "pluginVersion": "7.5.7",
- "pointradius": 2,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "increase(starboard_stars_total[1m])",
- "interval": "",
- "legendFormat": "{{ action }}",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "Starboard reactions",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "prometheus",
- "fieldConfig": {
- "defaults": {},
- "overrides": []
- },
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 7,
- "w": 6,
- "x": 6,
- "y": 23
- },
- "hiddenSeries": false,
- "id": 12,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "options": {
- "alertThreshold": true
- },
- "percentage": false,
- "pluginVersion": "7.5.7",
- "pointradius": 2,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "increase(emote_usages_total[1m])",
- "interval": "",
- "legendFormat": "Used emotes",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "Emote tracking",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "prometheus",
- "fieldConfig": {
- "defaults": {},
- "overrides": []
- },
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 7,
- "w": 6,
- "x": 12,
- "y": 23
- },
- "hiddenSeries": false,
- "id": 28,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "options": {
- "alertThreshold": true
- },
- "percentage": false,
- "pluginVersion": "7.5.7",
- "pointradius": 2,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "increase(experience_runtime_storage[1m])",
- "interval": "",
- "legendFormat": "Amount of entries",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "Experience storage",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "prometheus",
- "fieldConfig": {
- "defaults": {},
- "overrides": []
- },
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 7,
- "w": 6,
- "x": 18,
- "y": 23
- },
- "hiddenSeries": false,
- "id": 14,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "options": {
- "alertThreshold": true
- },
- "percentage": false,
- "pluginVersion": "7.5.7",
- "pointradius": 2,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "increase(assignable_roles_total[1m])",
- "interval": "",
- "legendFormat": "{{ action }}",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "Assignable role actions",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "prometheus",
- "fieldConfig": {
- "defaults": {},
- "overrides": []
- },
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 14,
- "w": 24,
- "x": 0,
- "y": 30
- },
- "hiddenSeries": false,
- "id": 34,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "options": {
- "alertThreshold": true
- },
- "percentage": false,
- "pluginVersion": "7.5.7",
- "pointradius": 2,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "exemplar": true,
- "expr": "increase(jda_event_total[1m])",
- "interval": "",
- "legendFormat": "{{ event_class }}",
- "queryType": "randomWalk",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "JDA Events",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- }
- ],
- "refresh": "10s",
- "schemaVersion": 27,
- "style": "dark",
- "tags": [],
- "templating": {
- "list": [
- {
- "description": "The spring boot application which contains the messages cache",
- "error": null,
- "hide": 2,
- "label": null,
- "name": "application",
- "query": "oneplus-bot",
- "skipUrlSync": false,
- "type": "constant"
- }
- ]
- },
- "time": {
- "from": "now-15m",
- "to": "now"
- },
- "timepicker": {},
- "timezone": "",
- "title": "OnePlus Bot status",
- "uid": "6WIJ36BMz",
- "version": 3
-}
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/grafana/provisioning/dashboards/all.yml b/deployment/image-packaging/src/main/docker/grafana/provisioning/dashboards/all.yml
deleted file mode 100644
index 8ddb6b0..0000000
--- a/deployment/image-packaging/src/main/docker/grafana/provisioning/dashboards/all.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-- name: 'oneplus-dashboards'
- org_id: 1
- folder: ''
- type: 'file'
- options:
- folder: '/var/lib/grafana/dashboards'
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/grafana/provisioning/datasources/all.yml b/deployment/image-packaging/src/main/docker/grafana/provisioning/datasources/all.yml
deleted file mode 100644
index 26c8b9d..0000000
--- a/deployment/image-packaging/src/main/docker/grafana/provisioning/datasources/all.yml
+++ /dev/null
@@ -1,29 +0,0 @@
-apiVersion: 1
-datasources:
- - access: 'proxy'
- editable: true
- is_default: true
- name: 'prometheus'
- org_id: 1
- type: 'prometheus'
- url: 'http://${PROMETHEUS_HOST}:${PROMETHEUS_PORT}'
- version: 1
- - name: 'postgres-db'
- type: postgres
- access: 'proxy'
- url: '${DB_HOST}:${DB_PORT}'
- password: '${DB_PASS}'
- user: '${DB_USER}'
- database: '${DB_NAME}'
- basicAuth: false
- is_default: false
- jsonData:
- sslmode: 'disable'
- version: 1
- editable: false
- - name: Loki
- type: loki
- access: proxy
- url: 'http://${LOKI_HOST}:${LOKI_PORT}'
- jsonData:
- maxLines: 2000
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/loki/Dockerfile b/deployment/image-packaging/src/main/docker/loki/Dockerfile
deleted file mode 100644
index 6259268..0000000
--- a/deployment/image-packaging/src/main/docker/loki/Dockerfile
+++ /dev/null
@@ -1,4 +0,0 @@
-ARG LOKI_VERSION
-FROM grafana/loki:${LOKI_VERSION}
-MAINTAINER Sheldan
-ADD loki.yml /mnt/config/loki-config.yaml
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/loki/loki.yml b/deployment/image-packaging/src/main/docker/loki/loki.yml
deleted file mode 100644
index 0b8ea89..0000000
--- a/deployment/image-packaging/src/main/docker/loki/loki.yml
+++ /dev/null
@@ -1,66 +0,0 @@
-auth_enabled: false
-
-server:
- http_listen_port: 3100
- grpc_listen_port: 9096
-
-ingester:
- wal:
- enabled: true
- dir: /tmp/wal
- lifecycler:
- address: 127.0.0.1
- ring:
- kvstore:
- store: inmemory
- replication_factor: 1
- final_sleep: 0s
- chunk_idle_period: 1h
- max_chunk_age: 1h
- chunk_target_size: 1048576
- chunk_retain_period: 30s
- max_transfer_retries: 0
-
-schema_config:
- configs:
- - from: 2020-10-24
- store: boltdb-shipper
- object_store: filesystem
- schema: v11
- index:
- prefix: index_
- period: 24h
-
-storage_config:
- boltdb_shipper:
- active_index_directory: /tmp/loki/boltdb-shipper-active
- cache_location: /tmp/loki/boltdb-shipper-cache
- cache_ttl: 24h
- shared_store: filesystem
- filesystem:
- directory: /tmp/loki/chunks
-
-compactor:
- working_directory: /tmp/loki/boltdb-shipper-compactor
- shared_store: filesystem
-
-limits_config:
- reject_old_samples: true
- reject_old_samples_max_age: 168h
-
-chunk_store_config:
- max_look_back_period: 0s
-
-table_manager:
- retention_deletes_enabled: true
- retention_period: 360h
-
-ruler:
- storage:
- type: local
- local:
- directory: /tmp/loki/rules
- rule_path: /tmp/loki/rules-temp
- ring:
- kvstore:
- store: inmemory
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/oneplusbot/Dockerfile b/deployment/image-packaging/src/main/docker/oneplusbot/Dockerfile
index b2475c9..27a4035 100644
--- a/deployment/image-packaging/src/main/docker/oneplusbot/Dockerfile
+++ b/deployment/image-packaging/src/main/docker/oneplusbot/Dockerfile
@@ -1,10 +1,8 @@
-FROM openjdk:8-jdk-alpine
+FROM amazoncorretto:17.0.8-alpine3.18
MAINTAINER Sheldan
VOLUME /tmp
-ADD bot/app.jar /app.jar
ADD config/* /config/
-VOLUME ["/config"]
-VOLUME ["/logs"]
ADD wrapper/*.sh /
RUN chmod +x /start.sh
+ADD bot/app.jar /app.jar
CMD ["/start.sh"]
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/pgAdmin/Dockerfile b/deployment/image-packaging/src/main/docker/pgAdmin/Dockerfile
deleted file mode 100644
index 6c0fef6..0000000
--- a/deployment/image-packaging/src/main/docker/pgAdmin/Dockerfile
+++ /dev/null
@@ -1,5 +0,0 @@
-ARG PG_ADMIN_VERSION
-FROM dpage/pgadmin4:${PG_ADMIN_VERSION}
-MAINTAINER Sheldan
-VOLUME /tmp
-ADD config/servers.json /pgadmin4/servers.json
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/pgAdmin/config/servers.json b/deployment/image-packaging/src/main/docker/pgAdmin/config/servers.json
deleted file mode 100644
index 84d1c0f..0000000
--- a/deployment/image-packaging/src/main/docker/pgAdmin/config/servers.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Servers": {
- "1": {
- "Name": "OnePlusBot database",
- "Group": "Server Group 1",
- "Port": 5432,
- "Username": "abstracto",
- "Host": "db",
- "SSLMode": "prefer",
- "MaintenanceDB": "postgres"
- }
- }
-}
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/prometheus/Dockerfile b/deployment/image-packaging/src/main/docker/prometheus/Dockerfile
deleted file mode 100644
index 4c6b029..0000000
--- a/deployment/image-packaging/src/main/docker/prometheus/Dockerfile
+++ /dev/null
@@ -1,4 +0,0 @@
-ARG PROMETHEUS_VERSION
-FROM prom/prometheus:${PROMETHEUS_VERSION}
-MAINTAINER Sheldan
-ADD prometheus.yml /etc/prometheus/prometheus.yml
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/prometheus/prometheus.yml b/deployment/image-packaging/src/main/docker/prometheus/prometheus.yml
deleted file mode 100644
index ca405f7..0000000
--- a/deployment/image-packaging/src/main/docker/prometheus/prometheus.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-global:
- scrape_interval: 10s
- scrape_timeout: 10s
- evaluation_interval: 1m
-scrape_configs:
- - job_name: oneplus_bot_micrometer
- honor_timestamps: true
- scrape_interval: 5s
- scrape_timeout: 5s
- metrics_path: /actuator/prometheus
- scheme: http
- static_configs:
- - targets:
- - oneplusbot:8080
- basic_auth:
- username: "abstracto"
- password_file: /etc/prometheus/micrometer_password
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/promtail/Dockerfile b/deployment/image-packaging/src/main/docker/promtail/Dockerfile
deleted file mode 100644
index d9c4e0d..0000000
--- a/deployment/image-packaging/src/main/docker/promtail/Dockerfile
+++ /dev/null
@@ -1,4 +0,0 @@
-ARG PROMTAIL_VERSION
-FROM grafana/promtail:${PROMTAIL_VERSION}
-MAINTAINER Sheldan
-ADD promtail.yaml /mnt/config/promtail-config.yaml
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/promtail/promtail.yaml b/deployment/image-packaging/src/main/docker/promtail/promtail.yaml
deleted file mode 100644
index f7837f0..0000000
--- a/deployment/image-packaging/src/main/docker/promtail/promtail.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
-server:
- disable: true
-
-positions:
- filename: /tmp/positions.yaml
-
-clients:
- - url: http://loki:3100/loki/api/v1/push
-
-scrape_configs:
- - job_name: system
- static_configs:
- - targets:
- - localhost
- labels:
- job: oneplus-bot-logs
- __path__: /logs/*.log
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/template-data/Dockerfile b/deployment/image-packaging/src/main/docker/template-data/Dockerfile
new file mode 100644
index 0000000..3ff8749
--- /dev/null
+++ b/deployment/image-packaging/src/main/docker/template-data/Dockerfile
@@ -0,0 +1,7 @@
+FROM alpine:3.18.0
+MAINTAINER Sheldan
+ADD config /var/template-config/
+ADD template-artifacts /var/template-config/templates
+ADD translation-artifacts /var/template-config/translations
+
+CMD ["/bin/sh", "/var/template-config/move.sh"]
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/template-data/config/artifact_versions.json b/deployment/image-packaging/src/main/docker/template-data/config/artifact_versions.json
new file mode 100644
index 0000000..95a99ad
--- /dev/null
+++ b/deployment/image-packaging/src/main/docker/template-data/config/artifact_versions.json
@@ -0,0 +1,17 @@
+{
+ "template_artifacts": ["utility", "core", "entertainment", "starboard", "link-embed", "webservices", "remind", "logging",
+ "suggestion", "invite-filter", "profanity-filter", "statistic", "experience-tracking", "moderation", "modmail", "assignable-roles",
+ "voice-channel-context", "anti-raid",
+ "starboard-custom",
+ "overrides-templates-webservices", "overrides-templates-core", "overrides-templates-logging", "overrides-templates-statistic",
+ "overrides-templates-modmail", "overrides-templates-moderation",
+ "news", "referral", "faq"],
+ "translation_artifacts": ["utility", "core", "entertainment", "starboard", "link-embed", "webservices", "suggestion",
+ "remind", "logging", "invite-filter", "profanity-filter", "statistic", "experience-tracking", "moderation", "modmail", "assignable-roles",
+ "voice-channel-context", "anti-raid",
+ "starboard-custom", "dynamic-activity-custom-translations", "moderation-custom",
+ "overrides-translation-moderation",
+ "news", "setup", "referral", "faq", "seasonal"]
+}
+
+
diff --git a/deployment/image-packaging/src/main/docker/template-data/config/move.sh b/deployment/image-packaging/src/main/docker/template-data/config/move.sh
new file mode 100644
index 0000000..ee61b61
--- /dev/null
+++ b/deployment/image-packaging/src/main/docker/template-data/config/move.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+mv /var/template-config/* /var/run-config/
\ No newline at end of file
diff --git a/deployment/infrastructure/terraform/.gitignore b/deployment/infrastructure/terraform/.gitignore
deleted file mode 100644
index 7a3e2fd..0000000
--- a/deployment/infrastructure/terraform/.gitignore
+++ /dev/null
@@ -1,29 +0,0 @@
-# Local .terraform directories
-**/.terraform/*
-
-# .tfstate files
-*.tfstate
-*.tfstate.*
-
-# Crash log files
-crash.log
-
-# Ignore any .tfvars files that are generated automatically for each Terraform run. Most
-# .tfvars files are managed as part of configuration and so should be included in
-# version control.
-#
-# example.tfvars
-
-# Ignore override files as they are usually used to override resources locally and so
-# are not checked in
-override.tf
-override.tf.json
-*_override.tf
-*_override.tf.json
-
-# Include override files you do wish to add to version control using negated pattern
-#
-# !example_override.tf
-
-# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
-# example: *tfplan*
diff --git a/deployment/infrastructure/terraform/.terraform.lock.hcl b/deployment/infrastructure/terraform/.terraform.lock.hcl
deleted file mode 100644
index 78c4ae2..0000000
--- a/deployment/infrastructure/terraform/.terraform.lock.hcl
+++ /dev/null
@@ -1,23 +0,0 @@
-# This file is maintained automatically by "terraform init".
-# Manual edits may be lost in future updates.
-
-provider "registry.terraform.io/hetznercloud/hcloud" {
- version = "1.34.3"
- hashes = [
- "h1:ZAFEiotL15xHI957CrTJEm3z83/lFMQdNWiMqN7Dyu4=",
- "zh:08e4aea3c4e895d941c24d76f373977e5fae112c531b56cb2fcdaa8b5086ebec",
- "zh:09f1255aad8f790c86a14522c7fff2fcb6529bb18f1e49a7423ca79db07f5a47",
- "zh:0b2bcab12aa913adaf89228a250eb41e827c64723a741f2b74b318833f77c9df",
- "zh:0c6947f73dc5779b2425e231b22643741b1877705fb4135df06f7a201f10d094",
- "zh:26513bdefecae83411997a5c4e11dffd886b4594cb8663f4b0c36a064b1a650e",
- "zh:42790576142fb7d0ce851923f58a642e7e4c9e6df9a02b531703131d836daade",
- "zh:5095ea6c8b31dfebd52a03f9ba4e2a8a7ecb0c0442f68c98cab76b677c343e81",
- "zh:6b80223b2831f9f2adf72c7ed37692cef67c8f43de62c405c7162bf524896bc3",
- "zh:6b90164e839ad0977b3feb4dbec153ab76a4f7ee8451ee2d202992ff5a4157b1",
- "zh:72d88705afb9d0a9d90a5ad342c605cb119b678e76f45c5e4c516da5d591f907",
- "zh:881889a9e974a15c616cd7648f1c415a4fb3e9a08c166bcb17e488bfcbb67985",
- "zh:967286f7ef73bb15c2412b9ae8853d1176a039374c5ea39cbfd75e7ebe13bcfd",
- "zh:967a6cc506a019c1720f0207068097a06eb006e940ecc63060373b4b4b6181cc",
- "zh:a68e5e2e2f03656e427045e32ca999422e00be299fc6ecedbd41bef48871b7c5",
- ]
-}
diff --git a/deployment/infrastructure/terraform/cloud.tf b/deployment/infrastructure/terraform/cloud.tf
deleted file mode 100644
index d196c7b..0000000
--- a/deployment/infrastructure/terraform/cloud.tf
+++ /dev/null
@@ -1,10 +0,0 @@
-terraform {
- cloud {
- hostname = "app.terraform.io"
- organization = "OnePlusBot"
-
- workspaces {
- name = "main"
- }
- }
-}
\ No newline at end of file
diff --git a/deployment/infrastructure/terraform/main.tf b/deployment/infrastructure/terraform/main.tf
deleted file mode 100644
index eb92d1f..0000000
--- a/deployment/infrastructure/terraform/main.tf
+++ /dev/null
@@ -1,7 +0,0 @@
-module "hetzner" {
- source = "git@github.com:Sheldan/discord-bot-terraform-module.git//hetzner-bot?ref=v1.0.1"
- ssh_key_key = "Sheldan"
- project_name = "OnePlusBot"
- user_name = "sheldan"
- hcloud_token = var.hcloud_token
-}
\ No newline at end of file
diff --git a/deployment/infrastructure/terraform/output.tf b/deployment/infrastructure/terraform/output.tf
deleted file mode 100644
index d00e897..0000000
--- a/deployment/infrastructure/terraform/output.tf
+++ /dev/null
@@ -1,4 +0,0 @@
-output "instance_ipv4" {
- description = "IPv4 address of the instance"
- value = module.hetzner.instance_ipv4
-}
\ No newline at end of file
diff --git a/deployment/infrastructure/terraform/variables.tf b/deployment/infrastructure/terraform/variables.tf
deleted file mode 100644
index 27460c4..0000000
--- a/deployment/infrastructure/terraform/variables.tf
+++ /dev/null
@@ -1,3 +0,0 @@
-variable "hcloud_token" {
- type = string
-}
\ No newline at end of file
diff --git a/deployment/pom.xml b/deployment/pom.xml
index a3d4f55..e2f4a24 100644
--- a/deployment/pom.xml
+++ b/deployment/pom.xml
@@ -12,7 +12,6 @@
pom
- docker-compose
image-packaging
diff --git a/pom.xml b/pom.xml
index 058a1f6..8838ea4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
org.springframework.boot
spring-boot-starter-parent
- 2.3.1.RELEASE
+ 3.1.1
@@ -15,12 +15,12 @@
1.6.6-SNAPSHOT
- 1.8
- 1.8
+ 17
+ 17
- 1.4.20
- 1.4.13
+ 1.5.9
+ 1.4.21