qubership-nifi is a fork of Apache NiFi. Compared with Apache NiFi it supports:
- additional environment variables for configuration.
- integration with Consul as configuration source for logging levels and other configuration properties
- automated NiFi configuration restore: configuration version to restore can be set via Consul parameter
- additional processors for various tasks not supported in opensource Apache NiFi: bulk DB operations, complex JSON extract from DB, rules-based validation
- reporting tasks for additional monitoring of NiFi processes.
- Create
docker-compose.yaml
file with contents (where<image>
should be replaced with qubership-nifi's image):
services:
nifi:
image: <image>
ports:
- 127.0.0.1:28080:8080
environment:
- NAMESPACE=local
- CONSUL_ENABLED=true
- CONSUL_URL=consul:8500
- AUTH=none
- NIFI_NEW_SENSITIVE_KEY=Abcdefghjkl12
container_name: nifi
consul:
image: hashicorp/consul:1.20
ports:
- 127.0.0.1:18500:8500
container_name: consul
- Run
docker compose -f docker-compose.yaml create
- Run
docker compose -f docker-compose.yaml start
Apache NiFi is scalable and conifgurable dataflow platform. Refer to Apache NiFi User Guide for basic usage.
You can modify logging levels by:
- Setting
ROOT_LOG_LEVEL
environment variable. Be mindful that this variable allows you to set only root logging level; - Setting logging level for specific package in Consul. Consul property name must start with "logger." followed by package name. Value should be one of logging level supported by Logback: ALL, TRACE, DEBUG, INFO, WARN, ERROR, OFF. Property should be located in one of two locations:
- config/${NAMESPACE}/application
- config/${NAMESPACE}/qubership-nifi
where
NAMESPACE
is a value ofNAMESPACE
environment variable, or value =local
, if not set.
To change the logging settings:
- Change the logger properties in Consul as per your requirements.
- Wait until the update is propagated to qubership-nifi. It may take up to 1 minute.
NiFi configuration properties could be set up in Consul:
- Property name must start with "nifi."
- Property should be located in one of two locations:
- config/${NAMESPACE}/application
- config/${NAMESPACE}/qubership-nifi
To change NiFi properties:
- Change the NiFi properties in Consul as per your requirements.
- Restart qubership-nifi.
The detailed description of all supported NiFi properties is available in the Apache's NiFi System Administrator's Guide.
qubership-nifi supports automated configuration restore. Steps below describe restore process:
- Set up configuration restore in Consul parameter
nifi-restore-version
located inconfig/${NAMESPACE}/qubership-nifi
. The parameter must contain name of archived configuration to restore from, e.g.20250115T120000+0000_flow.json.gz
. The list of archived configuration versions is available in logs. - Restart qubership-nifi.
On startup qubership-nifi does the following:
- Checks if nifi-restore-version property is set
- If it's set, then if specified file exists or not. If not exists, then prints warning and continues with normal startup.
- If it's set and file exists in archive, then it moves current configuration to archive and replaces current configuration with specified archived version. Once it's done nifi-restore-version property is automatically cleared in Consul.