Skip to content
Stand with Ukraine flag

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.

PropertyEnv variableDefaultDescription
server.addressHTTP_BIND_ADDRESS0.0.0.0Network interface to bind the HTTP server to
server.portHTTP_BIND_PORT8888HTTP port

Trendz requires PostgreSQL.

PropertyEnv variableDefaultDescription
spring.datasource.urlSPRING_DATASOURCE_URLjdbc:postgresql://localhost:5432/trendzJDBC connection URL
spring.datasource.usernameSPRING_DATASOURCE_USERNAMEpostgresDatabase username
spring.datasource.passwordSPRING_DATASOURCE_PASSWORDpostgresDatabase password
spring.datasource.hikari.maximumPoolSizeSPRING_DATASOURCE_MAXIMUM_POOL_SIZE5Maximum number of database connections in the pool
PropertyEnv variableDefaultDescription
tb.api.urlTB_API_URLhttp://localhost:9090URL of the ThingsBoard server Trendz connects to
PropertyEnv variableDefaultDescription
license.secretTRENDZ_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.

PropertyEnv variableDefaultDescription
cache.providerCACHE_TYPEcaffeineCache backend — caffeine or redis
redis.hostREDIS_HOSTlocalhostRedis server host (used when CACHE_TYPE=redis)
redis.portREDIS_PORT6379Redis server port
redis.databaseREDIS_DATABASE0Redis database index
redis.prefixREDIS_KEY_PREFIXtrendzKey prefix for all Trendz entries in Redis

The script engine runs Python-based calculations. It connects to a Python Executor service over WebSocket.

PropertyEnv variableDefaultDescription
script-engine.providerSCRIPT_ENGINE_PROVIDERDOCKER_CONTAINERExecution mode — DOCKER_CONTAINER or REMOTE
script-engine.docker-provider-urlSCRIPT_ENGINE_DOCKER_PROVIDER_URLlocalhost:8181WebSocket address of the Python Executor service
script-engine.runtime-timeoutSCRIPT_ENGINE_TIMEOUT60000 (60 s)Script execution timeout in milliseconds

Controls background job scheduling. See Task Service for the full job reference.

PropertyEnv variableDefaultDescription
taskService.enableTASK_SERVICE_ENABLEtrueEnable or disable the task service entirely
taskService.enableBackgroundTASK_SERVICE_BACKGROUND_ENABLEtrueEnable or disable automatic background job scheduling
taskService.defaultTaskTimeoutTASK_SERVICE_DEFAULT_TASK_TIMEOUT86400000 (24 h)Maximum runtime for a single job in milliseconds; jobs that exceed this are canceled
taskService.taskQuerySizeTASK_SERVICE_TASK_QUERY_SIZE10Maximum number of jobs picked up per scheduling cycle

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.

PropertyEnv variableDefaultDescription
topology-discovery.defaultConfig.minItemToAnalyzeTOPOLOGY_DISCOVERY_DEFAULT_CONFIG_MIN_ITEM_TO_ANALYZE500Minimum number of entities to sample during a full scan regardless of total count
topology-discovery.defaultConfig.maxItemToAnalyzeTOPOLOGY_DISCOVERY_DEFAULT_CONFIG_MAX_ITEM_TO_ANALYZE10000Maximum number of entities to sample during a full scan
topology-discovery.defaultConfig.analyzePercentTOPOLOGY_DISCOVERY_DEFAULT_CONFIG_ANALYZE_PERCENT5.0Percentage of total entities to sample when the count is between min and max

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.

PropertyEnv variableDefaultDescription
topology-discovery.triggerEnabledTOPOLOGY_DISCOVERY_TRIGGER_ENABLEDtrueEnable automatic lite topology discovery triggered by API calls
topology-discovery.lite.cooldown.discoverNewMsTOPOLOGY_DISCOVERY_LITE_COOLDOWNS_DISCOVER_NEW_MS300000 (5 min)Minimum interval between two “discover new types” runs
topology-discovery.lite.cooldown.refreshOldMsTOPOLOGY_DISCOVERY_LITE_COOLDOWNS_REFRESH_OLD_MS600000 (10 min)Minimum interval between two “refresh existing types” runs
topology-discovery.lite.limit.maxTypesTOPOLOGY_LITE_MAX_TYPES10Maximum number of new entity types processed in a single run
topology-discovery.lite.limit.maxEntities.keyScanTOPOLOGY_LITE_MAX_ENTITIES_KEY_SCAN100Maximum entities scanned per type to discover telemetry keys
topology-discovery.lite.limit.maxEntities.fieldsScanTOPOLOGY_LITE_MAX_ENTITIES_FIELDS_SCAN100Maximum entities scanned per type to discover fields
topology-discovery.lite.limit.maxEntities.relationsScanTOPOLOGY_LITE_MAX_ENTITIES_RELATIONS_SCAN10Maximum entities scanned per type to discover relations
topology-discovery.lite.limit.maxFields.perTypeTOPOLOGY_DISCOVERY_MAX_FIELD_EXPLORE256Maximum number of fields discovered per entity type
topology-discovery.lite.limit.maxFields.inBatchTOPOLOGY_LITE_MAX_FIELDS_IN_BATCH32Number of fields fetched per API batch request
topology-discovery.lite.logging.enabledTOPOLOGY_LITE_LOGGING_ENABLEDtrueEnable detailed logging for lite topology discovery runs