<?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>Thu, 29 Jul 2010 09:15:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<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;color: #FCFFBA;"><span style="color: #7a0874; font-weight: bold;color: #8FB394;">cd</span> <span style="color: #000000; font-weight: bold;color: #CCC;">/</span>usr<span style="color: #000000; font-weight: bold;color: #CCC;">/</span>ports<span style="color: #000000; font-weight: bold;color: #CCC;">/</span>net-im<span style="color: #000000; font-weight: bold;color: #CCC;">/</span>p5-Net-XMPP
<span style="color: #c20cb9; font-weight: bold;color: #577A61;">make</span> <span style="color: #c20cb9; font-weight: bold;color: #577A61;">install</span> clean
<span style="color: #7a0874; font-weight: bold;color: #8FB394;">cd</span> <span style="color: #000000; font-weight: bold;color: #CCC;">/</span>usr<span style="color: #000000; font-weight: bold;color: #CCC;">/</span>ports<span style="color: #000000; font-weight: bold;color: #CCC;">/</span>security<span style="color: #000000; font-weight: bold;color: #CCC;">/</span>p5-IO-Socket-SSL
<span style="color: #c20cb9; font-weight: bold;color: #577A61;">make</span> <span style="color: #c20cb9; font-weight: bold;color: #577A61;">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;color: #FCFFBA;"><span style="color: #666666; font-style: italic;color: #CDC;">#!/usr/bin/perl -w</span>
<span style="color: #666666; font-style: italic;color: #CDC;">#</span>
<span style="color: #666666; font-style: italic;color: #CDC;"># script for nagios notify via Jabber / Google Talk Instant Messaging</span>
<span style="color: #666666; font-style: italic;color: #CDC;">#   using XMPP protocol and SASL PLAIN authentication.</span>
<span style="color: #666666; font-style: italic;color: #CDC;">#</span>
<span style="color: #666666; font-style: italic;color: #CDC;"># author: Andrew Elwell</span>
<span style="color: #666666; font-style: italic;color: #CDC;"># based on work by Thus0</span>
 <span style="color: #b1b100;color: #B83A24;">and</span>  David Cox
<span style="color: #666666; font-style: italic;color: #CDC;">#</span>
<span style="color: #666666; font-style: italic;color: #CDC;"># released under the terms of the GNU General Public License v2</span>
<span style="color: #666666; font-style: italic;color: #CDC;"># Copyright 2007 Andrew Elwell.</span>
&nbsp;
<span style="color: #000000; font-weight: bold;color: #577A61;">use</span> strict<span style="color: #339933;color: #CCC;">;</span>
<span style="color: #000000; font-weight: bold;color: #577A61;">use</span> Net<span style="color: #339933;color: #CCC;">::</span><span style="color: #006600;">XMPP</span><span style="color: #339933;color: #CCC;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;color: #CDC;">## Configuration</span>
<span style="color: #b1b100;color: #B83A24;">my</span> <span style="color: #0000ff;">$username</span> <span style="color: #339933;color: #CCC;">=</span> <span style="color: #ff0000;color: #666666;">&quot;your.google.username&quot;</span><span style="color: #339933;color: #CCC;">;</span>
<span style="color: #b1b100;color: #B83A24;">my</span> <span style="color: #0000ff;">$password</span> <span style="color: #339933;color: #CCC;">=</span> <span style="color: #ff0000;color: #666666;">&quot;your.google.password&quot;</span><span style="color: #339933;color: #CCC;">;</span>
<span style="color: #b1b100;color: #B83A24;">my</span> <span style="color: #0000ff;">$resource</span> <span style="color: #339933;color: #CCC;">=</span> <span style="color: #ff0000;color: #666666;">&quot;nagios&quot;</span><span style="color: #339933;color: #CCC;">;</span>
<span style="color: #666666; font-style: italic;color: #CDC;">## End of configuration</span>
&nbsp;
<span style="color: #b1b100;color: #B83A24;">my</span> <span style="color: #0000ff;">$len</span> <span style="color: #339933;color: #CCC;">=</span> <span style="color: #000066;color: #8FB394;">scalar</span> <span style="color: #0000ff;">@ARGV</span><span style="color: #339933;color: #CCC;">;</span>
<span style="color: #b1b100;color: #B83A24;">if</span> <span style="color: #009900;color: #CCC;">&#40;</span><span style="color: #0000ff;">$len</span> <span style="color: #b1b100;color: #B83A24;">ne</span> <span style="color: #cc66cc;color: #DDD;">2</span><span style="color: #009900;color: #CCC;">&#41;</span> <span style="color: #009900;color: #CCC;">&#123;</span>
 <span style="color: #000066;color: #8FB394;">die</span> <span style="color: #ff0000;color: #666666;">&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;color: #CCC;">;</span>
