<?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>Jonathan Delgado&#039;s Weblog &#187; nagios</title>
	<atom:link href="http://www.techno-obscura.com/~delgado/blog/tag/nagios/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.techno-obscura.com/~delgado/blog</link>
	<description>Jonathan&#039;s periodic postings of varying importance</description>
	<lastBuildDate>Sun, 20 Nov 2011 21:01:29 +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>Nagios plugin for LSI Megaraid on FreeBSD</title>
		<link>http://www.techno-obscura.com/~delgado/blog/2011/08/nagios-plugin-for-lsi-megaraid-on-freebsd/</link>
		<comments>http://www.techno-obscura.com/~delgado/blog/2011/08/nagios-plugin-for-lsi-megaraid-on-freebsd/#comments</comments>
		<pubDate>Tue, 09 Aug 2011 13:32:56 +0000</pubDate>
		<dc:creator>Jonathan Delgado</dc:creator>
				<category><![CDATA[Comp Stuff]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[megaraid]]></category>
		<category><![CDATA[nagios]]></category>

		<guid isPermaLink="false">http://www.techno-obscura.com/~delgado/blog/?p=114</guid>
		<description><![CDATA[A while back I started to have some odd compatibility issues with the LSI MegaCli utility for FreeBSD on some of my systems, which was a pain because I depended on MegaCli working for my check_megaraid_sas plugin. All of the systems tat I had set up early on using Linux compatability mode worked fine, but [...]]]></description>
			<content:encoded><![CDATA[<p>A while back I started to have some odd compatibility issues with the LSI MegaCli utility for FreeBSD on some of my systems, which was a pain because I depended on MegaCli working for my <a href="http://www.techno-obscura.com/~delgado/blog/2007/06/check_megaraid_sas-nagios-plugin/">check_megaraid_sas plugin</a>. All of the systems tat I had set up early on using Linux compatability mode worked fine, but I had one system using the FreeBSD version of the client that stopped working at some point that was unclear&#8230; many changes had been made to the system involved that were hard to back out. The problem couldn&#8217;t be immediately replicated on other a similar system, but it eventually showed up elsewhere as well.</p>
<p>Faced with such a challenge, I opted to punt for the time being and focus on other items. Priorities were able to allow for more thinking on the matter, and I decided that instead of banging my head against the table to figure out why things were not working when they should I would make this work using something other than MegaCli.</p>
<p><a href="http://www.freebsd.org/cgi/man.cgi?query=mfiutil&amp;sektion=8&amp;manpath=FreeBSD+8.0-RELEASE">mfiutil</a> was added to FreeBSD with the <a href="http://www.freebsd.org/releases/8.0R/relnotes-detailed.html#DISKS">release of 8.0</a> and later on <a href="http://www.freebsd.org/releases/7.3R/announce.html">back ported to 7.3</a> as well. It doesn&#8217;t provide as great of detail about the RAID status or as much control as MegaCli does, but it works simply and hopefully should have more consistent performance and compatibility with the system. Using mfiutil (and my usual Perl) I have written a Nagios plugin to monitor the status of all physical drives and volumes recognized by the mfi driver.<br />
<span id="more-114"></span><br />
The plugin takes output from commands like:<br />
<code>#mfiutil -u0 show volumes<br />
mfi0 Volumes:<br />
  Id     Size    Level   Stripe  State   Cache   Name<br />
 mfid0 (  136G) RAID-1      64K OPTIMAL Enabled<br />
#mfiutil -u0 show drives<br />
mfi0 Physical Drives:<br />
(  137G) ONLINE &lt;SEAGATE ST3146855SS S515 serial=3LN2BBYV&gt; SAS enclosure 1, slot 0<br />
(  137G) ONLINE &lt;SEAGATE ST3146855SS S515 serial=3LN2BAVQ&gt; SAS enclosure 1, slot 1<br />
#mfiutil -u1 show volumes<br />
mfi1 Volumes:<br />
  Id     Size    Level   Stripe  State   Cache   Name<br />
 mfid1 ( 9076G) RAID-5      64K OPTIMAL Disabled<br />
#mfiutil -u1 show drives<br />
mfi1 Physical Drives:<br />
(  699G) ONLINE    &lt;ST3750640NS 3BKH serial=5QD2B1M3&gt; SATA enclosure 1, slot 14<br />
(  699G) ONLINE    &lt;ST3750640NS 3BKH serial=5QD2A3BC&gt; SATA enclosure 1, slot 13<br />
(  699G) ONLINE    &lt;ST3750640NS 3BKH serial=5QD2AC4F&gt; SATA enclosure 1, slot 12<br />
(  699G) ONLINE    &lt;ST3750640NS 3BKH serial=5QD2B37L&gt; SATA enclosure 1, slot 11<br />
(  699G) ONLINE    &lt;ST3750640NS 3BKH serial=5QD2ATGW&gt; SATA enclosure 1, slot 10<br />
(  699G) ONLINE    &lt;ST3750640NS 3BKH serial=5QD2B1ZT&gt; SATA enclosure 1, slot 9<br />
(  699G) ONLINE    &lt;ST3750640NS 3BKH serial=5QD2A943&gt; SATA enclosure 1, slot 8<br />
(  699G) ONLINE    &lt;ST3750640NS 3BKH serial=5QD255TA&gt; SATA enclosure 1, slot 7<br />
(  699G) ONLINE    &lt;ST3750640NS 3BKH serial=5QD2B39K&gt; SATA enclosure 1, slot 6<br />
(  699G) HOT SPARE &lt;ST3750640NS 3BKH serial=5QD2ATQB&gt; SATA enclosure 1, slot 5<br />
(  699G) ONLINE    &lt;ST3750640NS 3BKH serial=5QD2B1HZ&gt; SATA enclosure 1, slot 4<br />
(  699G) ONLINE    &lt;ST3750640NS 3BKH serial=5QD2A370&gt; SATA enclosure 1, slot 3<br />
(  699G) ONLINE    &lt;ST3750640NS 3BKH serial=5QD2AZT0&gt; SATA enclosure 1, slot 2<br />
(  699G) ONLINE    &lt;ST3750640NS 3BKH serial=5QD2AT64&gt; SATA enclosure 1, slot 1<br />
(  699G) ONLINE    &lt;ST3750640NS 3BKH serial=5QD285NY&gt; SATA enclosure 1, slot 0<br />
</code><br />
and generates a Nagios status report like:<br />
<code><br />
#check_mfi -u2 -s1<br />
OK: mfid0:136G:RAID-1:OPTIMAL mfid1:9076G:RAID-5:OPTIMAL Drives:17 Hotspare(s):1<br />
</code><br />
The -u flag is to specify how many mfi devices it should be looking for (and defaults to 1, i.e. mfi0, id unspecified) and -s is optional for how many hot spares to be looking for (0 if unspecified).</p>
<p>mfiutil needs to be run with root privs to work properly, but your Nagios process (or NRPE if you are checking on a remote system) is usually running as the nagios user, so the check_mfi plugin calls mfiutil via sudo. In order for this to work properly you should have a line like the following in your sudoers file:<br />
<code><br />
nagios  ALL=(ALL)       NOPASSWD: /usr/sbin/mfiutil<br />
</code></p>
<p>You can download the check_mfi plugin directly from my site <a href="http://www.techno-obscura.com/~delgado/code/check_mfi">here</a>. It has also been uploaded to <a href="http://exchange.nagios.org/">Nagios Exchange</a> (not yet properly listed) and <a href="https://www.monitoringexchange.org/inventory/Check-Plugins/Hardware/Devices/RAID-Controller/check_mfi">Monitoring Exchange</a> (I still can&#8217;t sort out why the world needs both of these, but I won&#8217;t be the one to choose which).</p>
<p>I pay best attention to questions and comments posted here on my blog and don&#8217;t typically look at what is on either of the other two sites except for when I upload a newer revision. That said, those sites may well have the most recent revision of my code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.techno-obscura.com/~delgado/blog/2011/08/nagios-plugin-for-lsi-megaraid-on-freebsd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>check_raid_amrstat Nagios plugin</title>
		<link>http://www.techno-obscura.com/~delgado/blog/2010/07/check_raid_amrstat/</link>
		<comments>http://www.techno-obscura.com/~delgado/blog/2010/07/check_raid_amrstat/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 19:44:29 +0000</pubDate>
		<dc:creator>Jonathan Delgado</dc:creator>
				<category><![CDATA[Comp Stuff]]></category>
		<category><![CDATA[nagios]]></category>

		<guid isPermaLink="false">http://www.techno-obscura.com/~delgado/blog/?p=96</guid>
		<description><![CDATA[We recently recycled a Dell Poweredge 1750 equipped with a PERC 4/Di RAID controller into my realm and have it running FreeBSD 8. The PERC4/Di is a rebranded LSI MegaRAID controller and uses the amr driver under FreeBSD. There is an appropriately titled &#8220;check_raid_amrstat &#8211; Dell AMR PERC4 FreeBSD&#8221; plugin already on Nagios Exchange and [...]]]></description>
			<content:encoded><![CDATA[<p>We recently recycled a Dell Poweredge  1750 equipped with a PERC 4/Di RAID controller into my realm and have it running FreeBSD 8. The PERC4/Di is a rebranded LSI MegaRAID controller and uses the amr driver under FreeBSD.</p>
<p>There is an appropriately titled &#8220;check_raid_amrstat &#8211; Dell AMR PERC4 FreeBSD&#8221; plugin already on <a href="http://exchange.nagios.org/directory/Plugins/Operating-Systems/BSD/FreeBSD/check_raid_amrstat-%252D-Dell-AMR-PERC4-FreeBSD/details">Nagios Exchange</a> and <a href="http://www.monitoringexchange.org/p/1698">Monitoring Exchange</a>, but as usual I can&#8217;t seem to be content with some other people&#8217;s code. </p>
<p>I cleaned up the code a bit. It is a bit more in sticking with the plugin writing guidelines. Presents a bit more info than the original in a more compact format, with output similar to <a href="http://www.techno-obscura.com/~delgado/blog/2007/06/check_megaraid_sas-nagios-plugin/">my MegaRAID SAS plugin</a>. Nothing radical at all, but I like it better and present it <a href="http://www.techno-obscura.com/~delgado/code/check_raid_amrstat">here</a> in case you want to see an alternative.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.techno-obscura.com/~delgado/blog/2010/07/check_raid_amrstat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nagios Plugin Repository</title>
		<link>http://www.techno-obscura.com/~delgado/blog/2009/07/nagios-plugin-repository/</link>
		<comments>http://www.techno-obscura.com/~delgado/blog/2009/07/nagios-plugin-repository/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 18:42:50 +0000</pubDate>
		<dc:creator>Jonathan Delgado</dc:creator>
				<category><![CDATA[Comp Stuff]]></category>
		<category><![CDATA[nagios]]></category>

		<guid isPermaLink="false">http://www.techno-obscura.com/~delgado/blog/?p=59</guid>
		<description><![CDATA[It seems I have missed out on some drama related to Nagios recently. I went to take a look at the listing for the Nagios plugins I have put out there on nagiosexchange.org only to discover that they have now rebranded themselves as monitoringexchange.org and are run by a group that is now dedicated to [...]]]></description>
			<content:encoded><![CDATA[<p>It seems I have missed out on some drama related to Nagios recently. I went to take a look at the listing for the Nagios plugins I have put out there on <a href="http://www.nagiosexchange.org/">nagiosexchange.org</a> only to discover that they have now rebranded themselves as <a href="http://www.monitoringexchange.org/">monitoringexchange.org</a> and are run by a group that is now dedicated to a fork of Nagios called <a href="http://www.icinga.org/">Icinga</a>. How confusing&#8230; and now there is a new plugin site at <a href="http://exchange.nagios.org/">exchange.nagios.org</a>.</p>
<p>I have no clue about which of these two sites is going to end up being the de facto source for Nagios plugins, but I have claimed what is mine on the Nagios branded one and will probably maintain things in parallel for the time being. Here are the links there for my LSI MegaRAID SAS (Dell PERC5 &amp; PERC6) plugin, <a href="http://exchange.nagios.org/directory/Plugins/Hardware/Storage-Systems/RAID-Controllers/check_megaraid_sas/details">check_megaraid_sas</a>, and my Perforce license plugin, <a href="http://exchange.nagios.org/directory/Plugins/License-Management/check_p4_license--3A-Perforce-license-checker/details">check_p4_license</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.techno-obscura.com/~delgado/blog/2009/07/nagios-plugin-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nagios plugin for Perforce license</title>
		<link>http://www.techno-obscura.com/~delgado/blog/2009/04/nagios-plugin-for-perforce-license/</link>
		<comments>http://www.techno-obscura.com/~delgado/blog/2009/04/nagios-plugin-for-perforce-license/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 18:31:48 +0000</pubDate>
		<dc:creator>Jonathan Delgado</dc:creator>
				<category><![CDATA[Comp Stuff]]></category>
		<category><![CDATA[nagios]]></category>

		<guid isPermaLink="false">http://www.techno-obscura.com/~delgado/blog/?p=46</guid>
		<description><![CDATA[I feel like whatever code I write, no matter how simple or seemingly insignificant, eventually ends up becoming useful to someone else at some point. So here is a quick Nagios plugin that I whipped up today, check_p4_license. I have a server running Perforce at work and it seems that every other year I have [...]]]></description>
			<content:encoded><![CDATA[<p>I feel like whatever code I write, no matter how simple or seemingly insignificant, eventually ends up becoming useful to someone else at some point. So here is a quick Nagios plugin that I whipped up today, <a href="/~delgado/code/check_p4_license">check_p4_license</a>.</p>
<p>I have a server running <a href="http://www.perforce.com/">Perforce</a> at work and it seems that every other year I have managed to not realize the license needed renewing until someone said to me, &#8220;Hey, is there any reason Perforce isn&#8217;t working?&#8221;</p>
<p>This year my spider-senses started tickling earlier on and I caught it in time, but I told myself I needed to count on more than just an odd sense of doom and foreboding in April. So I wrote a quickly Perl script that calls the Perforce p4 CLI tool and looks at your server&#8217;s license info and gripes back to you if it is going to be expiring any time soon.</p>
<p>I have also placed this plugin up on <a href="http://www.nagiosexchange.org/cgi-bin/page.cgi?g=Detailed%2F3033.html;d=1">NagiosExchange</a>, because I have found that it is better for me to do so earlier on than to have someone else find my stuff and upload then abandon it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.techno-obscura.com/~delgado/blog/2009/04/nagios-plugin-for-perforce-license/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>check_megaraid_sas Nagios plugin</title>
		<link>http://www.techno-obscura.com/~delgado/blog/2007/06/check_megaraid_sas-nagios-plugin/</link>
		<comments>http://www.techno-obscura.com/~delgado/blog/2007/06/check_megaraid_sas-nagios-plugin/#comments</comments>
		<pubDate>Thu, 07 Jun 2007 15:11:31 +0000</pubDate>
		<dc:creator>Jonathan Delgado</dc:creator>
				<category><![CDATA[Comp Stuff]]></category>
		<category><![CDATA[nagios]]></category>

		<guid isPermaLink="false">http://www.techno-obscura.com/~delgado/blog/?p=14</guid>
		<description><![CDATA[This is somewhat related to my earlier posting about updating the megaraid drivers. I use Nagios at work for system monitoring and one thing that I like to check is the status of the volumes managed by the RAID controller. When I first started configuring the Nagios on my new PowerEdge 1950 and 2950 systems [...]]]></description>
			<content:encoded><![CDATA[<p>
This is somewhat related to my earlier posting about updating the megaraid drivers. I use Nagios at work for system monitoring and one thing that I like to check is the status of the volumes managed by the RAID controller. When I first started configuring the Nagios on my new PowerEdge 1950 and 2950 systems I found a check_perc5i over on <a href="http://www.nagiosexchange.org/">Nagios Exchange</a>.</p>
<p>
Unfortunately the plugin only looked like it worked properly. It would report back correctly things like the number of volumes you had online, the number of disks, failed disks etc., but if you had a failed disk it would not actually return the proper error status. It just kept on going blindly saying  <i>OK : Bad Disks=3</i>. </p>
<p>
So I have written my own script to check the RAID controller status, <a href="/~delgado/code/check_megaraid_sas">check_megaraid_sas</a>. It is somewhat similar to the work I did for the <a href="/~delgado/notes/sles9-NagiosAfacli.html">PERC3Di with afacli and Nagios</a> quite a while back.</p>
<p>
In order to use it you need to have LSI&#8217;s MegaCli utility installed and the user executing the script will need to have sudo privileges (w/o a password) to execute it. Then you will end up with output like: <br />
<tt>OK: 0:0:RAID-1:2 drives:68GB:Optimal 1:0:RAID-5:7 drives:2792GB:Optimal Drives:10 Hotspare(s):1</tt><br />
or (less good)<br />
<tt>WARNING: 0:0:RAID-1:2 drives:74GB:Optimal 0:1:RAID-5:4 drives:1396GB:Optimal Drives:6 (3 Errors)</tt></p>
<p>
The warning is due to the detection of &#8220;other&#8221; disk errors on the drive. I am trying to find out from Dell if I can reset this count in the controller. Otherwise if it is cumulative I will probably modify my code to take a n argument for a threshold under which to ignore non-fatal errors. The output above is basically in the form:<br />
<tt>&lt;status&gt; &lt;controller #&gt;:&lt;volume #&gt;:&lt;RAID level&gt;:&lt;volume drive count&gt;:&lt;volume size&gt;:&lt;volume status&gt; ... Drives:&lt;total drives attached to controller(s)&gt;</tt></p>
]]></content:encoded>
			<wfw:commentRss>http://www.techno-obscura.com/~delgado/blog/2007/06/check_megaraid_sas-nagios-plugin/feed/</wfw:commentRss>
		<slash:comments>39</slash:comments>
		</item>
	</channel>
</rss>

