<?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>Christian&#039;s blog &#187; Nagios</title>
	<atom:link href="http://blog.barfoo.org/tags/nagios/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.barfoo.org</link>
	<description>The usual IT babble</description>
	<lastBuildDate>Thu, 02 Sep 2010 04:45:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
		<item>
		<title>Monitoring Brocade FC switches with SNMP/Nagios</title>
		<link>http://blog.barfoo.org/2009/12/21/monitoring-brocade-fc-switches-with-snmpnagios/</link>
		<comments>http://blog.barfoo.org/2009/12/21/monitoring-brocade-fc-switches-with-snmpnagios/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 18:29:47 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Brocade]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[SNMP]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://blog.barfoo.org/?p=2862</guid>
		<description><![CDATA[I looked into the mess a bit more, and as it turns out, the weird crap I was talking about only happens if you have a port with LossofSynchronization, LossofSignal or LinkFailures value with the base of ten (i.e. 10, 101 or 10.000). Additionally, the OID&#8217;s for those three failure elements seem to be dependent]]></description>
			<content:encoded><![CDATA[<p>I looked into the mess a bit more, and as it turns out, <a href="http://blog.barfoo.org/2009/11/23/monitoring-brocade-fc-switches-with-nagios/">the weird crap I was talking about</a> only happens if you have a port with <span class="cmd">LossofSynchronization</span>, <span class="cmd">LossofSignal</span> or <span class="cmd">LinkFailures</span> value with the base of ten (i.e. 10, 101 or 10.000).</p>
<p>Additionally, the OID&#8217;s for those three failure elements seem to be dependent on the firmware version, as with 6.3.x they appear as different OIDs. So I may need to introduce another command-line switch, which selects the firmware version and depending on that, the OID.</p>
<p>Even despite those problems I just described, I ended up using the plugin to watch our SAN infrastructure. I even wrote a <a href="http://blog.barfoo.org/wp-content/uploads/2009/12/check_snmp_brocade_fcport.txt">simple pnp4nagios template</a>, so all the data would show up in a single graph and not a graph per data source.</p>
<div class="wp-caption aligncenter" style="width: 429px"><a title="Graph: 4 Hours" rel="lightbox2" href="http://blog.barfoo.org/wp-content/uploads/2009/12/graph-4hours.png"><img class="  " title="Graph: 4 Hours" src="http://blog.barfoo.org/wp-content/uploads/2009/12/graph-4hours.png" alt="Graph: 4 Hours" width="419" height="216" /></a><p class="wp-caption-text">Graph: 4 Hours</p></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.barfoo.org/2009/12/21/monitoring-brocade-fc-switches-with-snmpnagios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monitoring Brocade FC switches with Nagios</title>
		<link>http://blog.barfoo.org/2009/11/23/monitoring-brocade-fc-switches-with-nagios/</link>
		<comments>http://blog.barfoo.org/2009/11/23/monitoring-brocade-fc-switches-with-nagios/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 17:21:00 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Brocade]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[SNMP]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://blog.barfoo.org/?p=2805</guid>
		<description><![CDATA[The last four days I spent looking for ways on monitoring a Brocade Fibrechannel switch (in my case IBM 2145 B32/F40). The first thing I came up with, is using SNMP. As it was already configured for the previous monitoring with Munin, getting information should be quite easy. After looking through Google for a bit,]]></description>
			<content:encoded><![CDATA[<p>The last four days I spent looking for ways on monitoring a Brocade Fibrechannel switch (in my case IBM 2145 B32/F40). The first thing I came up with, is using SNMP. As it was already configured for the previous monitoring with Munin, getting information should be quite easy. After looking through Google for a bit, there is already <a href="http://exchange.nagios.org/directory/Plugins/Hardware/Storage-Systems/SAN-and-NAS/IBM-Brocade/check_snmp_FCports_brocade-2Epl/details">one script</a> that worked for me.</p>
<p>Only trouble I had with that script, is that it crams every single port into one result. As I wanted something, that a) could watch a single port and b) return performance data, I went ahead an used the script to do a basic rewrite. But after a short while, I grew antsy and started writing a script from scratch, using the OIDs I got from that script and a <a href="http://forums.cacti.net//files/brocade_interfaces.xml">Cacti template</a>.<br />
<span id="more-2805"></span><br />
So far, I got a good plugin, but it&#8217;s still lacking a few things:</p>
<ol>
<li>Support for warning/critical thresholds for each error category</li>
<li>Sadly the important errors (<span class="cmd">er_link_fail</span>, <span class="cmd">er_loss_sync</span> and <span class="cmd">er_loss_sig</span>) are kept in a separate table structure (<span class="cmd">swEndDeviceRlsEntry</span>), which I can&#8217;t seem to access right now; even though the entries are mandatory and according to the <a href="http://wwwprod.brocadeconnect.com/content/For%20Technical%20Professionals/Downloads/MIBS%20and%20RSH%20Utilities/MIBs%20for%20Fabric%20OS%20v5.3.x/SW_v5_6.mib">MIB</a> should be at least read-only.</li>
<li>The plugin isn&#8217;t doing a proper <span class="cmd">$session-&gt;close();</span> . After moving the snmp stuff into a subroutine, Perl refuses to do the session closing. Don&#8217;t know why right now.</li>
</ol>
<p>Right now, the plugin supports two modes. The first just checks if the port is operational and in sync and the second checks the port status, but also returns the performance data.</p>
<h2>Only do a basic check if the Port is in operational status</h2>
<pre lang="text">./check_snmp_brocade_fcport.pl -H 10.0.0.50 -C public -P 2 -N
SNMP_BROCADE_FCPORT OK - FC port 0/2's swFCPortPhyState is inSync</pre>
<h2>Check the port status, but also return performance data</h2>
<pre lang="text">./check_snmp_brocade_fcport.pl -H 10.0.0.50 -C public -P 2
SNMP_BROCADE_FCPORT OK - FC port 0/2's swFCPortPhyState is inSync|stat_wtx=577976968;0;0;0;0 stat_wrx=4069984468;0;0;0;0 stat_ftx=422378205;0;0;0;0 stat_frx=123789748;0;0;0;0 er_enc_in=0;0;0;0;0 er_crc=0;0;0;0;0 er_trunc=0;0;0;0;0 er_toolong=0;0;0;0;0 er_bad_eof=0;0;0;0;0 er_enc_out=0;0;0;0;0 er_c3_timeout=0;0;0;0;0</pre>
<p>That might look like much, but Nagios is gonna pass everything after &#8220;|&#8221; to your performance data command.</p>
<p>List of OIDs, which hold the various information:</p>
<pre lang="text">   swFCPort
   PhyState: .1.3.6.1.4.1.1588.2.1.1.1.6.2.1.3.
   OpStatus: .1.3.6.1.4.1.1588.2.1.1.1.6.2.1.4.
  AdmStatus: .1.3.6.1.4.1.1588.2.1.1.1.6.2.1.5.
  LinkState: .1.3.6.1.4.1.1588.2.1.1.1.6.2.1.6.
    TxWords: .1.3.6.1.4.1.1588.2.1.1.1.6.2.1.11. (stat_wtx)
    RxWords: .1.3.6.1.4.1.1588.2.1.1.1.6.2.1.12. (stat_wrx)
   TxFrames: .1.3.6.1.4.1.1588.2.1.1.1.6.2.1.13. (stat_ftx)
   RxFrames: .1.3.6.1.4.1.1588.2.1.1.1.6.2.1.14. (stat_frx)
 RxEncInFrs: .1.3.6.1.4.1.1588.2.1.1.1.6.2.1.21. (er_enc_in)
     RxCrcs: .1.3.6.1.4.1.1588.2.1.1.1.6.2.1.22. (er_crc)
   RxTruncs: .1.3.6.1.4.1.1588.2.1.1.1.6.2.1.23. (er_trunc)
 RxTooLongs: .1.3.6.1.4.1.1588.2.1.1.1.6.2.1.24. (er_toolong)
  RxBadEofs: .1.3.6.1.4.1.1588.2.1.1.1.6.2.1.25. (er_bad_eof)
RxEncOutFrs: .1.3.6.1.4.1.1588.2.1.1.1.6.2.1.26. (er_enc_out)
 C3Discards: .1.3.6.1.4.1.1588.2.1.1.1.6.2.1.28. (er_c3_timeout)

swEndDevice
LinkFailure: .1.3.6.1.4.1.1588.2.1.1.1.21.1.1.4. (er_link_fail)
   SyncLoss: .1.3.6.1.4.1.1588.2.1.1.1.21.1.1.5. (er_loss_sync)
    SigLoss: .1.3.6.1.4.1.1588.2.1.1.1.21.1.1.6. (er_loss_sig)</pre>
<p>The last three OIDs, as well as the ones in <a href="http://wwwprod.brocadeconnect.com/content/For%20Technical%20Professionals/Downloads/MIBS%20and%20RSH%20Utilities/MIBs%20for%20Fabric%20OS%20v5.3.x/FA_v3_0.mib">FCMGMT-MIB</a> (as I mentioned in the TODO), sadly don&#8217;t exist (or I&#8217;m doing something wrong ? &#8212; no clue right now), so I can&#8217;t incorporate them into the script at this time.</p>
<p>However, I found something in a separate OID-tree (also the <a href="http://wwwprod.brocadeconnect.com/content/For%20Technical%20Professionals/Downloads/MIBS%20and%20RSH%20Utilities/MIBs%20for%20Fabric%20OS%20v5.3.x/FA_v3_0.mib">FCMGMT-MIB</a>), which seems to be exactly what I&#8217;m looking for.</p>
<pre lang="text">connUnitPortStatCount
   LossofSynchronization: .1.3.6.1.3.94.4.5.1.44.16.0.0.5.30.52.240.185.0.0.0.0.0.0.0.0.<fcport>
     LossofSignal: .1.3.6.1.3.94.4.5.1.43.16.0.0.5.30.52.240.185.0.0.0.0.0.0.0.0.<fcport>
   LinkFailures: .1.3.6.1.3.94.4.5.1.44.16.0.0.5.30.52.240.185.0.0.0.0.0.0.0.0.<fcport></pre>
<p>Only trouble with those OIDs is, that they are OCTET STRING&#8217;s, which right now just return crap (either nothing or just a new-line) with my script. Gonna have to work on that.</p>
<p class="information">If you&#8217;re interested in the Perl script (for now, lacking some options, performance data, <span class="cmd">$session->close();</span>), you&#8217;ll find it <a href="http://blog.barfoo.org/wp-content/uploads/2009/11/check_brocade_fcport">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.barfoo.org/2009/11/23/monitoring-brocade-fc-switches-with-nagios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring nagios-plugins-zypper</title>
		<link>http://blog.barfoo.org/2009/11/12/configuring-nagios-plugins-zypper/</link>
		<comments>http://blog.barfoo.org/2009/11/12/configuring-nagios-plugins-zypper/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 17:45:43 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[SLES10]]></category>
		<category><![CDATA[sudo]]></category>

		<guid isPermaLink="false">http://blog.barfoo.org/?p=2801</guid>
		<description><![CDATA[Since I&#8217;m running check_zypper via nrpe (which in turn runs as nobody), I need to set up sudo. In order for the plugin to work, we need to add the following line to /etc/sudoers (by means of visudo): nobody ALL = NOPASSWD: /usr/bin/zypper sl, /usr/bin/zypper --non-interactive --no-gpg-checks --terse list-updates (Keep in mind this needs to]]></description>
			<content:encoded><![CDATA[<p>Since I&#8217;m running check_zypper via nrpe (which in turn runs as nobody), I need to set up sudo. In order for the plugin to work, we need to add the following line to /etc/sudoers (by means of visudo):</p>
<pre lang="text">nobody ALL = NOPASSWD: /usr/bin/zypper sl, /usr/bin/zypper --non-interactive --no-gpg-checks --terse list-updates</pre>
<p>(Keep in mind this needs to be a single line &#8230;)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.barfoo.org/2009/11/12/configuring-nagios-plugins-zypper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Praxisbuch Nagios by Tobias Scherbaum</title>
		<link>http://blog.barfoo.org/2009/07/25/praxisbuch-nagios-by-tobias-scherbaum/</link>
		<comments>http://blog.barfoo.org/2009/07/25/praxisbuch-nagios-by-tobias-scherbaum/#comments</comments>
		<pubDate>Sat, 25 Jul 2009 11:58:20 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Leisure]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://blog.barfoo.org/?p=2454</guid>
		<description><![CDATA[Tobi recently finished writing yet another book, which he also talked about in a blog post. Shortly after, I asked him a rather curious question. What exactly is the plant or animal on the cover of the book ? He was kind enough to send a voucher copy of the book my way. He actually]]></description>
			<content:encoded><![CDATA[<p>Tobi recently finished writing yet another book, which he also talked about <a href="http://blog.scherbaum.info/2009/06/22/endlich-fertig/">in a blog post</a>. Shortly after, I <a href="http://blog.scherbaum.info/2009/06/22/endlich-fertig/#129719">asked him</a> a rather curious question. What exactly is the plant or animal on the cover of the book ? He was kind enough to send a voucher copy of the book my way.</p>
<div id="attachment_2455" class="wp-caption aligncenter" style="width: 451px"><a href="http://blog.barfoo.org/wp-content/uploads/2009/07/datgutepraxisbuchnagiosundvonvorne.png"><img class="size-medium wp-image-2455" title="Praxisbuch Nagios" src="http://blog.barfoo.org/wp-content/uploads/2009/07/datgutepraxisbuchnagiosundvonvorne-441x500.png" alt="Praxisbuch Nagios" width="441" height="500" /></a><p class="wp-caption-text">Praxisbuch Nagios</p></div>
<p>He actually mentions it in the credits at the beginning of the book. Turns out it is an animal, a sea pen or sea feather (I&#8217;m guessing at <a href="http://en.wikipedia.org/wiki/Sea_pen">Pennatula aculeata</a>).</p>
<p>Now as for the content of the book itself, I do have to admit that I haven&#8217;t read the whole book. I just picked a few topics (SNMP-Traps with Nagios, notifications) which I did find rather well written. My (soon ex-) trainee, <a href="http://blog.devnu11.net/">Michel</a>, however already bugged Tobias about some errors in the book itself, or rather some changes which happened after 3.0.3 (that&#8217;s the Nagios version the book is based on).</p>
<p>All in all, I guess I can congratulate Tobias on yet another good written book!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.barfoo.org/2009/07/25/praxisbuch-nagios-by-tobias-scherbaum/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nagios: Service Check Timed Out</title>
		<link>http://blog.barfoo.org/2009/04/03/nagios-service-check-timed-out/</link>
		<comments>http://blog.barfoo.org/2009/04/03/nagios-service-check-timed-out/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 15:55:57 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[nsclient++]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://blog.barfoo.org/?p=1981</guid>
		<description><![CDATA[Since I got the pleasure of watching some Windows boxen with Nagios, I took the Windows Update plugin from Michal Jankowski and implemented it. It took me some time, to initially set up the nsclient++ correctly so it just works, but up till now the check plugin sometimes reported the usual &#8220;Service Check Timed Out&#8221;.]]></description>
			<content:encoded><![CDATA[<p>Since I got the pleasure of watching some Windows boxen with Nagios, I took the <a href="http://www.monitoringexchange.org/inventory/Check-Plugins/Operating-Systems/Windows-NRPE/Check-Windows-Updates">Windows Update plugin</a> from Michal Jankowski and implemented it. It took me some time, to initially set up the nsclient++ correctly so it just works, but up till now the check plugin sometimes reported the usual &#8220;Service Check Timed Out&#8221;.</p>
<p>Usually I ended up increasing the cscript timeout, or the nsclient++ socket timeout, but it still kept showing up. Since I rely heavily on my surveillance tools, I have the demand, that as few as possible false positives show up. So I ended up chasing down this error today, and after that I have to say it was quite simple.</p>
<p>In my case, it wasn&#8217;t cscript (that timeout is set to 300 seconds), neither nsclient++ (socket timeout is set to 300 seconds too), nor the nrpe plugin itself (that has 300 seconds as well).</p>
<p>As it turns out, Nagios got an additional setting controlling these things, called <a href="http://nagios.sourceforge.net/docs/3_0/configmain.html#service_check_timeout">service_check_timeout</a> which defaults to 60 seconds. Sadly the plugin, or rather Windows needs longer than those 60 seconds to figure out whether or not it needs updating, thus Nagios is killing the plugin and returning a CRITICAL message.</p>
<p>After increasing the value of service_check_timeout that&#8217;ll be fixed hopefully.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.barfoo.org/2009/04/03/nagios-service-check-timed-out/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Nagios: SNMP OID&#8217;s for IBM&#8217;s RSA II adapter</title>
		<link>http://blog.barfoo.org/2009/04/01/nagios-snmp-oids-for-ibms-rsa-ii-adapter/</link>
		<comments>http://blog.barfoo.org/2009/04/01/nagios-snmp-oids-for-ibms-rsa-ii-adapter/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 11:10:15 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[check_snmp]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[RSA]]></category>
		<category><![CDATA[SNMP]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://blog.barfoo.org/?p=1924</guid>
		<description><![CDATA[Well, after some poking around I finally found some OID&#8217;s for the RSA&#8217;s (only through these two links: check_rsa_fan and check_rsa_temp). For Nagios, I dismissed the fans, since the fan speed is only passed on in percent values. So I only added this: define hostgroup{ hostgroup_name rsa-snmp alias Remote Supervisor Adapter (allowing SNMP connections) }]]></description>
			<content:encoded><![CDATA[<p>Well, after some poking around I finally found some OID&#8217;s for the RSA&#8217;s (only through these two links: <a href="http://www.monitoringexchange.org/inventory/Check-Plugins/Hardware/Server-%2528Manufacturer%2529/IBM/RSA---RSA-II-FAN-SPEED">check_rsa_fan</a> and <a href="http://www.monitoringexchange.org/inventory/Check-Plugins/Hardware/Server-%2528Manufacturer%2529/IBM/RSA---RSA-II-TEMPERATURE">check_rsa_temp</a>).</p>
<p>For Nagios, I dismissed the fans, since the fan speed is only passed on in percent values. So I only added this:</p>
<pre lang="text">define hostgroup{
  hostgroup_name                  rsa-snmp
  alias                           Remote Supervisor Adapter (allowing SNMP connections)
}

define service{
  use                             generic-perfdata

  check_command                   check_rsa_snmpv1_public!.1.3.6.1.4.1.2.3.51.1.2.1.2.1.1!45!60!°C!Temperature CPU0!
  hostgroup_name                  rsa-snmp
  service_description             TEMP CPU0
}

define service{
  use                             generic-perfdata

  check_command                   check_rsa_snmpv1_public!.1.3.6.1.4.1.2.3.51.1.2.1.2.2.1!45!60!°C!Temperature CPU1!
  hostgroup_name                  rsa-snmp
  service_description             TEMP CPU1
}

define service{
  use                             generic-perfdata

  check_command                   check_rsa_snmpv1_public!.1.3.6.1.4.1.2.3.51.1.2.1.5.1.0!29!35!°C!Temperature Ambient!
  hostgroup_name                  rsa-snmp
  service_description             TEMP AMBIENT
}</pre>
<p>Oh, and if anyone else is curious like me, here&#8217;s the list with the OID&#8217;s, courtesy of Gerhard Gschlad and  Leonardo Calamai.</p>
<p>For the fans:
<pre lang="text">Fan1: .1.3.6.1.4.1.2.3.51.1.2.3.1.0
Fan2: .1.3.6.1.4.1.2.3.51.1.2.3.2.0
Fan3: .1.3.6.1.4.1.2.3.51.1.2.3.3.0
Fan4: .1.3.6.1.4.1.2.3.51.1.2.3.4.0
Fan5: .1.3.6.1.4.1.2.3.51.1.2.3.5.0
Fan6: .1.3.6.1.4.1.2.3.51.1.2.3.6.0
Fan7: .1.3.6.1.4.1.2.3.51.1.2.3.7.0
Fan8: .1.3.6.1.4.1.2.3.51.1.2.3.8.0
Fan9: .1.3.6.1.4.1.2.3.51.1.2.3.9.0
Fan10: .1.3.6.1.4.1.2.3.51.1.2.3.10.0
Fan11: .1.3.6.1.4.1.2.3.51.1.2.3.11.0
Fan12: .1.3.6.1.4.1.2.3.51.1.2.3.12.0</pre>
<p>And for the temperatures:
<pre lang="text">CPU1: .1.3.6.1.4.1.2.3.51.1.2.1.2.1.1
CPU2: .1.3.6.1.4.1.2.3.51.1.2.1.2.2.1
CPU3: .1.3.6.1.4.1.2.3.51.1.2.1.2.3.1
CPU4: .1.3.6.1.4.1.2.3.51.1.2.1.2.4.1
Ambient: .1.3.6.1.4.1.2.3.51.1.2.1.5.1.0</pre>
<p>I just found a proper <a href="http://www.mibdepot.com/cgi-bin/getmib4.cgi?abc=0&#038;n=RSA-MIB&#038;r=ibm&#038;f=ibmrsaag.mib&#038;t=tree&#038;v=v1&#038;i=0&#038;obj=RSA-MIB">list of OID&#8217;s</a> for the IBM RSA adapter. That&#8217;s rather nice, since I really was looking for the OID&#8217;s for the VRM failure OID and other warning/critical events.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.barfoo.org/2009/04/01/nagios-snmp-oids-for-ibms-rsa-ii-adapter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nagios: check_snmp again</title>
		<link>http://blog.barfoo.org/2009/02/27/nagios-check_snmp-again/</link>
		<comments>http://blog.barfoo.org/2009/02/27/nagios-check_snmp-again/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 10:59:25 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[BladeCenter]]></category>
		<category><![CDATA[check_snmp]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://blog.barfoo.org/?p=1897</guid>
		<description><![CDATA[Well, today I had to grind my head again, regarding the way check_snmp handles WARNING and CRITICAL events. From my point of view, check_snmp is really just retarded sometimes. As you know, all the other plugins accept WARNING and CRITICAL-thresholds based on the calculation, if the return integer is above this threshold it reached WARNING/CRITICAL]]></description>
			<content:encoded><![CDATA[<p>Well, today I had to grind my head again, regarding the way check_snmp handles WARNING and CRITICAL events. From my point of view, check_snmp is really just retarded sometimes.</p>
<p>As you know, all the other plugins accept WARNING and CRITICAL-thresholds based on the calculation, if the return integer is above this threshold it reached WARNING/CRITICAL state. But check_snmp doesn&#8217;t play that way.</p>
<p>It expects only ranges, which are <strong>NOT</strong> gonna result in warning or critical events. Which is kinda stupid, since you gotta rethink twice about the thresholds <img src='http://blog.barfoo.org/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<pre lang="text">define service {
  use                   generic-service
  host_name             ibm-bc1-mgmt
  service_description   Chassis Cooling - Bay 1
  check_command         check_snmpv1_public!.1.3.6.1.4.1.2.3.51.2.2.3.20.0!\
                                            1900:8000!1900:0,10000:8000!\
                                            RPM!Chassis Cooling - Bay 1
  action_url            /pnp/index.php?host=$HOSTNAME$&#038;srv=$SERVICEDESC$
  notes                 View PNP RRD grap
}</pre>
<p>All in all, another lesson learned <img src='http://blog.barfoo.org/wp-includes/images/smilies/icon_surprised.gif' alt=':eek:' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.barfoo.org/2009/02/27/nagios-check_snmp-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nagios: NSclient++ in a clustered Environment</title>
		<link>http://blog.barfoo.org/2009/02/26/nagios-nsclient-in-a-clustered-environment/</link>
		<comments>http://blog.barfoo.org/2009/02/26/nagios-nsclient-in-a-clustered-environment/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 10:50:36 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[nsclient++]]></category>
		<category><![CDATA[safekeeping]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://blog.barfoo.org/?p=1880</guid>
		<description><![CDATA[Well, most of you already know that I&#8217;m a Nagios fanatic. I like to watch as many aspects as I possibly can. So, yesterday I started figuring out ways to watch our different cluster groups (housing a bunch &#8212; try above 20.000 &#8212; of file shares). Now, my first tries failed horribly. I brought down]]></description>
			<content:encoded><![CDATA[<p>Well, most of you already know that I&#8217;m a Nagios fanatic. I like to watch as many aspects as I possibly can. So, yesterday I started figuring out ways to watch our different cluster groups (housing a bunch &#8212; try above 20.000 &#8212; of file shares).</p>
<p>Now, my first tries failed horribly. I brought down a complete cluster group, resulting in a major annoyance. Now, today I went at it a bit smarter <img src='http://blog.barfoo.org/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  I cloned myself two VM&#8217;s off my <em>Windows Server 2003 Enterprise R2 template</em>, created a new cluster.</p>
<p>After that, I tried it on the test cluster again, same result. The resource is successfully created, but once I try to take it online, it breaks and moves the whole cluster group to the other node (as cyclic moving between the cluster nodes with no end).</p>
<p>After that, I figured something has to be wrong with the command I&#8217;m trying to use, the one as instructed by the <a href="http://nsclient.org/nscp/wiki/TipsAndTrick">NSClient++ wiki</a>. I then tried the command on the command line, but as soon as hitting &lt;TAB&gt; (oooold bash habit <img src='http://blog.barfoo.org/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  ), it completed the path, but put quotes around it &#8230; Don&#8217;t ask me.</p>
<p>If I try the path without the quotes, no-joy at all. Once you put quotes around it, everything becomes honky-dory and the resource comes online without the slightest trouble!</p>
<p><strong>Hint to self</strong>: When creating a NSClient++ cluster resource (or any application resource using a command that needs switches for that matter), use a quoted command line along the lines of this:</p>
<pre lang="text">"Q:\_nsclient\nsclient.exe" /test</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.barfoo.org/2009/02/26/nagios-nsclient-in-a-clustered-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nagios: Integrating Cisco switches</title>
		<link>http://blog.barfoo.org/2009/02/13/nagios-integrating-cisco-switches/</link>
		<comments>http://blog.barfoo.org/2009/02/13/nagios-integrating-cisco-switches/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 12:25:15 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[SNMP]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://blog.barfoo.org/?p=1763</guid>
		<description><![CDATA[Well, as I wrote recently, we received a new BladeCenter a few weeks back. Now, as we slowly take it into service I was interested in watching the utilization of the back planes as well as the CPU utilization of the Cisco Catalyst 3012 network switches. The first mistake I made, was to trust Cisco]]></description>
			<content:encoded><![CDATA[<p>Well, as I wrote recently, we received a new BladeCenter a few weeks back. Now, as we slowly take it into service I was interested in watching the utilization of the back planes as well as the CPU utilization of the Cisco Catalyst 3012 network switches.</p>
<p>The first mistake I made, was to trust Cisco with their guide about <a href="http://www.cisco.com/en/US/tech/tk389/tk816/technologies_tech_note09186a0080094a96.shtml">how to get the utilization from</a> <a href="http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a0080094a94.shtml">the device using SNMP</a>. They stated some OID&#8217;s, which I tried with <em>snmpwalk</em> and got a result from.</p>
<pre lang="bash">snmpwalk -v1 -c public -O n 10.0.0.35 .1.3.6.1.4.1.9.5.1.1.8
.1.3.6.1.4.1.9.5.1.1.8.0 = INTEGER: 0</pre>
<p>Now, as I tried retrieving the SNMP data by means of the <em>check_snmp</em> plugin, I got some flaky results:</p>
<pre lang="bash">/usr/lib/nagios/plugins/check_snmp -H 10.0.0.35 -C public \
                                   .1.3.6.1.4.1.9.5.1.1.8
SNMP problem - No data received from host
CMD: /usr/bin/snmpget -t 1 -r 5 -m '' -v 1 [authpriv] 10.0.0.35:161</pre>
<p>Those of you, who read the excerpts carefully will notice the difference between <em>snmpwalk</em> and the OID I passed on to <em>check_snmp</em>.</p>
<p>The point being, the OID&#8217;s Cisco gave in their Design tech notes are either old, or just not accurate at all. After passing on the <strong>.0</strong> to each value given by Cisco, the <em>check_snmp</em> is all honky dory and integrated into Nagios.</p>
<p>As usual, the Nagios definitions are further down, for those interested.<span id="more-1763"></span></p>
<pre lang="text">define host {
  use                   generic-network
  host_name             c3012-1
  alias                 c3012-1.home.barfoo.org
  address               10.0.0.35
  hostgroups            network
}

define service {
  use                   generic-service
  host_name             c3012-1
  service_description   SYS: Backplane utilization
  check_command         check_snmpv1_public!.1.3.6.1.4.1.9.5.1.1.8.0!60!80!\
                                            %!"Backplane utilization:"
  action_url            /pnp/index.php?host=$HOSTNAME$&#038;srv=$SERVICEDESC$
  notes                 View PNP RRD grap
}

define service {
  use                   generic-service
  host_name             c3012-1
  service_description   SYS: CPU utilization - 5sec
  check_command         check_snmpv1_public!.1.3.6.1.4.1.9.2.1.56.0!130!160!\
                                            %!"CPU utilization (5sec):"
  action_url            /pnp/index.php?host=$HOSTNAME$&#038;srv=$SERVICEDESC$
  notes                 View PNP RRD grap
}

define service {
  use                   generic-service
  host_name             c3012-1
  service_description   SYS: CPU utilization - 1min
  check_command         check_snmpv1_public!.1.3.6.1.4.1.9.2.1.57.0!80!95!\
                                            %!"CPU utilization (1min):"
  action_url            /pnp/index.php?host=$HOSTNAME$&#038;srv=$SERVICEDESC$
  notes                 View PNP RRD grap
}

define service {
  use                   generic-service
  host_name             c3012-1
  service_description   SYS: CPU utilization - 5min
  check_command         check_snmpv1_public!.1.3.6.1.4.1.9.2.1.58.0!35!60!\
                                            %!"CPU utilization (5min):"
  action_url            /pnp/index.php?host=$HOSTNAME$&#038;srv=$SERVICEDESC$
  notes                 View PNP RRD grap
}</pre>
<p>For now, the pnp4nagios graphing for the back plane utilization isn&#8217;t working (don&#8217;t ask me why). Also, it might be a good idea, to combine the CPU utilization commands into one, so you&#8217;d get a single graph out of it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.barfoo.org/2009/02/13/nagios-integrating-cisco-switches/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monitoring the IBM BladeCenter chassis with Nagios</title>
		<link>http://blog.barfoo.org/2009/02/10/monitoring-the-ibm-bladecenter-chassis-with-nagios/</link>
		<comments>http://blog.barfoo.org/2009/02/10/monitoring-the-ibm-bladecenter-chassis-with-nagios/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 11:40:00 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[IBM]]></category>
		<category><![CDATA[IBM BladeCenter H]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[safekeeping]]></category>
		<category><![CDATA[SNMP]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://blog.barfoo.org/?p=1729</guid>
		<description><![CDATA[Today I ended up working out the details on what we want to monitor regarding our BladeCenter. The most interesting details (for us that is) are these: Fan speeds for Chassis Cooling/Power Module Cooling Bay(s) Temperature Power Domain utilization It wasn&#8217;t *that* hard to implement. Only trouble(s) I ran into, were (1) IBM did a]]></description>
			<content:encoded><![CDATA[<p>Today I ended up working out the details on what we want to monitor regarding our BladeCenter. The most interesting details (for us that is) are these:</p>
<ul>
<li>Fan speeds for Chassis Cooling/Power Module Cooling Bay(s)</li>
<li>Temperature</li>
<li>Power Domain utilization</li>
</ul>
<p>It wasn&#8217;t *<strong>that</strong>* hard to implement. Only trouble(s) I ran into, were (<strong>1</strong>) IBM did a real shitty job with the <a href="http://www-947.ibm.com/systems/support/supportsite.wss/docdisplay?lndocid=MIGR-5078305&amp;brandind=5000020">MIB&#8217;s</a>. If you look closely into the mmblade.mib, you&#8217;re gonna notice, that not a single OID is specified for the events. (<strong>2</strong>) As the MIB&#8217;s weren&#8217;t documented anywhere, I had to look them up via <em>snmpwalk</em> (which I had never used before). So as a reminder (to myself), here&#8217;s how it is done:</p>
<pre lang="bash">snmpwalk -v1 -c public -O n 10.0.0.35 .1.3.6.1.4.1.2.3.51.2.2</pre>
<p>This will get you a list, with a lot of output (5154 lines to be exact). Lucky me, the web interface of the management module/ssh interface is rather verbose, so all you need to do is compare those values with what you are looking for.</p>
<p>So for myself (and anyone interested) read ahead for the list of checks we are currently running on the management module.<span id="more-1729"></span></p>
<pre lang="bash">define command {
  command_name      check_snmpv1
  command_line      /usr/lib/nagios/plugins/check_snmp -C public \
                             -H $HOSTADDRESS$ -o $ARG1$ -w $ARG2$ \
                             -c $ARG3$ -l $ARG5$ -u $ARG4$
}

define host {
  use                   generic-network
  host_name             bc-mgmt1
  alias                 bc-mgmt1.home.barfoo.org
  address               10.0.0.35
  parents               uni-greif-05
}

define service {
  use                   generic-service
  host_name             bc-mgmt1
  service_description   Temperature
  check_command         check_snmpv1!.1.3.6.1.4.1.2.3.51.2.2.1.5.1.0!\
                                  33!38!C!Input temperature
  action_url            /pnp/index.php?host=$HOSTNAME$&#038;srv=$SERVICEDESC$
  notes                 View PNP RRD grap
}

define service {
  use                   generic-service
  host_name             bc-mgmt1
  service_description   Chassis Cooling - Bay 1
  check_command         check_snmpv1!.1.3.6.1.4.1.2.3.51.2.2.3.20.0!\
                                  1600:1200,2100:2600!1200:0,2600:3000!RPM!\
                                  Chassis Cooling - Bay 1
  action_url            /pnp/index.php?host=$HOSTNAME$&#038;srv=$SERVICEDESC$
  notes                 View PNP RRD grap
}

define service {
  use                   generic-service
  host_name             bc-mgmt1
  service_description   Chassis Cooling - Bay 2
  check_command         check_snmpv1!.1.3.6.1.4.1.2.3.51.2.2.3.21.0!\
                                  1600:1200,2100:2600!1200:0,2600:3000!RPM!\
                                  Chassis Cooling - Bay 2
  action_url            /pnp/index.php?host=$HOSTNAME$&#038;srv=$SERVICEDESC$
  notes                 View PNP RRD grap
}

define service {
  use                   generic-service
  host_name             bc-mgmt1
  service_description   Power Module Cooling - Bay 1
  check_command         check_snmpv1!.1.3.6.1.4.1.2.3.51.2.2.6.1.1.6.1!\
                                  6200:5400,6700:7000!5300:0,7000:7500!RPM!\
                                  Power Module Cooling - Bay 1
  action_url            /pnp/index.php?host=$HOSTNAME$&#038;srv=$SERVICEDESC$
  notes                 View PNP RRD grap
}

define service {
  use                   generic-service
  host_name             bc-mgmt1
  service_description   Power Module Cooling - Bay 1 Fans
  check_command         check_snmpv1!.1.3.6.1.4.1.2.3.51.2.2.6.1.1.4.1!\
                                  2:1!1:0!Fans present!\
                                  Power Module Cooling - Bay 1
  action_url            /pnp/index.php?host=$HOSTNAME$&#038;srv=$SERVICEDESC$
  notes                 View PNP RRD grap
}

define service {
  use                   generic-service
  host_name             bc-mgmt1
  service_description   Power Module Cooling - Bay 2
  check_command         check_snmpv1!.1.3.6.1.4.1.2.3.51.2.2.6.1.1.6.2!\
                                  6200:5400,6700:7000!5300:0,7000:7500!RPM!\
                                  Power Module Cooling - Bay 2
  action_url            /pnp/index.php?host=$HOSTNAME$&#038;srv=$SERVICEDESC$
  notes                 View PNP RRD grap
}

define service {
  use                   generic-service
  host_name             bc-mgmt1
  service_description   Power Module Cooling - Bay 2 Fans
  check_command         check_snmpv1!.1.3.6.1.4.1.2.3.51.2.2.6.1.1.4.2!\
                                  2:1!1:0!Fans present!\
                                  Power Module Cooling - Bay 2
  action_url            /pnp/index.php?host=$HOSTNAME$&#038;srv=$SERVICEDESC$
  notes                 View PNP RRD grap
}

define service {
  use                   generic-service
  host_name             bc-mgmt1
  service_description   Power Module Cooling - Bay 3
  check_command         check_snmpv1!.1.3.6.1.4.1.2.3.51.2.2.6.1.1.6.3!\
                                  6200:5400,6700:7000!5300:0,7000:7500!RPM!\
                                  Power Module Cooling - Bay 3
  action_url            /pnp/index.php?host=$HOSTNAME$&#038;srv=$SERVICEDESC$
  notes                 View PNP RRD grap
}

define service {
  use                   generic-service
  host_name             bc-mgmt1
  service_description   Power Module Cooling - Bay 3 Fans
  check_command         check_snmpv1!.1.3.6.1.4.1.2.3.51.2.2.6.1.1.4.3!\
                                  2:1!1:0!Fans present!\
                                  Power Module Cooling - Bay 3
  action_url            /pnp/index.php?host=$HOSTNAME$&#038;srv=$SERVICEDESC$
  notes                 View PNP RRD grap
}

define service {
  use                   generic-service
  host_name             bc-mgmt1
  service_description   Power Module Cooling - Bay 4
  check_command         check_snmpv1!.1.3.6.1.4.1.2.3.51.2.2.6.1.1.6.2!\
                                  6200:5400,6700:7000!5300:0,7000:7500!RPM!\
                                  Power Module Cooling - Bay 4
  action_url            /pnp/index.php?host=$HOSTNAME$&#038;srv=$SERVICEDESC$
  notes                 View PNP RRD grap
}

define service {
  use                   generic-service
  host_name             bc-mgmt1
  service_description   Power Module Cooling - Bay 4 Fans
  check_command         check_snmpv1!.1.3.6.1.4.1.2.3.51.2.2.6.1.1.4.2!\
                                  2:1!1:0!Fans present!\
                                  Power Module Cooling - Bay 4
  action_url            /pnp/index.php?host=$HOSTNAME$&#038;srv=$SERVICEDESC$
  notes                 View PNP RRD grap
}

define service {
  use                   generic-service
  host_name             bc-mgmt1
  service_description   Power Domain 1: Utilization
  check_command         check_snmpv1!.1.3.6.1.4.1.2.3.51.2.2.10.1.1.1.10.1!\
                                  2600:2400!2880:2600!W!\
                                  Power Domain 1: Utilization
  action_url            /pnp/index.php?host=$HOSTNAME$&#038;srv=$SERVICEDESC$
  notes                 View PNP RRD grap
}

define service {
  use                   generic-service
  host_name             bc-mgmt1
  service_description   Power Domain 2: Utilization
  check_command         check_snmpv1!.1.3.6.1.4.1.2.3.51.2.2.10.1.1.1.10.2!\
                                  2600:2400!2880:2600!W!\
                                  Power Domain 2: Utilization
  action_url            /pnp/index.php?host=$HOSTNAME$&#038;srv=$SERVICEDESC$
  notes                 View PNP RRD grap
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.barfoo.org/2009/02/10/monitoring-the-ibm-bladecenter-chassis-with-nagios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Opsview installation reviewed</title>
		<link>http://blog.barfoo.org/2009/01/21/opsview-installation-reviewed/</link>
		<comments>http://blog.barfoo.org/2009/01/21/opsview-installation-reviewed/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 09:25:44 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[opsview]]></category>
		<category><![CDATA[SLES10]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://blog.barfoo.org/?p=1599</guid>
		<description><![CDATA[Well, I recently (well, yesterday) built the opsview RPM&#8217;s for SLES10, and started fiddeling about with it today. Alex &#8220;recommended&#8221; I should rather look at Opsview instead of Centreon, but boy was there a surprise waiting for me &#8230; Opsview has the advantage that it at least lets you use the package manager. But, it]]></description>
			<content:encoded><![CDATA[<p>Well, I recently (well, yesterday) built the <a href="http://blog.barfoo.org/2009/01/21/building-opsview-for-suse-linux-enterprise-10/">opsview RPM&#8217;s for SLES10</a>, and started fiddeling about with it today. Alex &#8220;<em>recommended</em>&#8221; I should rather look at Opsview instead of Centreon, but boy was there a surprise waiting for me &#8230;</p>
<p>Opsview has the advantage that it at least lets you use the package manager. But, it also needs <strong>*a lot*</strong> of handy work (just like Centreon, which I really dislike since it&#8217;s real error prone).</p>
<p>I started doing the setup, but gave up halfway through &#8230; <img src='http://blog.barfoo.org/wp-includes/images/smilies/icon_exclaim.gif' alt=':!:' class='wp-smiley' />  Dude, and they expect people to pay money for training ?!?</p>
<p>I mean, come on .. you can do a better job at making this thing fit a bit better into the system, and even make the install a bit more straight forward.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.barfoo.org/2009/01/21/opsview-installation-reviewed/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Nagios and check_ram yet again</title>
		<link>http://blog.barfoo.org/2008/11/14/nagios-and-check_ram-yet-again/</link>
		<comments>http://blog.barfoo.org/2008/11/14/nagios-and-check_ram-yet-again/#comments</comments>
		<pubDate>Fri, 14 Nov 2008 17:08:30 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[check_ram]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[RPM]]></category>

		<guid isPermaLink="false">http://blog.barfoo.org/?p=1247</guid>
		<description><![CDATA[As some people know, I previously &#8220;created&#8221; (mostly modified the check_swap plug-in to print RAM usage) check_ram in C. Now one of my problems for the past few months was putting the C plug-in as well as &#8220;supported&#8221; environment under the same hat. Today I had another look at the amount of available plug-ins in]]></description>
			<content:encoded><![CDATA[<p>As some people know, I previously &#8220;<em>created</em>&#8221; (mostly modified the check_swap plug-in to print RAM usage) check_ram in C. Now one of my problems for the past few months was putting the C plug-in as well as &#8220;<em>supported</em>&#8221; environment under the same hat. Today I had another look at the amount of available plug-ins in <a href="http://www.monitoringexchange.org/search?query=check_ram">NagiosExchange</a>. There are quite a few plug-ins available, but as I do have some experience with Python, I used the one <a href="http://www.monitoringexchange.org/inventory/Check-Plugins/Operating-Systems/Linux/Check_Ram-on-Linux-32-bit-and-64-bit-systems">written in Python</a>.</p>
<p>It was rather easy hacking in support for performance data into it, as the below shows. Someone else already posted a non-unified diff for performance data support, but that ain&#8217;t quite right according to the <a href="http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN203">Nagios plug-in development guidelines</a>.</p>
<p><span id="more-1247"></span></p>
<pre lang="diff">
--- check_ram.py.orig
+++ check_ram.py
@@ -1,6 +1,7 @@
 #!/usr/bin/env python
 #
 #   Copyright Hari Sekhon 2007
+#   Copyright Christian Heim 2008
 #
 #   This program is free software; you can redistribute it and/or modify
 #   it under the terms of the GNU General Public License as published by
@@ -64,27 +65,30 @@
     total_used_megs = float(memtotal-memfree) / 1024
     total_free_megs = float(total_free) / 1024
     memtotal_megs   = float(memtotal) / 1024
+
+    total_warning_threshold_megs = round(float(memtotal) * float(warning_threshold) / 100 / 1024)
+    total_critical_threshold_megs = round(float(memtotal) * float(critical_threshold) / 100 / 1024)

     if percent == True:
         percentage_free = int( float(total_free) / float(memtotal) * 100 )
         if percentage_free < critical_threshold:
-            print "RAM CRITICAL: %d%% ram free (%d/%d MB used)" % (percentage_free,total_used_megs,memtotal_megs)
+            print "RAM CRITICAL - %d%% free (%d MB out of %d MB) |ram=%dMB;%d;%d;0;%d" % (percentage_free,total_free_megs,memtotal_megs,total_free_megs,total_warning_threshold_megs,total_critical_threshold_megs,memtotal_megs)
             return CRITICAL
         elif percentage_free < warning_threshold:
-            print "RAM WARNING: %d%% ram free (%d/%d MB used)" % (percentage_free,total_used_megs,memtotal_megs)
+            print "RAM WARNING - %d%% free (%d MB out of %d MB) |ram=%dMB;%d;%d;0;%d" % (percentage_free,total_free_megs,memtotal_megs,total_free_megs,total_warning_threshold_megs,total_critical_threshold_megs,memtotal_megs)
             return WARNING
         else:
-            print "RAM OK: %d%% ram free" % percentage_free
+            print "RAM OK - %d%% free (%d MB out of %d MB) |ram=%dMB;%d;%d;0;%d" % (percentage_free,total_free_megs,memtotal_megs,total_free_megs,total_warning_threshold_megs,total_critical_threshold_megs,memtotal_megs)
             return OK
     else:
         if total_free < critical_threshold:
-            print "RAM CRITICAL: %dMB ram free (%d/%d MB used)" % (total_free_megs,total_used_megs,memtotal_megs)
+            print "RAM CRITICAL - %d%% free (%d MB out of %d MB) |ram=%dMB;%d;%d;0;%d" % (percentage_free,total_free_megs,memtotal_megs,total_free_megs,total_warning_threshold_megs,total_critical_threshold_megs,memtotal_megs)
             return CRITICAL
         if total_free < warning_threshold:
-            print "RAM WARNING: %dMB ram free (%d/%d MB used)" % (total_free_megs,total_used_megs,memtotal_megs)
+            print "RAM WARNING - %d%% free (%d MB out of %d MB) |ram=%dMB;%d;%d;0;%d" % (percentage_free,total_free_megs,memtotal_megs,total_free_megs,total_warning_threshold_megs,total_critical_threshold_megs,memtotal_megs)
             return WARNING
         else:
-            print "RAM OK: %dMB ram free" % (total_free_megs)
+            print "RAM OK - %d%% free (%d MB out of %d MB) |ram=%dMB;%d;%d;0;%d" % (percentage_free,total_free_megs,memtotal_megs,total_free_megs,total_warning_threshold_megs,total_critical_threshold_megs,memtotal_megs)

             return OK
</pre>
<p>Now, with that simple plug-in I can go ahead and package the thing <a href="http://distributions.barfoo.org/SLES10/noarch/nagios-plugins-ram-0.1-1.0.noarch.rpm">separately</a>, without the need to figure out a way to get them nagios-plugins to install some useful includes ...</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.barfoo.org/2008/11/14/nagios-and-check_ram-yet-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MessPC Ethernetbox 2 and Nagios</title>
		<link>http://blog.barfoo.org/2008/10/24/messpc-ethernetbox-2-and-nagios/</link>
		<comments>http://blog.barfoo.org/2008/10/24/messpc-ethernetbox-2-and-nagios/#comments</comments>
		<pubDate>Fri, 24 Oct 2008 19:12:39 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[check_pcmeasure]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://blog.barfoo.org/?p=886</guid>
		<description><![CDATA[As I talked to Tobi yesterday, we came to talk about our Ethernet Box thermometer. It&#8217;s a neat device, which works pretty much out of the box. Integrating it with Nagios is a bit of a bummer. That&#8217;s what the ~300 EUR box looks like. It&#8217;s basically a small black box with a RJ45 jack,]]></description>
			<content:encoded><![CDATA[<p>As I talked to Tobi yesterday, we came to talk about our Ethernet Box thermometer. It&#8217;s a neat device, which works pretty much out of the box. Integrating it with Nagios is a bit of a bummer.</p>
<div id="attachment_881" class="wp-caption aligncenter" style="width: 244px"><a title="Ethernetbox 2" rel="lightbox2" href="http://blog.barfoo.org/wp-content/uploads/2008/08/img_1524.jpg"><img class="size-medium wp-image-881" title="Ethernetbox 2" src="http://blog.barfoo.org/wp-content/uploads/2008/08/img_1524-500x333.jpg" alt="Ethernetbox 2" width="234" height="156" /></a><p class="wp-caption-text">Ethernet box 2</p></div>
<p>That&#8217;s what the ~300 EUR box looks like. It&#8217;s basically a small black box with a RJ45 jack, and four RJ11 jacks for attached external devices. The box itself only functions as a &#8220;<em>management station</em>&#8221; and doesn&#8217;t come with a sensor.<br />
Normally, you can attach up till four RJ11 sensors to it. But, MessPC also has RJ11 port splitters, which enables you to attach up to eight RJ11 sensors to the MessPC.</p>
<div id="attachment_885" class="wp-caption aligncenter" style="width: 280px"><a href="http://blog.barfoo.org/wp-content/uploads/2008/08/img_1524_rj45_jacks.png"><img class="size-thumbnail wp-image-885" title="Thermometer RJ45 jacks" src="http://blog.barfoo.org/wp-content/uploads/2008/08/img_1524_rj45_jacks-450x232.png" alt="Thermometer RJ45 jacks" width="270" height="139" /></a><p class="wp-caption-text">Thermometer RJ45 jacks</p></div>
<p>As you can see, the box has a RJ45 jack on the other side, which you basically hook up to your network and then configure an IP address (or if you fancy DHCP for those things, it&#8217;s possible too).</p>
<div id="attachment_884" class="wp-caption aligncenter" style="width: 280px"><a href="http://blog.barfoo.org/wp-content/uploads/2008/08/img_1524_rj11_jacks.png"><img class="size-thumbnail wp-image-884" title="Thermometer RJ11 jacks" src="http://blog.barfoo.org/wp-content/uploads/2008/08/img_1524_rj11_jacks-450x232.png" alt="Thermometer RJ11 jacks" width="270" height="139" /></a><p class="wp-caption-text">Thermometer RJ11 jacks</p></div>
<p>On the opposite site, are the RJ11 jacks for the sensors. As you can see, we currently do have 4 splitters attachted to the box, enabling up till 8 sensors to be measured.<br />
Once you have it up and running, you can look at the web interface and you&#8217;ll be able to see the state of the sensors right on the first page.<br />
<span id="more-886"></span><br />
Now, if you have a Nagios installation (like I do), you might want to integrate the Ethernetbox with Nagios.<br />
You do have two choices: either do the checking by means of SNMP but forego graphing by Nagios, or use <em><a href="http://linux.swobspace.net/projects/nagios-en/pcmeasure.html">check_pcmeasure</a></em> and use the full features of your Nagios installation (read: graphing done by <a href="http://www.pnp4nagios.org/">pnp4nagios</a>).<br />
As I recently updated our Nagios installation to 3.0.4, I ran into trouble with the pcmeasure plugin. It simply didn&#8217;t run with the embedded perl (which it should, but apparently became a bit stricter between 2.x and 3.x). So I went ahead and <a href="http://blog.barfoo.org/wp-content/uploads/2008/08/check_pcmeasure.pl">changed it</a>, so it would run with embedded perl, as I was in the mood.<br />
After that was done, I simply dumped it into <em>/usr/lib/nagios/plugins</em> on my nagios box,<br />
created a <em>/etc/nagios/objects/commands/etherbox.cfg</em> containing the necessary command definition:</p>
<pre lang="bash"># 'check_ethernetbox' command definition
define command{
        command_name    check_ethernetbox
        command_line    /usr/lib/nagios/plugins/check_pcmeasure.pl -H $HOSTADDRESS$ -S $ARG1$ -W $ARG2$ -C $ARG3$
}</pre>
<div id="attachment_1235" class="wp-caption aligncenter" style="width: 510px"><a href="http://blog.barfoo.org/wp-content/uploads/2008/10/nagios-service-view.png"><img class="size-medium wp-image-1235" title="Nagios Service Detail" src="http://blog.barfoo.org/wp-content/uploads/2008/10/nagios-service-view-500x31.png" alt="Nagios Service Detail" width="500" height="31" /></a><p class="wp-caption-text">Nagios Service Detail</p></div>
<p>Now we can go ahead and *really* integrate it into Nagios, by simply creating a host utilizing this command definition.</p>
<pre lang="bash">define host {
  use                   generic-network
  host_name             ethernetbox
  alias                 ethernetbox.home.barfoo.org
  address               10.0.0.9
  parents               home-0
}

define service {
  use                   generic-service
  host_name             ethernetbox
  service_description   1.1: Aussentemperatur
  check_command         check_ethernetbox!com1.1!29.0!35.0!
  action_url            /pnp/index.php?host=$HOSTNAME$&amp;srv=$SERVICEDESC$
  notes                 View PNP RRD grap
}

define service {
  use                   generic-service
  host_name             ethernetbox
  service_description   1.2: Druckfussboden
  check_command         check_ethernetbox!com1.2!16.0!19.0!
  action_url            /pnp/index.php?host=$HOSTNAME$&amp;srv=$SERVICEDESC$
  notes                 View PNP RRD grap
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.barfoo.org/2008/10/24/messpc-ethernetbox-2-and-nagios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Suspected NRPE weirdness</title>
		<link>http://blog.barfoo.org/2008/08/10/suspected-nrpe-weirdness/</link>
		<comments>http://blog.barfoo.org/2008/08/10/suspected-nrpe-weirdness/#comments</comments>
		<pubDate>Sun, 10 Aug 2008 07:55:28 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[NRPE]]></category>

		<guid isPermaLink="false">http://blog.barfoo.org/?p=874</guid>
		<description><![CDATA[Well, I just noticed a really weird thing, when you have command line arguments enabled. Here&#8217;s a snippet from my nrpe.cfg: dont_blame_nrpe=1 command[check_disk]=/usr/lib/nagios/plugins/check_disk -E -w $ARG1$ -c $ARG2$ -p $ARG3$ Now, if you&#8217;d check the free space for the root, it ain&#8217;t gonna show any inode percentage (that one isn&#8217;t what I&#8217;m talking about). But]]></description>
			<content:encoded><![CDATA[<p>Well, I just noticed a really weird thing, when you have command line arguments enabled.</p>
<p>Here&#8217;s a snippet from my <em>nrpe.cfg</em>:</p>
<pre lang="bash" line="1">dont_blame_nrpe=1
command[check_disk]=/usr/lib/nagios/plugins/check_disk -E -w $ARG1$ -c $ARG2$ -p $ARG3$</pre>
<p>Now, if you&#8217;d check the free space for the root, it ain&#8217;t gonna show any inode percentage (that one isn&#8217;t what I&#8217;m talking about). But if you have to use bind mounts like I do (Tivoli needs a separate &#8220;<em>domain</em>&#8221; &#8212; that is a separate mount point for each domain), you might wanna check the free space on the <strong>*real*</strong> device, rather than the free space on the bind mount (which is gonna show you the free space of the parent file system &#8211; in my case the root fs).</p>
<p>Let&#8217;s take a look at what I&#8217;m talking about. If you use the check_disk locally like this:</p>
<pre lang="text" line="1"># ./check_disk -w 20% -c 10% -p /apache/
DISK OK - free space: /apache 11090 MB (36% inode=36%);| /apache=19629MB;24575;27647;0;30719</pre>
<p>Means, everything is okay, you have to pass the extra trailing slash to the <em>&#8211;partition</em> argument, as otherwise it would pick up the bind mount at /backup.</p>
<p>Now, if we do the above by means of NRPE, that&#8217;s gonna get you a different result. As I showed above, I have the <em><strong>check_disk</strong></em> command in my <em>nrpe.cfg</em>, I also specifically enabled command arguments during compile time.</p>
<pre lang="text" line="1"># ./check_nrpe -H nagios.home.barfoo.org -c check_disk -a 20% 5% /apache/
DISK CRITICAL: /apache/ not found</pre>
<p>Now, why the hell isn&#8217;t it picking up the <strong>*original*</strong> mount point of the file system ? Guess why &#8230; Because I added <em>-E</em> to the command, because it didn&#8217;t use the original mount point but rather the bind mount in /backup. Removing the <em>-E</em> and it picks up the <strong>*original*</strong> mount point without any trouble <strong>*shrug*</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.barfoo.org/2008/08/10/suspected-nrpe-weirdness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nagios 3 and hostgroup inheritance</title>
		<link>http://blog.barfoo.org/2008/08/08/nagios-3-and-hostgroup-inheritance/</link>
		<comments>http://blog.barfoo.org/2008/08/08/nagios-3-and-hostgroup-inheritance/#comments</comments>
		<pubDate>Fri, 08 Aug 2008 12:24:01 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[hostgroup_members]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[Nagios 3]]></category>

		<guid isPermaLink="false">http://blog.barfoo.org/?p=850</guid>
		<description><![CDATA[As I wrote some time ago, I was trying to utilize Nagios 3.x&#8217;s neat feature of &#8220;nested&#8221; hostgroups. Well, as it turned out I thought it worked differently; basically like this: define hostgroup { hostgroup_name a-parent-hostgroup alias Our toplevel parent hostgroup } define service { use generic-service check_command check_dummy!0! service_description SSH hostgroup_name a-parent-hostgroup } define]]></description>
			<content:encoded><![CDATA[<p>As I wrote some <a href="http://blog.barfoo.org/2008/07/17/nagios-hostgroup-inheritance/">time</a> <a href="http://blog.barfoo.org/2008/07/19/nagios-hostgroup-inheritance-continued/">ago</a>, I was trying to utilize Nagios 3.x&#8217;s neat feature of &#8220;<em>nested</em>&#8221; hostgroups. Well, as it turned out I thought it worked differently; basically like this:</p>
<pre lang="text" line="1">define hostgroup {
        hostgroup_name      a-parent-hostgroup
        alias               Our toplevel parent hostgroup
}

define service {
       use                  generic-service
       check_command        check_dummy!0!
       service_description  SSH
       hostgroup_name       a-parent-hostgroup
}

define hostgroup {
        hostgroup_name      a-child-hostgroup
        hostgroup_members   a-parent-hostgroup
        alias               Our child hostgroup
}

define service {
       use                  generic-service
       check_command        check_dummy!0!
       service_description  LOAD
       hostgroup_name       a-child-hostgroup
}</pre>
<p>As you can cleary see on line 14, I thought you define the relation between two hostgroups in the child hostgroup. The problem with it was basically (as I said in the earlier posts), that all the services defined for the child hostgroups are handed on upwards to the parent hostgroup(s).</p>
<p>But after talking to <a href="http://blog.scherbaum.info/">Tobi</a>, I quickly found out, that the relation is in fact defined within the parent hostgroup. So if you simply put <em>hostgroup_members</em> within the <strong>parent hostgroup</strong> and define all child hostgroups which should inherit from the parent one, you should be just fine.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.barfoo.org/2008/08/08/nagios-3-and-hostgroup-inheritance/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Nagios Hostgroup Inheritance (continued)</title>
		<link>http://blog.barfoo.org/2008/07/19/nagios-hostgroup-inheritance-continued/</link>
		<comments>http://blog.barfoo.org/2008/07/19/nagios-hostgroup-inheritance-continued/#comments</comments>
		<pubDate>Sat, 19 Jul 2008 09:41:21 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[hostgroup_members]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[Nagios 3]]></category>
		<category><![CDATA[SLES10]]></category>

		<guid isPermaLink="false">http://blog.barfoo.org/?p=561</guid>
		<description><![CDATA[Well, it turns out that my thought was ultimativly flawed. When defining the hostgroup_members in the lower tiers, nagios is association the checks from the lower tier with the upper tiers. Thus propagandating all checks upwards, and me ending up with ~250 checks instead of ~150. Gonna have to try to define the dependency backwards,]]></description>
			<content:encoded><![CDATA[<p>Well, it turns out that <a href="http://blog.barfoo.org/2008/07/17/nagios-hostgroup-inheritance/">my thought</a> was ultimativly flawed. When defining the <em><a href="http://nagios.sourceforge.net/docs/3_0/objectdefinitions.html#hostgroup">hostgroup_members</a></em> in the lower tiers, nagios is association the checks from the lower tier with the upper tiers. Thus propagandating all checks upwards, and me ending up with ~250 checks instead of ~150.</p>
<p>Gonna have to try to define the dependency backwards, maybe that&#8217;ll help. But that&#8217;s a topic for Monday. Guess I&#8217;ll finish viewing Ghost in the Shell &#8211; Stand Alone Complex first.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.barfoo.org/2008/07/19/nagios-hostgroup-inheritance-continued/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Nagios Hostgroup Inheritance</title>
		<link>http://blog.barfoo.org/2008/07/17/nagios-hostgroup-inheritance/</link>
		<comments>http://blog.barfoo.org/2008/07/17/nagios-hostgroup-inheritance/#comments</comments>
		<pubDate>Thu, 17 Jul 2008 19:18:20 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[hostgroup_members]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[Nagios 3]]></category>
		<category><![CDATA[SLES10]]></category>

		<guid isPermaLink="false">http://blog.barfoo.org/?p=519</guid>
		<description><![CDATA[As I wrote earlier, I recently virtualized our nagios. Along with that came a complete &#8220;redesign&#8221; of how checks are applied. Up till now, I defined checks for each and every single server, thus ending up with ~25 files, each holding roughly 6 checks which are in the same file just sorted by hostname. As]]></description>
			<content:encoded><![CDATA[<p>As I wrote earlier, I recently <a href="http://blog.barfoo.org/2008/07/15/nagios-virtualization/">virtualized our nagios</a>. Along with that came a complete &#8220;<em>redesign</em>&#8221; of how checks are applied. Up till now, I defined checks for each and every single server, thus ending up with ~25 files, each holding roughly 6 checks which are in the same file just sorted by hostname.</p>
<p>As you can imagine, it gets quite confusing with that amount of checks (~150). So the last two days I spent on reorganizing (with Visio), on which object/hostgroup placing a check would make sense. Now, this is my first result of two days planning, reorganizing, reordering and moving hosts into different hostgroups.</p>
<p style="text-align: center;">
<div id="attachment_755" class="wp-caption aligncenter" style="width: 510px"><a title="Nagios Hostgroup Inheritance - Linux" rel="lightbox2[nagios_hostgroup_inheritance]" href="http://blog.barfoo.org/wp-content/uploads/2008/08/nagios-hostgruppen-abh__ngigkeiten-linux.png"><img class="size-medium wp-image-755" title="Nagios Hostgroup Inheritance - Linux" src="http://blog.barfoo.org/wp-content/uploads/2008/08/nagios-hostgruppen-abh__ngigkeiten-linux-500x323.png" alt="Nagios Hostgroup Inheritance - Linux" width="500" height="323" /></a><p class="wp-caption-text">Nagios Hostgroup Inheritance - Linux</p></div>
<p style="text-align: center;">
<div id="attachment_758" class="wp-caption aligncenter" style="width: 510px"><a title="Nagios Hostgroup Inheritance - Windows" rel="lightbox2[nagios_hostgroup_inheritance]" href="http://blog.barfoo.org/wp-content/uploads/2008/08/nagios-hostgruppen-abh__ngigkeiten-windows.png"><img class="size-medium wp-image-758" title="Nagios Hostgroup Inheritance - Windows" src="http://blog.barfoo.org/wp-content/uploads/2008/08/nagios-hostgruppen-abh__ngigkeiten-windows-500x353.png" alt="Nagios Hostgroup Inheritance - Windows" width="500" height="353" /></a><p class="wp-caption-text">Nagios Hostgroup Inheritance - Windows</p></div>
<p>Thanks to Josh (and Chris I think), realizing the above is gonna get quite easy. Gonna talk about the config layout itself about once I have it all wrapped up. Stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.barfoo.org/2008/07/17/nagios-hostgroup-inheritance/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Nagios virtualization</title>
		<link>http://blog.barfoo.org/2008/07/15/nagios-virtualization/</link>
		<comments>http://blog.barfoo.org/2008/07/15/nagios-virtualization/#comments</comments>
		<pubDate>Tue, 15 Jul 2008 09:46:13 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Nagios]]></category>

		<guid isPermaLink="false">http://blog.barfoo.org/?p=513</guid>
		<description><![CDATA[As virtualization seems to be a trendy thing to do, I went ahead and virtualized our nagios (while reinstalling the whole thing &#8230;). Now as I went into work today and started my email client, I received 4 nagios warnings about a LOAD service reaching critical state. Looked at the nagios box itself, opened up]]></description>
			<content:encoded><![CDATA[<p>As virtualization seems to be a trendy thing to do, I went ahead and virtualized our nagios (while reinstalling the whole thing &#8230;).</p>
<p>Now as I went into work today and started my email client, I received 4 nagios warnings about a LOAD service reaching critical state. Looked at the nagios box itself, opened up the VM console, looked into the syslog. Nothing.</p>
<p>Yet over 3/4 of the services were flapping, some ping checks were critical (for whatever reason). So I opened the nagios webinterface again, and noticed it dropping the connection over and over again (had to reauthentificate me again and again).</p>
<p>So I opened up Putty, which established the connection without a single problem, but dropped me like a stone after a short amount of time. I restarted the session and got a security warning from Putty (due to different than the saved sshd public key). That raised my suspicion. So I took a look at the hostname, and lookie there.</p>
<p>Somehow my old nagios box (which is a physical box), got turned online again, thus having the same IP address as my virtualized one. So the virtualized nagios wasn&#8217;t really dropping my connection, but I was being directed to the old nagios.</p>
<p>Walked over into the data center, turned of the old box (well, I kept the power button pressed for a short time), and away went my troubles.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.barfoo.org/2008/07/15/nagios-virtualization/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Nagios3 with Active Directory authorization on SLES10</title>
		<link>http://blog.barfoo.org/2008/07/14/nagios3-with-active-directory-authorization-on-sles10/</link>
		<comments>http://blog.barfoo.org/2008/07/14/nagios3-with-active-directory-authorization-on-sles10/#comments</comments>
		<pubDate>Mon, 14 Jul 2008 17:32:04 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[SLES10]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://blog.barfoo.org/?p=494</guid>
		<description><![CDATA[Well, it seems to be getting a &#8220;trend&#8221; for me, to integrate stuff into our Active Directory. Now that I know why, and how easy that is, I expect to add more stuff. The good thing about the integration is, that you only need to maintain a single source for authorization. The bad thing about]]></description>
			<content:encoded><![CDATA[<p>Well, it seems to be getting a &#8220;trend&#8221; for me, to integrate stuff into our Active Directory. Now that I know why, and how easy that is, I expect to add more stuff. The good thing about the integration is, that you only need to maintain a single source for authorization.</p>
<p>The bad thing about that is, that stuff becomes dependant on the Active Directory (we do have four domain controllers, so that should be fine).</p>
<p>Now, here&#8217;s the ssl-(only) apache2 configuration file for my vhost:</p>
<pre lang="apache">
<VirtualHost *:80>

  ## mod_core
  DocumentRoot "/usr/share/nagios"

  ServerName nagios.barfoo.org
  ServerAlias nagios3.barfoo.org
  ServerAdmin nagiosadmin@barfoo.org

  ## mod_rewrite
  RewriteEngine On
  RewriteRule ^/(.*)         https://nagios.barfoo.org/$1 [L,R]

</VirtualHost>

<VirtualHost *:443>

  ## mod_core
  DocumentRoot "/usr/share/nagios"

  ServerName nagios.barfoo.org
  ServerAdmin nagiosadmin@barfoo.org

  ScriptAlias /nagios/cgi-bin /usr/lib/nagios/cgi
  Alias /nagios /usr/share/nagios
  Alias /pnp /usr/share/nagios/html/pnp4nagios

  <DirectoryMatch "/usr/(share/nagios|lib/nagios/cgi)">
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 10.0.0.
    Options None

    # Authorization
    AuthType Basic
    AuthName "Nagios Barfoo"

    # The authentification provider is mod_ldap
    AuthBasicProvider ldap

    # mod_ldap is our *only* authentification provider for this!
    AuthzLDAPAuthoritative on

    # Redirect the userfile requests to /dev/null
    AuthUserFile /dev/null

    # AD requires an authentication DN to access any records
    AuthLDAPBindDN "BARFOO\\ldap_nagios"
    AuthLDAPBindPassword "somethingrandom"

    # The URL to search in
    AuthLDAPURL "ldap://dc0.barfoo.org dc1.barfoo.org dc2.barfoo.org dc3.barfoo.org/OU=Users,dc=barfoo,dc=org?sAMAccountName?sub?(objectClass=*)"

    # Search the group membership in the specified group, otherwise it's gonna
    # get searched at the binding DN's location
    AuthLDAPGroupAttributeIsDN on
    Require ldap-group CN=gr_nagios,OU=Groups,DC=barfoo,DC=org
  </DirectoryMatch>

  ## mod_log
  ErrorLog /var/log/apache2/nagios.barfoo.org.error_log
  TransferLog /var/log/apache2/nagios.barfoo.org.access_log
  CustomLog /var/log/apache2/nagios.barfoo.org.ssl_request_log   ssl_combined

  ## mod_ssl
  SSLEngine on
  SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
  SSLCertificateFile /etc/apache2/ssl.crt/nagios.barfoo.org.crt
  SSLCertificateKeyFile /etc/apache2/ssl.key/nagios.barfoo.org.key

  <Files ~ "\.(cgi|shtml|phtml|php3|php?)$">
    SSLOptions +StdEnvVars
  </Files>

  SetEnvIf User-Agent ".*MSIE.*" \
    nokeepalive ssl-unclean-shutdown \
    downgrade-1.0 force-response-1.0

</VirtualHost>
</pre>
<p>As you can see, AuthLDAPUrl holds the four LDAP servers separated by spaces (that&#8217;s what the <a href="http://httpd.apache.org/docs/2.0/mod/mod_auth_ldap.html#authldapurl">Apache2 documentation</a> says about that), and that actually works.</p>
<p>The only additional thing I had to change from the nagios part is in <em>/etc/nagios/cgi.cfg</em> to allow everyone to issue system commands. Also, if you ever stumble upon extranous chars in the check_nrpe output, update to a newer NRPE version, that fixed it for me (that is on the receiver side &#8211; as in the box running the NRPE agent).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.barfoo.org/2008/07/14/nagios3-with-active-directory-authorization-on-sles10/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Nagios &amp; plugins</title>
		<link>http://blog.barfoo.org/2007/10/06/nagios-plugins/</link>
		<comments>http://blog.barfoo.org/2007/10/06/nagios-plugins/#comments</comments>
		<pubDate>Sat, 06 Oct 2007 15:12:43 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[check_ram]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[nsclient++]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://blog.barfoo.org/2007/10/06/nagios-plugins/</guid>
		<description><![CDATA[Since we started utilizing Nagios&#8216;s power two months ago, I finally came up with a C-based ram-plugin for nagios. The biggest problem I had with the python and perl based plugins, that some distributions (yes, SLES and Debian) don&#8217;t install either Python or Perl. Since I wanted a manageable setup (as in unified code base]]></description>
			<content:encoded><![CDATA[<p>Since we started utilizing <a href="http://www.nagios.org/">Nagios</a>&#8216;s power two months ago, I finally came up with a C-based ram-plugin for nagios. The biggest problem I had with the python and perl based plugins, that some distributions (yes, SLES and Debian) don&#8217;t install either Python or Perl.</p>
<p>Since I wanted a manageable setup (as in unified code base across all distributions), I wanted it to work without installing too much. So I took the <a href="http://nagiosplug.svn.sourceforge.net/viewvc/nagiosplug/nagiosplug/trunk/plugins/check_swap.c?view=markup">swap plugin</a> and basically removed what wasn&#8217;t necessary and <a href="http://blog.barfoo.org/wp-content/uploads/2007/10/check_ram.patch">voila</a>!</p>
<p>Here we go, yay ME!</p>
<p>Only thing I need to finish sometime soon, is getting the <a href="http://nsclient.org/nscp/">NSClient++</a> work on my Windows boxen (which I do have quite a few, the domain controllers, nas-cluster, &#8230;)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.barfoo.org/2007/10/06/nagios-plugins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
