Documentation: Flowy Configuration
Flowy Configuration
The configuration files have many settings in common. Flowy relies on a relational database for its metadata. Hence, the very same settings for spring / datasource should be hence used both for the admin and processing service.
The following table describes the details:
| Path | Availability | Description | Type | Default value |
|---|---|---|---|---|
| spring.datasource.url | Core | The URL to the database that Flowy should use for its metadata | Mandatory | n/a |
| spring.datasource.username | Core | The username to be used | Mandatory | n/a |
| spring.datasource.password | Core | The password to be used | Mandatory | n/a |
| spring.datasource.hikari.maximum-pool-size | Core | Pool size of database connections that used for internal communication by the Flowy service | Optional | 10 |
| flowy.core.instance.dir | Core | Path where Flowy related files and directories are stored | Optional | .flowy |
| flowy.core.instance-id | Core | Must be individual for every admin as well as processing service. These values must match with the according setting / instance entry. If not set, new values will be generated and stored to instance-id file. | Optional | n/a |
| flowy.core.security.password | Core | This password will be used to encrypt and decrypt the values as they are stored in the database; hence the same value must be used across every environment | Mandatory | n/a |
| flowy.core.security.prometheus-metrics-whitelist | Core | By default only 127.0.0.1 is allowed; any additional IP address must be configured here | Mandatory | n/a |
| flowy.core.system-scheduler-pool-size | Core | Amount of threads used for internal jobs | Optional | 10 |
| server.port | Core | Server default port | Optional | 8080 |
| spring.liquibase.enabled | Core | Defines if migrations are executed on startup | Optional | true |
Admin configuration
The following configuration can be used for the admin service:
spring:
datasource:
url: jdbc:postgresql://<dbServer>:<dbPort>/<dbName>
username: <dbUser>
password: <dbPassword>
liquibase.enabled: false
flowy.core:
security:
password: <flowySharedSecret>
prometheus-metrics-whitelist:
- 127.0.0.1
- 127.0.0.2
- 127.0.0.3
flowy.admin.module-version: 2021.09
The following table describes the details:
| Path | Availability | Description | Type | Default value |
|---|---|---|---|---|
| flowy.admin.history.ttl | Admin | Defines the maximum time to keep history entries | Optional | 90d |
| flowy.admin.history.clean-delay | Admin | Time between checks for history cleaning | Optional | 1d |
| flowy.admin.history.clean-enabled | Admin | Enables, respective disables history cleaning (off by default) | Optional | False |
| flowy.admin.module-version | Admin | Used to compare when exporting/importing module to ensure compatibility | Mandatory | n/a |
| server.servlet.context-path | Admin | URL extension for the service | Optional | "/api" |
| flowy.admin.module-version | Admin | Necessary version for export and import of Flowy objects | Mandatory | n/a |
Processing configuration
The following configuration can be used for the processing service:
spring:
datasource:
url: jdbc:postgresql://<dbServer>:<dbPort>/<dbName>
username: <dbUser>
password: <dbPassword>
server.port: 8081
flowy.core:
security:
password: <flowySharedSecret>
prometheus-metrics-whitelist:
- 127.0.0.1
- 127.0.0.2
- 127.0.0.3
The following table describes the details:
| Path | Availability | Description | Type | Default value |
|---|---|---|---|---|
| flowy.processing.credentials.inactive-ttl | Processing | Defines the timeout when connections should be closed (currently only supported by MQTT) | Optional | 1d |
| flowy.processing.credentials.sync-delay | Processing | Specifies the interval between checks of credentials | Optional | 5s |
| flowy.processing.plugin.sync-delay | Processing | Time between checks for plugin updates | Optional | 25s |
| flowy.processing.plugin.dir | Processing | Specifies the directory where plugins are cached | Optional | "plugins" |
| flowy.processing.process-execution.fetch-events-delay | Processing | Specifies the interval between events checks | Optional | 100ms |
| flowy.processing.process-execution.clean-up-logs-delay | Processing | Specifies the interval between cleaning executions of step logs and events | Optional | 7m |
| flowy.processing.process-execution.clean-up-errors-delay | Processing | Specifies the interval between cleaning executions of errors | Optional | 7m |
| flowy.processing.process-execution.heartbeat | Processing | Specifies the interval between heartbeat updates | Optional | 45s |
| flowy.processing.process-execution.execute-process-step-child-event-delay | Processing | Specifies the wait duration between checks of children events | Optional | 100ms |
| flowy.processing.trigger-cron.sync-delay | Processing | Specifies the wait duration between cron synchronisations | Optional | 25s |
| flowy.processing.groovy-script.clean-up-delay | Processing | Specifies the interval between cleaning executions of storage values | Optional | 1h |
| flowy.processing.groovy-script.inactive-ttl | Processing | Interval how long the groovy script should stay in the cache if unused | Optional | 30d |
| flowy.processing.trigger-rest.wait-event-time | Processing | Specifies the wait duration between checks event status | Optional | 100ms |
| flowy.processing.trigger-rest.sync-delay | Processing | Specifies the wait duration between rest trigger syncronisations | Optional | 25s |
| flowy.processing.trigger-messaging.sync-delay | Processing | Specifies the wait duration between messaging trigger synchronisations | Optional | 25s |
| flowy.processing.storage.clean-up-delay | Processing | Specifies the interval between cleaning executions of storage values | Optional | 5m |
| flowy.processing.library.sync-delay | Processing | Time between checks for library updates | Optional | 30s |
| flowy.processing.library.dir | Processing | Specifies the directory where libraries are cached | Optional | 30s |
| flowy.processing.rest-templates.clean-up-delay | Processing | Interval between cleans of rest template cache | Optional | 1h |
| flowy.processing.rest-templates.inactive-ttl | Processing | Interval how long the rest template should stay in the cache if unused | Optional | 1d |
| flowy.processing.process-execution.fix-execution-state-delay | Processing | Interval to check for jobs not finished in time | Optional | 1m |
| server.servlet.context-path | Processing | URL extension for the service | Optional | "" (=empty string) |
Please refer to the internal jobs page to learn more about history cleaning.
Log configuration
Logging settings must be provided to Flowy by logback.xml. The default Logback configuration included into the jar can be overridden:
java -Dlogging.config=/path/to/logback.xml -jar flowy.jar
Below you'll find several useful examples.
Log rotation
An logback.xml configuration using local log files and rotation:
<configuration>
<springProperty scope="context" name="application" source="spring.application.name"/>
<springProperty scope="context" name="instance-id" source="flowy.core.instance-id"/>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%green(%date) %highlight(%-5level) %yellow([%-4relative]) %magenta([%thread]) %cyan(%logger{10}) %yellow([%file:%line]) %blue(: %msg%n)</pattern>
<charset>UTF-8</charset>
</encoder>
</appender>
<!-- RollingFileAppender configuration -->
<appender name="ROLLING" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>log/flowy.log</file>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss} %-5level [%thread] %logger{10} [%file:%line] - %msg%n</pattern>
</encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!-- daily rollover and max 16MB -->
<fileNamePattern>log/flowy.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<maxFileSize>16MB</maxFileSize>
<maxHistory>10</maxHistory>
<totalSizeCap>320MB</totalSizeCap>
</rollingPolicy>
</appender>
<root level="WARN">
<appender-ref ref="ROLLING"/>
<appender-ref ref="STDOUT"/>
</root>
</configuration>
Graylog configuration
Enclosed an logback.xml example demonstrating the usage of Graylog:
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%green(%date) %highlight(%-5level) %yellow([%-4relative]) %magenta([%thread]) %cyan(%logger{10}) %yellow([%file:%line]) %blue(: %msg%n)</pattern>
<charset>UTF-8</charset>
</encoder>
</appender>
<appender name="GELF" class="de.siegmar.logbackgelf.GelfUdpAppender">
<graylogHost>192.168.1.2</graylogHost>
<graylogPort>10240</graylogPort>
</appender>
<root level="INFO">
<appender-ref ref="GELF"/>
<appender-ref ref="STDOUT"/>
</root>
</configuration>

