Search code examples
memorygoogle-compute-enginestackdriver

monitor memory of gce by stackdriver


I wanna monitor memory of gcp vm, and I already install monitoring agent, step by step from link.

the problem is i still cant get information of memory on the stackdriver dashboard. did i miss something?

screenshot

and when i type "sudo service stackdriver-agent status" get the log "write_gcm: can not take infinite value" what does it mean? Is there a connection between those two?

screenshot


Solution

  • Since the Stackdriver agent is alive, you should check if it actually generates and pushes any data. There're basic checks you can start from:

    1. Restart the agent.
    2. Try another time period on the chart (1D or 1W).
    3. Try a CPU metric and see whether data is shown.
    4. Check system logs (journalctl, /var/log/syslog, /var/log/messages) for messages containing "collectd" or "stackdriver-agent".
    5. Verify a service account used by the VM. If you use a custom service account, make sure it has a role "roles/monitoring.metricWriter". See Access control.
    6. Verify that data is arriving in Monitoring by manually calling the timeseries.list method in API Explorer

    Troubleshooting steps are described in details here: Troubleshooting Agent Installation

    The error "write_gcm: can not take infinite value" could be caused by disabled swap.