<span style="color: #009900;color: #CCC;">&#125;</span>
<span style="color: #b1b100;color: #B83A24;">my</span> <span style="color: #0000ff;">@field</span><span style="color: #339933;color: #CCC;">=</span><span style="color: #000066;color: #8FB394;">split</span><span style="color: #009900;color: #CCC;">&#40;</span><span style="color: #009966; font-style: italic;">/,/</span><span style="color: #339933;color: #CCC;">,</span><span style="color: #0000ff;">$ARGV</span><span style="color: #009900;color: #CCC;">&#91;</span><span style="color: #cc66cc;color: #DDD;">0</span><span style="color: #009900;color: #CCC;">&#93;</span><span style="color: #009900;color: #CCC;">&#41;</span><span style="color: #339933;color: #CCC;">;</span>
<span style="color: #666666; font-style: italic;color: #CDC;">#------------------------------------</span>
&nbsp;
<span style="color: #666666; font-style: italic;color: #CDC;"># Google Talk &amp; Jabber parameters :</span>
&nbsp;
<span style="color: #b1b100;color: #B83A24;">my</span> <span style="color: #0000ff;">$hostname</span> <span style="color: #339933;color: #CCC;">=</span> <span style="color: #ff0000;">'talk.google.com'</span><span style="color: #339933;color: #CCC;">;</span>
<span style="color: #b1b100;color: #B83A24;">my</span> <span style="color: #0000ff;">$port</span> <span style="color: #339933;color: #CCC;">=</span> <span style="color: #cc66cc;color: #DDD;">5222</span><span style="color: #339933;color: #CCC;">;</span>
<span style="color: #b1b100;color: #B83A24;">my</span> <span style="color: #0000ff;">$componentname</span> <span style="color: #339933;color: #CCC;">=</span> <span style="color: #ff0000;">'gmail.com'</span><span style="color: #339933;color: #CCC;">;</span>
<span style="color: #b1b100;color: #B83A24;">my</span> <span style="color: #0000ff;">$connectiontype</span> <span style="color: #339933;color: #CCC;">=</span> <span style="color: #ff0000;">'tcpip'</span><span style="color: #339933;color: #CCC;">;</span>
<span style="color: #b1b100;color: #B83A24;">my</span> <span style="color: #0000ff;">$tls</span> <span style="color: #339933;color: #CCC;">=</span> <span style="color: #cc66cc;color: #DDD;">1</span><span style="color: #339933;color: #CCC;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;color: #CDC;">#------------------------------------</span>
&nbsp;
<span style="color: #b1b100;color: #B83A24;">my</span> <span style="color: #0000ff;">$Connection</span> <span style="color: #339933;color: #CCC;">=</span> <span style="color: #000000; font-weight: bold;color: #577A61;">new</span> Net<span style="color: #339933;color: #CCC;">::</span><span style="color: #006600;">XMPP</span><span style="color: #339933;color: #CCC;">::</span><span style="color: #006600;">Client</span><span style="color: #009900;color: #CCC;">&#40;</span><span style="color: #009900;color: #CCC;">&#41;</span><span style="color: #339933;color: #CCC;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;color: #CDC;"># Connect to talk.google.com</span>
<span style="color: #b1b100;color: #B83A24;">my</span> <span style="color: #0000ff;">$status</span> <span style="color: #339933;color: #CCC;">=</span> <span style="color: #0000ff;">$Connection</span><span style="color: #339933;color: #CCC;">-&gt;</span><span style="color: #006600;">Connect</span><span style="color: #009900;color: #CCC;">&#40;</span>
 hostname <span style="color: #339933;color: #CCC;">=&gt;</span> <span style="color: #0000ff;">$hostname</span><span style="color: #339933;color: #CCC;">,</span> port <span style="color: #339933;color: #CCC;">=&gt;</span> <span style="color: #0000ff;">$port</span><span style="color: #339933;color: #CCC;">,</span>
 componentname <span style="color: #339933;color: #CCC;">=&gt;</span> <span style="color: #0000ff;">$componentname</span><span style="color: #339933;color: #CCC;">,</span>
 connectiontype <span style="color: #339933;color: #CCC;">=&gt;</span> <span style="color: #0000ff;">$connectiontype</span><span style="color: #339933;color: #CCC;">,</span> tls <span style="color: #339933;color: #CCC;">=&gt;</span> <span style="color: #0000ff;">$tls</span><span style="color: #009900;color: #CCC;">&#41;</span><span style="color: #339933;color: #CCC;">;</span>
