Configuration
The Business Engine requires minimal number of environment variables to start up:
- Timescale database connection details.
- Grafana URL and Token (Service Account).
Additional variables can be added to override default values.
loading...
In the future release, the Environent tab in Business Studio will allow to update configuration in real-time.
Timescale database
Timescale (PostgreSQL) database is used to store Business Engine database and required for start-up. We selected Timescale database because it can be used to store Grafana configuration for High Availability setup.
########################### Database Configuration #############################################
##
## Database (Timescale) Host
##
DATABASE_HOST=timescale
##
## Database (Timescale) Port
##
DATABASE_PORT=5432
##
## Database (Timescale) Name if different from postgres
##
DATABASE_DB=postgres
##
## Database (Timescale) User
##
DATABASE_USERNAME=postgres
##
## Database (Timescale) Password
##
DATABASE_PASSWORD=postgres
Grafana
Grafana connection details are required for start-up. Business Engine supports Grafana OSS, Enterprise and Cloud instances.
##
## Grafana HTTP API
##
GRAFANA_URL=http://grafana:3000
##
## Service Account
## - Viewer permission is required to access dashboards
## - Editor permission is required to access dashboards and add Annotations
##
GRAFANA_TOKEN=SERVICE-ACCOUNT-TOKEN
Health Check
Depends on the configuration, Grafana might take longer time to respond to the requests from Business Engine. This scenario may lead to the failure of the startup health check.
To avoid this false health check failure, we added timing parameters that determine how long the Business Engine waits before checking Grafana's active status using Grafana token and URL to connect to.
By default, the waiting is 2 seconds.
##
## Grafana Health-Check timeout, ms
## Waiting for Grafana availability for (Timeout * Number of Retries / 1000 ) seconds
##
GRAFANA_HEALTH_CHECK_TIMEOUT=1000
##
## Grafana Health-Check number of retries
##
GRAFANA_HEALTH_CHECK_RETRY=2
GRAFANA_REQUEST_TIMEOUT
Data Source requests timeout can be increased for slow requests. By default, the wait time is 10 seconds.
##
## Data Source timeout, ms
##
GRAFANA_REQUEST_TIMEOUT=10000
Business Engine
API Server and Scheduler starts on port 3001 and 3002 by default. They can be changed to start in the Host
network mode, otherwise use port mapping to assign different ports.
##
## API Server Port
##
ENGINE_SERVER_PORT=3001
##
## Scheduler Port for Prometheus Metrics
##
ENGINE_SCHEDULER_PORT=3002
ENGINE_API_DOCUMENTATION
Swagger UI can be enable to experiment with Business Engine API.
##
## Generate OpenAPI specification and start Swagger UI for API documentation
## UI is available at ENGINE_SERVER_PORT/swagger
##
ENGINE_API_DOCUMENTATION=false
ENGINE_ALERT_BATCH_SIZE
You can increase batch size to improve performance for alerts with multiple variable executions. It may create additional load on the data source for heavy queries and limited resources.
##
## Batch size to process Alerts with multiple Variables executions
##
ENGINE_ALERT_BATCH_SIZE=2
ENGINE_ALERT_ANNOTATIONS_BATCH_SIZE
After evaluating alert across the big time range for all values Business Engine will create annotations for each out of threshold value. It may increase load on the Grafana instance with limited resources.
##
## Batch size to create annotations
##
ENGINE_ALERT_ANNOTATIONS_BATCH_SIZE=5