<?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>gugaBSD &#187; nagios</title>
	<atom:link href="http://www.luizgustavo.pro.br/blog/tag/nagios/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.luizgustavo.pro.br/blog</link>
	<description>Software Livre, BSD e outras coisas mais...</description>
	<lastBuildDate>Fri, 13 Jan 2012 13:05:10 +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>Centreon 2.3.3 on FreeBSD 9 (update)</title>
		<link>http://www.luizgustavo.pro.br/blog/2011/12/09/english-centreon-2-3-3-freebsd-9/</link>
		<comments>http://www.luizgustavo.pro.br/blog/2011/12/09/english-centreon-2-3-3-freebsd-9/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 02:32:19 +0000</pubDate>
		<dc:creator>luizgustavo</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[mundoUnix]]></category>
		<category><![CDATA[Software Livre]]></category>
		<category><![CDATA[centreon]]></category>
		<category><![CDATA[monitoramento]]></category>
		<category><![CDATA[nagios]]></category>
		<category><![CDATA[SNMP]]></category>

		<guid isPermaLink="false">http://www.luizgustavo.pro.br/blog/2011/12/09/english-centreon-2-3-3-freebsd-9/</guid>
		<description><![CDATA[This tutorial will guide the user to complete the installation of Centreon on FreeBSD. We will be using an installation on a FreeBSD 9.0-PRERELEASE kernel version, kernel version does not influence the tutorial. It may be FreeBSD 8.x or 9.x What is the Centreon? Centreon is a powerful tool for monitoring hosts and services, it [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.luizgustavo.pro.br/blog/wp-content/uploads/2010/02/centreon_bsd.png"><img class="aligncenter size-full wp-image-367" title="centreon_bsd" src="http://www.luizgustavo.pro.br/blog/wp-content/uploads/2010/02/centreon_bsd.png" alt="" width="250" height="81" /></a>This tutorial will guide the user to complete the installation of Centreon on FreeBSD. We will be using an installation on a FreeBSD 9.0-PRERELEASE kernel version, kernel version does not influence the tutorial. It may be FreeBSD 8.x or 9.x</p>
<p>What is the Centreon?</p>
<p>Centreon is a powerful tool for monitoring hosts and services, it is a frontend that works on top of Nagios, adding many features for viewing and alert history, status, etc. ..</p>
<h4 style="text-align: center;">Need Support ? <a href="http://mundounix.com.br/wp/monitoramento-de-redes/" target="_blank">Click Here !</a></h4>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-386" title="monitoramento_diagrama" src="http://www.luizgustavo.pro.br/blog/wp-content/uploads/2010/02/monitoramento_diagrama.png" alt="" width="467" height="420" /></p>
<p>To learn more about the tool, I invite you to visit the official site at <a title="http://www.centreon.com" href="http://www.centreon.com/" rel="nofollow">http://www.centreon.com</a></p>
<p>What we need? ?</p>
<div>
<ul>
<li>Apache</li>
<li><acronym title="Hypertext Preprocessor">PHP</acronym> 5.3.x + a lot of dependencies</li>
<li>Mysql</li>
<li>Nagios</li>
<li>Pear + a lot of dependencies</li>
<li><acronym title="Practical Extraction and Report Language">Perl</acronym> + a lot of dependencies</li>
<li>rrdtool</li>
<li>snmp</li>
<li>sudo</li>
<li>Centreon (obvious :-p)</li>
</ul>
</div>
<p><span id="more-704"></span></p>
<h4>Starting installation of packages</h4>
<p>For this tutorial, we will use the tool <a href="http://www.freebsd.org/cgi/url.cgi?ports/ports-mgmt/portmaster/pkg-descr" target="_blank">portmaster</a>, you can even do all the installation manually, but I advise u to use the tool in order to facilitate the installation of the dependencies and the amount of packages that we need.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>ports<span style="color: #000000; font-weight: bold;">/</span>ports-mgmt<span style="color: #000000; font-weight: bold;">/</span>portmaster
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span> clean</pre></div></div>

<p>if you are using csh shell</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rehash</pre></div></div>

<p>We start by some common packages to provide the Centreon:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># In the package configurations, keep the default settings or to your liking.</span>
portmaster <span style="color: #660033;">-d</span> lang<span style="color: #000000; font-weight: bold;">/</span>perl5.12 www<span style="color: #000000; font-weight: bold;">/</span>apache22 shells<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">bash</span> security<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">sudo</span> net-mgmt<span style="color: #000000; font-weight: bold;">/</span>net-snmp net-mgmt<span style="color: #000000; font-weight: bold;">/</span>snmptt</pre></div></div>

<p>Installing our database (if using MySQL outside, only install mysql-client)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">portmaster <span style="color: #660033;">-d</span> databases<span style="color: #000000; font-weight: bold;">/</span>mysql51-client databases<span style="color: #000000; font-weight: bold;">/</span>mysql51-server</pre></div></div>

<p>Let&#8217;s go, install the PHP:</p>
<p>Attention to configure PHP5 package, you need some options checked, at least those which are listed below:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> │ │ <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> CLI        Build CLI version                               │ │
 │ │ <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> APACHE     Build Apache module                             │ │</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">portmaster <span style="color: #660033;">-d</span> lang<span style="color: #000000; font-weight: bold;">/</span>php5 databases<span style="color: #000000; font-weight: bold;">/</span>php5-mysql graphics<span style="color: #000000; font-weight: bold;">/</span>php5-gd 
	www<span style="color: #000000; font-weight: bold;">/</span>php5-session archivers<span style="color: #000000; font-weight: bold;">/</span>php5-zlib 
	sysutils<span style="color: #000000; font-weight: bold;">/</span>php5-posix security<span style="color: #000000; font-weight: bold;">/</span>php5-filter 
	converters<span style="color: #000000; font-weight: bold;">/</span>php5-mbstring textproc<span style="color: #000000; font-weight: bold;">/</span>php5-xml 
	devel<span style="color: #000000; font-weight: bold;">/</span>php5-gettext textproc<span style="color: #000000; font-weight: bold;">/</span>php5-xmlwriter</pre></div></div>

<p>PEAR:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">portmaster <span style="color: #660033;">-d</span> devel<span style="color: #000000; font-weight: bold;">/</span>pear databases<span style="color: #000000; font-weight: bold;">/</span>pear-DB_DataObject databases<span style="color: #000000; font-weight: bold;">/</span>pear-DB_DataObject_FormBuilder 
	databases<span style="color: #000000; font-weight: bold;">/</span>pear-MDB2 textproc<span style="color: #000000; font-weight: bold;">/</span>pear-Numbers_Roman 
	textproc<span style="color: #000000; font-weight: bold;">/</span>pear-Numbers_Words devel<span style="color: #000000; font-weight: bold;">/</span>pear-HTML_QuickForm2 
	devel<span style="color: #000000; font-weight: bold;">/</span>pear-HTML_QuickForm_advmultiselect net<span style="color: #000000; font-weight: bold;">/</span>pear-Net_Traceroute 
	net<span style="color: #000000; font-weight: bold;">/</span>pear-Net_Ping devel<span style="color: #000000; font-weight: bold;">/</span>pear-Validate net<span style="color: #000000; font-weight: bold;">/</span>pear-XML_RPC 
	mail<span style="color: #000000; font-weight: bold;">/</span>pear-Mail mail<span style="color: #000000; font-weight: bold;">/</span>pear-Mail_Mime www<span style="color: #000000; font-weight: bold;">/</span>pear-HTTP net<span style="color: #000000; font-weight: bold;">/</span>pear-SOAP 
	devel<span style="color: #000000; font-weight: bold;">/</span>pear-HTML_Table security<span style="color: #000000; font-weight: bold;">/</span>pear-Auth_SASL net<span style="color: #000000; font-weight: bold;">/</span>pear-Net_SMTP 
	graphics<span style="color: #000000; font-weight: bold;">/</span>pear-Image_Canvas graphics<span style="color: #000000; font-weight: bold;">/</span>pear-Image_Graph 
	graphics<span style="color: #000000; font-weight: bold;">/</span>pear-Image_GraphViz</pre></div></div>

<p>Let&#8217;s go to the part of Perl:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">portmaster <span style="color: #660033;">-d</span> devel<span style="color: #000000; font-weight: bold;">/</span>p5-Config-IniFiles graphics<span style="color: #000000; font-weight: bold;">/</span>p5-GD 
	databases<span style="color: #000000; font-weight: bold;">/</span>p5-DBD-mysql security<span style="color: #000000; font-weight: bold;">/</span>p5-Crypt-DES 
	security<span style="color: #000000; font-weight: bold;">/</span>p5-Digest-HMAC net-mgmt<span style="color: #000000; font-weight: bold;">/</span>p5-Net-SNMP</pre></div></div>

<h4 style="text-align: center;">Problems with network? implementing security? <a href="http://mundounix.com.br/wp/consultoria-linuxbsd/" target="_blank">click here !</a></h4>
<p>An important tool that can not miss in our environment:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">portmaster <span style="color: #660033;">-d</span> databases<span style="color: #000000; font-weight: bold;">/</span>rrdtool</pre></div></div>

<p>And our background of Centreon, Nagios!</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">portmaster <span style="color: #660033;">-d</span> net-mgmt<span style="color: #000000; font-weight: bold;">/</span>nagios net-mgmt<span style="color: #000000; font-weight: bold;">/</span>ndoutils</pre></div></div>

<p>Check the options:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">│ │<span style="color: #7a0874; font-weight: bold;">&#91;</span>X<span style="color: #7a0874; font-weight: bold;">&#93;</span> EMBEDDED_PERL   Enable embedded Perl <span style="color: #7a0874; font-weight: bold;">&#91;</span>requires Perl 5.8.0+<span style="color: #7a0874; font-weight: bold;">&#93;</span> │ │
│ │<span style="color: #7a0874; font-weight: bold;">&#91;</span>X<span style="color: #7a0874; font-weight: bold;">&#93;</span> NANOSLEEP       Use nanosleep <span style="color: #000000; font-weight: bold;">in</span> event timing               │ │
│ │<span style="color: #7a0874; font-weight: bold;">&#91;</span>X<span style="color: #7a0874; font-weight: bold;">&#93;</span> EVENT_BROKER    Enable event broker functionality           │ │</pre></div></div>

<p>Nagios-plugins:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">│ │ <span style="color: #7a0874; font-weight: bold;">&#91;</span>X<span style="color: #7a0874; font-weight: bold;">&#93;</span> FPING    Support <span style="color: #000000; font-weight: bold;">for</span> non-flooding fast <span style="color: #c20cb9; font-weight: bold;">ping</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>check_fping<span style="color: #7a0874; font-weight: bold;">&#41;</span>  │ │
│ │ <span style="color: #7a0874; font-weight: bold;">&#91;</span>X<span style="color: #7a0874; font-weight: bold;">&#93;</span> NETSNMP  SNMP support <span style="color: #7a0874; font-weight: bold;">&#40;</span>check_snmp<span style="color: #7a0874; font-weight: bold;">&#41;</span>                         │ │</pre></div></div>

<p>If installing in a Jail, check below:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">│ │ <span style="color: #7a0874; font-weight: bold;">&#91;</span>X<span style="color: #7a0874; font-weight: bold;">&#93;</span> JAIL     Compilation within jail<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">8</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>see Makefile<span style="color: #7a0874; font-weight: bold;">&#41;</span>         │ │</pre></div></div>

<p>ndoutils:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">│ │ <span style="color: #7a0874; font-weight: bold;">&#91;</span>X<span style="color: #7a0874; font-weight: bold;">&#93;</span> MYSQL  MySQL Backend  			                   │ │</pre></div></div>

<p>Let&#8217;s settings for some packages:</p>
<p>if you are using csh shell</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rehash</pre></div></div>

<p>PHP:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc
<span style="color: #c20cb9; font-weight: bold;">cp</span> php.ini-production php.ini
<span style="color: #666666; font-style: italic;"># Set the time zone for your location</span>
<span style="color: #c20cb9; font-weight: bold;">perl</span> <span style="color: #660033;">-p</span> <span style="color: #660033;">-i</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/;date.timezone =/date.timezone = America/Sao_Paulo/'</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php.ini</pre></div></div>

<p>Apache:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'apache22_enable=&quot;YES&quot;'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.conf
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;AddType application/x-httpd-php .php&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache22<span style="color: #000000; font-weight: bold;">/</span>Includes<span style="color: #000000; font-weight: bold;">/</span>php.conf
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;AddType application/x-httpd-php-source .phps&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache22<span style="color: #000000; font-weight: bold;">/</span>Includes<span style="color: #000000; font-weight: bold;">/</span>php.conf
<span style="color: #c20cb9; font-weight: bold;">perl</span> <span style="color: #660033;">-p</span> <span style="color: #660033;">-i</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/DirectoryIndex index.html/DirectoryIndex index.html index.php/g'</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache22<span style="color: #000000; font-weight: bold;">/</span>httpd.conf
&nbsp;
<span style="color: #666666; font-style: italic;"># Make sure your hosts file (/etc/hosts) or internal DNS is working properly</span>
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.d<span style="color: #000000; font-weight: bold;">/</span>apache22 start</pre></div></div>

<p>Mysql:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'mysql_enable=&quot;YES&quot;'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.conf
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.d<span style="color: #000000; font-weight: bold;">/</span>mysql-server start
<span style="color: #666666; font-style: italic;"># set the root password for mysql</span>
mysqladmin <span style="color: #660033;">-u</span> root password <span style="color: #ff0000;">&quot;new-password&quot;</span></pre></div></div>

<p>SNMP:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'snmpd_enable=&quot;YES&quot;'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.conf
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'snmpd_flags=&quot;-a&quot;'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.conf
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'snmpd_conffile=&quot;/usr/local/etc/snmp/snmpd.conf&quot;'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.conf
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'snmptrapd_enable=&quot;YES&quot;'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.conf
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'snmptrapd_flags=&quot;-a -p /var/run/snmptrapd.pid&quot;'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.conf
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>snmp
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>snmp<span style="color: #000000; font-weight: bold;">/</span>snmpd.conf.example <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>snmp<span style="color: #000000; font-weight: bold;">/</span>snmpd.conf
<span style="color: #c20cb9; font-weight: bold;">perl</span> <span style="color: #660033;">-p</span> <span style="color: #660033;">-i</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/rocommunity public  default    -V systemonly/rocommunity public default/g'</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>snmp<span style="color: #000000; font-weight: bold;">/</span>snmpd.conf
<span style="color: #c20cb9; font-weight: bold;">perl</span> <span style="color: #660033;">-p</span> <span style="color: #660033;">-i</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/agentAddress  udp:127.0.0.1:161/#agentAddress  udp:127.0.0.1:161/'</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>snmp<span style="color: #000000; font-weight: bold;">/</span>snmpd.conf
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.d<span style="color: #000000; font-weight: bold;">/</span>snmpd start
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.d<span style="color: #000000; font-weight: bold;">/</span>snmptrapd start</pre></div></div>

<p>Fix the file <strong><span style="text-decoration: underline;">/usr/local/etc/snmp/snmpd.conf</span></strong> with location information and identification.</p>
<p><em></em>If you are installing snmpd in a Jail, see this article for the same operation in Jail:<br />
<a href="http://ggeek.blogspot.com/2008/10/freebsd-jails-and-net-snmp.html" target="_blank">http://ggeek.blogspot.com/2008/10/freebsd-jails-and-net-snmp.html</a></p>
<h4 style="text-align: center;">Consulting in Open Source, <a href="http://mundounix.com.br/wp/consultoria/" target="_blank">contact us!</a></h4>
<p>Nagios:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sh</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>nagios<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-1</span> <span style="color: #000000; font-weight: bold;">*</span>-sample <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #c20cb9; font-weight: bold;">read</span> arq ; <span style="color: #000000; font-weight: bold;">do</span> <span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #007800;">$arq</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$arq</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-f1</span> <span style="color: #660033;">-d</span><span style="color: #ff0000;">'-'</span><span style="color: #000000; font-weight: bold;">`</span> ; <span style="color: #000000; font-weight: bold;">done</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> objects<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-1</span> <span style="color: #000000; font-weight: bold;">*</span>-sample <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #c20cb9; font-weight: bold;">read</span> arq ; <span style="color: #000000; font-weight: bold;">do</span> <span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #007800;">$arq</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$arq</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-f1</span> <span style="color: #660033;">-d</span><span style="color: #ff0000;">'-'</span><span style="color: #000000; font-weight: bold;">`</span> ; <span style="color: #000000; font-weight: bold;">done</span>
<span style="color: #7a0874; font-weight: bold;">exit</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'nagios_enable=&quot;YES&quot;'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.conf
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.d<span style="color: #000000; font-weight: bold;">/</span>nagios start</pre></div></div>

<p>NDOUtils:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'ndo2db_enable=&quot;YES&quot;'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.conf</pre></div></div>

<p>Download Centreon:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>tmp
fetch http:<span style="color: #000000; font-weight: bold;">//</span>download.centreon.com<span style="color: #000000; font-weight: bold;">/</span>centreon<span style="color: #000000; font-weight: bold;">/</span>centreon-2.3.3.tar.gz
<span style="color: #c20cb9; font-weight: bold;">tar</span> zxf centreon-2.3.3.tar.gz
<span style="color: #7a0874; font-weight: bold;">cd</span> centreon-2.3.3</pre></div></div>

<p>Making Centreon read the bash shell</p>
<p>There are two ways (choose one):</p>
<p>- Changing the path the scripts Centreon:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">perl</span> <span style="color: #660033;">-p</span> <span style="color: #660033;">-i</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s//bin/bash//usr/local/bin/bash/g'</span> install.sh
<span style="color: #c20cb9; font-weight: bold;">perl</span> <span style="color: #660033;">-p</span> <span style="color: #660033;">-i</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s//bin/bash//usr/local/bin/bash/g'</span> libinstall<span style="color: #000000; font-weight: bold;">/*</span></pre></div></div>

<p>- Creating a symbolic link in /bin</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">bash</span> <span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">bash</span></pre></div></div>

<p>Some preparations for the installation:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>cron.d
fetch <span style="color: #660033;">-o</span> tmpl<span style="color: #000000; font-weight: bold;">/</span>vardistrib<span style="color: #000000; font-weight: bold;">/</span>freebsd http:<span style="color: #000000; font-weight: bold;">//</span>www.luizgustavo.pro.br<span style="color: #000000; font-weight: bold;">/</span>downloads<span style="color: #000000; font-weight: bold;">/</span>freebsd.txt</pre></div></div>

<p>Now start the installation via the command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">bash</span> install.sh <span style="color: #660033;">-f</span> tmpl<span style="color: #000000; font-weight: bold;">/</span>vardistrib<span style="color: #000000; font-weight: bold;">/</span>freebsd</pre></div></div>

<p>Follow the installation process through the video below:</p>
<p><iframe src="http://www.youtube.com/embed/h3QensGRZeA?rel=0" frameborder="0" width="520" height="350"></iframe></p>
<p>After installation, we will leave for the web part to do so, restart MySQL and Apache:</p>
<div>
<div>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.d<span style="color: #000000; font-weight: bold;">/</span>apache2 restart
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.d<span style="color: #000000; font-weight: bold;">/</span>mysql-server restart</pre></div></div>

</div>
</div>
<p>We fix some patches of permission:</p>
<div>
<div>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> www:www <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>centreon<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>centreon
<span style="color: #c20cb9; font-weight: bold;">rm</span> filesGeneration
<span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>cache<span style="color: #000000; font-weight: bold;">/</span>centreon<span style="color: #000000; font-weight: bold;">/</span>filesGeneration .
<span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> www:www filesGeneration
<span style="color: #c20cb9; font-weight: bold;">rm</span> filesUpload
<span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>cache<span style="color: #000000; font-weight: bold;">/</span>centreon<span style="color: #000000; font-weight: bold;">/</span>filesUpload .
<span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> www:www filesUpload
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>cache<span style="color: #000000; font-weight: bold;">/</span>centreon
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>centreon<span style="color: #000000; font-weight: bold;">/</span>filesGeneration
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>centreon<span style="color: #000000; font-weight: bold;">/</span>filesUpload</pre></div></div>

</div>
</div>
<p>We also fix a problem of dependence on the version of PEAR:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>pear uninstall HTML_QuickForm_advmultiselect 
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>pear <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">-f</span> pear<span style="color: #000000; font-weight: bold;">/</span>HTML_QuickForm_advmultiselect-1.2.0</pre></div></div>

<p><em>Now this way, we can point to our broswer centreon server address:</em></p>
<pre>http://&lt;ip_or_url&gt;/centreon</pre>
<h4>Follow the video to configure the web:</h4>
<p><iframe src="http://www.youtube.com/embed/0NUwmVmcfKA?rel=0" frameborder="0" width="520" height="360"></iframe></p>
<p><strong>There is less, we still need to export the configuration files for our NDO-Utils to work for it, follow the export of the same video on the web:</strong></p>
<p><iframe src="http://www.youtube.com/embed/UdebdL-AaN0?rel=0" frameborder="0" width="520" height="360"></iframe></p>
<p>Now, let&#8217;s start the processes of Centreon:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">pw user mod nagios <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">sh</span>
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.d<span style="color: #000000; font-weight: bold;">/</span>centcore start
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.d<span style="color: #000000; font-weight: bold;">/</span>centstorage start</pre></div></div>

<p>Setting the part of the CRON to FreeBSD:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>cron.d<span style="color: #000000; font-weight: bold;">/*</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>crontab
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.d<span style="color: #000000; font-weight: bold;">/</span>cron restart
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>cron.d</pre></div></div>

<p>Restart nagios processes and ndoutils</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.d<span style="color: #000000; font-weight: bold;">/</span>nagios restart
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.d<span style="color: #000000; font-weight: bold;">/</span>ndo2db restart</pre></div></div>

<p>Ready! Now just configure your hosts and start monitoring.</p>
<p><a href="http://www.mundounix.com.br/"><img class="alignleft" title="logo_mundounix3" src="http://luizgustavo.pro.br/blog/wp-content/uploads/2009/09/logo_mundounix3.png" alt="" width="284" height="72" /></a><em><strong>If you need support Centreon, contact the <a href="http://www.mundounix.com.br/" target="_blank">Mundounix</a>, we offer support and advice for network monitoring solution.</strong></em></p>
<p><a href="http://www.mundounix.com.br/" target="_blank">http://www.mundounix.com.br</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.luizgustavo.pro.br/blog/2011/12/09/english-centreon-2-3-3-freebsd-9/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Centreon 2.3.3 no FreeBSD 9 (atualizado)</title>
		<link>http://www.luizgustavo.pro.br/blog/2011/12/08/centreon-2-3-3-freebsd9/</link>
		<comments>http://www.luizgustavo.pro.br/blog/2011/12/08/centreon-2-3-3-freebsd9/#comments</comments>
		<pubDate>Thu, 08 Dec 2011 22:20:09 +0000</pubDate>
		<dc:creator>luizgustavo</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[mundoUnix]]></category>
		<category><![CDATA[Software Livre]]></category>
		<category><![CDATA[centreon]]></category>
		<category><![CDATA[monitoramento]]></category>
		<category><![CDATA[nagios]]></category>
		<category><![CDATA[SNMP]]></category>

		<guid isPermaLink="false">http://www.luizgustavo.pro.br/blog/?p=674</guid>
		<description><![CDATA[Este tutorial vai orientar o usuário a efetuar a instalação do Centreon no FreeBSD. Estaremos utilizando uma instalação em um FreeBSD com kernel versão 9.0-PRERELEASE, a versão do kernel não influenciará no tutorial. Pode ser FreeBSD 8.x ou 9.x O que é o Centreon ? Centreon é uma poderosa ferramenta de monitoramento de hosts e [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.luizgustavo.pro.br/blog/wp-content/uploads/2010/02/centreon_bsd.png"><img class="aligncenter size-full wp-image-367" title="centreon_bsd" src="http://www.luizgustavo.pro.br/blog/wp-content/uploads/2010/02/centreon_bsd.png" alt="" width="250" height="81" /></a>Este tutorial vai orientar o usuário a efetuar a instalação do Centreon no FreeBSD. Estaremos utilizando uma instalação em um FreeBSD com kernel versão 9.0-PRERELEASE, a versão do kernel não influenciará no tutorial. Pode ser FreeBSD 8.x ou 9.x</p>
<h4>O que é o Centreon ?</h4>
<p>Centreon é uma poderosa ferramenta de monitoramento de hosts e serviços, ele é um frontend que funciona em cima do Nagios, adicionando muitas facilidades para visualização e histórico de alertas, estatus, etc..</p>
<h4 style="text-align: center;">Precisa de suporte ? <a href="http://mundounix.com.br/wp/monitoramento-de-redes/" target="_blank">Clique aqui !</a></h4>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-386" title="monitoramento_diagrama" src="http://www.luizgustavo.pro.br/blog/wp-content/uploads/2010/02/monitoramento_diagrama.png" alt="" width="467" height="420" /></p>
<p>Para conhecer um pouco mais sobre a ferramenta, eu lhe convido a visitar o site oficial no endereço <a title="http://www.centreon.com" href="http://www.centreon.com/" rel="nofollow">http://www.centreon.com</a></p>
<p>O que nós vamos precisar ?</p>
<div>
<ul>
<li>Apache</li>
<li><acronym title="Hypertext Preprocessor">PHP</acronym> 5.3.x + um monte de dependências</li>
<li>Mysql</li>
<li>Nagios</li>
<li>Pear + um monte de dependências</li>
<li><acronym title="Practical Extraction and Report Language">Perl</acronym> + um monte de dependências</li>
<li>rrdtool</li>
<li>snmp</li>
<li>sudo</li>
<li>Centreon (óbvio :-p)</li>
</ul>
</div>
<p><span id="more-674"></span></p>
<h4>Iniciando a instalação dos pacotes</h4>
<p>Para este tutorial, nos iremos usar a ferramenta <a href="http://www.freebsd.org/cgi/url.cgi?ports/ports-mgmt/portmaster/pkg-descr" target="_blank">portmaster</a>, você até podera fazer toda a instalação manualmente, mas u aconselho o uso da ferramenta, afim de facilitar a instalação das dependências e pela a quantidade de pacotes que iremos precisar.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>ports<span style="color: #000000; font-weight: bold;">/</span>ports-mgmt<span style="color: #000000; font-weight: bold;">/</span>portmaster
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span> clean</pre></div></div>

<p>se estiver usando o shell csh</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rehash</pre></div></div>

<p>Começamos por alguns pacotes comuns para prover o Centreon:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Nas configurações de pacotes, mantenha as opções default ou a seu gosto.</span>
portmaster <span style="color: #660033;">-d</span> lang<span style="color: #000000; font-weight: bold;">/</span>perl5.12 www<span style="color: #000000; font-weight: bold;">/</span>apache22 shells<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">bash</span> security<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">sudo</span> net-mgmt<span style="color: #000000; font-weight: bold;">/</span>net-snmp net-mgmt<span style="color: #000000; font-weight: bold;">/</span>snmptt</pre></div></div>

<p>Instalando nosso banco de dados (se for usar o Mysql fora, instale somente o mysql-client)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">portmaster <span style="color: #660033;">-d</span> databases<span style="color: #000000; font-weight: bold;">/</span>mysql51-client databases<span style="color: #000000; font-weight: bold;">/</span>mysql51-server</pre></div></div>

<p>Vamos instalar o PHP:</p>
<p>Atenção ao configurar o pacote PHP5, você precisará de algumas opções marcadas, pelo menos as que estão listadas abaixo:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> │ │ <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> CLI        Build CLI version                               │ │
 │ │ <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> APACHE     Build Apache module                             │ │</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">portmaster <span style="color: #660033;">-d</span> lang<span style="color: #000000; font-weight: bold;">/</span>php5 databases<span style="color: #000000; font-weight: bold;">/</span>php5-mysql graphics<span style="color: #000000; font-weight: bold;">/</span>php5-gd \
	www<span style="color: #000000; font-weight: bold;">/</span>php5-session archivers<span style="color: #000000; font-weight: bold;">/</span>php5-zlib \
	sysutils<span style="color: #000000; font-weight: bold;">/</span>php5-posix security<span style="color: #000000; font-weight: bold;">/</span>php5-filter \
	converters<span style="color: #000000; font-weight: bold;">/</span>php5-mbstring textproc<span style="color: #000000; font-weight: bold;">/</span>php5-xml \
	devel<span style="color: #000000; font-weight: bold;">/</span>php5-gettext textproc<span style="color: #000000; font-weight: bold;">/</span>php5-xmlwriter</pre></div></div>

<p>PEAR:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">portmaster <span style="color: #660033;">-d</span> devel<span style="color: #000000; font-weight: bold;">/</span>pear databases<span style="color: #000000; font-weight: bold;">/</span>pear-DB_DataObject databases<span style="color: #000000; font-weight: bold;">/</span>pear-DB_DataObject_FormBuilder \
	databases<span style="color: #000000; font-weight: bold;">/</span>pear-MDB2 textproc<span style="color: #000000; font-weight: bold;">/</span>pear-Numbers_Roman \
	textproc<span style="color: #000000; font-weight: bold;">/</span>pear-Numbers_Words devel<span style="color: #000000; font-weight: bold;">/</span>pear-HTML_QuickForm2 \
	devel<span style="color: #000000; font-weight: bold;">/</span>pear-HTML_QuickForm_advmultiselect net<span style="color: #000000; font-weight: bold;">/</span>pear-Net_Traceroute \
	net<span style="color: #000000; font-weight: bold;">/</span>pear-Net_Ping devel<span style="color: #000000; font-weight: bold;">/</span>pear-Validate net<span style="color: #000000; font-weight: bold;">/</span>pear-XML_RPC \
	mail<span style="color: #000000; font-weight: bold;">/</span>pear-Mail mail<span style="color: #000000; font-weight: bold;">/</span>pear-Mail_Mime www<span style="color: #000000; font-weight: bold;">/</span>pear-HTTP net<span style="color: #000000; font-weight: bold;">/</span>pear-SOAP \
	devel<span style="color: #000000; font-weight: bold;">/</span>pear-HTML_Table security<span style="color: #000000; font-weight: bold;">/</span>pear-Auth_SASL net<span style="color: #000000; font-weight: bold;">/</span>pear-Net_SMTP \
	graphics<span style="color: #000000; font-weight: bold;">/</span>pear-Image_Canvas graphics<span style="color: #000000; font-weight: bold;">/</span>pear-Image_Graph \
	graphics<span style="color: #000000; font-weight: bold;">/</span>pear-Image_GraphViz</pre></div></div>

<p>Vamos para a parte do Perl:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">portmaster <span style="color: #660033;">-d</span> devel<span style="color: #000000; font-weight: bold;">/</span>p5-Config-IniFiles graphics<span style="color: #000000; font-weight: bold;">/</span>p5-GD \
	databases<span style="color: #000000; font-weight: bold;">/</span>p5-DBD-mysql security<span style="color: #000000; font-weight: bold;">/</span>p5-Crypt-DES \
	security<span style="color: #000000; font-weight: bold;">/</span>p5-Digest-HMAC net-mgmt<span style="color: #000000; font-weight: bold;">/</span>p5-Net-SNMP</pre></div></div>

<h4 style="text-align: center;">Problemas com rede ? implementação de segurança ? <a href="http://mundounix.com.br/wp/consultoria-linuxbsd/" target="_blank">clique aqui</a></h4>
<p>Uma importante ferramenta que não pode faltar no nosso ambiente:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">portmaster <span style="color: #660033;">-d</span> databases<span style="color: #000000; font-weight: bold;">/</span>rrdtool</pre></div></div>

<p>E nosso pano de fundo do Centreon, o Nagios !</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">portmaster <span style="color: #660033;">-d</span> net-mgmt<span style="color: #000000; font-weight: bold;">/</span>nagios net-mgmt<span style="color: #000000; font-weight: bold;">/</span>ndoutils</pre></div></div>

<p>Marque as opções:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">│ │<span style="color: #7a0874; font-weight: bold;">&#91;</span>X<span style="color: #7a0874; font-weight: bold;">&#93;</span> EMBEDDED_PERL   Enable embedded Perl <span style="color: #7a0874; font-weight: bold;">&#91;</span>requires Perl 5.8.0+<span style="color: #7a0874; font-weight: bold;">&#93;</span> │ │
│ │<span style="color: #7a0874; font-weight: bold;">&#91;</span>X<span style="color: #7a0874; font-weight: bold;">&#93;</span> NANOSLEEP       Use nanosleep <span style="color: #000000; font-weight: bold;">in</span> event timing               │ │
│ │<span style="color: #7a0874; font-weight: bold;">&#91;</span>X<span style="color: #7a0874; font-weight: bold;">&#93;</span> EVENT_BROKER    Enable event broker functionality           │ │</pre></div></div>

<p>Nagios-plugins:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">│ │ <span style="color: #7a0874; font-weight: bold;">&#91;</span>X<span style="color: #7a0874; font-weight: bold;">&#93;</span> FPING    Support <span style="color: #000000; font-weight: bold;">for</span> non-flooding fast <span style="color: #c20cb9; font-weight: bold;">ping</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>check_fping<span style="color: #7a0874; font-weight: bold;">&#41;</span>  │ │
│ │ <span style="color: #7a0874; font-weight: bold;">&#91;</span>X<span style="color: #7a0874; font-weight: bold;">&#93;</span> NETSNMP  SNMP support <span style="color: #7a0874; font-weight: bold;">&#40;</span>check_snmp<span style="color: #7a0874; font-weight: bold;">&#41;</span>                         │ │</pre></div></div>

<p>Se estiver instalando dentro de uma Jail, marque a opção abaixo:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">│ │ <span style="color: #7a0874; font-weight: bold;">&#91;</span>X<span style="color: #7a0874; font-weight: bold;">&#93;</span> JAIL     Compilation within jail<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">8</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>see Makefile<span style="color: #7a0874; font-weight: bold;">&#41;</span>         │ │</pre></div></div>

<p>ndoutils:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">│ │ <span style="color: #7a0874; font-weight: bold;">&#91;</span>X<span style="color: #7a0874; font-weight: bold;">&#93;</span> MYSQL  MySQL Backend  			                   │ │</pre></div></div>

<p>Vamos as configurações de alguns pacotes:</p>
<p>se estiver usando o shell csh</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rehash</pre></div></div>

<p>PHP:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc
<span style="color: #c20cb9; font-weight: bold;">cp</span> php.ini-production php.ini
<span style="color: #666666; font-style: italic;"># Ajuste o Fuso horario para sua localidade</span>
<span style="color: #c20cb9; font-weight: bold;">perl</span> <span style="color: #660033;">-p</span> <span style="color: #660033;">-i</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/;date.timezone =/date.timezone = America\/Sao_Paulo/'</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php.ini</pre></div></div>

<p>Apache:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'apache22_enable=&quot;YES&quot;'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.conf
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;AddType application/x-httpd-php .php&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache22<span style="color: #000000; font-weight: bold;">/</span>Includes<span style="color: #000000; font-weight: bold;">/</span>php.conf
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;AddType application/x-httpd-php-source .phps&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache22<span style="color: #000000; font-weight: bold;">/</span>Includes<span style="color: #000000; font-weight: bold;">/</span>php.conf
<span style="color: #c20cb9; font-weight: bold;">perl</span> <span style="color: #660033;">-p</span> <span style="color: #660033;">-i</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/DirectoryIndex index.html/DirectoryIndex index.html index.php/g'</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache22<span style="color: #000000; font-weight: bold;">/</span>httpd.conf
&nbsp;
<span style="color: #666666; font-style: italic;"># Verifique se o seu arquivo de hosts (/etc/hosts) ou DNS interno esta funcionando corretamente</span>
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.d<span style="color: #000000; font-weight: bold;">/</span>apache22 start</pre></div></div>

<p>Mysql:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'mysql_enable=&quot;YES&quot;'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.conf
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.d<span style="color: #000000; font-weight: bold;">/</span>mysql-server start
<span style="color: #666666; font-style: italic;"># definir senha para root do mysql</span>
mysqladmin <span style="color: #660033;">-u</span> root password <span style="color: #ff0000;">&quot;nova-senha&quot;</span></pre></div></div>

<p>SNMP:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'snmpd_enable=&quot;YES&quot;'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.conf
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'snmpd_flags=&quot;-a&quot;'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.conf
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'snmpd_conffile=&quot;/usr/local/etc/snmp/snmpd.conf&quot;'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.conf
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'snmptrapd_enable=&quot;YES&quot;'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.conf
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'snmptrapd_flags=&quot;-a -p /var/run/snmptrapd.pid&quot;'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.conf
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>snmp
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>snmp<span style="color: #000000; font-weight: bold;">/</span>snmpd.conf.example <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>snmp<span style="color: #000000; font-weight: bold;">/</span>snmpd.conf
<span style="color: #c20cb9; font-weight: bold;">perl</span> <span style="color: #660033;">-p</span> <span style="color: #660033;">-i</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/rocommunity public  default    -V systemonly/rocommunity public default/g'</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>snmp<span style="color: #000000; font-weight: bold;">/</span>snmpd.conf
<span style="color: #c20cb9; font-weight: bold;">perl</span> <span style="color: #660033;">-p</span> <span style="color: #660033;">-i</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/agentAddress  udp:127.0.0.1:161/#agentAddress  udp:127.0.0.1:161/'</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>snmp<span style="color: #000000; font-weight: bold;">/</span>snmpd.conf
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.d<span style="color: #000000; font-weight: bold;">/</span>snmpd start
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.d<span style="color: #000000; font-weight: bold;">/</span>snmptrapd start</pre></div></div>

<p>Acerte o arquivo <span style="text-decoration: underline;"><strong>/usr/local/etc/snmp/snmpd.conf</strong></span> com informações de localização e identificação.</p>
<p><em>Se você estiver instalando o snmpd em uma Jail, veja este artigo para funcionamento da mesma em Jail:</em><br />
<a href="http://ggeek.blogspot.com/2008/10/freebsd-jails-and-net-snmp.html" target="_blank">http://ggeek.blogspot.com/2008/10/freebsd-jails-and-net-snmp.html</a></p>
<h4 style="text-align: center;">Consultoria em Soluções Livres, <a href="http://mundounix.com.br/wp/consultoria/" target="_blank">entre em contato !</a></h4>
<p>Nagios:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sh</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>nagios<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-1</span> <span style="color: #000000; font-weight: bold;">*</span>-sample <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #c20cb9; font-weight: bold;">read</span> arq ; <span style="color: #000000; font-weight: bold;">do</span> <span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #007800;">$arq</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$arq</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-f1</span> <span style="color: #660033;">-d</span><span style="color: #ff0000;">'-'</span><span style="color: #000000; font-weight: bold;">`</span> ; <span style="color: #000000; font-weight: bold;">done</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> objects<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-1</span> <span style="color: #000000; font-weight: bold;">*</span>-sample <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #c20cb9; font-weight: bold;">read</span> arq ; <span style="color: #000000; font-weight: bold;">do</span> <span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #007800;">$arq</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$arq</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-f1</span> <span style="color: #660033;">-d</span><span style="color: #ff0000;">'-'</span><span style="color: #000000; font-weight: bold;">`</span> ; <span style="color: #000000; font-weight: bold;">done</span>
<span style="color: #7a0874; font-weight: bold;">exit</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'nagios_enable=&quot;YES&quot;'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.conf
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.d<span style="color: #000000; font-weight: bold;">/</span>nagios start</pre></div></div>

<p>NDOUtils:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'ndo2db_enable=&quot;YES&quot;'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.conf</pre></div></div>

<p>Fazendo download do Centreon:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>tmp
fetch http:<span style="color: #000000; font-weight: bold;">//</span>download.centreon.com<span style="color: #000000; font-weight: bold;">/</span>centreon<span style="color: #000000; font-weight: bold;">/</span>centreon-2.3.3.tar.gz
<span style="color: #c20cb9; font-weight: bold;">tar</span> zxf centreon-2.3.3.tar.gz
<span style="color: #7a0874; font-weight: bold;">cd</span> centreon-2.3.3</pre></div></div>

<p>Fazendo o Centreon ler o shell bash</p>
<p>Existem 2 maneiras (escolha uma):</p>
<p>- Alterando o caminho nos scripts do Centreon:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">perl</span> <span style="color: #660033;">-p</span> <span style="color: #660033;">-i</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/\/bin\/bash/\/usr\/local\/bin\/bash/g'</span> install.sh
<span style="color: #c20cb9; font-weight: bold;">perl</span> <span style="color: #660033;">-p</span> <span style="color: #660033;">-i</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/\/bin\/bash/\/usr\/local\/bin\/bash/g'</span> libinstall<span style="color: #000000; font-weight: bold;">/*</span></pre></div></div>

<p>- Criando um link simbolico no /bin</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">bash</span> <span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">bash</span></pre></div></div>

<p>Alguns preparativos para a instalação:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>cron.d
fetch <span style="color: #660033;">-o</span> tmpl<span style="color: #000000; font-weight: bold;">/</span>vardistrib<span style="color: #000000; font-weight: bold;">/</span>freebsd http:<span style="color: #000000; font-weight: bold;">//</span>www.luizgustavo.pro.br<span style="color: #000000; font-weight: bold;">/</span>downloads<span style="color: #000000; font-weight: bold;">/</span>freebsd.txt</pre></div></div>

<p>Inicie agora a instalação via comando:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">bash</span> install.sh <span style="color: #660033;">-f</span> tmpl<span style="color: #000000; font-weight: bold;">/</span>vardistrib<span style="color: #000000; font-weight: bold;">/</span>freebsd</pre></div></div>

<p>Acompanhe o processo de instalação através do video abaixo:</p>
<p><iframe src="http://www.youtube.com/embed/h3QensGRZeA?rel=0" frameborder="0" width="520" height="350"></iframe></p>
<p>Terminada a instalação, vamos partir para a parte web, para isso, reinicie o MySQL e o Apache:</p>
<div>
<div>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.d<span style="color: #000000; font-weight: bold;">/</span>apache2 restart
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.d<span style="color: #000000; font-weight: bold;">/</span>mysql-server restart</pre></div></div>

</div>
</div>
<p>Vamos acertar algumas correções de permissão:</p>
<div>
<div>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> www:www <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>centreon<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>centreon
<span style="color: #c20cb9; font-weight: bold;">rm</span> filesGeneration
<span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>cache<span style="color: #000000; font-weight: bold;">/</span>centreon<span style="color: #000000; font-weight: bold;">/</span>filesGeneration .
<span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> www:www filesGeneration
<span style="color: #c20cb9; font-weight: bold;">rm</span> filesUpload
<span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>cache<span style="color: #000000; font-weight: bold;">/</span>centreon<span style="color: #000000; font-weight: bold;">/</span>filesUpload .
<span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> www:www filesUpload
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>cache<span style="color: #000000; font-weight: bold;">/</span>centreon
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>centreon<span style="color: #000000; font-weight: bold;">/</span>filesGeneration
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>centreon<span style="color: #000000; font-weight: bold;">/</span>filesUpload</pre></div></div>

</div>
</div>
<p>Vamos corrigir também um problema de versão de dependência do PEAR:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>pear uninstall HTML_QuickForm_advmultiselect 
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>pear <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">-f</span> pear<span style="color: #000000; font-weight: bold;">/</span>HTML_QuickForm_advmultiselect-1.2.0</pre></div></div>

<p><em>Agora assim, podemos apontar nosso navergador para o endereço do servidor centreon:</em></p>
<pre>http://&lt;ip_ou_url&gt;/centreon</pre>
<h4>Acompanhe o vídeo para configurar via web:</h4>
<p><iframe src="http://www.youtube.com/embed/0NUwmVmcfKA?rel=0" frameborder="0" width="520" height="360"></iframe></p>
<p><strong>Falta pouco, ainda precisamos exportar os arquivos de configuração para que nosso NDO-Utils possa funcionar, para isso, acompanhe o vídeo na exportação do mesmo via web:</strong></p>
<p><iframe src="http://www.youtube.com/embed/UdebdL-AaN0?rel=0" frameborder="0" width="520" height="360"></iframe></p>
<p>Agora, vamos iniciar os processos do Centreon:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">pw user mod nagios <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">sh</span>
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.d<span style="color: #000000; font-weight: bold;">/</span>centcore start
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.d<span style="color: #000000; font-weight: bold;">/</span>centstorage start</pre></div></div>

<p>Acertar a parte da CRON para o FreeBSD:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>cron.d<span style="color: #000000; font-weight: bold;">/*</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>crontab
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.d<span style="color: #000000; font-weight: bold;">/</span>cron restart
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>cron.d</pre></div></div>

<p>Reinicie os processos do nagios e ndoutils</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.d<span style="color: #000000; font-weight: bold;">/</span>nagios restart
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.d<span style="color: #000000; font-weight: bold;">/</span>ndo2db restart</pre></div></div>

<p>Pronto ! agora é só configurar os seus hosts e iniciar o monitoramento.</p>
<p><a href="http://www.mundounix.com.br/"><img class="alignleft" title="logo_mundounix3" src="http://luizgustavo.pro.br/blog/wp-content/uploads/2009/09/logo_mundounix3.png" alt="" width="284" height="72" /></a><em><strong>Se necessitar de suporte ao Centreon, entre em contato com a <a href="http://www.mundounix.com.br/" target="_blank">Mundounix</a>, nós oferecemos suporte e consultoria para solução de monitoramento de redes.</strong></em></p>
<p><a href="http://www.mundounix.com.br/" target="_blank">http://www.mundounix.com.br</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.luizgustavo.pro.br/blog/2011/12/08/centreon-2-3-3-freebsd9/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Notificação do Nagios no Gtalk</title>
		<link>http://www.luizgustavo.pro.br/blog/2010/03/05/notificacao-do-nagios-no-gtalk/</link>
		<comments>http://www.luizgustavo.pro.br/blog/2010/03/05/notificacao-do-nagios-no-gtalk/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 00:21:19 +0000</pubDate>
		<dc:creator>luizgustavo</dc:creator>
				<category><![CDATA[Diversos]]></category>
		<category><![CDATA[mundoUnix]]></category>
		<category><![CDATA[monitoramento]]></category>
		<category><![CDATA[nagios]]></category>
		<category><![CDATA[Plugins]]></category>

		<guid isPermaLink="false">http://www.luizgustavo.pro.br/blog/?p=503</guid>
		<description><![CDATA[Essa dica e pra quem quer receber notificações de mensagens do nagios através de uma conta do gtalk, assim você pode receber na hora um alerta do nagios no seu cliente de gtalk (seja no seu desktop ou celular) Essa dica eu peguei do site: http://www.gridpp.ac.uk/wiki/Nagios_jabber_notification Vou mostrar aqui como configurar em um FreeBSD: Satisfazendo [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><img class="alignright size-full wp-image-505" style="border: 0pt none; margin: 3px;" title="nagios_logo" src="http://www.luizgustavo.pro.br/blog/wp-content/uploads/2010/03/nagios_logo.png" alt="" width="161" height="43" />Essa dica e pra quem quer receber notificações de mensagens do nagios através de uma conta do gtalk, assim você pode receber na hora um alerta do nagios no seu cliente de gtalk (seja no seu desktop ou celular)</p>
<p>Essa dica eu peguei do site: <a href="http://www.gridpp.ac.uk/wiki/Nagios_jabber_notification" target="_blank">http://www.gridpp.ac.uk/wiki/Nagios_jabber_notification</a></p>
<p><span id="more-503"></span>Vou mostrar aqui como configurar em um FreeBSD:</p>
<p>Satisfazendo algumas dependências do perl para o script:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>ports<span style="color: #000000; font-weight: bold;">/</span>net-im<span style="color: #000000; font-weight: bold;">/</span>p5-Net-XMPP
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span> clean
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>ports<span style="color: #000000; font-weight: bold;">/</span>security<span style="color: #000000; font-weight: bold;">/</span>p5-IO-Socket-SSL
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span> clean</pre></div></div>

<p>A partir dai podemos criar o nosso script:</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/usr/bin/perl -w</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># script for nagios notify via Jabber / Google Talk Instant Messaging</span>
<span style="color: #666666; font-style: italic;">#   using XMPP protocol and SASL PLAIN authentication.</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># author: Andrew Elwell</span>
<span style="color: #666666; font-style: italic;"># based on work by Thus0</span>
 <span style="color: #b1b100;">and</span>  David Cox
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># released under the terms of the GNU General Public License v2</span>
<span style="color: #666666; font-style: italic;"># Copyright 2007 Andrew Elwell.</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">use</span> strict<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> Net<span style="color: #339933;">::</span><span style="color: #006600;">XMPP</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">## Configuration</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$username</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;your.google.username&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$password</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;your.google.password&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$resource</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;nagios&quot;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">## End of configuration</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$len</span> <span style="color: #339933;">=</span> <span style="color: #000066;">scalar</span> <span style="color: #339933;">@</span><span style="color: #000000; font-weight: bold;">ARGV</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$len</span> <span style="color: #b1b100;">ne</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #000066;">die</span> <span style="color: #ff0000;">&quot;Usage...<span style="color: #000099; font-weight: bold;">\n</span> $0 [jabberid] [message]<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">@field</span><span style="color: #339933;">=</span><span style="color: #000066;">split</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/,/</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$ARGV</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">#------------------------------------</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Google Talk &amp; Jabber parameters :</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$hostname</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'talk.google.com'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$port</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">5222</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$componentname</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'gmail.com'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$connectiontype</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'tcpip'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$tls</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#------------------------------------</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$Connection</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Net<span style="color: #339933;">::</span><span style="color: #006600;">XMPP</span><span style="color: #339933;">::</span><span style="color: #006600;">Client</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Connect to talk.google.com</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$status</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$Connection</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">Connect</span><span style="color: #009900;">&#40;</span>
 hostname <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$hostname</span><span style="color: #339933;">,</span> port <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$port</span><span style="color: #339933;">,</span>
 componentname <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$componentname</span><span style="color: #339933;">,</span>
 connectiontype <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$connectiontype</span><span style="color: #339933;">,</span> tls <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$tls</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #009900;">&#40;</span><span style="color: #000066;">defined</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$status</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;ERROR:  XMPP connection failed.<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
 <span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;        ($!)<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
 <span style="color: #000066;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Change hostname</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$sid</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$Connection</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>SESSION<span style="color: #009900;">&#125;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>id<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$Connection</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>STREAM<span style="color: #009900;">&#125;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>SIDS<span style="color: #009900;">&#125;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span><span style="color: #0000ff;">$sid</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>hostname<span style="color: #009900;">&#125;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$componentname</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Authenticate</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">@result</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$Connection</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">AuthSend</span><span style="color: #009900;">&#40;</span>
 username <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$username</span><span style="color: #339933;">,</span> password <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$password</span><span style="color: #339933;">,</span>
 resource <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$resource</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$result</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #b1b100;">ne</span> <span style="color: #ff0000;">&quot;ok&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;ERROR: Authorization failed: $result[0] - $result[1]<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
 <span style="color: #000066;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Send messages</span>
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">@field</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #0000ff;">$Connection</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">MessageSend</span><span style="color: #009900;">&#40;</span>
 to       <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">&quot;$_<span style="color: #000099; font-weight: bold;">\@</span>$componentname&quot;</span><span style="color: #339933;">,</span>
 resource <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$resource</span><span style="color: #339933;">,</span>
 subject  <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">&quot;Notification&quot;</span><span style="color: #339933;">,</span>
 type     <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">&quot;chat&quot;</span><span style="color: #339933;">,</span>
 body     <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$ARGV</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Altere as opcoes no script conforme os dados de sua conexao no Gtalk</p>
<p>Dai configure no seu nagios (ou Centreon) o seu comando de notificacao:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># 'host-notify-by-jabber' command definition
define command{
 command_name    host-notify-by-jabber
 command_line    /usr/local/bin/notify_via_jabber $CONTACTPAGER$ &quot;Host '$HOSTALIAS$' is $HOSTSTATE$ - Info
: $HOSTOUTPUT$&quot;
 }
&nbsp;
# 'notify-by-jabber' command definition
define command{
 command_name    notify-by-jabber
 command_line    /usr/local/bin/notify_via_jabber $CONTACTPAGER$ &quot;$NOTIFICATIONTYPE$ $HOSTNAME$ $SERVICED
ESC$ $SERVICESTATE$ $SERVICEOUTPUT$ $LONGDATETIME$&quot;
 }</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.luizgustavo.pro.br/blog/2010/03/05/notificacao-do-nagios-no-gtalk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Centreon: Nova versão estável 2.1</title>
		<link>http://www.luizgustavo.pro.br/blog/2009/09/23/centreon-nova-versao-estavel-2-1/</link>
		<comments>http://www.luizgustavo.pro.br/blog/2009/09/23/centreon-nova-versao-estavel-2-1/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 02:49:10 +0000</pubDate>
		<dc:creator>luizgustavo</dc:creator>
				<category><![CDATA[Software Livre]]></category>
		<category><![CDATA[centreon]]></category>
		<category><![CDATA[lançamento]]></category>
		<category><![CDATA[monitoramento]]></category>
		<category><![CDATA[nagios]]></category>
		<category><![CDATA[software livre]]></category>

		<guid isPermaLink="false">http://www.luizgustavo.pro.br/blog/?p=101</guid>
		<description><![CDATA[O conceituado front-end de administração do Nagios 3 lançou uma nova versão estável agora no dia 18/09 conforme o post do blog do Centreon. Essa nova versão traz muitas novidades no visual, vários bugs foram consertados e temos uma versão muito mais estável na familia 2.x do Centreon. A equipe de desenvolvimento agora inicia uma [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.luizgustavo.pro.br/blog/wp-content/uploads/2009/09/logo_centreon.png"><img class="alignright size-full wp-image-99" title="logo_centreon" src="http://www.luizgustavo.pro.br/blog/wp-content/uploads/2009/09/logo_centreon.png" alt="logo_centreon" width="203" height="41" /></a>O conceituado front-end de administração do Nagios 3 lançou uma nova versão estável agora no dia 18/09 conforme o post do <a href="http://blog.centreon.com/index.php?post/2009/09/18/Centreon-2.1-Stable-Released" target="_blank">blog do Centreon</a>.</p>
<p>Essa nova versão traz muitas novidades no visual, vários bugs foram consertados e temos uma versão muito mais estável na familia 2.x do Centreon.</p>
<p>A equipe de desenvolvimento agora inicia uma dedicação de trabalho para o lançamento da próxima versão 2.2 do Centreon, você pode acompanhar como vai ser essa versão  indo até este <a href="http://forge.centreon.com/versions/show/25" target="_blank">endereço</a></p>
<p>Para efetuar o download da nova versão, acompanhe o <a href="http://download.centreon.com/index.php?id=118" target="_blank">link</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.luizgustavo.pro.br/blog/2009/09/23/centreon-nova-versao-estavel-2-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

