Monitoring: Google help needed: the stackdriver api doesn't give us the machine type (but it does give us load)
have to ask onix about this, to see what needs to be done.
#5 Updated by Steven Timm over 4 years ago
OK here we go:
the main monitoring code can be checked out of GIT via
git clone ssh://email@example.com:/cvs/projects/monitoringaccountingbilling
The routine in question can be found in that tree at
The method in question is get_gce_cpu_usage
It is calling the timeSeries method using v3 of the monitoring API.
This can be seen here:
This returns a data structure separated by instance.
Right now, it does not give us any idea of which machine type each instance is, and how many cores it has.
So for instance if I have 4 core instance at 100% load, and 16 core instance at 25% load, the average load will be (100+25)/2 which is 62.5%. The higher-core instance should be weighted more.
i.e. the right math is (100*4)+(25*16)/(4+16) = 800/20 = 40.
I suggest that you install the code, try to run it, make sure what I have said above is right, then
write up a question that can be submitted to google cloud tech support.'