Configuring your MiNiFi C++ Agent

After you have installed the MiNiFi C++ Agent, you need to update the configuration files for proper operation.

MiNiFi C++ relies on two configuration files: minifi.properties for general settings and config.yml for flow configuration.

Follow these steps to configure the MiNiFi C++ Agent:

  1. From the MiNiFi home directory, locate and open the minifi.properties configuration file.
  2. 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

  3. 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

  4. Enable MiNiFi to receive runtime flow instructions from the by setting the nifi.c2.enable property to true.
    nifi.c2.enable=true
  5. Configure your server endpoint.
    nifi.c2.rest.url=http://[***EFM SERVER_IP ADDRESS***]:10090/efm/api/c2-protocol/heartbeat
    nifi.c2.rest.url.ack=http://[***EFM SERVER_IP ADDRESS***]:10090/efm/api/c2-protocol/acknowledge

    Replace [***EFM SERVER_IP ADDRESS***] with the IP address of the server endpoint. For example with efm-host.corp.local

  6. 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 . 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.

  7. 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
    
  8. Restart the agent to apply the changes.

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