<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: how to monitor ibm mq from nagios</title>
	<atom:link href="http://dougmunsinger.com/2008/10/how-to-monitor-ibm-mq-from-nagios.html/feed" rel="self" type="application/rss+xml" />
	<link>http://dougmunsinger.com/2008/10/how-to-monitor-ibm-mq-from-nagios.html</link>
	<description>doug munsinger</description>
	<lastBuildDate>Tue, 29 Sep 2009 01:42:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Tomas</title>
		<link>http://dougmunsinger.com/2008/10/how-to-monitor-ibm-mq-from-nagios.html/comment-page-1#comment-4046</link>
		<dc:creator>Tomas</dc:creator>
		<pubDate>Thu, 27 Aug 2009 09:40:45 +0000</pubDate>
		<guid isPermaLink="false">http://dougmunsinger.com/?p=546#comment-4046</guid>
		<description>Hi, very nice article. I wonder if I could execute qdepth plugin with check_by_ssh. I currently do not have experience with NRPE. Thanks for help</description>
		<content:encoded><![CDATA[<p>Hi, very nice article. I wonder if I could execute qdepth plugin with check_by_ssh. I currently do not have experience with NRPE. Thanks for help</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: T.Rob</title>
		<link>http://dougmunsinger.com/2008/10/how-to-monitor-ibm-mq-from-nagios.html/comment-page-1#comment-65</link>
		<dc:creator>T.Rob</dc:creator>
		<pubDate>Wed, 22 Oct 2008 21:39:20 +0000</pubDate>
		<guid isPermaLink="false">http://dougmunsinger.com/?p=546#comment-65</guid>
		<description>Nice article!  I hadn&#039;t been paying attention and didn&#039;t know there were modules for Nagios to check WMQ.

How about this for checking queue depth...

&lt;code&gt;
# Isolate the CURDEPTH element to a line, then strip the attribute so Perl gets only the value
my $curdepth = `echo &quot;display queue (&#039;${QUEUE}&#039;)&quot; &#124; $MQSC $QMGRNAME &#124; tr &#039;)&#039; &#039;\n&#039; &#124; tr &#039; &#039; &#039;\n&#039; &#124; grep CURDEPTH &#124; tr &#039;(&#039; &#039;\n&#039; &#124; grep -v CURDEPTH`;
&lt;/code&gt;

&lt;code&gt;
if ($curdepth == &#039;0&#039;) {
   # Look for literal &#039;0&#039;
} elsif ($curdepth &gt; 0) {
   # Check against $WARN and $CRIT
} else {
   # runmqsc command failed.  QMgr down?
}
&lt;/code&gt;

Note that I added the QMgr name to the runmqsc command to handle cases where the QMgr is not set as the default or there is more than one.  I also added logic to catch the case where WMQ is down.

In the case of process monitoring, amqzmuc0 is the log formatter and I don&#039;t think it runs in all cases.  A better choice might be amqzxma0 which is the execution controller.

-- T.Rob</description>
		<content:encoded><![CDATA[<p>Nice article!  I hadn&#8217;t been paying attention and didn&#8217;t know there were modules for Nagios to check WMQ.</p>
<p>How about this for checking queue depth&#8230;</p>
<p><code><br />
# Isolate the CURDEPTH element to a line, then strip the attribute so Perl gets only the value<br />
my $curdepth = `echo "display queue ('${QUEUE}')" | $MQSC $QMGRNAME | tr ')' '\n' | tr ' ' '\n' | grep CURDEPTH | tr '(' '\n' | grep -v CURDEPTH`;<br />
</code></p>
<p><code><br />
if ($curdepth == '0') {<br />
   # Look for literal '0'<br />
} elsif ($curdepth &gt; 0) {<br />
   # Check against $WARN and $CRIT<br />
} else {<br />
   # runmqsc command failed.  QMgr down?<br />
}<br />
</code></p>
<p>Note that I added the QMgr name to the runmqsc command to handle cases where the QMgr is not set as the default or there is more than one.  I also added logic to catch the case where WMQ is down.</p>
<p>In the case of process monitoring, amqzmuc0 is the log formatter and I don&#8217;t think it runs in all cases.  A better choice might be amqzxma0 which is the execution controller.</p>
<p>&#8211; T.Rob</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 0.589 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-03-10 04:14:36 -->
