<?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>Obsolete Your Idols &#187; system monitoring</title>
	<atom:link href="http://blog.manjusri.org/tag/system-monitoring/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.manjusri.org</link>
	<description>Book Reviews and Blather</description>
	<lastBuildDate>Wed, 06 Jul 2011 18:46:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>NRPE check_file_age is a filthy liar</title>
		<link>http://blog.manjusri.org/2009/08/02/nrpe-check_file_age-is-a-filthy-liar/</link>
		<comments>http://blog.manjusri.org/2009/08/02/nrpe-check_file_age-is-a-filthy-liar/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 01:10:36 +0000</pubDate>
		<dc:creator>binder</dc:creator>
				<category><![CDATA[Nerdery]]></category>
		<category><![CDATA[nagios]]></category>
		<category><![CDATA[nrpe]]></category>
		<category><![CDATA[system monitoring]]></category>

		<guid isPermaLink="false">http://blog.manjusri.org/?p=191</guid>
		<description><![CDATA[Possibly just on Ubuntu.  So here&#8217;s what I told the NRPE daemon my command was: command[check_timer]=/usr/lib/nagios/plugins/check_file_age -w 7200 -c 14400 -f /usr/local/playfirst/run/var/TimerService.${HOSTNAME}.alive and when reading it from nagios_local.cfg, the nrpe daemon reported it as: /usr/lib/nagios/plugins/check_file_age -w 7200 -c 14400 -f /usr/local/playfirst/run/var/TimerService.${HOSTNAME}.alive$ Oops. Because then it goes on to substitute the client hostname for ${HOSTNAME} but [...]]]></description>
			<content:encoded><![CDATA[<p>Possibly just on Ubuntu.  So here&#8217;s what I told the NRPE daemon my command was:</p>
<blockquote><p>command[check_timer]=/usr/lib/nagios/plugins/check_file_age -w 7200 -c 14400 -f /usr/local/playfirst/run/var/TimerService.${HOSTNAME}.alive</p></blockquote>
<p>and when reading it from nagios_local.cfg, the nrpe daemon reported it as:</p>
<blockquote><p>/usr/lib/nagios/plugins/check_file_age -w 7200 -c 14400 -f /usr/local/playfirst/run/var/TimerService.${HOSTNAME}.alive$</p></blockquote>
<p>Oops.</p>
<p>Because then it goes on to substitute the client hostname for ${HOSTNAME} but it turns out the $ at the end of the filename persists and no, there is no file of that name lying around.  So that&#8217;s kind of a curious artifact of trying to use an environment variable substitution.  The variable does substitute but you keep a bonus $ at the end.  So then I used a bit of sed trickery so that I push out N different config files, each with the hostname hardcoded.</p>
<p>But it still didn&#8217;t work.  Because it turns out that daemon runs as nagios, and that file was in a place where only user and group could see it.  Rather than turn on the bits for everyone else, I decided to let nrpe run  its commands with the sudo prefix option.</p>
<p>Meanwhile, on the server, all of these were flagging file not found.  I sure wish the second error state would have been reported as &#8216;no permission to read file FOO&#8217; and the first, I wish the substitution didn&#8217;t have that weird side effect.</p>
<p>Yeah, I could write patch or patches for these and submit upstream but I&#8217;ve had bad luck providing patches to Debian and Ubuntu in the past.  I have to assume it&#8217;s something about me at this point.  But if anyone wants to patch something, these are things which bugged me this last week and made my job harder.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.manjusri.org/2009/08/02/nrpe-check_file_age-is-a-filthy-liar/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