&nbsp;
<span style="color: #b1b100;color: #B83A24;">if</span> <span style="color: #009900;color: #CCC;">&#40;</span><span style="color: #339933;color: #CCC;">!</span><span style="color: #009900;color: #CCC;">&#40;</span><span style="color: #000066;color: #8FB394;">defined</span><span style="color: #009900;color: #CCC;">&#40;</span><span style="color: #0000ff;">$status</span><span style="color: #009900;color: #CCC;">&#41;</span><span style="color: #009900;color: #CCC;">&#41;</span><span style="color: #009900;color: #CCC;">&#41;</span> <span style="color: #009900;color: #CCC;">&#123;</span>
 <span style="color: #000066;color: #8FB394;">print</span> <span style="color: #ff0000;color: #666666;">&quot;ERROR:  XMPP connection failed.<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;color: #CCC;">;</span>
 <span style="color: #000066;color: #8FB394;">print</span> <span style="color: #ff0000;color: #666666;">&quot;        ($!)<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;color: #CCC;">;</span>
 <span style="color: #000066;color: #8FB394;">exit</span><span style="color: #009900;color: #CCC;">&#40;</span><span style="color: #cc66cc;color: #DDD;">0</span><span style="color: #009900;color: #CCC;">&#41;</span><span style="color: #339933;color: #CCC;">;</span>
<span style="color: #009900;color: #CCC;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;color: #CDC;"># Change hostname</span>
<span style="color: #b1b100;color: #B83A24;">my</span> <span style="color: #0000ff;">$sid</span> <span style="color: #339933;color: #CCC;">=</span> <span style="color: #0000ff;">$Connection</span><span style="color: #339933;color: #CCC;">-&gt;</span><span style="color: #009900;color: #CCC;">&#123;</span>SESSION<span style="color: #009900;color: #CCC;">&#125;</span><span style="color: #339933;color: #CCC;">-&gt;</span><span style="color: #009900;color: #CCC;">&#123;</span>id<span style="color: #009900;color: #CCC;">&#125;</span><span style="color: #339933;color: #CCC;">;</span>
<span style="color: #0000ff;">$Connection</span><span style="color: #339933;color: #CCC;">-&gt;</span><span style="color: #009900;color: #CCC;">&#123;</span>STREAM<span style="color: #009900;color: #CCC;">&#125;</span><span style="color: #339933;color: #CCC;">-&gt;</span><span style="color: #009900;color: #CCC;">&#123;</span>SIDS<span style="color: #009900;color: #CCC;">&#125;</span><span style="color: #339933;color: #CCC;">-&gt;</span><span style="color: #009900;color: #CCC;">&#123;</span><span style="color: #0000ff;">$sid</span><span style="color: #009900;color: #CCC;">&#125;</span><span style="color: #339933;color: #CCC;">-&gt;</span><span style="color: #009900;color: #CCC;">&#123;</span>hostname<span style="color: #009900;color: #CCC;">&#125;</span> <span style="color: #339933;color: #CCC;">=</span> <span style="color: #0000ff;">$componentname</span><span style="color: #339933;color: #CCC;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;color: #CDC;"># Authenticate</span>
<span style="color: #b1b100;color: #B83A24;">my</span> <span style="color: #0000ff;">@result</span> <span style="color: #339933;color: #CCC;">=</span> <span style="color: #0000ff;">$Connection</span><span style="color: #339933;color: #CCC;">-&gt;</span><span style="color: #006600;">AuthSend</span><span style="color: #009900;color: #CCC;">&#40;</span>
 username <span style="color: #339933;color: #CCC;">=&gt;</span> <span style="color: #0000ff;">$username</span><span style="color: #339933;color: #CCC;">,</span> password <span style="color: #339933;color: #CCC;">=&gt;</span> <span style="color: #0000ff;">$password</span><span style="color: #339933;color: #CCC;">,</span>
 resource <span style="color: #339933;color: #CCC;">=&gt;</span> <span style="color: #0000ff;">$resource</span><span style="color: #009900;color: #CCC;">&#41;</span><span style="color: #339933;color: #CCC;">;</span>
