Uploaded image for project: 'Apache NiFi MiNiFi C++'
  1. Apache NiFi MiNiFi C++
  2. MINIFICPP-1504

Add Resource consumption data to heartbeats

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.10.0
    • None

    Description

      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 already 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:

       

      ...
        "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
           },
         }
      ...

      These new field would be optional (maybe configurable?)

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

       

       
       

      Attachments

        1. desktop.png
          156 kB
          Martin Zink
        2. laptop.png
          150 kB
          Martin Zink
        3. macos.png
          169 kB
          Martin Zink
        4. ubuntu.png
          196 kB
          Martin Zink
        5. windows.png
          87 kB
          Martin Zink

        Activity

          People

            MZink Martin Zink
            MZink Martin Zink
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 10h
                10h