Configuration Reference
All Trendz configuration is stored in trendz.yml. Every property can be overridden with an environment variable — the name is shown in the Env variable column.
Configuration changes require a Trendz restart — there is no hot-reload mechanism.
Server
Section titled “Server”| Property | Env variable | Default | Description |
|---|---|---|---|
server.address | HTTP_BIND_ADDRESS | 0.0.0.0 | Network interface to bind the HTTP server to |
server.port | HTTP_BIND_PORT | 8888 | HTTP port |
Database
Section titled “Database”Trendz requires PostgreSQL.
| Property | Env variable | Default | Description |
|---|---|---|---|
spring.datasource.url | SPRING_DATASOURCE_URL | jdbc:postgresql://localhost:5432/trendz | JDBC connection URL |
spring.datasource.username | SPRING_DATASOURCE_USERNAME | postgres | Database username |
spring.datasource.password | SPRING_DATASOURCE_PASSWORD | postgres | Database password |
spring.datasource.hikari.maximumPoolSize | SPRING_DATASOURCE_MAXIMUM_POOL_SIZE | 5 | Maximum number of database connections in the pool |
ThingsBoard Connection
Section titled “ThingsBoard Connection”| Property | Env variable | Default | Description |
|---|---|---|---|
tb.api.url | TB_API_URL | http://localhost:9090 | URL of the ThingsBoard server Trendz connects to |
License
Section titled “License”| Property | Env variable | Default | Description |
|---|---|---|---|
license.secret | TRENDZ_LICENSE_SECRET | (empty) | License secret obtained from the ThingsBoard License Portal. Optional when using ThingsBoard 4.3.0+ with license logic V2 — in that case Trendz will start without it. |
The default cache provider is Caffeine (in-process). Switch to Redis for multi-instance or high-availability deployments.
| Property | Env variable | Default | Description |
|---|---|---|---|
cache.provider | CACHE_TYPE | caffeine | Cache backend — caffeine or redis |
redis.host | REDIS_HOST | localhost | Redis server host (used when CACHE_TYPE=redis) |
redis.port | REDIS_PORT | 6379 | Redis server port |
redis.database | REDIS_DATABASE | 0 | Redis database index |
redis.prefix | REDIS_KEY_PREFIX | trendz | Key prefix for all Trendz entries in Redis |
Script Engine
Section titled “Script Engine”The script engine runs Python-based calculations. It connects to a Python Executor service over WebSocket.
| Property | Env variable | Default | Description |
|---|---|---|---|
script-engine.provider | SCRIPT_ENGINE_PROVIDER | DOCKER_CONTAINER | Execution mode — DOCKER_CONTAINER or REMOTE |
script-engine.docker-provider-url | SCRIPT_ENGINE_DOCKER_PROVIDER_URL | localhost:8181 | WebSocket address of the Python Executor service |
script-engine.runtime-timeout | SCRIPT_ENGINE_TIMEOUT | 60000 (60 s) | Script execution timeout in milliseconds |
Task Service
Section titled “Task Service”Controls background job scheduling. See Task Service for the full job reference.
| Property | Env variable | Default | Description |
|---|---|---|---|
taskService.enable | TASK_SERVICE_ENABLE | true | Enable or disable the task service entirely |
taskService.enableBackground | TASK_SERVICE_BACKGROUND_ENABLE | true | Enable or disable automatic background job scheduling |
taskService.defaultTaskTimeout | TASK_SERVICE_DEFAULT_TASK_TIMEOUT | 86400000 (24 h) | Maximum runtime for a single job in milliseconds; jobs that exceed this are canceled |
taskService.taskQuerySize | TASK_SERVICE_TASK_QUERY_SIZE | 10 | Maximum number of jobs picked up per scheduling cycle |
Topology Discovery
Section titled “Topology Discovery”Full topology discovery scans all ThingsBoard entity types, fields, and relations from scratch. These settings control the sampling strategy used when analyzing how many entities of each type exist.
| Property | Env variable | Default | Description |
|---|---|---|---|
topology-discovery.defaultConfig.minItemToAnalyze | TOPOLOGY_DISCOVERY_DEFAULT_CONFIG_MIN_ITEM_TO_ANALYZE | 500 | Minimum number of entities to sample during a full scan regardless of total count |
topology-discovery.defaultConfig.maxItemToAnalyze | TOPOLOGY_DISCOVERY_DEFAULT_CONFIG_MAX_ITEM_TO_ANALYZE | 10000 | Maximum number of entities to sample during a full scan |
topology-discovery.defaultConfig.analyzePercent | TOPOLOGY_DISCOVERY_DEFAULT_CONFIG_ANALYZE_PERCENT | 5.0 | Percentage of total entities to sample when the count is between min and max |
Lite Topology Discovery
Section titled “Lite Topology Discovery”Lite topology discovery runs automatically in the background to detect new or changed entity types without a full rescan. It is triggered by API calls with a cooldown between runs.
| Property | Env variable | Default | Description |
|---|---|---|---|
topology-discovery.triggerEnabled | TOPOLOGY_DISCOVERY_TRIGGER_ENABLED | true | Enable automatic lite topology discovery triggered by API calls |
topology-discovery.lite.cooldown.discoverNewMs | TOPOLOGY_DISCOVERY_LITE_COOLDOWNS_DISCOVER_NEW_MS | 300000 (5 min) | Minimum interval between two “discover new types” runs |
topology-discovery.lite.cooldown.refreshOldMs | TOPOLOGY_DISCOVERY_LITE_COOLDOWNS_REFRESH_OLD_MS | 600000 (10 min) | Minimum interval between two “refresh existing types” runs |
topology-discovery.lite.limit.maxTypes | TOPOLOGY_LITE_MAX_TYPES | 10 | Maximum number of new entity types processed in a single run |
topology-discovery.lite.limit.maxEntities.keyScan | TOPOLOGY_LITE_MAX_ENTITIES_KEY_SCAN | 100 | Maximum entities scanned per type to discover telemetry keys |
topology-discovery.lite.limit.maxEntities.fieldsScan | TOPOLOGY_LITE_MAX_ENTITIES_FIELDS_SCAN | 100 | Maximum entities scanned per type to discover fields |
topology-discovery.lite.limit.maxEntities.relationsScan | TOPOLOGY_LITE_MAX_ENTITIES_RELATIONS_SCAN | 10 | Maximum entities scanned per type to discover relations |
topology-discovery.lite.limit.maxFields.perType | TOPOLOGY_DISCOVERY_MAX_FIELD_EXPLORE | 256 | Maximum number of fields discovered per entity type |
topology-discovery.lite.limit.maxFields.inBatch | TOPOLOGY_LITE_MAX_FIELDS_IN_BATCH | 32 | Number of fields fetched per API batch request |
topology-discovery.lite.logging.enabled | TOPOLOGY_LITE_LOGGING_ENABLED | true | Enable detailed logging for lite topology discovery runs |
Was this helpful?