Configuring your MiNiFi C++ Agent

After you have installed the MiNiFi C++ Agent, update the configuration files before using the agent.

MiNiFi C++ Agents rely on the following configuration files and directories:

minifi.properties
  • Installed with MiNiFi C++
  • Contains the default values for common configuration properties
  • Starting with version 1.26.02, Cloudera recommends leaving this file unchanged and overriding settings by using the minifi.properties.d directory instead
  • On Windows, installing MiNiFi C++ updates overwrites this file
minifi.properties.d
  • Available since version 1.26.02
  • You can use it for files to override the default configuration from minifi.properties
    • MiNiFi C++ loads these files in alphabetical order
    • Cloudera recommends naming the files with a two-digit numeric prefix that defines the load order, followed by an underscore and a short description of the contents
    • Use the .properties extension, for example: 10_c2-server.properties
config.yml
  • Defines the flow configuration
  • If MiNiFi C++ is managed by Edge Flow Manager, the flow configuration is downloaded automatically and this file is overwritten
minifi-log.properties
  • Installed with MiNiFi C++
  • Contains the default log configuration
  • On Windows, installing MiNiFi C++ updates overwrites this file
minifi-log.properties.d
  • Available since version 1.26.02
  • You can use it for files to override log configuration from minifi-log.properties
bootstrap.conf
  • Contains encryption settings and keys when flow properties or the entire flow configuration are encrypted
  • Restrict read access so that only MiNiFi C++ can read this file
minifi-uid.properties
  • Installed with MiNiFi C++
  • Contains UUID generation settings
  • On Windows, installing MiNiFi C++ updates overwrites this file
minifi-uid.properties.d
  • Available since version 1.26.02
  • You can use it for files to override the configuration from minifi-uid.properties

Follow these steps to configure the MiNiFi C++ Agent on Linux.

  1. From the MiNiFi home directory, navigate to the conf/minifi.properties.d directory.

    If the directory does not exist, create it.

  2. Create a file named 10_c2-server.properties.
  3. Configure the agent class to logically group MiNiFi C++ instances based on their functionality using the following setting.
    nifi.c2.agent.class=[***AGENT_CLASS***]

    Replace [***AGENT_CLASS***] with your agent class name.

    For example: nifi.c2.agent.class=my_agent_class

  4. Configure the ID of the agent. If you do not specify an agent ID, MiNiFi generates a unique ID per agent instance.
    nifi.c2.agent.identifier=[***AGENT_ID***]

    Replace [***AGENT_ID***] with your chosen ID.

    For example: nifi.c2.agent.identifier=minifi_cpp_13

  5. Enable MiNiFi to receive runtime flow instructions from the Edge Flow Manager by setting the nifi.c2.enable property to true.
    nifi.c2.enable=true
  6. Configure the Edge Flow Manager server endpoint by adding the following properties.
    nifi.c2.flow.base.url=https://[***EFM SERVER_IP ADDRESS***]:10090/efm/api
    nifi.c2.rest.path.base=http://[***EFM SERVER_IP ADDRESS***]:10090/efm/api
    nifi.c2.rest.url=/c2-protocol/heartbeat
    nifi.c2.rest.url.ack=/c2-protocol/acknowledge

    Replace [***EFM SERVER_IP ADDRESS***] with the IP address of the Edge Flow Manager server endpoint.

    For example: efm-host.corp.local

  7. Configure the heartbeat interval.
    nifi.c2.agent.heartbeat.period=[***HEARTBEAT_INTERVAL***]

    Replace [***HEARTBEAT_INTERVAL***] with the time period you want to set as the frequency for the the agent to send a heartbeat to the Edge Flow Manager. The format can be an integer in milliseconds, or an integer followed by a time period unit.

    For example: nifi.c2.agent.heartbeat.period=5000

    5 sec is also a valid value.

  8. Optional: Configure the metrics for your MiNiFi C++ Agent.

    For more information, see Metrics in the Apache NiFi - MiNiFi - C++ C2 Readme.

    nifi.c2.root.class.definitions=metrics
    nifi.c2.root.class.definitions.metrics.name=metrics
    nifi.c2.root.class.definitions.metrics.metrics=runtimemetrics,loadmetrics,processorMetrics
    nifi.c2.root.class.definitions.metrics.metrics.runtimemetrics.name=RuntimeMetrics
    nifi.c2.root.class.definitions.metrics.metrics.runtimemetrics.classes=DeviceInfoNode,FlowInformation
    nifi.c2.root.class.definitions.metrics.metrics.loadmetrics.name=LoadMetrics
    nifi.c2.root.class.definitions.metrics.metrics.loadmetrics.classes=QueueMetrics,RepositoryMetrics
    nifi.c2.root.class.definitions.metrics.metrics.processorMetrics.name=ProcessorMetric
    nifi.c2.root.class.definitions.metrics.metrics.processorMetrics.classes=GetFileMetrics
  9. Optional: After completing the configuration, check that your new 10_c2-server.properties configuration file looks similar to the following:
    nifi.c2.enable=true
    nifi.c2.flow.base.url=https://efm-host.corp.local:10090/efm/api
    nifi.c2.rest.path.base=http://efm-host.corp.local:10090/efm/api
    nifi.c2.rest.url=/c2-protocol/heartbeat
    nifi.c2.rest.url.ack=/c2-protocol/acknowledge
    nifi.c2.agent.heartbeat.period=5 sec
    nifi.c2.agent.class=web_servers
    nifi.c2.agent.identifier=foo3_web_server
  10. Restart the agent to apply the changes.

    For the list of supported MiNiFi C++ processors, see MiNiFi C++ Agent processor support.