<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Stackdriver &#8211; My Shitty Code</title>
	<atom:link href="https://myshittycode.com/tag/stackdriver/feed/" rel="self" type="application/rss+xml" />
	<link>https://myshittycode.com</link>
	<description>Embracing the Messiness in Search of Epic Solutions</description>
	<lastBuildDate>Fri, 06 Jan 2023 03:56:39 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>

<image>
	<url>https://myshittycode.com/wp-content/uploads/2022/04/cropped-icon-32x32.png</url>
	<title>Stackdriver &#8211; My Shitty Code</title>
	<link>https://myshittycode.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">205304208</site>	<item>
		<title>GCP Stackdriver Agent: &#8220;write_gcm: can not take infinite value&#8221; Error</title>
		<link>https://myshittycode.com/2020/06/13/gcp-stackdriver-agent-write_gcm-can-not-take-infinite-value-error/</link>
					<comments>https://myshittycode.com/2020/06/13/gcp-stackdriver-agent-write_gcm-can-not-take-infinite-value-error/#comments</comments>
		
		<dc:creator><![CDATA[Shitty Author]]></dc:creator>
		<pubDate>Sat, 13 Jun 2020 23:17:12 +0000</pubDate>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Google Cloud Platform]]></category>
		<category><![CDATA[Stackdriver]]></category>
		<guid isPermaLink="false">http://myshittycode.com/?p=1153</guid>

					<description><![CDATA[<p>PROBLEM When running the stackdriver-agent (v6.x), the log file contains the following errors:- SOLUTION By default, the swap metric is enabled. To verify, go to /etc/stackdriver/collectd.conf and locate the following configuration:- This error occurs because the VM instance does not have swap memory, hence this metric plugin tries to divide by 0. To verify the [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://myshittycode.com/2020/06/13/gcp-stackdriver-agent-write_gcm-can-not-take-infinite-value-error/">GCP Stackdriver Agent: &#8220;write_gcm: can not take infinite value&#8221; Error</a> appeared first on <a rel="nofollow" href="https://myshittycode.com">My Shitty Code</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">PROBLEM</h2>



<p>When running the <a href="https://cloud.google.com/monitoring/agent/install-agent" target="_blank" rel="noopener">stackdriver-agent (v6.x)</a>, the log file contains the following errors:-</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
collectd&#x5B;1496]: write_gcm: can not take infinite value
collectd&#x5B;1496]: write_gcm: wg_typed_value_create_from_value_t_inline failed for swap/percent/value! Continuing.
collectd&#x5B;1496]: write_gcm: can not take infinite value
collectd&#x5B;1496]: write_gcm: wg_typed_value_create_from_value_t_inline failed for swap/percent/value! Continuing.
collectd&#x5B;1496]: write_gcm: can not take infinite value
collectd&#x5B;1496]: write_gcm: wg_typed_value_create_from_value_t_inline failed for swap/percent/value! Continuing.
</pre></div>


<h2 class="wp-block-heading">SOLUTION</h2>



<p>By default, the <a href="https://cloud.google.com/monitoring/api/metrics_agent#agent-swap" target="_blank" rel="noopener">swap metric</a> is enabled.</p>



<p>To verify, go to <code>/etc/stackdriver/collectd.conf</code> and locate the following configuration:-</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
LoadPlugin swap
&amp;lt;Plugin &quot;swap&quot;&gt;
  ValuesPercentage true
&amp;lt;/Plugin&gt;
</pre></div>


<p>This error occurs because the VM instance does not have swap memory, hence this metric plugin tries to divide by 0.</p>



<p>To verify the VM&#8217;s swap memory:-</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
$ free -m
              total        used        free      shared  buff/cache   available
Mem:           3536         191        3197           8         147        3151
Swap:             0           0           0
</pre></div>


<p>To fix this, remove this configuration and restart <code>stackdriver-agent</code>.</p>
<p>The post <a rel="nofollow" href="https://myshittycode.com/2020/06/13/gcp-stackdriver-agent-write_gcm-can-not-take-infinite-value-error/">GCP Stackdriver Agent: &#8220;write_gcm: can not take infinite value&#8221; Error</a> appeared first on <a rel="nofollow" href="https://myshittycode.com">My Shitty Code</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://myshittycode.com/2020/06/13/gcp-stackdriver-agent-write_gcm-can-not-take-infinite-value-error/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1153</post-id>	</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Lazy Loading (feed)
Database Caching using Disk

Served from: myshittycode.com @ 2026-02-20 23:25:24 by W3 Total Cache
-->