<?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>Itimag.com &#187; monitorización</title>
	<atom:link href="http://www.itimag.com/tag/monitorizacion/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.itimag.com</link>
	<description>Blog de un Ingeniero Informático</description>
	<lastBuildDate>Mon, 09 Jan 2012 11:54:08 +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>Instalando zabbix 1.6.2 en Debian etch</title>
		<link>http://www.itimag.com/unix/monitoring/instalando-zabbix-1-6-2-en-debian-etch/</link>
		<comments>http://www.itimag.com/unix/monitoring/instalando-zabbix-1-6-2-en-debian-etch/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 00:01:41 +0000</pubDate>
		<dc:creator>Itimag</dc:creator>
				<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[monitorización]]></category>
		<category><![CDATA[servicios]]></category>
		<category><![CDATA[servidor]]></category>
		<category><![CDATA[zabbix]]></category>

		<guid isPermaLink="false">http://www.itimag.net/?p=500</guid>
		<description><![CDATA[Llevo unos días informándome de algún sistema que permita la monitorización de servidores con la misma finalidad que siempre: aprender . Buscando por la red encontré distintas aplicaciones de código libre entre las cuales se encuentra zabbix. Mi principal objetivo es el de disponer de un sistema de monitorización que me avise por mail cuando [...]]]></description>
			<content:encoded><![CDATA[<p>Llevo unos días informándome de algún sistema que permita la monitorización de servidores con la misma finalidad que siempre: aprender <img src='http://www.itimag.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  .</p>
<p>Buscando por la red encontré distintas aplicaciones de código libre entre las cuales se encuentra <a title="zabbrix webpage" href="http://www.zabbix.com/index.php" target="_self">zabbix</a>. Mi principal objetivo es el de disponer de un sistema de monitorización que me avise por mail cuando se produce la caída de cualquier servicio del servidor (ssh, ftp, apache, bind, etc). Zabbix permite eso y mucho más.</p>
<p>A continuación os explico como instalar la última versión en linux debian:</p>
<p>Instalamos todos los requerimientos de zabbix:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #660033;">-y</span> <span style="color: #c20cb9; font-weight: bold;">install</span> build-essential libmysqlclient-dev libssl-dev libsnmp-dev apache2 libapache2-mod-php5 php5-gd php5-mysql mysql-server</pre></div></div>

<p>Añadimos el grupo y usuario zabbix ya que es necesario para la aplicación:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">groupadd zabbix
useradd <span style="color: #660033;">-c</span> <span style="color: #ff0000;">'Zabbix'</span> <span style="color: #660033;">-d</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>zabbix <span style="color: #660033;">-g</span> zabbix <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;">bash</span> zabbix
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>zabbix
<span style="color: #c20cb9; font-weight: bold;">chown</span> zabbix:zabbix <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>zabbix</pre></div></div>

<p>Creamos la base de datos para zabbix:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysql <span style="color: #660033;">-p</span> <span style="color: #660033;">-u</span> root
create database zabbix;
grant all on zabbix.<span style="color: #000000; font-weight: bold;">*</span> to <span style="color: #ff0000;">'zabbix'</span><span style="color: #000000; font-weight: bold;">@</span><span style="color: #ff0000;">'localhost'</span> identified by <span style="color: #ff0000;">'PASSWORD'</span>;
quit;</pre></div></div>

<p>Nota: debes substituir PASSWORD por la contraseña que le quieras asignar.</p>
<p>Descargamos y descomprimimos las fuentes</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>home<span style="color: #000000; font-weight: bold;">/</span>zabbix
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>ovh.dl.sourceforge.net<span style="color: #000000; font-weight: bold;">/</span>sourceforge<span style="color: #000000; font-weight: bold;">/</span>zabbix<span style="color: #000000; font-weight: bold;">/</span>zabbix-1.6.2.tar.gz
<span style="color: #c20cb9; font-weight: bold;">tar</span> zxvf zabbix-1.6.2.tar.gz
<span style="color: #7a0874; font-weight: bold;">cd</span> zabbix-1.6.2</pre></div></div>

<p>Compilamos el código fuente y instalamos zabbix_server y zabbix_agentd.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-mysql</span> <span style="color: #660033;">--with-net-snmp</span> <span style="color: #660033;">--enable-server</span> <span style="color: #660033;">--enable-agent</span> <span style="color: #660033;">--with-libcurl</span>
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>Añadimos los puertos a /etc/services y creamos algunos ficheros de configuración:</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;">&quot; zabbix_agent 10050/tcp # Zabbix ports
zabbix_trap 10051/tcp&quot;</span> <span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>services
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>zabbix
<span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> zabbix:zabbix <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>zabbix
<span style="color: #c20cb9; font-weight: bold;">cp</span> misc<span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span>zabbix_<span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>zabbix</pre></div></div>

<p>Modificamos los datos de acceso a la base de datos:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>zabbix<span style="color: #000000; font-weight: bold;">/</span>zabbix_server.conf</pre></div></div>

<p>Modificamos lo siguiente:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">DBHost</span>=localhost o tu db host
<span style="color: #007800;">DBName</span>=zabbix
<span style="color: #007800;">DBUser</span>=zabbix
<span style="color: #007800;">DBPassword</span>=ZABBIX_PASSWORD</pre></div></div>

<p>Nota: ZABBIX_PASSWORD corresponde con la contraseña que configuamos cuando dimos permisos con GRANT.</p>
<p>Copiamos los iniciadores de los servicios y hacemos una pequeña modificación:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>zabbix<span style="color: #000000; font-weight: bold;">/</span>zabbix-1.6.2<span style="color: #000000; font-weight: bold;">/</span>misc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>debian<span style="color: #000000; font-weight: bold;">/*</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>zabbix-agent</pre></div></div>

<p>Buscamos la linea</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">DAEMON</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>zabbix<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${NAME}</span></pre></div></div>

<p>y la substituimos por</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">DAEMON</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${NAME}</span></pre></div></div>

<p>Ahora con el otro fichero:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>zabbix-server</pre></div></div>

<p>Buscamos la linea</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">DAEMON</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>zabbix<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${NAME}</span></pre></div></div>

<p>y la substituimos por</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">DAEMON</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${NAME}</span></pre></div></div>

<p>Subimos las tablas a la base de datos:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysql <span style="color: #660033;">-u</span> root <span style="color: #660033;">-p</span> zabbix <span style="color: #000000; font-weight: bold;">&amp;</span>lt; <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>zabbix<span style="color: #000000; font-weight: bold;">/</span>zabbix-1.6.2<span style="color: #000000; font-weight: bold;">/</span>create<span style="color: #000000; font-weight: bold;">/</span>schema<span style="color: #000000; font-weight: bold;">/</span>mysql.sql
mysql <span style="color: #660033;">-u</span> root <span style="color: #660033;">-p</span> zabbix <span style="color: #000000; font-weight: bold;">&amp;</span>lt; <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>zabbix<span style="color: #000000; font-weight: bold;">/</span>zabbix-1.6.2<span style="color: #000000; font-weight: bold;">/</span>create<span style="color: #000000; font-weight: bold;">/</span>data<span style="color: #000000; font-weight: bold;">/</span>data.sql
mysql <span style="color: #660033;">-u</span> root <span style="color: #660033;">-p</span> zabbix <span style="color: #000000; font-weight: bold;">&amp;</span>lt; <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>zabbix<span style="color: #000000; font-weight: bold;">/</span>zabbix-1.6.2<span style="color: #000000; font-weight: bold;">/</span>create<span style="color: #000000; font-weight: bold;">/</span>data<span style="color: #000000; font-weight: bold;">/</span>images_mysql.sql</pre></div></div>

<p>Modificamos la configuración de nuestro php:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php5<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>php.ini</pre></div></div>

<p>Modificamos lo siguiente:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">max_execution_time = <span style="color: #000000;">300</span>
date.timezone = Europe<span style="color: #000000; font-weight: bold;">/</span>Madrid</pre></div></div>

<p>Reiniciamos apache e iniciamos los servicios de zabbix:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 restart
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>zabbix-server start
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>zabbix-agent start</pre></div></div>

<p>Ya podemos acceder a zabbix desde http://tu_ip/zabbix/ y seguimos las instrucciones.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itimag.com/unix/monitoring/instalando-zabbix-1-6-2-en-debian-etch/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

