<?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>Opsview Labs &#187; Ndoutils</title>
	<atom:link href="http://labs.opsview.com/tag/ndoutils/feed/" rel="self" type="application/rss+xml" />
	<link>http://labs.opsview.com</link>
	<description>Opsview&#039;s Engineering Blog</description>
	<lastBuildDate>Fri, 20 Jan 2012 09:32:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Speeding up Opsview&#8217;s status queries</title>
		<link>http://labs.opsview.com/2010/11/speeding-up-opsviews-status-queries/</link>
		<comments>http://labs.opsview.com/2010/11/speeding-up-opsviews-status-queries/#comments</comments>
		<pubDate>Thu, 18 Nov 2010 15:09:39 +0000</pubDate>
		<dc:creator>tonvoon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Ndoutils]]></category>
		<category><![CDATA[Opsview]]></category>

		<guid isPermaLink="false">http://labs.opsview.com/?p=600</guid>
		<description><![CDATA[
			
				
			
		With Opsview, we&#8217;re always looking at how to improve performance. We have some users with really large systems, so getting the best out of Opsview is imperative to the user experience.
One thing we&#8217;ve done is to create post reload helper tables. As all status data is stored in a MySQL database &#8211; and our status [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Flabs.opsview.com%2F2010%2F11%2Fspeeding-up-opsviews-status-queries%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.opsview.com%2F2010%2F11%2Fspeeding-up-opsviews-status-queries%2F&amp;style=normal&amp;b=2" height="61" width="50" />
			</a>
		</div><p><a class="lightbox" title="Go Speed!" href="http://labs.opsview.com/wp-content/uploads/2010/11/images.jpeg"><img class="alignleft size-full wp-image-606" style="margin: 0 10px 5px 0;" title="Go Speed!" src="http://labs.opsview.com/wp-content/uploads/2010/11/images.jpeg" alt="" width="152" height="119" /></a>With Opsview, we&#8217;re always looking at how to improve performance. We have some users with really large systems, so getting the best out of Opsview is imperative to the user experience.</p>
<p>One thing we&#8217;ve done is to create <em>post reload helper tables</em>. As all status data is stored in a MySQL database &#8211; and our status views need to query the database &#8211; this is one part that needs to work fast and efficiently.</p>
<p>We tried some initial queries to get summarised status data across 10000 services, grouping results by host groups and separated out into handled and unhandled services. This used to take 30 seconds to run, which is clearly unacceptable. With our helper tables, this reduced the query time down to 0.4 seconds!<span id="more-600"></span></p>
<p>But the helper tables do more than that &#8211; they also provide security, to ensure that users only see the hosts and services that they should. We have a table called <em>opsview_contact_services</em>, which lists exactly which services a user has access to. This is really important if you have multiple customers using your Opsview system, since you don&#8217;t want one customer to see other customer&#8217;s information.</p>
<p>So these <em>helper tables</em> are great because they save a lot of time for each individual query, at the expense of a one-time generation cost. But what do you do if  the generation time takes too long?</p>
<p>One of our largest users, a major north American health organisation, had this problem. Their post reload tasks were taking 4 minutes 20 seconds to run, which is a large amount of time as status information would not be updated during this period. With some database analysis and some changes to our application queries, we were able to reduce this time down to 1 minute 15 seconds. That&#8217;s a 70% reduction!</p>
<p>And that&#8217;s not all &#8211; with the latest release of Opsview, we&#8217;ve also made this post reload task multi-threaded. This means that the tables can be generated while high priority status information is being updated concurrently. So now Opsview users will know that the latest information on their screens reflects the data as it is coming in.</p>
<p>Now, 1 minute 15 seconds could be considered a large amount of time, but considering this is for a system with over 9000 hosts and over 24000 services, that&#8217;s not too shabby!</p>
<p>So the gains made at this one implementation are now available to all Opsview users. Happy upgrading!</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.opsview.com/2010/11/speeding-up-opsviews-status-queries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NDOutils on Solaris 10</title>
		<link>http://labs.opsview.com/2008/03/ndoutils-on-solaris-10/</link>
		<comments>http://labs.opsview.com/2008/03/ndoutils-on-solaris-10/#comments</comments>
		<pubDate>Thu, 13 Mar 2008 12:54:31 +0000</pubDate>
		<dc:creator>tonvoon</dc:creator>
				<category><![CDATA[Nagios]]></category>
		<category><![CDATA[Opsview]]></category>
		<category><![CDATA[Ndoutils]]></category>
		<category><![CDATA[solaris 10]]></category>

		<guid isPermaLink="false">http://labs.opsview.com/2008/03/ndoutils-on-solaris-10.html</guid>
		<description><![CDATA[
			
				
			
		Michael Prochaska was having trouble with compiling NDOutils on Solaris 10. Since we have an interest in getting Opsview working on Solaris (the upcoming 2.12 release will add Solaris 10 as a supported platform), we offered to help. So this is the result of his company, Bacher Systems, sponsoring our work.

This is our version of [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Flabs.opsview.com%2F2008%2F03%2Fndoutils-on-solaris-10%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.opsview.com%2F2008%2F03%2Fndoutils-on-solaris-10%2F&amp;style=normal&amp;b=2" height="61" width="50" />
			</a>
		</div><p>Michael Prochaska was having trouble with compiling NDOutils on Solaris 10. Since we have an interest in getting <a href="http://opsview.org">Opsview</a> working on Solaris (the upcoming 2.12 release will add Solaris 10 as a supported platform), we offered to help. So this is the result of his company, <a href="http://www.bacher.at">Bacher Systems</a>, sponsoring our work.</p>
<p><span id="more-84"></span></p>
<p>This is our version of <a href="http://altinity.blogs.com/dotorg//ndoutils-1.4b7-altinity.tar.gz" title="ndoutils-1.4b7-altinity.tar.gz">NDOutils 1.4b7</a>. We&#8217;ve applied the following patches, most of which can go back upstream:</p>
<h3><a href="http://altinity.blogs.com/dotorg//ndoutils_better_mysql_detection.1.4b7.patch" title="ndoutils_better_mysql_detection.1.4b7.patch">ndoutils_better_mysql_detection.1.4b7.patch</a> and <a href="http://altinity.blogs.com/dotorg//ndoutils_np_mysqlclient.m4" title="ndoutils_np_mysqlclient.m4">ndoutils_np_mysqlclient.m4</a></h3>
<p>We&#8217;ve talked about this <a href="http://altinity.blogs.com/dotorg/2007/04/better_mysqlcli.html">before</a> and it looks like it is included in <a href="http://nagios.cvs.sourceforge.net/nagios/ndoutils/Changelog?revision=1.14&#038;view=markup">CVS</a> for ndoutils. However, since it is not released yet, we&#8217;ve included it in this list. You need to copy ndoutils_np_mysqlclient.m4 into a new m4/ directory at the top level of ndoutils and run:</p>
<pre>
aclocal -I m4
autoconf
</pre>
<p>This updates the ./configure script to detect mysql using mysql_config.</p>
<h3><a href="http://altinity.blogs.com/dotorg//ndoutils_show_mysql_error.patch" title="ndoutils_show_mysql_error.patch">ndoutils_show_mysql_error.patch</a></h3>
<p>We&#8217;ve found this to be a useful patch. When ndoutils logs to syslog with mysql errors, we don&#8217;t always understand what it means. This patch will add the returned mysql error to syslog too.</p>
<h3><a href="http://altinity.blogs.com/dotorg//ndoutils_solaris_eintr_in_accept.patch" title="ndoutils_solaris_eintr_in_accept.patch">ndoutils_solaris_eintr_in_accept.patch</a></h3>
<p>We&#8217;ve found that it is possible to get an EINTR during the accept on Solaris systems. This patch ignores the EINTR and waits for the next connect.</p>
<h3><a href="http://altinity.blogs.com/dotorg//ndoutils_retry_on_soft_read_errors.patch" title="ndoutils_retry_on_soft_read_errors.patch">ndoutils_retry_on_soft_read_errors.patch</a></h3>
<p>While reading through the code for EINTR, we found there was a case where it was possible that an EINTR falls through during a read(). This patch loops around the read() in these cases.</p>
<h3><a href="http://altinity.blogs.com/dotorg//ndoutils_remove_multiple_children.patch" title="ndoutils_remove_multiple_children.patch">ndoutils_remove_multiple_children.patchndoutils_remove_multiple_children.patch</a></h3>
<p>For reasons that we haven&#8217;t quite understood, sometimes the SIGCHLD signal is not processed correctly. This leaves a defunct process behind. However, the next time a child exits, it is processed, but only one child. This leaves many defunct processes over time. This patch loops around the waitpid() call to get all the children.</p>
<h3><a href="http://altinity.blogs.com/dotorg//ndoutils_use_sigaction_for_child_handler.patch" title="ndoutils_use_sigaction_for_child_handler.patch">ndoutils_use_sigaction_for_child_handler.patch</a></h3>
<p>Related to above, the signal handler for the children in Solaris looks like it needs to be reset, if you use signal() to set it. However, sigaction() is a more convenient system call. When researching this, we found that NSCA uses this (and a similar loop to remove multiple children). So sigaction() is used instead of signal() to set the SIGCHLD handler.</p>
<h3><a href="http://altinity.blogs.com/dotorg//ndoutils_sunos.h" title="ndoutils_sunos.h">ndoutils_sunos.h</a>, <a href="http://altinity.blogs.com/dotorg//ndoutils_sunos.c" title="ndoutils_sunos.c">ndoutils_sunos.c</a> and <a href="http://altinity.blogs.com/dotorg//ndoutils_build_on_solaris.patch" title="ndoutils_build_on_solaris.patch">ndoutils_build_on_solaris.patch</a></h3>
<p>These files include asprintf() and vasprintf(), which are not available on solaris. However, this is not the best way of handling this. A more appropriate way would be to be only include if ./configure saw they were missing. I&#8217;d be inclined to use gnulib to add this function in, because then there&#8217;s a whole set of other functions that can be brought in as well. The Nagios Plugins use this in their project to great success. If Ethan says the word, we&#8217;ll make this a better patch. But it works for now.</p>
<p>We hope these all get included in a release of NDOutils soon. We love that Nagios logs its status information into a database &#8211; Opsview relies on this in order to show status screens for large systems. It is in all our interests to get this crucial piece of software as stable and as complete as possible.</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.opsview.com/2008/03/ndoutils-on-solaris-10/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Better mysqlclient detection for NDOUtils</title>
		<link>http://labs.opsview.com/2007/04/better-mysqlclient-detection-for-ndoutils/</link>
		<comments>http://labs.opsview.com/2007/04/better-mysqlclient-detection-for-ndoutils/#comments</comments>
		<pubDate>Mon, 02 Apr 2007 15:13:46 +0000</pubDate>
		<dc:creator>tonvoon</dc:creator>
				<category><![CDATA[Nagios]]></category>
		<category><![CDATA[Opsview]]></category>
		<category><![CDATA[MysqlClient]]></category>
		<category><![CDATA[nagios ndoutils can_submit_commands sigsev]]></category>
		<category><![CDATA[Ndoutils]]></category>

		<guid isPermaLink="false">http://labs.opsview.com/2007/04/better-mysqlclient-detection-for-ndoutils.html</guid>
		<description><![CDATA[Using Nagios Plugins' mysql detection routines in NDOUtils, should fix some ./configure problems.

Update: patch reworked for NDOutils 1.4b3

Update: attached the tarball of NDOutils 1.4b3 with this patch to save you patching yourself
]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Flabs.opsview.com%2F2007%2F04%2Fbetter-mysqlclient-detection-for-ndoutils%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.opsview.com%2F2007%2F04%2Fbetter-mysqlclient-detection-for-ndoutils%2F&amp;style=normal&amp;b=2" height="61" width="50" />
			</a>
		</div><p>We&#8217;ve encountered some problems with mysql detection in NDOUtils &#8211; it doesn&#8217;t work on one of our redhat servers. The specific problem is that the ceil function is not found, which is because -lm is missing from the list of libraries to add at link time:</p>
<p><code><br />
utils.o(.text+0x14e): In function `ndo_dbuf_strcat':<br />
: undefined reference to `ceil'<br />
collect2: ld returned 1 exit status<br />
</code></p>
<p>Rather than adding that library in manually (along with the -lz library that we found earlier for <a href="http://altinity.blogs.com/dotorg/2007/01/helping_ndoutil.html#configure_patch">Mac OS X</a>), we should use information from <a href="http://dev.mysql.com/doc/refman/4.1/en/mysql-config.html">mysql_config</a> to construct the compile flags. However, this is a bit tricky because of the various permutations.</p>
<p>Fortunately, the Nagios Plugins have a <a href="http://www.nagioscommunity.org/2007/03/30/mysqlclient-detection-in-nagios-plugins/">solution</a> already. They have an m4 file, called <a href="http://altinity.blogs.com/dotorg//np_mysqlclient.m4">np_mysqlclient.m4</a>, that is used to detect mysql_config and this returns data from the msyql_config for configure to use.</p>
<p>So we&#8217;ve patched NDOUtils so that it uses this m4 file now. In order to use, you have to apply the <a href="http://altinity.blogs.com/dotorg//ndoutils_better_mysql_detection_cvs.patch">patch</a> to configure.in, add a new m4/ directory to the top level and copy <a href="http://altinity.blogs.com/dotorg//np_mysqlclient.m4">np_mysqlclient.m4</a> into m4/. Then run:<br />
<code><br />
aclocal -I m4<br />
autoconf<br />
./configure --with-mysql=DIR<br />
</code></p>
<p>The detection is the same as in the Nagios Plugins: ./configure will try to find mysql_config in DIR/bin/mysql_config, otherwise will look in the PATH.</p>
<p>The nice thing is that if the logic for detection needs to be enhanced, we can update the m4 file and propagate the changes back to the Nagios Plugins as well. So everyone wins!</p>
<p>There&#8217;s also a patch for CFLAGS in src/Makefile.in (which were getting overridden &#8211; presumably for testing), a small header change in config.h.in and some Makefile.in changes because make errors were getting lost by the <code>cd ..</code> command.</p>
<p>We&#8217;ve tested this on a Mac OS X server, a Debian Etch server, and 32bit and 64bit Redhat, and it is looking good.</p>
<p>Unfortunately, it means deprecating the &#8211;with-mysql-inc and &#8211;with-mysql-lib configure options. Hopefully, you&#8217;ll see why this way is so much nicer.</p>
<p>Here&#8217;s the <a href="http://altinity.blogs.com/dotorg//ndoutils_better_mysql_detection_cvs.patch">patch</a> against CVS HEAD.</p>
<p><i>Update: Here&#8217;s the <a href="http://altinity.blogs.com/dotorg//ndoutils_better_mysql_detection_1.4b3.patch">patch</a>, reworked for NDOutils 1.4b3</i></p>
<p><i>Update: You can get the tarball with just this patch <a href="http://resources.opsview.org/ndoutils-1.4b3_with_mysql_patch.tar.gz">here</a></i></p>
]]></content:encoded>
			<wfw:commentRss>http://labs.opsview.com/2007/04/better-mysqlclient-detection-for-ndoutils/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Helping NDOUtils to a final release</title>
		<link>http://labs.opsview.com/2007/01/helping-ndoutils-to-a-final-release/</link>
		<comments>http://labs.opsview.com/2007/01/helping-ndoutils-to-a-final-release/#comments</comments>
		<pubDate>Tue, 23 Jan 2007 11:41:06 +0000</pubDate>
		<dc:creator>tonvoon</dc:creator>
				<category><![CDATA[Nagios]]></category>
		<category><![CDATA[Opsview]]></category>
		<category><![CDATA[can_submit_commands]]></category>
		<category><![CDATA[Ndoutils]]></category>
		<category><![CDATA[sigsev]]></category>

		<guid isPermaLink="false">http://labs.opsview.com/2007/01/helping-ndoutils-to-a-final-release.html</guid>
		<description><![CDATA[Patches for NDOUtils, as currently used by Altinity. Update: fixed a patch for configdumpstart so that it was only clearing tables once. Also fixed a bug for configdumpend not being called. Update 2: Ethan has applied to CVS!
]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Flabs.opsview.com%2F2007%2F01%2Fhelping-ndoutils-to-a-final-release%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.opsview.com%2F2007%2F01%2Fhelping-ndoutils-to-a-final-release%2F&amp;style=normal&amp;b=2" height="61" width="50" />
			</a>
		</div><p>There has been a new update to NDOUtils to 1.4b2 <a href="http://nagios.org/">recently</a> and we thought we&#8217;d share our latest patches here so that they can be evaluated upstream. </p>
<p>We&#8217;ve always <a href="http://www.netways.de/de/nagios_konferenz/archiv_2006/programm/open_source_etiquette/">argued</a> that it is best to be as close to the released code as possible &#8211; we don&#8217;t want the expense of maintaining a fork, so it&#8217;s in our interests to inform everyone about our changes. And since NDOUtils is gearing up for the 1.4 release, now is a good time to publicise them.</p>
<p>Our course, the <a href="http://source.altinity.org/source">link</a> to our most stable code is <a href="http://altinity.com/opensourcecommitment">updated daily</a>, so the list below will not be accurate over time, but we&#8217;ve also uploaded the patches onto this blog server, so you can still reference them here. All patches will apply cleanly onto NDOUtils 1.4b2.</p>
<h3><a href="http://altinity.blogs.com/dotorg//ndoutils_issue_commands_1.patch">ndoutils_issue_commands.patch</a></h3>
<p>This is the include header <a href="http://altinity.blogs.com/dotorg/2006/09/starting_on_ndo.html">problem</a> because we&#8217;ve changed the data structure for a contact. Long term, it is best if Nagios splits the include files out of NDOUtils and let it be installed by Nagios, but this is probably outside of Ethan&#8217;s radar right now.</p>
<h3><a href="http://altinity.blogs.com/dotorg//ndoutils_daemonize.patch">ndoutils_daemonize.patch</a></h3>
<p>We found that the ndo2db process wasn&#8217;t closing stdout, which meant the attaching terminal could not close. It looks like it should be set, but was commented out for debugging purposes. We uncomment those lines.</p>
<h3><a href="http://altinity.blogs.com/dotorg//ndoutils_debug.patch">ndoutils_debug.patch</a></h3>
<p>It looks like some memory debug is switched on by default. We switch them off here.</p>
<h3><a href="http://altinity.blogs.com/dotorg//ndoutils_memory.patch">ndoutils_memory.patch</a></h3>
<p>And the ifdef doesn&#8217;t actually switch them off &#8211; we correct that too. (We&#8217;re too lazy to combine these last two patches together!)</p>
<p><a name="configure_patch"></a>
<h3><a href="http://altinity.blogs.com/dotorg//ndoutils_configure.patch">ndoutils_configure.patch</a></h3>
<p>
The configure script wasn&#8217;t respecting the &#8211;with-mysql-inc option correctly. We also test for the compress lib, which gave us problems on Mac OS X.</p>
<h3><a href="http://altinity.blogs.com/dotorg//ndoutils_notification_level_1.patch">ndoutils_notification_level.patch</a></h3>
<p>This is required to support our use of <a href="http://altinity.blogs.com/dotorg/2006/09/simple_escalati.html">simple escalations</a>. Again, a separate location for the include files for Nagios would remove the need for this.</p>
<h3><a href="http://altinity.blogs.com/dotorg//ndoutils_clear_tables_on_reload_1.patch">ndoutils_clear_tables_on_reload.patch</a></h3>
<p>This is the biggie. If the configuration for Nagios has changed and a reload requested, the ndo_object table do not reflect the new configuration. We found that the ndo_objects table is only updated on a restart, not a reload. This caused problems for status views that use the database because the new hosts and services weren&#8217;t there. This fixes that problem.</p>
<p>We also found that the active flag wasn&#8217;t correctly set to inactive when the configuration was dumped. Once we fixed that, we found that hosts and services in ndo_objects were marked inactive, when they should be active. This has also been fixed, along with a SQL typo.</p>
<p><em>Update: we&#8217;ve discovered that the configdumpstart routine gets called twice &#8211; once with the original data, and once with retained data. Looking at the ndomod data stream, it looks like the configdumpstart is sent with a huge set of data, then another configdumpstart with more data. The patch above has been re-worked so that the table clearing only occurs once, before the original data is sent through. This does beg the question of what is the difference between the original and the retained data &#8211; if there was a table clear happening between the original and retained data yet all data was there, why send all the original data?</p>
<p>Also, we found a bug where configdumpend was not being called. It turned out to be a missing break in the case statement. This is included in the patch above too.</em></p>
<p></p>
<h3>DEFAULT CHARSET mismatches</h3>
<p>
We also run a perl script when the NDOUtils distribution is unpacked. We strip out all the DEFAULT CHARSET=ascii statements in mysql.src. This is because if the server has a different charset, you can get some collation errors in mysql. We think it is better to remove these altogether and leave the charset to be set by the mysql database. The script is:</p>
<p><code><br />
perl -pi -e 's/DEFAULT CHARSET=ascii //' db/mysql.src<br />
</code></p>
<h3><a href="http://altinity.blogs.com/dotorg//ndoutils_upgradedb.pl">ndoutils_upgradedb.pl</a></h3>
<p>Upgrading database schemas are a terrible pain. NDOUtils includes scripts to update the database, but there&#8217;s a manual step required to work out which scripts to apply. We&#8217;ve written a perl script (requires DBI.pm) to apply the upgrade scripts automatically, as long as the filename convention is adhered to. There&#8217;s also a new table created, called nagios_database_version, which holds a single row with the version of the database schema for subsequent updates.</p>
<p>The copyright for this script can be claimed by Ethan if he chooses to include it in the NDOUtils distribution. Otherwise, you are free to use it and distribute it yourselves under the GPL, but the copyright is retained by Altinity.</p>
<p>Hopefully, these patches will get included into the new NDOUtils soon, as we move forward to the next generation of Nagios status viewers.</p>
<p><em>Update 2: Ethan has <a href="http://article.gmane.org/gmane.network.nagios.devel/3433">applied</a> these changes to CVS, except for the notification_level patch as that is a bit more involved.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://labs.opsview.com/2007/01/helping-ndoutils-to-a-final-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Starting on ndoutils</title>
		<link>http://labs.opsview.com/2006/09/starting-on-ndoutils/</link>
		<comments>http://labs.opsview.com/2006/09/starting-on-ndoutils/#comments</comments>
		<pubDate>Mon, 11 Sep 2006 23:33:27 +0000</pubDate>
		<dc:creator>tonvoon</dc:creator>
				<category><![CDATA[Nagios]]></category>
		<category><![CDATA[Opsview]]></category>
		<category><![CDATA[can_submit_commands]]></category>
		<category><![CDATA[Ndoutils]]></category>
		<category><![CDATA[sigsev]]></category>

		<guid isPermaLink="false">http://labs.opsview.com/2006/09/starting-on-ndoutils.html</guid>
		<description><![CDATA[Some pointers when you start to use ndoutils
]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Flabs.opsview.com%2F2006%2F09%2Fstarting-on-ndoutils%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.opsview.com%2F2006%2F09%2Fstarting-on-ndoutils%2F&amp;style=normal&amp;b=2" height="61" width="50" />
			</a>
		</div><p>We are starting to use Ndoutils, which is the first event broker for Nagios. The idea with the event broker modules is that the functionality of Nagios can be extended without the core code being changed. Ethan has released <a href="http://sourceforge.net/project/showfiles.php?group_id=26589">ndoutils</a> which writes Nagios data to a mysql database.</p>
<p>We managed to get Ndoutils 1.3.1 to compile, but whenever Nagios started up, we kept getting SIGSEGV and Nagios would crash. Nagios.log would say:</p>
<pre style="overflow: auto">
[1158012772] Nagios 2.5 starting... (PID=21793)
[1158012772] LOG VERSION: 2.0
[1158012773] ndomod: NDOMOD 1.3.1 Copyright (c) 2005-2006 Ethan Galstad (nagios@nagios.org)
[1158012773] ndomod: Successfully connected to data sink.  0 queued items to flush.
[1158012773] Event broker module '/usr/local/nagios/bin/ndomod.o' initialized successfully.
[1158012773] Caught SIGSEGV, shutting down...
</pre>
<p>It took us a few hours to work out with lots of debugging lines in the ndoutils (printf statements + starting up Nagios manually without daemonizing), but we eventually found out that the Nagios 2 header files distributed with Ndoutils did not have our changes for <a href="http://altinity.blogs.com/dotorg/2006/02/a_view_some_cha.html">can_submit_commands</a>. The patch is <a href="http://altinity.blogs.com/dotorg//ndoutils_issue_commands.patch">here</a> &#8211; obviously, only use this if you are using the can_submit_commands patch.</p>
<p>We&#8217;ve been speaking to Ethan because we think it is a good idea for Nagios to install the header files (maybe in /usr/local/nagios/include?), so then any local patches are done there, rather than trying to maintain multiple header files across different projects.</p>
<p>Hope this saves you a few hours!</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.opsview.com/2006/09/starting-on-ndoutils/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

