/
ClearBlade config
ClearBlade config
Title = "ClearBlade Configuration File"
[Buckets]
QueueEmptyIntervalSecs = 5 # Number of seconds to wait before emptying queue full of file storage system events
MaxFilePacketSize = 2048 # Maximum number of bytes that can be copied/transferred in a single RPC packet
RootDir = "$GOPATH/src/clearblade/blade-runner/clearblade_edge_buckets" # Root path to buckets
GoogleBucketName = "clearblade-buckets" # The Google Cloud storage bucket name to use
DefaultEdgeStorageType = "local" # Use the local file system
DefaultPlatformStorageType = "google" # Use an already-configured Google bucket instance
MaxParallelSyncEvents = 10 # Max number of goroutines processing a bucket's sync queue
[Cluster]
HostAddress = "" # The IP address for other clustered nodes to contact this platform
EnableHAProxyController = false # Enable the HAProxy controller to handle dynamic cluster nodes
[DataUsage]
DataUsageDBFlushIntervalSeconds = 300 # How often does the data usage collector flush the info to the DB
MaxDataUsageDataExpirationMinutes = 131400 # (3 months) Used to set the expiry in minutes for MQTT/HTTP usage data
GoogleMinMessageSizeBytes = 1024 # Messages below this size will be set equal to GoogleMinMessageSizeBytes
[Database]
DBStore = "postgres" # Database store to use. Postgres for platform and SQLite for edge
DBType = "postgres" # Similar to DBStore. Postgres for platform and SQLite for edge
DBHost = "127.0.0.1" # The database server's address
DBPort = "5432" # Database port
DBUsername = "myUser" # Username for connecting to the database
DBPassword = "myPassword" # Password for connecting to the database
MaxMySQLDBConnections = 5 # Max number of connections to MySQL to open per collection
MongoOperationTimeoutSeconds = 60 # Mongo operation timeout in seconds
MongoMaxPoolSize = 100 # Maximum connection pool size for Mongo
DisableDBRecoveryMode = false # Disables database recovery mode. The platform will go into a crash restart loop if it cannot connect to a database
DisableTimescale = false # Disables timescale. This option is ignored on the edge
[Debug]
DisablePprof = true # This will disable pprof output file and web-server creation if set to true
PprofCPUInterval = 600 # The length of time, in seconds, to wait between successive pprof CPU profile generations
PprofHeapInterval = 600 # The length of time, in seconds, to wait between successive pprof heap profile generations
PprofLatencyInterval = 600 # The length of time, in seconds, to wait between successive pprof latency profile generations
PprofMaxFiles = 30 # The maximum number of CPU and heap profiles to retain. 0 indicates keeping all of them
PprofMaxFileAge = 1440 # The maximum amount of time, specified in minutes, in which to retain CPU and heap profile data files
EnablePrometheus = true # Collect debug metrics and expose Prometheus exporter endpoints
BrokerQosLogging = false # Extra debug logging around QoS storage in the broker
VerboseSessionLogs = false # Extra debug logging around sessions
[EdgeMonitoring]
MaxEdgeMonSizeDays = 365 # Number of days of events to store in the database table.
[Engine]
PreloaderRequestTimeoutSeconds = 60
MaxLegacyServiceLogLines = 2500
HotSwapUserCtx = true
MessageQueueLength = 10000
EventQueueLength = 10000
[FileHostingConfig]
URL = "http://localhost:8915" # URL with a port for the file hosting server
EdgeBinaryLocation = "/edge/" # Location where the edge binaries are stored on the file hosting server
[HTTP]
HttpPort = ":9000" # Listen port for the HTTP server
UseTLSHTTP = false # Use TLS for HTTP server (see Security.Cert and Security.Key)
HttpMTLSPort = ":9001" # Listen port for the HTTP mTLS server
HttpURL = "https://platform.clearblade.com" # The platform's external URL
TimeProfile = -1 # Enables time profiling of HTTP requests (in ms). Default is disabled (-1)
GzipResponses = true # gzip HTTP responses if HTTP client supports it
[IotCore]
DeviceNumIdColumn = "numid" # Column in the device table representing the device numerical ID in IoT Core
DeviceTimestampCacheSeconds = 300 # How often to dump device timestamps from cache to DB
[KVStore]
Store = "local" # Specifies which KVStore to use. Supported stores are local and Redis
Address = "" # The Redis server's address. Empty if using a local store
Port = "" # Redis port. Empty if using a local store
Password = "" # Redis username. Empty if using a local store
LocalCacheReaperIntervalSeconds = 60 # How often to scan the local cache and delete expired keys
DeviceCacheExpirySeconds = 10 # How long to keep entries in the local device cache
[LeanMode]
LeanMode = false # Stop storing analytics, message history, and code logs. Takes precedence over the next three variables
StoreAnalytics = true # Stop storing analytics if set to false
StoreMessageHistory = true # Stop storing message history if set to false
StoreCodeLogs = true # Stop storing code logs if set to false
DefaultCodeLogsTTLMinutes = -1 # When < 0, use the DB schema default (7 days); otherwise, use this value
MaxPageSize = 1000 # Maximum page size for analytics calls
MaxAuditTrailDays = 7 # Number of days of audit trail to keep
MaxAuditTrailCounts = 500 # Max number of audit trail entries per (asset_class,action_type)
DisableDebugGoroutines = false # Disable all goroutines that print debug info
MaxNotificationHistory = 500 # Max number of notification history entries
FailedServiceStorageTimeHours = 72 # Time to keep failed runs in the DB before deletion
FailedServiceCleanerIntervalMinutes = 60 # Time between delete calls to failed services
CodeLogCleanerIntervalMinutes = 30 # Time between delete calls to code logs
[License]
PKey = "" # Platform key issued by ClearBlade
RegistrationKey = "" # Key required for creating a new developer account
AutoRenewLicense = false # (bool) attempt to auto-renew license
LicenseRenewalWebhook = "" # (string) where to request a new license from
LicenseAutoRenewDays = 15 # (int) how many days until expiry should we start trying to renew the license
PlatformID = "" # (string) the license's registration ID
[Locks]
MaxLockTime = 60 # Number of seconds to hold the lock before forcing an unlock
MaxLockWaitTime = 120 # Number of seconds to wait for the lock before giving up and returning an error
BumpInterval = 60 # Number of seconds in-between wait queue bumps to prevent locks from getting stuck
CheckLockLock = false # Whether to check Lock(); Lock(); sequence which is valid in our JavaScript
EnableBumpingWaitQueue = false # Should we periodically bump the wait queues to prevent locks from getting stuck
[Logging]
LoggingEnabled = true # Enable or disable logging
LogLevel = "debug" # Raise minimum log-level (super,debug,info,warn,error,fatal)
Logfile = "" # The logfile's location. If the value "stderr" or "stdout" are supplied, then it will forward to their respective file handles
MaxLogFileSizeInKB = 50000 # Maximum size of the log file before rotation in KB. Default 50MB. Must be greater than 100 KB. -1 indicates no limit. Only used when Logfile is set and not stdout/stderr
MaxLogFileBackups = 1 # Maximum backups of the log file. Must be greater than 0
Includes = "" # Categories to log. If empty, all categories are logged. Works in concert with log level
Excludes = "" # Categories not to log. If empty, no categories are excluded. Works in concert with log level
LogFormat = "plain" # Valid formats are plain, json
[MQTT]
BrokerTCPPort = ":1883" # The MQTT broker's listen port
BrokerTLSPort = ":1884" # The MQTT broker's TLS listen port
BrokerWSPort = ":8903" # The MQTT broker's WebSocket listen port
BrokerWSSPort = ":8904" # The MQTT broker's TLS WebSocket listen port
MessagingAuthPort = ":8905" # The MQTT Auth broker's listen port
MessagingAuthWSPort = ":8907" # The MQTT Auth broker's WebSocket listen port
UseTLSMessaging = false # Use TLS for the MQTT broker
UseTLSMessagingWS = false # Use TLS for the WebSocket MQTT broker
UseTLSMessagingAuth = false # Use TLS for the MQTT Auth broker
MaxPublishSize = 1e9 # Maximum MQTT publish packet size
MessagingURL = "messaging.clearblade.com" # Used to configure the platform's external messaging URL. May be proxied
AllowDuplicateClientId = false # Allow a duplicate client ID connection; kill the old connection with the same client ID
EnforceMQTTKeepAlive = false # Explicitly enforce MQTT keep alive at the MQTT client level
InitialReadTimeoutSeconds = 60 # How long a client has to send us data before we disconnect them
UseModifiedErrorCodes = false # Use error code 5 when the JWT private key doesn't match the cert
WriteTimeoutSeconds = 5 # Timeout for a socket write
IgnorePermissionErrors = false # Allow clients to stay connected if they attempt to publish or subscribe to a topic they don't have perms for
AllowRetainMessages = true # Allow clients to retain messages that get returned on future subscribes
RetainMessageTTL = 0 # Cache TTL (# of seconds) for retained messages (0 is infinite)
AddRandomToClientIds = false # Append random string to client IDs
MaxConcurrentConnectsPerNode = -1 # Node limit on concurrent connection processing (only applies if >0)
[MessageHistory]
TimePeriodDeleteMsgHistory = 120 # Time interval to delete message history based on storage rules (seconds)
EnableDeviceStateHistoryCleanup = false # Enables IoT Core device state history cleanup
DeviceStateHistoryCleanupInterval = 1440 # Device state cleanup interval
MinDeviceStatesToKeep = 10 # Minimum number of device states to keep
[Metrics]
ReportMetrics = false # Should we send metrics
ReportIntervalHours = 24 # How often to send metrics
MetricWebhook = "" # Where to send the metrics
[Misc]
MaxServiceCachesPerSystem = 11 # Max service caches per system
UserCtxCacheTTLSeconds = 60 # TTL for user ctx cache
[Profiler]
Enabled = false # Is profiling enabled?
NumGatherers = 5 # Number of profiling event gatherer goroutines
GathererBufferSize = 51200 # Max number of profile events to cache before writing
WriterType = "Local File System" # Type of profiler writer
MaxDuration = "5m" # Maximum duration to run a profile. Specified as a duration string
[Profiler.LocalFile]
RootPath = "/tmp/cb_profiling" # Where to store the gathered profile info at run time
[RPC]
RPCTransport = "tcp" # Transport layer for RPC communications
RPCPort = "8950" # Listen port for external RPC server. Used for edge-to-platform communication
RPCPortInternal = "8952" # Listen port for internal RPC server. Used for node-to-node communication
RPCTimeout = 120 # Timeout for all RPC calls within the platform or from platform to edge
RPCKeepaliveInterval = 60 # Keepalive interval for RPC connections
MaxRPCPacketSizeMB = 20 # Maximum RPC packet size, after which packets will be split into segments for transfer
RPCSegmentSizeMB = 5 # Each RPC packet segment's size. Only set on the edge
MaxInMemorySegmentStorageSizeMB = 100 # Maximum in memory segment storage size during data transfer, after which segments are stored in the database
MaxSegmentStorageDays = 5 # Maximum number of days to store segments in the database
EncoderDecoderType = "json" # RPC encoder decoder
DataCompression = "lz4" # RPC data compression
MaxInFlightWorkers = 100 # Maximum number of process message goroutines at a time per RPC client
MaxProcessMessageQueue = 10000 # Maximum number of process message goroutines at a time per RPC client
RPCMessageTrafficSeconds = 120 # Interval to dump and clear the RPC message traffic on a single node
[Security]
Key = "" # The TLS key file's location
Cert = "" # The TLS cert file's location
ExpireTokens = true # Set to invalidate user/device tokens issued more than the system's tokenTTL (defaults to 5 days)
ExpireDevTokens = true # Set to invalidate developer tokens issued more than the instance's tokenTTL (defaults to 5 days)
EnableMutualTLSAuth = false # Set to turn on mTLS auth for devices. mTLS endpoint will be turned on when this is set to true
MaxSocketReadSizeMB = 500 # If data to be read on any socket exceeds this number, the client is disconnected
MEKStorageLocation = "./" # The master encryption key's location
[Sync]
SyncOptimize = true # Optimizes the syncing process if set to true
SyncOptimizeExceptions = "" # Exceptions for the sync optimization process
SyncOptimizations = "" # List specific optimizations to run
PerSystemOptimizerIntervalSeconds = 3600 # Interval to run the per system optimizer (currently only for collection items in inserts)
AllowOverlappingDeployments= false # Set to true to disable overlapping deployment check (not recommended)
[Triggers]
MaxExecutors = 1024 # Maximum number of trigger executors running at one time
, multiple selections available,
Related content
Load balancer configuration
Load balancer configuration
More like this
Console
Read with this
Messaging tutorial
Messaging tutorial
Read with this
Collections tutorial
Collections tutorial
Read with this
Release notes
Release notes
Read with this
CA certificates
CA certificates
Read with this