You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Martin Zink (Jira)" <ji...@apache.org> on 2021/02/18 09:33:00 UTC

[jira] [Created] (MINIFICPP-1504) Add Resource consumption data to heartbeats

Martin Zink created MINIFICPP-1504:
--------------------------------------

             Summary: Add Resource consumption data to heartbeats
                 Key: MINIFICPP-1504
                 URL: https://issues.apache.org/jira/browse/MINIFICPP-1504
             Project: Apache NiFi MiNiFi C++
          Issue Type: New Feature
            Reporter: Martin Zink
            Assignee: Martin Zink


It would be beneficial to add CPU utilization and RAM consumption to the heartbeat. So the C2 server can monitor how much resources does the agent, and the agent's host(overall) consume.

Currently the heartbeat {color:#172b4d}already{color} contains the number of vCores, and the total RAM of the system.

Here are the proposed changes to the heartbeat JSON in the C2 Protocol:

 
{code:java}
...
  "deviceInfo": {
    "identifier": "",
    "systemInfo": {
       "physicalMem": 8360783872,
       "vCores": 4,
       // New fields to be added below.
       // cpuUtilization 
         // - a normalized (max == 100%) percentage value 
         // - passed as floating point in the range [0.0, 1.0]
         // - the agent would average a sliding window of system values taken at some interval
       // memoryUtilization
         // - bytes in use, whatever the system reports.
         // could exceed max physical memory due to virtual mem / swap on host.
      "cpuUtilization": 0.50,
      "memoryUtilization": 7360783872
    },
    "networkInfo": {
     ...
    }
  },
  "agentInfo": {
    ...
    "status": {
      ...
      // New nested object to be added below.
      // Same as values in systemInfo, but for the minifi agent process only
      // cpuUtilization 
        // - a normalized (max == 100%) percentage value 
        // - passed as floating point in the range [0.0, 1.0]
        // - agent will average a sliding window of system values taken at some interval
      // memoryUtilization
        // - bytes in use, whatever the system reports. 
        // could exceed max physical memory due to virtual mem / swap on host.
     "resourceConsumption": {
       "cpuUtilization": 0.10,
       "memoryUtilization": 1360783872
     },
   }
...{code}
These new field would be optional (maybe configurable?)

This should work on all supported platforms and return platform-independent information to the C2.

 

 
  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)