Reputation: 1
This is the mql query I'm trying I'm expecting results like Instanceid,memory value, cpu value but unfortunately I'm getting only 2 columns instanceid and value In value field either cpu or memory not both
Please help me to fix this so that i can get instanceid, memory value, cpu value‘
fetch gce_instance
| {
metric 'agent.googleapis.com/memory/percent_used'
| filter(metric.state != 'free')
| group_by 1m, [value_percent_used_mean: mean(value.percent_used)]
| every 1m
| group_by [resource.instance_id], [Value_percent_used_mean_aggregate: aggregate(value_percent_used_mean)]
;
metric 'agent.googleapis.com/cpu/utilization'
| filter(metric.cpu_state == 'system')
| group_by 1m, [value_utilization_mean: mean(value.utilization)]
| every 1m
| group_by [resource.instance_id], [Value_cpu_mean_utilization: aggregate(value_utilization_mean)]
}
| group_by [resource.instance_id]
| every 1m
| outer_join 0,1
Upvotes: 0
Views: 71