blob: fdb92a0509de05b080b6828acfcafe0b674bb995 [file] [log] [blame]
{
// Appmgr and component manager sample total CPU and queuing time for all components (v1 and v2
// respectively) they know about every minute. Component manager does the same for v2
// components. The last two samples are retained to calculate average CPU load over
// approximately the last minute.
select: {
// The total number of nanoseconds any component was scheduled
// and running on a CPU in the second to most recent sample.
prev_cpu_v1: "INSPECT:core/appmgr:root/cpu_stats/recent_usage:previous_cpu_time",
prev_cpu_v2: "INSPECT:<component_manager>:root/cpu_stats/recent_usage:previous_cpu_time",
// The total number of nanoseconds any component was queued to
// run, but was not actually running in the second to most recent sample.
prev_queue_v1: "INSPECT:core/appmgr:root/cpu_stats/recent_usage:previous_queue_time",
prev_queue_v2: "INSPECT:<component_manager>:root/cpu_stats/recent_usage:previous_queue_time",
// The timestamp of the second to most recent sample.
prev_time_v1: "INSPECT:core/appmgr:root/cpu_stats/recent_usage:previous_timestamp",
prev_time_v2: "INSPECT:<component_manager>:root/cpu_stats/recent_usage:previous_timestamp",
// The total number of nanoseconds any component was scheduled
// and running on a CPU in the most recent sample.
current_cpu_v1: "INSPECT:core/appmgr:root/cpu_stats/recent_usage:recent_cpu_time",
current_cpu_v2: "INSPECT:<component_manager>:root/cpu_stats/recent_usage:recent_cpu_time",
// The total number of nanoseconds any component was queued to
// run, but was not actually running in the most recent sample.
current_queue_v1: "INSPECT:core/appmgr:root/cpu_stats/recent_usage:recent_queue_time",
current_queue_v2: "INSPECT:<component_manager>:root/cpu_stats/recent_usage:recent_queue_time",
// The timestamp of the most recent sample.
current_time_v1: "INSPECT:core/appmgr:root/cpu_stats/recent_usage:recent_timestamp",
current_time_v2: "INSPECT:<component_manager>:root/cpu_stats/recent_usage:recent_timestamp",
},
eval: {
// The average CPU and queue times during the two most recent samples in
// appmgr (typically every minute). This includes only CPU time for
// components known to appmgr and component_manager. The percentage is out
// of the total CPU time available on a single processor, so on a 4
// core system the percentage can go up to 400%.
cpu_average_v1: "(current_cpu_v1 - prev_cpu_v1) / (current_time_v1 - prev_time_v1)",
queue_average_v1: "(current_queue_v1 - prev_queue_v1) / (current_time_v1 - prev_time_v1)",
cpu_average_v2: "(current_cpu_v2 - prev_cpu_v2) / (current_time_v2 - prev_time_v2)",
queue_average_v2: "(current_queue_v2 - prev_queue_v2) / (current_time_v2 - prev_time_v2)",
},
act: {
v1_component_cpu_usage: {
type: "Gauge",
value: "cpu_average_v1",
format: "percentage",
},
v1_component_queue_average: {
type: "Gauge",
value: "queue_average_v1",
format: "percentage",
},
v2_component_cpu_usage: {
type: "Gauge",
value: "cpu_average_v2",
format: "percentage",
},
v2_component_queue_average: {
type: "Gauge",
value: "queue_average_v2",
format: "percentage",
},
},
}