thingsboard.yml
7.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
#
# Copyright © 2016 The Thingsboard Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
server:
# Server bind address
address: "${HTTP_BIND_ADDRESS:0.0.0.0}"
# Server bind port
port: "${HTTP_BIND_PORT:8080}"
# Uncomment the following section to enable ssl
# ssl:
# key-store: classpath:keystore/keystore.p12
# key-store-password: thingsboard
# keyStoreType: PKCS12
# keyAlias: tomcat
# Zookeeper connection parameters. Used for service discovery.
zk:
# Enable/disable zookeeper discovery service.
enabled: "${ZOOKEEPER_ENABLED:false}"
# Zookeeper connect string
url: "${ZOOKEEPER_URL:localhost:2181}"
# Zookeeper retry interval in milliseconds
retry_interval_ms: "${ZOOKEEPER_RETRY_INTERVAL_MS:3000}"
# Zookeeper connection timeout in milliseconds
connection_timeout_ms: "${ZOOKEEPER_CONNECTION_TIMEOUT_MS:3000}"
# Zookeeper session timeout in milliseconds
session_timeout_ms: "${ZOOKEEPER_SESSION_TIMEOUT_MS:3000}"
# Name of the directory in zookeeper 'filesystem'
zk_dir: "${ZOOKEEPER_NODES_DIR:/thingsboard}"
# RPC connection parameters. Used only in cluster mode only.
rpc:
bind_host: "${RPC_HOST:localhost}"
bind_port: "${RPC_PORT:9001}"
# Clustering properties related to consistent-hashing. See architecture docs for more details.
cluster:
# Name of hash function used for consistent hash ring.
hash_function_name: "${CLUSTER_HASH_FUNCTION_NAME:murmur3_128}"
# Amount of virtual nodes in consistent hash ring.
vitrual_nodes_size: "${CLUSTER_VIRTUAL_NODES_SIZE:16}"
# Plugins configuration parameters
plugins:
# Comma seperated package list used during classpath scanning for plugins
scan_packages: "${PLUGINS_SCAN_PACKAGES:org.thingsboard.server.extensions}"
# JWT Token parameters
security.jwt:
tokenExpirationTime: "${JWT_TOKEN_EXPIRATION_TIME:900}" # Number of seconds (15 mins)
refreshTokenExpTime: "${JWT_REFRESH_TOKEN_EXPIRATION_TIME:3600}" # Seconds (1 hour)
tokenIssuer: "${JWT_TOKEN_ISSUER:thingsboard.io}"
tokenSigningKey: "${JWT_TOKEN_SIGNING_KEY:thingsboardDefaultSigningKey}"
# Device communication protocol parameters
http:
request_timeout: "${HTTP_REQUEST_TIMEOUT:60000}"
# MQTT server parameters
mqtt:
bind_address: "${MQTT_BIND_ADDRESS:0.0.0.0}"
bind_port: "${MQTT_BIND_PORT:1883}"
adaptor: "${MQTT_ADAPTOR_NAME:JsonMqttAdaptor}"
timeout: "${MQTT_TIMEOUT:10000}"
# Uncomment the following lines to enable ssl for MQTT
# ssl:
# key-store: keystore/mqttserver.jks
# key-store-password: password
# keyStoreType: JKS
# TrustStore can be the same as KeyStore
# trust-store: keystore/mqttserver.jks
# trust-store-password: password
# trustStoreType: JKS
# CoAP server parameters
coap:
bind_address: "${COAP_BIND_ADDRESS:0.0.0.0}"
bind_port: "${COAP_BIND_PORT:5683}"
adaptor: "${COAP_ADAPTOR_NAME:JsonCoapAdaptor}"
timeout: "${COAP_TIMEOUT:10000}"
# Cassandra driver configuration parameters
cassandra:
# Thingsboard cluster name
cluster_name: "${CASSANDRA_CLUSTER_NAME:Thingsboard Cluster}"
# Thingsboard keyspace name
keyspace_name: "${CASSANDRA_KEYSPACE_NAME:thingsboard}"
# Specify node list
url: "${CASSANDRA_URL:127.0.0.1:9042}"
# Enable/disable secure connection
ssl: "${CASSANDRA_USE_SSL:false}"
# Enable/disable JMX
jmx: "${CASSANDRA_USE_JMX:true}"
# Enable/disable metrics collection.
metrics: "${CASSANDRA_DISABLE_METRICS:true}"
# NONE SNAPPY LZ4
compression: "${CASSANDRA_COMPRESSION:none}"
# Specify cassandra claster initialization timeout (if no hosts available during startup)
init_timeout_ms: "${CASSANDRA_CLUSTER_INIT_TIMEOUT_MS:300000}"
# Specify cassandra claster initialization retry interval (if no hosts available during startup)
init_retry_interval_ms: "${CASSANDRA_CLUSTER_INIT_RETRY_INTERVAL_MS:3000}"
# Credential parameters #
credentials: "${CASSANDRA_USE_CREDENTIALS:false}"
# Specify your username
username: "${CASSANDRA_USERNAME:}"
# Specify your password
password: "${CASSANDRA_PASSWORD:}"
# Cassandra cluster connection socket parameters #
socket:
connect_timeout: "${CASSANDRA_SOCKET_TIMEOUT:5000}"
read_timeout: "${CASSANDRA_SOCKET_READ_TIMEOUT:20000}"
keep_alive: "${CASSANDRA_SOCKET_KEEP_ALIVE:true}"
reuse_address: "${CASSANDRA_SOCKET_REUSE_ADDRESS:true}"
so_linger: "${CASSANDRA_SOCKET_SO_LINGER:}"
tcp_no_delay: "${CASSANDRA_SOCKET_TCP_NO_DELAY:false}"
receive_buffer_size: "${CASSANDRA_SOCKET_RECEIVE_BUFFER_SIZE:}"
send_buffer_size: "${CASSANDRA_SOCKET_SEND_BUFFER_SIZE:}"
# Cassandra cluster connection query parameters #
query:
read_consistency_level: "${CASSANDRA_READ_CONSISTENCY_LEVEL:ONE}"
write_consistency_level: "${CASSANDRA_WRITE_CONSISTENCY_LEVEL:ONE}"
default_fetch_size: "${CASSANDRA_DEFAULT_FETCH_SIZE:2000}"
# Specify partitioning size for timestamp key-value storage. Example MINUTES, HOURS, DAYS, MONTHS
ts_key_value_partitioning: "${TS_KV_PARTITIONING:MONTHS}"
# Specify max partitions per request
max_limit_per_request: "${TS_KV_MAX_LIMIT_PER_REQUEST:1000}"
# Actor system parameters
actors:
session:
sync:
# Default timeout for processing request using synchronous session (HTTP, CoAP) in milliseconds
timeout: "${ACTORS_SESSION_SYNC_TIMEOUT:10000}"
plugin:
# Default timeout for termination of the plugin actor after it is stopped
termination.delay: "${ACTORS_PLUGIN_TERMINATION_DELAY:60000}"
# Default timeout for processing of particular message by particular plugin
processing.timeout: "${ACTORS_PLUGIN_TIMEOUT:60000}"
# Errors for particular actor are persisted once per specified amount of milliseconds
error_persist_frequency: "${ACTORS_PLUGIN_ERROR_FREQUENCY:3000}"
rule:
# Default timeout for termination of the rule actor after it is stopped
termination.delay: "${ACTORS_RULE_TERMINATION_DELAY:30000}"
# Errors for particular actor are persisted once per specified amount of milliseconds
error_persist_frequency: "${ACTORS_RULE_ERROR_FREQUENCY:3000}"
statistics:
# Enable/disable actor statistics
enabled: "${ACTORS_STATISTICS_ENABLED:true}"
persist_frequency: "${ACTORS_STATISTICS_PERSIST_FREQUENCY:60000}"
# Cache parameters
cache:
# Enable/disable cache functionality.
enabled: "${CACHE_ENABLED:true}"
device_credentials:
# Default time to store device credentials in cache, in seconds
time_to_live: "${CACHE_DEVICE_CREDENTIAL_TTL:3600}"
# Maximum size of the map. When maximum size is reached, the map is evicted based on the policy defined.
max_size:
# Max size policy options:
# PER_NODE: Maximum number of map entries in each JVM.
# PER_PARTITION: Maximum number of map entries within each partition.
# USED_HEAP_SIZE: Maximum used heap size in megabytes for each JVM.
# USED_HEAP_PERCENTAGE: Maximum used heap size percentage for each JVM.
# FREE_HEAP_SIZE: Minimum free heap size in megabytes for each JVM.
# FREE_HEAP_PERCENTAGE: Minimum free heap size percentage for each JVM.
policy: "${CACHE_DEVICE_CREDENTIAL_MAX_SIZE_POLICY:PER_NODE}"
size: "${CACHE_DEVICE_CREDENTIAL_MAX_SIZE_SIZE:1000000}"