<?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>Extempore &#187; zenoss</title>
	<atom:link href="http://michaelhendrickx.com/tag/zenoss/feed" rel="self" type="application/rss+xml" />
	<link>http://michaelhendrickx.com</link>
	<description>random ramblings of the disturbed mind</description>
	<lastBuildDate>Tue, 20 Jul 2010 05:39:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>nnscfgmaker.sh: a nagios/nsclient++ cfg maker</title>
		<link>http://michaelhendrickx.com/201001_nnscfgmaker-sh-a-nagiosnsclient-cfg-maker.html</link>
		<comments>http://michaelhendrickx.com/201001_nnscfgmaker-sh-a-nagiosnsclient-cfg-maker.html#comments</comments>
		<pubDate>Thu, 28 Jan 2010 14:27:42 +0000</pubDate>
		<dc:creator>Michael Hendrickx</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[misc]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[nagios]]></category>
		<category><![CDATA[zenoss]]></category>

		<guid isPermaLink="false">http://michaelhendrickx.com/?p=241</guid>
		<description><![CDATA[Dear all,
We are in the process of changing the monitoring system on part of our network from Zenoss to Nagios.  This is not a Zenoss vs. Nagios debate, as both products are awesome and do the things they are designed for very well.  We (Christian and myself) use a combination of Cacti for [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://michaelhendrickx.com/wp-content/uploads/2010/01/nagios.jpg" alt="" title="nagios" width="150" height="114" align="right" />Dear all,</p>
<p>We are in the process of changing the monitoring system on part of our network from Zenoss to Nagios.  This is not a Zenoss vs. Nagios debate, as both products are awesome and do the things they are designed for very well.  We (<a href="http://ae.linkedin.com/in/certifiedgeek">Christian</a> and myself) use a combination of <a href="http://www.cacti.net">Cacti</a> for bandwith monitoring and <a href="http://www.zenoss.com">Zenoss</a> for server and device monitoring.  Now, recently we decided to change the latter to <a href="http://www.nagios.org/">Nagios</a>.  It is know for its &#8220;great deal of flexibility when integrating Nagios into their environment&#8221; (Galstad, 2005)</p>
<p>As Zenoss was configured using <a href="http://www.snmp-informant.com/">SNMP Informant</a> to grab information about the MS Windows servers (available disk space, CPU load, etc) and Nagios uses <a href="http://nsclient.org/">NSClient++</a>; one of the time consuming tasks was getting the client on the server (thank you domain <img src='http://michaelhendrickx.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ) and configuring each and every server on the Nagios server.  I guess there should be some sort of discovery tool for Nagios, but I couldn&#8217;t directly find one.  </p>
<p>In order to tackle the copy-pasting for a few dozen config files, and to brush up my bash scripting again, I wrote the <strong>Nagios Nsclient++ cfg maker</strong><span id="more-241"></span>, yeah, what&#8217;s in a name eh.  This client enumerates the target server about what is installed and makes a CFG file based on that.  Oh yeah, we&#8217;re using nagios with its text files, not the SQL version.</p>
<p>You can download it <a href='http://michaelhendrickx.com/wp-content/uploads/2010/01/nnscfgmaker.sh' >here (bash script)</a>.  As it&#8217;s GPL&#8217;d, feel free to change and redistribute it.  As we mainly house HP servers, APC UPS&#8217;s and most of them run Windows (for now, <em>evil laugh</em>), so it&#8217;s a bit windows/hp minded.</p>
<p>The syntax is very easy, just run the script with the hostname of the server that you want to &#8220;enumerate&#8221;.  Doing that, you&#8217;ll have something similar as the output below:</p>
<pre>
mike@mon:/usr/local/nagios/etc/servers$ ./nnscfgmaker.sh server2
Nagios NSclient++ (check_nt) CFG maker

 + logfile: server2.cfg
 + pinging the server.. ok
 + checking of nsclient++ is installed
 + adding hdd c:\
 + adding hdd e:\
 + adding hdd f:\
 + adding hdd g:\
 + adding hdd h:\
 + adding hdd i:\
 + adding process: MS SQL Server (sqlservr.exe)
 + adding service: Automatic Updates (wuauserv)
 + adding service: DNS Client (DNSCache)
 + adding service: Event Log (Eventlog)
 + adding service: Messenger (Messenger)
 + adding service: Server Service (lanmanserver)
 + adding service: Windows Time (w32time)
 + adding service: SNMP service (SNMP)
 + adding service: HP OpenView Ctrl Service (ovctrl)
 + adding service: Backup Exec Server (BackupExecRPCService)
 + adding service: HP Insight Server Agent (CqMgServ)
 + adding service: HP Insight NIC Agent (CpqNicMgmt)
 + adding service: HP Insight Storage Agent (CqMgStor)
 + adding service: TrendMicro OfficeScan NT Listener (tmlisten)
 + adding service: Trendmicro Antivirus RealTime Scan (ntrtscan)
 - done

mike@mon:/usr/local/nagios/etc/servers$
</pre>
<p>This creates a files called server2.cfg, which Nagios can read and process.</p>
<p>Hope you like it, let me know if you have any questions or comments.</p>
<p>Take care,<br />
Michael</p>
<p><span style="color:#808080">Ethan Galstad (2005), Nagios. [online] Available from: <a href="http://archive.fosdem.org/2005/index/interviews/interviews_galstad.html">http://archive.fosdem.org/2005/index/interviews/interviews_galstad.html</a> (Accessed: 28 Jan 2010)</span></p>
]]></content:encoded>
			<wfw:commentRss>http://michaelhendrickx.com/201001_nnscfgmaker-sh-a-nagiosnsclient-cfg-maker.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
