This article documents two issues seen with the legacy Cloud Logging and Cloud Monitoring agents on Google Cloud VMs. Use the examples below as historical troubleshooting for installations that still run those agents.
Google ended standard maintenance and regular bug fixes for both legacy agents on 28 September 2026. For supported Compute Engine VMs, Google recommends the Ops Agent. Check Google’s end-of-support and migration guidance before changing an existing installation. The links below document the legacy agents.
Once installed, they will send near-realtime data to your Cloud Monitoring and Cloud Logging consoles for you to get a live-feed on your instances running in GCP.
When deploying Cloud Monitoring Agents in Linux VM instances, you’ll sometimes see this error occur: write_gcm: can not take infinite value. This error occurs because you may not have configure a swap file for memory, however, the Cloud Monitoring Agent is programmed to look for it by default. What occurs then is that the value cannot be found, hence the repeated errors.
To resolve this issue with the Cloud Monitoring Agent, locate the following lines in the configuration file /etc/stackdriver/collectd.conf and remove them (we commonly use vim for this, but any text editor will work):
LoadPlugin swap
<Plugin "swap">
ValuesPercentage true
</Plugin>
After removing the lines above, restart the Cloud Monitoring Agent with the following command: sudo service stackdriver-agent start
Credits to https://myshittycode.com/2020/06/13/gcp-stackdriver-agent-write_gcm-can-not-take-infinite-value-error/ for the solution which has no doubt helped many people (us included!).
When deploying the Cloud Logging Agent in Windows Server instances in GCP, you’ll sometimes see that the Ruby Interpreter consistently uses a large amount of CPU and does not produce any successful logging into Cloud Logging’s winevt.raw category. This issue normally occurs when you use older versions of Windows Server images.
To diagnose this issue, inspect the Cloud Logging Agent’s logs located at: C:\Program Files (x86)\Stackdriver\. If you spot that the Cloud Logging Agent repeatedly restarts itself after being terminated with the following lines:
[info]: #0 Initialized the insert ID key to xxxxxxxxxxxxx
[info]: #0 fluentd worker is now running worker=0
[info]: Worker 0 finished unexpectedly with signal SIGSEGV
[info]: #0 Initialized the insert ID key to xxxxxxxxxxxxx
[info]: #0 fluentd worker is now running worker=0
[info]: Worker 0 finished unexpectedly with signal SIGSEGV
This indicates that there is an issue with the gRPC plugin that is being used by the Ruby Interpreter and is described in further detail here: https://github.com/grpc/grpc/issues/7876. To resolve this issue, edit the C:\Program Files (x86)\Stackdriver\ file with a text editor and locate the following line:
use_grpc true
And change that to:
use_grpc false
After that, restart the StackdriverLogging Service and you should be able to see the Ruby interpreter start up and gradually settle down into low CPU consumption. Remember to check your Cloud Logging logs to see if the winevt.raw category was automatically created by the Cloud Logging Agent (this may take several minutes after startup as it polls all the existing logs).
Note: According to a ticket raised by us with Google Support, this will be fixed in a future release of the agent. So stay tuned!
If the steps above did not help you solve your issues, the first stop to fixing any issues is to attempt troubleshooting via these links:
If the Google Cloud articles above do not resolve your issues, reach out to us at https://matrixc.com/contact-us/ for assistance, we would be happy to help!
Interested in reading more Google Cloud tips? Check out our blog section at matrixc.com for more articles like this one!
A request for “AI training for our staff” leaves a provider guessing about the people,…
An AI-generated report can read smoothly while giving the wrong impression of the figures. A…
Your company has paid for AI tools. A few people use them regularly, others avoid…
Image above: AI-generated illustration of a Malaysian team planning a learning task. A team can…
Assess Qwen for a defined business application. Understand model access, task fit, evaluation, costs and…
Compare managed Qwen access and selected model weights. Check serving costs, model terms, control, failures…
View Comments