DBSExporter is an add-on designed for monitoring PostgreSQL, MongoDB, RabbitMQ, Redis, and S3 storage databases.
The installation of the add-on consists of four steps:
- Download the Helm chart and configuration file.
- Create a configuration token to use MinIO metrics for Prometheus.
- Fill in the configuration file.
- Install the DBSExporter chart using Helm in the Kubernetes cluster.
Step 1: Download the Helm chart and configuration file
To install via the internet, obtain the values-dbsexporter.yaml
configuration file by executing the following command:
helm repo add elma365 https://charts.elma365.tech
helm repo update
helm show values elma365/dbsexporter > values-dbsexporter.yaml
For offline installation without internet access
- On a computer with internet access, download the archive of the latest version of the DBSExporter chart from the ELMA365 repository using the command:
helm repo add elma365 https://charts.elma365.tech
helm repo update
helm pull elma365/dbsexporter
- Copy the obtained chart archive
dbsexporter-X.Y.Z.tgz to the server where the installation will take place. - Unpack the chart, and copy the default configuration file
values.yaml to values-dbsexporter.yaml .
tar -xf dbsexporter-X.Y.Z.tgz
cp dbsexporter/values.yaml values-dbsexporter.yaml
|
Step 2: Create a configuration token to use MinIO metrics for Prometheus
Create alias
and send the command to generate a token by executing the following:
mc alias set my_alias http://minio.local accessKey secretKey
mc admin prometheus generate my_alias
Step 3: Fill in the configuration file
Fill in the configuration file to install DBSExporter
Use the generated token when configuring the MinIO connection in the values-dbsexporter.yaml file.
dbsexporter:
## Enable chart imports
grafana-dashboards:
dashboards:
enabled: true
grafanaFolder: dbs
## MinIO connection settings
prometheus-minio-exporter:
nameOverride: minio
instances:
- name: minio-job
token: generated_token
path: /minio/v2/metrics/cluster
host: 'minio.local'
port: 80
scheme: http
## MongoDB connection settings
prometheus-mongodb-exporter:
nameOverride: mongo
instances:
- name: mongodb
uri: "mongodb://mongodb:27017"
## Postgres connection settings
prometheus-postgres-exporter:
nameOverride: postgres
config:
instances:
- name: postgres
## Specify a data source amd a data source secret.
host: 'example.ru'
user: postgres
userSecret: {}
# # Secret name
# name:
# # User key inside the secret
# key:
password: postgres_password
## Specify passwordFile if the database password is stored in a file.
passwordFile: ''
## Specify passwordSecret if the database password is stored in a secret.
passwordSecret: {}
# # Secret name
# name:
# # Password key inside the secret
# key:
pgpassfile: ''
## If pgpassfile is set, it is used to initialize the environment variable PGPASSFILE.
port: "5432"
database: ''
sslmode: disable
extraParams: ''
## rabbitMQ connection settings
prometheus-rabbitmq-exporter:
nameOverride: rabbitmq
rabbitmq:
instances:
- name: rabbitmq
url: 'http://rabbitmq:15672'
user: rabbitmq_user
password: rabbitmq_password
## The specified password will be placed in Secret:
existingPasswordSecret: rabbitmq-secret
existingPasswordSecretKey: password
capabilities: bert,no_sort
include_queues: ".*"
include_vhost: ".*"
skip_queues: "^$"
skip_verify: "false"
skip_vhost: "^$"
exporters: "exchange,node,overview,queue"
output_format: "TTY"
timeout: 60
max_queues: 0
excludeMetrics: ""
## Allows overriding environment variables using an external ConfigMap.
configMapOverrideReference: ""
## Redis connection setting
prometheus-redis-exporter:
nameOverride: redis
instances:
- name: redis1
redisAddress: 'redis://redis:6379/0'
|
Configuring connection parameters to a private registry for installation in a closed environment without internet access
To connect to the private registry:
- Download ELMA365 images and upload them to a local image registry. Refer to Download ELMA365 images for more details.
- Specify the address and path for the parameter
image.repository . - Provide the name of the secret with access rights to the private registry in the parameter
image.pullSecrets . The secret must be manually created and encrypted in Base64.
prometheus-minio-exporter:
## Connection parameters to the private registry
image:
## Address and path for the private registry
repository: registry.example.com/minio_exporter
# tag: "1.0.15"
imagePullSecrets:
- myRegistryKeySecretName
prometheus-mongodb-exporter:
## Connection parameters to the private registry
image:
## Address and path for the private registry
repository: registry.example.com/mongodb_exporter
# tag: "0.31.0"
imagePullSecrets:
- myRegistryKeySecretName
prometheus-postgres-exporter:
## Connection parameters to the private registry
image:
## Address and path for the private registry
repository: registry.example.com/postgres-exporter
# tag: "v0.13.2"
imagePullSecrets:
- myRegistryKeySecretName
## rabbitMQ connection settings
prometheus-rabbitmq-exporter:
## Connection parameters to the private registry
image:
## Address and path for the private registry
repository: registry.example.com/rabbitmq-exporter
# tag: "v0.29.0"
imagePullSecrets:
- myRegistryKeySecretName
prometheus-redis-exporter:
## Connection parameters to the private registry
# image:
## Address and path for the private registry
repository: registry.example.com/redis_exporter
# tag: "v1.44.0"
imagePullSecrets:
- myRegistryKeySecretName
Where repository format is: address — registry.example.com .
|
Step 4: Install the DBSExporter chart using Helm in the Kubernetes cluster
Execute the installation of the DBSExporter chart in namespace monitoring
.
For online installation:
helm upgrade --install -n monitoring dbsexporter elma365/dbsexporter -f values-dbsexporter.yaml
For offline installation without internet access, navigate to the directory with the downloaded chart and execute the command:
helm upgrade --install dbsexporter ./dbsexporter -f values-dbsexporter.yaml -n monitoring
Found a typo? Highlight the text, press ctrl + enter and notify us