Configuring your MiNiFi C++ agent

After you install the MiNiFi C++ agent, you need to update the configuration files.

MiNiFi C++ is configured through two files: minifi.properties is used for general configuration and config.yml is used for configuring your flow.

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

  1. From the MiNiFi home directory, open the minifi.properties configuration file.
  2. Configure the agent class so that you can logically group MiNiFi C++ instances according to their functionality.
    nifi.c2.agent.class=[***AGENT_CLASS***]

    Replace [***AGENT_CLASS***] with the name of your agent class, 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 the ID of your choice, for example: nifi.c2.agent.identifier=minifi_cpp_13

  4. Set the nifi.c2.enable property to true to inform MiNiFi that run time flow instructions will be received from EFM.
    nifi.c2.enable=true
  5. Configure your EFM 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 EFM server endpoint, for example with efm-host.corp.local

  6. Configure your 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 EFM.

    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.

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