&nbsp;
<span style="color: #b1b100;color: #B83A24;">if</span> <span style="color: #009900;color: #CCC;">&#40;</span><span style="color: #0000ff;">$result</span><span style="color: #009900;color: #CCC;">&#91;</span><span style="color: #cc66cc;color: #DDD;">0</span><span style="color: #009900;color: #CCC;">&#93;</span> <span style="color: #b1b100;color: #B83A24;">ne</span> <span style="color: #ff0000;color: #666666;">&quot;ok&quot;</span><span style="color: #009900;color: #CCC;">&#41;</span> <span style="color: #009900;color: #CCC;">&#123;</span>
 <span style="color: #000066;color: #8FB394;">print</span> <span style="color: #ff0000;color: #666666;">&quot;ERROR: Authorization failed: $result[0] - $result[1]<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;color: #CCC;">;</span>
 <span style="color: #000066;color: #8FB394;">exit</span><span style="color: #009900;color: #CCC;">&#40;</span><span style="color: #cc66cc;color: #DDD;">0</span><span style="color: #009900;color: #CCC;">&#41;</span><span style="color: #339933;color: #CCC;">;</span>
<span style="color: #009900;color: #CCC;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;color: #CDC;"># Send messages</span>
<span style="color: #b1b100;color: #B83A24;">foreach</span> <span style="color: #009900;color: #CCC;">&#40;</span> <span style="color: #0000ff;">@field</span> <span style="color: #009900;color: #CCC;">&#41;</span> <span style="color: #009900;color: #CCC;">&#123;</span>
<span style="color: #0000ff;">$Connection</span><span style="color: #339933;color: #CCC;">-&gt;</span><span style="color: #006600;">MessageSend</span><span style="color: #009900;color: #CCC;">&#40;</span>
 to       <span style="color: #339933;color: #CCC;">=&gt;</span> <span style="color: #ff0000;color: #666666;">&quot;$_<span style="color: #000099; font-weight: bold;">\@</span>$componentname&quot;</span><span style="color: #339933;color: #CCC;">,</span>
 resource <span style="color: #339933;color: #CCC;">=&gt;</span> <span style="color: #0000ff;">$resource</span><span style="color: #339933;color: #CCC;">,</span>
 subject  <span style="color: #339933;color: #CCC;">=&gt;</span> <span style="color: #ff0000;color: #666666;">&quot;Notification&quot;</span><span style="color: #339933;color: #CCC;">,</span>
 type     <span style="color: #339933;color: #CCC;">=&gt;</span> <span style="color: #ff0000;color: #666666;">&quot;chat&quot;</span><span style="color: #339933;color: #CCC;">,</span>
 body     <span style="color: #339933;color: #CCC;">=&gt;</span> <span style="color: #0000ff;">$ARGV</span><span style="color: #009900;color: #CCC;">&#91;</span><span style="color: #cc66cc;color: #DDD;">1</span><span style="color: #009900;color: #CCC;">&#93;</span><span style="color: #009900;color: #CCC;">&#41;</span><span style="color: #339933;color: #CCC;">;</span>
<span style="color: #009900;color: #CCC;">&#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;color: #FCFFBA;"># '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>
