<?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>Smemorando &#187; Nagios monitoraggio</title>
	<atom:link href="http://www.smemorando.com/tag/nagios-monitoraggio/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.smemorando.com</link>
	<description>la libertà non esiste, siamo tutti schiavi</description>
	<lastBuildDate>Wed, 02 Jun 2010 08:10:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Installare Nagios e plugins</title>
		<link>http://www.smemorando.com/2009/08/08/installare-e-configurare-nagios-nagios-plugins/</link>
		<comments>http://www.smemorando.com/2009/08/08/installare-e-configurare-nagios-nagios-plugins/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 18:06:28 +0000</pubDate>
		<dc:creator>Cristian</dc:creator>
				<category><![CDATA[Nagios]]></category>
		<category><![CDATA[htpasswd]]></category>
		<category><![CDATA[Nagios monitoraggio]]></category>

		<guid isPermaLink="false">http://www.smemorando.com/?p=23</guid>
		<description><![CDATA[Per iniziare installo questi pacchetti: sudo apt-get install apache2 sudo apt-get install build-essential sudo apt-get install libgd2-xpm-dev qui creo l&#8217;utente nagios e gli imposto la password nagios: sudo -s /usr/sbin/useradd -m nagios passwd nagios imposto il gruppo di appartenenza e la shell: /usr/sbin/groupadd nagios /usr/sbin/usermod -G nagios nagios /usr/sbin/groupadd nagcmd /usr/sbin/usermod -G nagcmd nagios /usr/sbin/usermod [...]]]></description>
			<content:encoded><![CDATA[<p>Per iniziare installo questi pacchetti:<br />
<span style="font-weight: bold;">sudo apt-get install apache2 </span><br />
<span style="font-weight: bold;">sudo apt-get install build-essential </span><br />
<span style="font-weight: bold;">sudo apt-get install libgd2-xpm-dev </span></p>
<p>qui creo l&#8217;utente nagios e gli imposto la password nagios:<br />
<span style="font-weight: bold;">sudo -s </span><br />
<span style="font-weight: bold;">/usr/sbin/useradd -m nagios </span><br />
<span style="font-weight: bold;">passwd nagios </span></p>
<p>imposto il gruppo di appartenenza e la shell:<br />
<span style="font-weight: bold;">/usr/sbin/groupadd nagios </span><br />
<span style="font-weight: bold;">/usr/sbin/usermod -G nagios nagios </span><br />
<span style="font-weight: bold;">/usr/sbin/groupadd nagcmd<br />
/usr/sbin/usermod -G nagcmd nagios </span><br />
<span style="font-weight: bold;">/usr/sbin/usermod -G nagcmd www-data </span></p>
<p>scarico i sorgenti:<br />
<span style="font-weight: bold;">wget <a href="http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.0.tar.gz" onclick="pageTracker._trackPageview('/outgoing/prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.0.tar.gz?referer=');">http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.0.tar.gz</a></span></p>
<p><span style="font-weight: bold;">wget <a href="http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.13.tar.gz" onclick="pageTracker._trackPageview('/outgoing/prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.13.tar.gz?referer=');">http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.13.tar.gz</a></span></p>
<p>scompatto e configuro il primo:<br />
<span style="font-weight: bold;">tar xzf nagios-3.2.0.tar.gz </span><br />
<span style="font-weight: bold;">cd nagios-3.2.0 </span><br />
<span style="font-weight: bold;">./configure &#8211;with-command-group=nagcmd<br />
make all<br />
make install </span></p>
<p>configuro i permessi:<br />
<span style="font-weight: bold;">make install-init </span><br />
<span style="font-weight: bold;">make install-config </span><br />
<span style="font-weight: bold;">make install-commandmode </span></p>
<p>e configuro l&#8217;interfaccia web:<br />
<span style="font-weight: bold;">make install-webconf </span></p>
<p>per funzionare ha bisogno di un utente amministratore:<br />
<span style="font-weight: bold;">htpasswd -c /usr/local/nagios/etc/</span><span style="font-weight: bold;">htpasswd.users nagiosadmin </span></p>
<p>ora faccio ricaricare la configurazione ad Apache:<br />
<span style="font-weight: bold;">/etc/init.d/apache2 reload </span></p>
<p>installo openssl e altri pacchetti utili che mi servirà anche per utilizzare il plug-in check_http per verificare i certificati ssl:<br />
<span style="font-weight: bold;">apt-get install openssl dnsutils fping</span></p>
<p>non resta che installare i plugin, quindi mi porto nella directory dove sono stati salvati e li scompatto e configuro:<br />
t<span style="font-weight: bold;">ar xzf nagios-plugins-1.4.13.tar.gz </span><br />
<span style="font-weight: bold;">cd nagios-plugins-1.4.13 </span><br />
<span style="font-weight: bold;">./configure &#8211;with-nagios-user=nagios &#8211;with-nagios-group=nagios &#8211;with-openssl=/usr/bin/openssl </span></p>
<p>e non:<br />
<span style="font-weight: bold;">./configure &#8211;with-nagios-user=nagios &#8211;with-nagios-group=nagios</span></p>
<p>poi lancio:<br />
<span style="font-weight: bold;">make </span><br />
<span style="font-weight: bold;">make install</span></p>
<p><span style="font-style: italic;">ora inizio con la configurazione.</span></p>
<p>per prima cosa edito il file bashrc e aggiungo un paio di alias per semplificarmi la vita:<br />
<span style="font-weight: bold;">vim /root/.bashrc</span></p>
<p>ed aggiungo subito dopo questa riga:<br />
# some more ls aliases</p>
<p>questi alias:<br />
<span style="font-weight: bold;">alias nagios_rs=&#8217;/etc/init.d/nagios restart&#8217;</span><br />
<span style="font-weight: bold;">alias nagios_st=&#8217;/etc/init.d/nagios start&#8217;</span><br />
<span style="font-weight: bold;">alias nagios_check=&#8217;/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg&#8217;</span></p>
<p>poi facciamo si che nagios si avvii in automatico al boot:<br />
<span style="font-weight: bold;">ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios</span></p>
<p>controllo che non ci siano errori:<br />
<span style="font-weight: bold;">nagios_check </span></p>
<p><a href="http://www.blog75.eu/uploaded_images/nagios_check-710875.png" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.blog75.eu/uploaded_images/nagios_check-710875.png?referer=');"><img style="display: block; margin: 0px auto 10px; width: 320px; cursor: pointer; height: 246px; text-align: center;" src="http://www.blog75.eu/uploaded_images/nagios_check-710873.png" border="0" alt="Nagios check" /></a><br />
e lo avviamo:<br />
<span style="font-weight: bold;">nagios_st </span></p>
<p>per accedere all&#8217;interfaccia web basta aprire il browser e digitare http://localhost/nagios/</p>
<p><a href="http://www.blog75.eu/uploaded_images/nagios-interface-1-780355.png" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.blog75.eu/uploaded_images/nagios-interface-1-780355.png?referer=');"><img style="display: block; margin: 0px auto 10px; width: 320px; cursor: pointer; height: 313px; text-align: center;" src="http://www.blog75.eu/uploaded_images/nagios-interface-1-780351.png" border="0" alt="Nagios Web Interface" /></a><br />
tra qualche giorno la seconda parte</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smemorando.com/2009/08/08/installare-e-configurare-nagios-nagios-plugins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
