[ https://issues.apache.org/jira/browse/MINIFICPP-1504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Zink updated MINIFICPP-1504: ----------------------------------- Attachment: windows.png laptop.png macos.png ubuntu.png desktop.png > 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 > Priority: Major > Attachments: desktop.png, laptop.png, macos.png, ubuntu.png, > windows.png > > Time Spent: 50m > Remaining Estimate: 0h > > 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)