<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-632987313637017278</id><updated>2024-09-10T09:05:41.814-06:00</updated><category term="Desarrollo"/><category term="GNU Linux"/><category term="Software Libre"/><category term="Actividad Social"/><category term="Redes"/><category term="Nagios"/><category term="Noticias"/><category term="OpenLaszlo"/><category term="Colaboracion"/><category term="LPI"/><category term="otrs"/><category term="Gulmore"/><category term="Bases de datos"/><category term="Grafana"/><category term="Java"/><category term="Microsoft"/><category term="Prometheus"/><category term="mail"/><category term="seguridad"/><title type='text'>.:: El rincon de Martin ::.</title><subtitle type='html'>Software Libre, SL, SSH, ssh, desarollo, programacion, openlaszlo, bases de datos, mysql, gulmore, flisol, Nagios, mail, orts, postfix, java, OLPC XO, GNU, Linux, GNU Linux, Morelia, iptables, bash, centreon</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://martin-edmundo.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://martin-edmundo.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>77</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-632987313637017278.post-1711256983848663987</id><published>2020-05-17T15:43:00.000-05:00</published><updated>2020-05-17T15:54:09.173-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Grafana"/><category scheme="http://www.blogger.com/atom/ns#" term="Prometheus"/><title type='text'>Instalacion Prometheus y Grafana en Raspberry</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
No tenia pensado escribir este blog pero despues de instalar Grafana tuve problemas para visualizar la pagina de login de grafana. Así que aprovecho para hacer un breve proceso guiado de la instalación.&lt;/div&gt;
&lt;br /&gt;
Raspberry: v2 &lt;br /&gt;
SO: Linux Raspberrypi 4.19.97&lt;br /&gt;
Kernel: Raspbian GNU/Linux 10&lt;br /&gt;
Imagen: 2020-02-13-raspbian-buster-lite.img&lt;br /&gt;
Prometheus: 2.7.1+ds&lt;br /&gt;
Grafana:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;PROMETHEUS&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Primeramente la instalación de prometheus, si no hacemos ningún cambio en la configuración, despues de correr el siguiente comando el servicio quedara disponible en el siguiente URL &lt;b&gt;http://192.168.0.13:9090&lt;/b&gt;, se tomara la IP que tenga el Raspberry, el portal no solicitara ningún usuario ni contraseña.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;i&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;sudo apt-get install prometheus
&lt;/span&gt;&lt;/i&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Las configuraciones se realizaran en el archivo de configuracion /etc/prometheus/prometheus.yml, cada cambio podemos verificar que nuestra configuración sea correcta antes de hacer el reinicio de prometheus con el comando:&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;sudo promtool check config prometheus.yml&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuk89q7A4r2_ll9IasIrN861BhOEWRLSQXzauY6U8dGMVliMDByf5FGzOVMAlDSV61yX9TQMJKCzizIQbQqlfagt7mE2PfEv6Jh1UUIQhxhTvyJpV2u0yd7KrdJHhNQdPG5agH-W5-hBQ/s1600/prometheus.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;373&quot; data-original-width=&quot;851&quot; height=&quot;140&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuk89q7A4r2_ll9IasIrN861BhOEWRLSQXzauY6U8dGMVliMDByf5FGzOVMAlDSV61yX9TQMJKCzizIQbQqlfagt7mE2PfEv6Jh1UUIQhxhTvyJpV2u0yd7KrdJHhNQdPG5agH-W5-hBQ/s320/prometheus.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;GRAFANA&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Para la instalación de grafana, también con el comando apt-get, el servicio deberá quedara disponible en la URL &lt;b&gt;http://192.168.0.13:3000/login&lt;/b&gt;, sin embargo, es en este paso donde únicamente se visualizaba una pantalla blanca dentro de los navegadores desde donde trataba de ingresar.&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Para dar solución, seguí la recomendación encontrada en [ &lt;a href=&quot;https://community.grafana.com/t/installation-blank-screen-at-login/829&quot;&gt;https://community.grafana.com&lt;/a&gt; ] donde @&lt;span class=&quot;first username new-user&quot;&gt;&lt;a data-user-card=&quot;bortzmeyer&quot; href=&quot;https://community.grafana.com/u/bortzmeyer&quot;&gt;bortzmeyer&lt;/a&gt;&lt;/span&gt; recomienda comentar una linea del archivo /usr/share/grafana/public/app/app.js, en la linea 54 se comenta ang-drag-drop como se muestra en la imagen.&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1_VMfvh_FofCVjTwfxHzvUZfxaj4oFONSbTJ0BnEIWzSCUn3Rg7H3xqv8BdHlPM1upDlZ581jl2WZo8vEq5tlNQCGDs_2rBM_WMcE1vxNS5cgRTwoJB60V8I8IR6SZeGMINJVIWYao6s/s1600/comment.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;209&quot; data-original-width=&quot;230&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1_VMfvh_FofCVjTwfxHzvUZfxaj4oFONSbTJ0BnEIWzSCUn3Rg7H3xqv8BdHlPM1upDlZ581jl2WZo8vEq5tlNQCGDs_2rBM_WMcE1vxNS5cgRTwoJB60V8I8IR6SZeGMINJVIWYao6s/s1600/comment.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Despues del cambio sera necesario reiniciar el servicio de grafana y listo, ya podemos visualizar la pantalla de login.&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiGisitqIqwT_zcfJQoOsNQJPy_z3D_ZOFd5HLWuAO3TDWwJ6FhIjCueB9UfRTd9uhyphenhyphenEpVoTo38MysqAGYXgAMho8KFNdFOBqbd2WO_w4mMt1FBJQyNouZ2pnj0K208KNr0eUpkLG7wKY/s1600/grafana01.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;495&quot; data-original-width=&quot;756&quot; height=&quot;209&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiGisitqIqwT_zcfJQoOsNQJPy_z3D_ZOFd5HLWuAO3TDWwJ6FhIjCueB9UfRTd9uhyphenhyphenEpVoTo38MysqAGYXgAMho8KFNdFOBqbd2WO_w4mMt1FBJQyNouZ2pnj0K208KNr0eUpkLG7wKY/s320/grafana01.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
La clave por default es admin:admin, si por alguna razón llegamos a perderla la podríamos recuperar reasignándola con el comando:&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;background-color: yellow;&quot;&gt;&lt;span id=&quot;docs-internal-guid-7710f397-7fff-969a-b8f8-ff0d607c8996&quot; style=&quot;color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;grafana-cli --homepath /usr/share/grafana&amp;nbsp; admin reset-admin-password admin&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finalmente sera necesario conectar al datasource, para nuestro caso usaremos prometheus.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjZp8SBvxJGMd-_9cILWsBcuE5JUQf9VWzw2ZfSGaWB6unaistX3rLxk0EfVGanAKF1T7QXChPET8p8p4V3eeu2j-GJrGwWAiu1W9sqyq99Cl5ryy0AmsJc9c8x3B3YvjFOAfirbb88gU/s1600/grafana02.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;496&quot; data-original-width=&quot;929&quot; height=&quot;170&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjZp8SBvxJGMd-_9cILWsBcuE5JUQf9VWzw2ZfSGaWB6unaistX3rLxk0EfVGanAKF1T7QXChPET8p8p4V3eeu2j-GJrGwWAiu1W9sqyq99Cl5ryy0AmsJc9c8x3B3YvjFOAfirbb88gU/s320/grafana02.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://martin-edmundo.blogspot.com/feeds/1711256983848663987/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/632987313637017278/1711256983848663987' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/1711256983848663987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/1711256983848663987'/><link rel='alternate' type='text/html' href='http://martin-edmundo.blogspot.com/2020/05/instalacion-prometheus-y-grafana-en.html' title='Instalacion Prometheus y Grafana en Raspberry'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuk89q7A4r2_ll9IasIrN861BhOEWRLSQXzauY6U8dGMVliMDByf5FGzOVMAlDSV61yX9TQMJKCzizIQbQqlfagt7mE2PfEv6Jh1UUIQhxhTvyJpV2u0yd7KrdJHhNQdPG5agH-W5-hBQ/s72-c/prometheus.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-632987313637017278.post-5534615838197954650</id><published>2019-07-21T13:49:00.001-05:00</published><updated>2019-07-21T13:50:21.003-05:00</updated><title type='text'>Arrancando www.visitamorelia.com</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuQDivQe-BKrEDatPrFPdy1PkPFwakgwNRGONd8Fj2oA-4WVtClbbuBe67t_WScB70rsMaV2STk3Z0LN0HyBKfKvhsw-RumvlBRpvUUSstURycUQ79P-MQKez50LrUGZ5SJvpLtgJidC8/s1600/g10.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;502&quot; data-original-width=&quot;1200&quot; height=&quot;133&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuQDivQe-BKrEDatPrFPdy1PkPFwakgwNRGONd8Fj2oA-4WVtClbbuBe67t_WScB70rsMaV2STk3Z0LN0HyBKfKvhsw-RumvlBRpvUUSstURycUQ79P-MQKez50LrUGZ5SJvpLtgJidC8/s320/g10.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Hace unos días me di tiempo para pensar sobre las cosas que me gustan, y
 debido a la añoranza que tengo sobre mi ciudad natal, Morelia, quise 
hacer una pagina turística sobre Morelia y de esta manera aun estando 
lejos de allá podría mantenerme conectado de alguna manera sobre lo que 
ocurre allá y al mismo tiempo hacerme el espacio para tener fotos.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
En&lt;span class=&quot;original-content&quot;&gt; &lt;/span&gt;&lt;a href=&quot;https://www.visitamorelia.com/&quot; target=&quot;_blank&quot;&gt;www.visitamorelia.com&lt;/a&gt; quiero compartir para el visitante lugares culturales, lugares públicos, actividades que hacer para los&lt;span class=&quot;original-content&quot;&gt; vacacionistas&lt;/span&gt; o personas que quieran visitar la ciudad, lugares gastronómicos, restaurantes&lt;span class=&quot;original-content&quot;&gt;&lt;/span&gt; y lugares para comer, hoteles.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Para el contenido del día a día también hemos creado el espacio para un blog y colocar actividades relevantes del día &lt;span class=&quot;original-content&quot;&gt;a&lt;/span&gt; día que ocurren en la ciudad.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Definitivamente mi objetivo es convertir este sitio en una referencia de visitantes, viajeros y mochileros que gustan por viajar y conocer 
diferentes lugares, los que visitan Morelia pueden encontrar en la 
ciudad un lugar con mucha historia sobre México, arquitectura colonial, 
cuna de artesanías y el sentido tradicional del país.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Aunque el sitio aun está actualizándose cada semana, ya puedo invitarlos a visitarnos en&lt;span class=&quot;original-content&quot;&gt; &lt;/span&gt;&lt;a href=&quot;https://www.visitamorelia.com/&quot; target=&quot;_blank&quot;&gt;www.visitamorelia.com&lt;/a&gt; y sobre todo en la ciudad de Morelia.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsKaNNLZjW0n38Svn1p8XUDQstyWvIqlJDNMly6pRtzLvdoNroxDpHg0MD5J4spCCJaTReQ8y6RTLODJ-vz_6n7dO4AOkSahHoeLOaWk4VgMq263W3lk4RglED8QL-NNnDArJ6x-lvYf8/s1600/just+sold.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Catedral de Morelia | visitamorelia.com&quot; border=&quot;0&quot; data-original-height=&quot;800&quot; data-original-width=&quot;800&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsKaNNLZjW0n38Svn1p8XUDQstyWvIqlJDNMly6pRtzLvdoNroxDpHg0MD5J4spCCJaTReQ8y6RTLODJ-vz_6n7dO4AOkSahHoeLOaWk4VgMq263W3lk4RglED8QL-NNnDArJ6x-lvYf8/s400/just+sold.png&quot; title=&quot;Catedral de Morelia | visitamorelia.com&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Catedral de Morelia | visitamorelia.com&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://martin-edmundo.blogspot.com/feeds/5534615838197954650/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/632987313637017278/5534615838197954650' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/5534615838197954650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/5534615838197954650'/><link rel='alternate' type='text/html' href='http://martin-edmundo.blogspot.com/2019/07/arrancando-wwwvisitamoreliacom.html' title='Arrancando www.visitamorelia.com'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuQDivQe-BKrEDatPrFPdy1PkPFwakgwNRGONd8Fj2oA-4WVtClbbuBe67t_WScB70rsMaV2STk3Z0LN0HyBKfKvhsw-RumvlBRpvUUSstURycUQ79P-MQKez50LrUGZ5SJvpLtgJidC8/s72-c/g10.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-632987313637017278.post-3540881697058163059</id><published>2019-07-20T06:49:00.001-05:00</published><updated>2019-07-20T14:49:59.476-05:00</updated><title type='text'>50 años de la supuesta llegada a la Luna</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
20 de Julio de 1969 el hombre aluniza por primera vez, Neil Armstrong se convierte en el primer hombre en pisar la Luna... o al menos eso es lo que nos han contado.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4cQt7eMkQR6EGTzYpVZ530miduzJrYiqRfNg0XBE1L_9Xe03nGG8w_t4SbE5-FCABn07x4fyMOCMKE6UO_oZmuR_sERnTOCjXGtVyXQ_1TVjFvU-wwPseFeouPcuRJrivG9fRwpMsBlo/s1600/29388451_10210797198782814_585260521817636864_n.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;540&quot; data-original-width=&quot;960&quot; height=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4cQt7eMkQR6EGTzYpVZ530miduzJrYiqRfNg0XBE1L_9Xe03nGG8w_t4SbE5-FCABn07x4fyMOCMKE6UO_oZmuR_sERnTOCjXGtVyXQ_1TVjFvU-wwPseFeouPcuRJrivG9fRwpMsBlo/s400/29388451_10210797198782814_585260521817636864_n.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
A 50 años de distancia la pregunta sigue en el aire ¿Pudieron llegar los norteamericanos a la Luna?&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
En un contexto de la carrera espacial donde Rusos y Norteamericanos compiten para conquistar el espacio y en la siguiente tabla se muestra la ventaja de que tenían los rusos sobre su competidor:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;ul style=&quot;text-align: justify;&quot;&gt;
&lt;li&gt;1957: Sputnik, primer satelite artificial en el espacio (Rusia).&lt;/li&gt;
&lt;li&gt;1957: Perrita Laika, primer ser vivo en el espacio 😞 (Rusia).&lt;/li&gt;
&lt;li&gt;1958: Explorer 1, primer satelite norteamericano.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;1959: E-1 (Luna 2), primer modulo en llegar a la luna y estrellandose en su superficie (Rusia).&lt;/li&gt;
&lt;li&gt;1960: Perritas Belka y Strelka, primeros seres vivos en ir a espacio y regresaron con vida (Rusia)&lt;/li&gt;
&lt;li&gt;1961: Yuri Gagarin, primer cosmonauta en el espacio y en orbita terrestre (Rusia).&lt;/li&gt;
&lt;li&gt;1961: Alan Shepard, primer norteamericano en hacer un viaje sub-orbital durante 15 minutos a una altura de 186km. &lt;/li&gt;
&lt;li&gt;1962, John Glenn, primer astronauta estadounidense en órbita terrestre. &lt;/li&gt;
&lt;li&gt;1963: Valentina Tereshkova, Primer Mujer en el espacio (Rusia).&lt;/li&gt;
&lt;li&gt;1965: Alexei Leonov, primer cosmonauta en hacer una caminata espacial (Rusia).&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
A pensar de las ventajas de los Rusos, fueron los Norteamericanos quienes llegaron por primera vez a la Luna, en donde no fallo no un cable, ni un tornillo, ni un circuito eléctrico, no fallo la comunicación, no fallo el lanzamiento, no fallaron los acoplamientos, no fallo la nave que protejio a los cosmonautas de la radiación espacial, no fallo el alunizaje, no fallo el despegue lunar ni los nuevos acoplamientos ni el regreso a casa, se atravesaron los anillos de Van Allen.&lt;br /&gt;
&lt;br /&gt;
Además de eso, existen muchos dudas sobre las evidencias del viaje que se ha presentado al publico: fotos y videos.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: justify;&quot;&gt;
&lt;li&gt;Luz y sombras: en varias fotos se detectan multiples sombras para los objetos. En nuestra experiencia en la tierra, se presentan multiples sombras cuando existen multiples objetos de luz.&lt;/li&gt;
&lt;li&gt;Movimiento de la bandera: Con carencia de aire la bandera no tendria por que moverse.&lt;/li&gt;
&lt;li&gt;Descenso de Armstrong del modulo: ¿Quien video grabo el descenso de Armstrong?&lt;/li&gt;
&lt;li&gt;Huella formada: Una huella deberia formarse en presencia de agua.&lt;/li&gt;
&lt;li&gt;Carencia de estrellas en las fotografias&lt;/li&gt;
&lt;li&gt;Carencia de crater en el lugar donde alunizo el modulo.&lt;/li&gt;
&lt;li&gt;Carencia de polvo en los pies del modulo.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Previo al viaje se tuvieron problemas con las misiones Gemini y Apolo, además con el gasto publico invertido en la carrera espacial y algunos muertes, existía gran presión social en algunos sectores para ya no invertir en eso, con este antecedente ¿Podria la Nasa simplemente decir que no lograron llegar a la Luna despues de todo el gasto y todo el gasto de esfuerzo?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Uno de lo últimos cuestionamientos que se hacen es por que despues del programa Apollo, el hombre ya no volvió a la Luna.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/n1o-y7mwg-g/0.jpg&quot; frameborder=&quot;0&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/n1o-y7mwg-g?feature=player_embedded&quot; width=&quot;320&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://martin-edmundo.blogspot.com/feeds/3540881697058163059/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/632987313637017278/3540881697058163059' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/3540881697058163059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/3540881697058163059'/><link rel='alternate' type='text/html' href='http://martin-edmundo.blogspot.com/2019/07/50-anos-de-la-supesta-llegada-la-luna.html' title='50 años de la supuesta llegada a la Luna'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4cQt7eMkQR6EGTzYpVZ530miduzJrYiqRfNg0XBE1L_9Xe03nGG8w_t4SbE5-FCABn07x4fyMOCMKE6UO_oZmuR_sERnTOCjXGtVyXQ_1TVjFvU-wwPseFeouPcuRJrivG9fRwpMsBlo/s72-c/29388451_10210797198782814_585260521817636864_n.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-632987313637017278.post-4294513455256521602</id><published>2018-06-15T21:33:00.003-05:00</published><updated>2018-06-15T21:33:50.779-05:00</updated><title type='text'>Flisol 2018 en Linux Cabal</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
El pasado 28 de Abril del 2018 se celebro en America Latina el Flisol, Festival de Instalación de Software Libre el evento donde simultaneamente se realizan instalaciones de Software Libre en diversas ciudades de America.&lt;br /&gt;&lt;br /&gt;Las sedes del 2018 las podemos ver en [ &lt;a href=&quot;https://flisol.info/FLISOL2018/Mexico&quot; target=&quot;_blank&quot;&gt;Sedes Flisol en México&lt;/a&gt; ]&lt;br /&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
En la ciudad de Morelia se realizo en la UNAM Campus Morelia, me habría gustado acompañarlos pero no me fue posible, sin embargo, tuve oportunidad de asistir a la sede de Guadalajara organizada por &lt;a href=&quot;http://www.linuxcabal.org/index.php?Lang=es&quot; target=&quot;_blank&quot;&gt;Linux Cabal&lt;/a&gt;. Debo mencionar que en el 2016 también asistí a esta misma sede comparado con la de hace dos años me pareció que bajo la asistencia y la participación social pero eso no fue factor para afectar al evento.&lt;br /&gt;&lt;br /&gt;Presencie dos muy buenas platicas, la primera de como usar Vim por Octavio Alvarez de Grupo de &lt;a href=&quot;http://www.gultij.org/&quot; target=&quot;_blank&quot;&gt;Usuarios Linux Tijuana&lt;/a&gt; donde observamos muchos secretos de este poderoso procesador de textos.&lt;br /&gt;&lt;br /&gt;La segunda platica fue de &lt;a href=&quot;https://empresalibre.net/&quot; target=&quot;_blank&quot;&gt;Empresa Libre&lt;/a&gt;, un sistema de facturación electrónica basado en web para PyMEs desarrollado por Mauricio Baeza.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhy305mlZlbrYrGlRWigQzQNcPNogPxtBLK-tv1TYmfsZ-V66cMdq0499iCnlFVSoN-7U1WfD5bstlAyRICA7PXXiR4eozsYQdU0ndaKmPri5r5N0i9cFWNri6yBAW9VqSqD0qwXOG2m7E/s1600/Foto+de+Martin+Barriga.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;584&quot; data-original-width=&quot;1040&quot; height=&quot;179&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhy305mlZlbrYrGlRWigQzQNcPNogPxtBLK-tv1TYmfsZ-V66cMdq0499iCnlFVSoN-7U1WfD5bstlAyRICA7PXXiR4eozsYQdU0ndaKmPri5r5N0i9cFWNri6yBAW9VqSqD0qwXOG2m7E/s320/Foto+de+Martin+Barriga.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Nos vemos el proximo año en Flisol 2019.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://martin-edmundo.blogspot.com/feeds/4294513455256521602/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/632987313637017278/4294513455256521602' title='1 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/4294513455256521602'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/4294513455256521602'/><link rel='alternate' type='text/html' href='http://martin-edmundo.blogspot.com/2018/06/flisol-2018-en-linux-cabal.html' title='Flisol 2018 en Linux Cabal'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhy305mlZlbrYrGlRWigQzQNcPNogPxtBLK-tv1TYmfsZ-V66cMdq0499iCnlFVSoN-7U1WfD5bstlAyRICA7PXXiR4eozsYQdU0ndaKmPri5r5N0i9cFWNri6yBAW9VqSqD0qwXOG2m7E/s72-c/Foto+de+Martin+Barriga.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-632987313637017278.post-8453830110027446006</id><published>2018-04-19T15:40:00.000-05:00</published><updated>2018-04-19T22:34:12.602-05:00</updated><title type='text'>Balanceando con Citrix Netscaler</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
En este articulo mostrare como hacer una implementación rápida de un servicio TCP balanceado con Citrix Netscaler. Suponiendo que tenemos dos servidores con un servicio de Apache Tomcat cada uno y que ambos escuchan en el puerto 8080, requerimos lo siguiente:&lt;/div&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;1 IP como IP virtual para publicar el servicio balanceado.&lt;/li&gt;
&lt;li&gt;2 IPs de los servidores a balancear.&lt;/li&gt;
&lt;li&gt;puertos TCP a balancear.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjY8aQW-GvNt3CMrtJjQJbtRYiOJGpRO0LGMthbfHNvQflukcmP1-PtQ5-wqnvOI9NTZE0f1H4Y8ZhZAhWVd8pHyyQc58LNpDuFW9oLsnNGCtzpwPsINER3CKQNKbNYZFH6oCM1TR4TolY/s1600/g17031-36.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;743&quot; data-original-width=&quot;1600&quot; height=&quot;148&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjY8aQW-GvNt3CMrtJjQJbtRYiOJGpRO0LGMthbfHNvQflukcmP1-PtQ5-wqnvOI9NTZE0f1H4Y8ZhZAhWVd8pHyyQc58LNpDuFW9oLsnNGCtzpwPsINER3CKQNKbNYZFH6oCM1TR4TolY/s320/g17031-36.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
El equipo utilizado en esta practica es&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;NS10.1: Build 120.13.nc&lt;/li&gt;
&lt;li&gt;Citrix Netscaler MPX-8200 &lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
En la sección de &quot;Load Balancing&quot; tenemos la parametrizacion básica en los sub-menu de Servers, Services y Virtual Server. En el sub-menu de servers vamos a definir cada uno de los servidores que deseamos balancear es ahi donde vamos a capturar el hostname o alias, IP y algún comentario así como se muestra en la siguiente imagen. Para nuestra arquitectura básica propuesta es aquí donde definimos al host1 y host2 con sus respectivas IPs.&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8Jx1O1QqTuytYTS7YNjx8tpNk8pgKX9xkHGXISgw72rApAgN4wtIzuqiweOdZtsHw1GttjJ7J7fnGRK5xN7nYQ1IF7-niJDQ3y1hxePRB74p1Egm59eYhanlqS9izM_wiQxj19Nj3z44/s1600/01.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;727&quot; data-original-width=&quot;1366&quot; height=&quot;170&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8Jx1O1QqTuytYTS7YNjx8tpNk8pgKX9xkHGXISgw72rApAgN4wtIzuqiweOdZtsHw1GttjJ7J7fnGRK5xN7nYQ1IF7-niJDQ3y1hxePRB74p1Egm59eYhanlqS9izM_wiQxj19Nj3z44/s320/01.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&amp;nbsp;En el sub-menu Services podemos definir el cada servicio que asociaremos a un servidor. Debemos ya tener documentado o planeado la siguiente informacion:&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;El nombre del servicio.&lt;/li&gt;
&lt;li&gt;El protocolo a usar: TCP, UDP, DNS, HTTP, SSL, MSSQL, MYSQL, RDP, etc.&lt;/li&gt;
&lt;li&gt;El puerto a usar.&lt;/li&gt;
&lt;li&gt;El servidor al que asociaremos este servicio y que debimos definir en previamente.&lt;/li&gt;
&lt;li&gt;Monitor, el cual es el mecanimos por el que verificaremos la salud del servicio.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguyXnW-KxISNkpIrvgDKr5B_VFRD4lz0YGIK3WmbjTtMTSsm3-9_i8mG6soPgFSCoYKN-zHrlkCwH3HCAapGWcwVUhSqFLVUl4VJa3O7XtaQO5ld_YDy4CAChKzmArb5eAC4Wqni1LvIA/s1600/02.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;688&quot; data-original-width=&quot;1230&quot; height=&quot;178&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguyXnW-KxISNkpIrvgDKr5B_VFRD4lz0YGIK3WmbjTtMTSsm3-9_i8mG6soPgFSCoYKN-zHrlkCwH3HCAapGWcwVUhSqFLVUl4VJa3O7XtaQO5ld_YDy4CAChKzmArb5eAC4Wqni1LvIA/s320/02.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Como complemento al servicio debemos asociar un monitor, el cual revisara la salud del servicio, existen monitores como validación por icmp, validación por conexión tcp, encabezados de http, encabezados por tcp, etc. Existe un listado ya definido y nosotros podemos definir nuevos monitores.&lt;br /&gt;
&lt;br /&gt;
Finalmente en el sub-menu Virtual Servers, fijaremos una IP virtual para atender al servicio balanceado. Como en el caso de los servicios la información que debemos asignar es:&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Nombre del servidor virtual.&lt;/li&gt;
&lt;li&gt;Protocolo&lt;/li&gt;
&lt;li&gt;El protocolo a usar: TCP, UDP, DNS, HTTP, SSL, MSSQL, MYSQL, RDP, etc.&lt;/li&gt;
&lt;li&gt;El puerto a usar.&lt;/li&gt;
&lt;li&gt;Debemos seleccionar los servicios que asignaremos a este Virtual Server.&lt;/li&gt;
&lt;li&gt;Metodo de balanceo: Least Connection, Least Request, Least Response Time, Round Robin, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
De esta manera la consulta del servicio se realiza unicamente hacia la IP virtual.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbNVKBU47HxaYLyxAuAftCjHdgfvQw3H87eLKHcti11PLAvkculQbQ4Ah8g89LwxgQPuaa0YXMZiczsJXhS3p1dfK4SKIhfdzbV131b91fzuGq3OUbbAaGZGZusTwdxQRenJrtQmQA9KI/s1600/03.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;688&quot; data-original-width=&quot;1230&quot; height=&quot;178&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbNVKBU47HxaYLyxAuAftCjHdgfvQw3H87eLKHcti11PLAvkculQbQ4Ah8g89LwxgQPuaa0YXMZiczsJXhS3p1dfK4SKIhfdzbV131b91fzuGq3OUbbAaGZGZusTwdxQRenJrtQmQA9KI/s320/03.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://martin-edmundo.blogspot.com/feeds/8453830110027446006/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/632987313637017278/8453830110027446006' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/8453830110027446006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/8453830110027446006'/><link rel='alternate' type='text/html' href='http://martin-edmundo.blogspot.com/2018/04/balancando-con-citrix-netscaler.html' title='Balanceando con Citrix Netscaler'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjY8aQW-GvNt3CMrtJjQJbtRYiOJGpRO0LGMthbfHNvQflukcmP1-PtQ5-wqnvOI9NTZE0f1H4Y8ZhZAhWVd8pHyyQc58LNpDuFW9oLsnNGCtzpwPsINER3CKQNKbNYZFH6oCM1TR4TolY/s72-c/g17031-36.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-632987313637017278.post-5219073421698298</id><published>2018-03-16T13:15:00.000-06:00</published><updated>2018-03-16T13:23:41.265-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Nagios"/><category scheme="http://www.blogger.com/atom/ns#" term="Software Libre"/><title type='text'>Widgets en Centreon</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGfYrFRZ4WeH4E0Pilwug3Skr_RhALCS0Yk0MJFs0Po2TULbG2l5N9h-94b7aXKZiJn8FKFZ9EbQ1GwxedzqZ02b-dYUemak94WEnpGawOEbgIHTZdtvFBsU3eU4DFPaZVnXus2I3-C5Q/s1600/centreon_logo.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGfYrFRZ4WeH4E0Pilwug3Skr_RhALCS0Yk0MJFs0Po2TULbG2l5N9h-94b7aXKZiJn8FKFZ9EbQ1GwxedzqZ02b-dYUemak94WEnpGawOEbgIHTZdtvFBsU3eU4DFPaZVnXus2I3-C5Q/s400/centreon_logo.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
En estos momentos me encuentro implementando una version estable de Centreon 2.7.13 por lo que la finalidad de este post es únicamente presentar la funcionalidad widgets en centreon.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Nos van a servir para mostrar rápidamente el monitoreo de recursos que puedan ser mas críticos y de rápido acceso, los elementos a colocar en el widget son parametrizables, muchas veces con patrones de búsqueda, ordenamientos, clasificados por hostgroup, etc. Entre los widgets que se pueden agregar están los siguientes:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Graph Monitoring&lt;/b&gt;: Mostrara las gráficas de algún recurso, nos da opción de parametrizar la frecuencia de actualización.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Host Monitoring&lt;/b&gt;: Muestra el monitorio de un host o conjunto de hosts dentro del widget&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Hostgroup Monitoring&lt;/b&gt;: Muestra el monitoreo de un hostgroup definido previamente.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Service Monitoring&lt;/b&gt;: Muestra el monitoreo de un grupo de servicios.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Por definición un widget debe incrustarse en una vista, podemos tener varias vistas (o tabs)&amp;nbsp; en cada una de estas vistas colocar uno o mas widgets. En la siguientes dos imágenes podemos ver dos vistas: &quot;Servicios en linea&quot; y &quot;Servicios para atención&quot;.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
En la primera vista de servicios para atención hemos colocado dos widgets, el primero del tipo Service Monitoring donde vemos los servicios con status de Critical y Warning únicamente. El segundo widget podemos ver uno del tipo Host Monitoring.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKrAhS8k1yLVmcPwvJoYzerSeMVFmEtpmu373wp0GDRD59sER0u0jaQXl5kn1-nvtuDwUxZbYmMeg6o0hI1ZzTghczF7T-GnII24JBvi96f4XRgZhCHooPuQVvoFX2DVuiKAPHMpXnEX0/s1600/01.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;158&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKrAhS8k1yLVmcPwvJoYzerSeMVFmEtpmu373wp0GDRD59sER0u0jaQXl5kn1-nvtuDwUxZbYmMeg6o0hI1ZzTghczF7T-GnII24JBvi96f4XRgZhCHooPuQVvoFX2DVuiKAPHMpXnEX0/s320/01.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
En la segunda vista de servicios en linea hemos colocado un par de widgets del tipo Graph Monitoring donde mostramos el monitoreo del web request de un servidor supuestamente critico.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe9GpPDVre1ebHSPj8LA-i1efc-W0h2N8xKTh4eImG2rfXdGHYogmEpoYpnQUBkOW0KMvCfvhqK1BBoR8fvSeeWSWtezJaCtp1oyyNPAN9tsP-2LGOUwie71oIPbqrr9BVJgYzh6r9-tQ/s1600/02.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;100&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe9GpPDVre1ebHSPj8LA-i1efc-W0h2N8xKTh4eImG2rfXdGHYogmEpoYpnQUBkOW0KMvCfvhqK1BBoR8fvSeeWSWtezJaCtp1oyyNPAN9tsP-2LGOUwie71oIPbqrr9BVJgYzh6r9-tQ/s320/02.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
¿Cómo agregamos un nuevo widget?&lt;br /&gt;
&lt;br /&gt;
En el Menu &quot;Home&quot; -&amp;gt; &quot;Custom View&quot; podemos ver la barra de control para la manipulacion de widgets, la barra es muy intitiva y hemos leido desde el principio seguro tendremos muy buena idea de lo como hacer estas definiciones.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtVF5QF69BMbGrLav91VItgF_WEh2ghU8sBStj5lSTtPFHsBSnpuVPR__EUFKLtNxD1PWniL5401d1bXkUft1Nmbpsotk4Xpmoh8kt0bZwZg__tooyIcyewbtJJk1AlmyRn1XNojA5u2s/s1600/03.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;54&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtVF5QF69BMbGrLav91VItgF_WEh2ghU8sBStj5lSTtPFHsBSnpuVPR__EUFKLtNxD1PWniL5401d1bXkUft1Nmbpsotk4Xpmoh8kt0bZwZg__tooyIcyewbtJJk1AlmyRn1XNojA5u2s/s320/03.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Lo primero es definir un la vista, en nuestro caso definiremos una vista llamada &quot;Vista test&quot;, durante este proceso de definición podemos iniciarla con 1, 2 y 3 columnas para colocar widgets y darle orden a nuestros elementos. Ya una vez definida la vista nos colocamos sobre ella y ahora si, agregamos el widget.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7qucwR00QqisIn0_jUD1sh_7HmmYLezZ8uwuvR6BGTVFsVAXmHDPJ-b2IWHCglJBpoIyIN6SuSoCVLmDyV68smsw7OY3QeL-oU0Q8mHktULIqUObWrx02rTop3LYasqUabk_MRhr8zuc/s1600/04.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7qucwR00QqisIn0_jUD1sh_7HmmYLezZ8uwuvR6BGTVFsVAXmHDPJ-b2IWHCglJBpoIyIN6SuSoCVLmDyV68smsw7OY3QeL-oU0Q8mHktULIqUObWrx02rTop3LYasqUabk_MRhr8zuc/s400/04.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhD3Htmjz8P3Er2qjm3HTCG3LJX4Rf6s41BuAghQK8nsm_L7W0p7Xe-cH8qXpfe3VzpkWAE0SDjnrOoLDwby1vAUtPYA59eHbiTsAvgry6WG2gwZy116fR_QPCIRWk7xkg6zdW2Snqw23o/s1600/05.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;74&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhD3Htmjz8P3Er2qjm3HTCG3LJX4Rf6s41BuAghQK8nsm_L7W0p7Xe-cH8qXpfe3VzpkWAE0SDjnrOoLDwby1vAUtPYA59eHbiTsAvgry6WG2gwZy116fR_QPCIRWk7xkg6zdW2Snqw23o/s320/05.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Para incrustar un nuevo widget primero debemos indicar de que tipo sera, con las imágenes mostradas anteriormente podemos darnos una idea de los resultados que podemos tener. Una vez agregado el componente podemos parametrizarlo con la barra superior derecha del widget, la llave mecánica indica modificar.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhQylYPPR8yOlMWYeS4rfOLef8bZWaVVjsFxDM3ldMBZergOVmwsFEK5TP6LA2wbqNEPJGRZuw0MwzDpevktyE9sOXfsKGKwjX0MCci2LrA5SnLGJ77ED1gOHMYeQ3_ULJTPIxhNGlr50/s1600/06.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;162&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhQylYPPR8yOlMWYeS4rfOLef8bZWaVVjsFxDM3ldMBZergOVmwsFEK5TP6LA2wbqNEPJGRZuw0MwzDpevktyE9sOXfsKGKwjX0MCci2LrA5SnLGJ77ED1gOHMYeQ3_ULJTPIxhNGlr50/s320/06.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSY0aF80kmAn_41LqU_6cAAWzNcpz8xEH6qfTs4EV5CwclvWljrrSlvP_K6rec8dQhgnUYKjxWhPTHhCZq8MuLXNHGm3H7_Tvx5nplp_vzE6zAQuYE8oezMP6Gfyno8RUG4ZXwYmiTgMY/s1600/07.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;133&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSY0aF80kmAn_41LqU_6cAAWzNcpz8xEH6qfTs4EV5CwclvWljrrSlvP_K6rec8dQhgnUYKjxWhPTHhCZq8MuLXNHGm3H7_Tvx5nplp_vzE6zAQuYE8oezMP6Gfyno8RUG4ZXwYmiTgMY/s320/07.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Una observación importante es que estos widgets no vienen activos inicialmente por lo que hay que cargarlos al centreon en el menu &quot;Administration&quot; -&amp;gt; &quot;Extensions&quot; -&amp;gt; &quot;Widgets&quot;. Los circulos rojos indican que el widget esta activo mientras que el engrane indica que no esta activo y si lo necesitamos debemos activarlo dandole clic.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsiIPM0rVfkt8wG_jK1F396wKMSNjTBB68Y2wr4V447lbghHlvd1m0k6tOPdozfx76XBxQ-4zYIrT53v5KC7uydjDKw5XEL3Bf5iixYR0nru5NCLkMN3oPomq5ImeT5EDrWBtwPrPaEjI/s1600/08.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;76&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsiIPM0rVfkt8wG_jK1F396wKMSNjTBB68Y2wr4V447lbghHlvd1m0k6tOPdozfx76XBxQ-4zYIrT53v5KC7uydjDKw5XEL3Bf5iixYR0nru5NCLkMN3oPomq5ImeT5EDrWBtwPrPaEjI/s320/08.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://martin-edmundo.blogspot.com/feeds/5219073421698298/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/632987313637017278/5219073421698298' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/5219073421698298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/5219073421698298'/><link rel='alternate' type='text/html' href='http://martin-edmundo.blogspot.com/2018/03/widgets-en-centreon.html' title='Widgets en Centreon'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGfYrFRZ4WeH4E0Pilwug3Skr_RhALCS0Yk0MJFs0Po2TULbG2l5N9h-94b7aXKZiJn8FKFZ9EbQ1GwxedzqZ02b-dYUemak94WEnpGawOEbgIHTZdtvFBsU3eU4DFPaZVnXus2I3-C5Q/s72-c/centreon_logo.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-632987313637017278.post-522892404670496013</id><published>2017-03-16T18:10:00.001-06:00</published><updated>2017-03-16T18:16:57.431-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Microsoft"/><title type='text'>Comandos de Supervivencia en Windows Server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Debido a mi actual trabajo, en los últimos años he tenido mas acercamiento a Windows Server y definitivamente no fue tan fácil ya que te acostumbras a tus herramientas GNU que cuando te lo cambian es como volver a empezar casi desde cero.&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Dicho lo anterior, les traigo el siguiente listado de comandos de supervivencia básica que he documentado en los últimos años para Windows Server 2003, 2018 y 2012 (No powershell).&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Problemas con Remote Desktop&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Cuando he tenido problemas para ingresar por remote desktop, algunas veces reiniciando el servicio de Remote Desktop o terminal services logramos volver a ingresar al servidor. A continuación muestro como el proceso su no se presenta ningún problema.&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;sc \\&lt;ip_addr&gt;&lt;/ip_addr&gt;&lt;/i&gt;&lt;/b&gt;&lt;b&gt;&lt;i&gt;&lt;ip_addr&gt;&lt;i&gt;&lt;b&gt;IP_ADDRS&lt;/b&gt;&lt;/i&gt; STOP TERMSERVICE&lt;br /&gt;sc \\&lt;ip_addr&gt;&lt;/ip_addr&gt;&lt;/ip_addr&gt;&lt;/i&gt;&lt;/b&gt;&lt;b&gt;&lt;i&gt;&lt;ip_addr&gt;&lt;ip_addr&gt;&lt;i&gt;&lt;b&gt;IP_ADDRS&lt;/b&gt;&lt;/i&gt; START TERMSERVICE&lt;/ip_addr&gt;&lt;/ip_addr&gt;&lt;ip_addr&gt;&lt;ip_addr&gt;&amp;nbsp;&lt;/ip_addr&gt;&lt;/ip_addr&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ip_addr&gt;&lt;ip_addr&gt;Si por alguna razón el servicio se queda en status de &quot;STOPPING&quot; al momento de detener el servicio aun podemos matar el proceso usando fuerza bruta, primero debemos conseguir el identificar del proceso, luego matar el proceso y despues iniciar el servicio.&lt;/ip_addr&gt;&lt;/ip_addr&gt;&lt;br /&gt;
&lt;ip_addr&gt;&lt;ip_addr&gt;&lt;/ip_addr&gt;&lt;/ip_addr&gt;&lt;ip_addr&gt;&lt;ip_addr&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;sc \\&lt;ip_addr&gt;&lt;/ip_addr&gt;&lt;/b&gt;&lt;/i&gt;&lt;/ip_addr&gt;&lt;/ip_addr&gt;&lt;ip_addr&gt;&lt;ip_addr&gt;&lt;i&gt;&lt;b&gt;&lt;ip_addr&gt;&lt;i&gt;&lt;b&gt;IP_ADDRS&lt;/b&gt;&lt;/i&gt; queryex termservice&lt;br /&gt;taskkill /s &lt;/ip_addr&gt;&lt;/b&gt;&lt;/i&gt;&lt;/ip_addr&gt;&lt;/ip_addr&gt;&lt;ip_addr&gt;&lt;ip_addr&gt;&lt;i&gt;&lt;b&gt;&lt;ip_addr&gt;&lt;i&gt;&lt;b&gt;IP_ADDRS&lt;/b&gt;&lt;/i&gt; &lt;ip_addr&gt; /u Administrator /PID &lt;pid&gt;&lt;br /&gt;sc \\&lt;ip_addr&gt;&lt;/ip_addr&gt;&lt;/pid&gt;&lt;/ip_addr&gt;&lt;/ip_addr&gt;&lt;/b&gt;&lt;/i&gt;&lt;/ip_addr&gt;&lt;/ip_addr&gt;&lt;ip_addr&gt;&lt;ip_addr&gt;&lt;i&gt;&lt;b&gt;&lt;ip_addr&gt;&lt;ip_addr&gt;&lt;pid&gt;&lt;ip_addr&gt;&lt;i&gt;&lt;b&gt;IP_ADDRS&lt;/b&gt;&lt;/i&gt; START TERMSERVICE&lt;/ip_addr&gt;&lt;/pid&gt;&lt;/ip_addr&gt;&lt;/ip_addr&gt;&lt;/b&gt;&lt;/i&gt;&lt;/ip_addr&gt;&lt;/ip_addr&gt;&lt;br /&gt;
&lt;ip_addr&gt;&lt;ip_addr&gt;&lt;ip_addr&gt;&lt;ip_addr&gt;&lt;pid&gt;&lt;ip_addr&gt;&lt;br /&gt;&lt;imagen&gt;&lt;image&gt;

&lt;/image&gt;&lt;/imagen&gt;&lt;/ip_addr&gt;&lt;/pid&gt;&lt;/ip_addr&gt;&lt;/ip_addr&gt;&lt;/ip_addr&gt;&lt;/ip_addr&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1a5TUOMlQVQ-v_1ggHc5X7JzoBvqNh6bS6lu2s04B5KzBjR-msZ3_hqw3kP2WPX8AWFnMm3iU9Go_B3x8NcY-4pMQ4lHfnkpDgH1pmflmeFEjvVDMgLZKB7FUzZOsw3AmnL9C2P2mhgA/s1600/sessions.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;229&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1a5TUOMlQVQ-v_1ggHc5X7JzoBvqNh6bS6lu2s04B5KzBjR-msZ3_hqw3kP2WPX8AWFnMm3iU9Go_B3x8NcY-4pMQ4lHfnkpDgH1pmflmeFEjvVDMgLZKB7FUzZOsw3AmnL9C2P2mhgA/s320/sessions.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Ahora supongamos que tenemos un servidor en otra ciudad a 300km de distancia y no podemos ingresar al sistema operativo por remote desktop, el servidor no tiene configurada o simplemente no tiene una interface de&amp;nbsp; administración como la iLO o el IMM y tampoco contamos con un ingeniero en sitio. Despues de agotar varias opciones solo queda intentar el reinicio remoto y espera que levanta bien todo el sistema operativo y escritorio remoto. Con el siguiente comando se nos muestra un cuadro de dialogo para reiniciar uno o varios servidores.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;shutdown /i&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;imagen&gt;&lt;br /&gt;&lt;/imagen&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2HTW4R1x_9l5eCbHL3pt7tt-u41256kxhfJqE3MhJ6e9Mxf7ueHAtJBPFzTi6RMHpy6jm3m7hPWDSwBox9x98uBPQ3fRwn29mBTIVjsJhWJZrctof3_ctYwxAsj_7hIus8uXIEsnBbf8/s1600/shutdown.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2HTW4R1x_9l5eCbHL3pt7tt-u41256kxhfJqE3MhJ6e9Mxf7ueHAtJBPFzTi6RMHpy6jm3m7hPWDSwBox9x98uBPQ3fRwn29mBTIVjsJhWJZrctof3_ctYwxAsj_7hIus8uXIEsnBbf8/s320/shutdown.png&quot; width=&quot;286&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;imagen&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Sesiones de usuarios y terminal services.&lt;/b&gt;&lt;/span&gt;&lt;/imagen&gt;&lt;imagen&gt;Por default windows server acepta dos usuarios simultáneos por remote desktop, si alguien quiere mas usuarios simultáneos debe comprar licenciamiento. En windows server 2003 muchas veces llegamos a tener problemas para ingresar ya que una sesion iniciada y no cerrada impide que alguien mas ingrese. La manera de ver que usuarios no cerraron bien su sesion y cerrarles la misma es con los comandos qwinsta y rwinsta.&lt;/imagen&gt;&lt;br /&gt;
&lt;imagen&gt;&lt;/imagen&gt;&lt;imagen&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;qwinsta /server:IP_ADDRS&lt;/b&gt;&lt;/i&gt;&lt;ip_addr&gt;&lt;br /&gt;&lt;br /&gt;La tercer columna nos muestra el identificador de sesion, con este identificador podemos finalizar una sesion.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;rwinsta /server:&lt;/b&gt;&lt;/i&gt;&lt;/ip_addr&gt;&lt;/imagen&gt;&lt;i&gt;&lt;b&gt;IP_ADDRS&lt;/b&gt;&lt;/i&gt;&lt;imagen&gt;&lt;ip_addr&gt;&lt;ip_addr&gt;&lt;i&gt;&lt;b&gt; 3&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;

&lt;br /&gt;

&lt;/ip_addr&gt;&lt;/ip_addr&gt;&lt;/imagen&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjb3rWx9CI9ZofkBBcpyUwkhxrsdN-gjxeyBvj_V-EfWPl_fv-fSfM9EtqG4LbmkVxR0PUAwVN35z4tTI2wpeOQ0s8FJkwQeQpx4CHz5m5dL0bqnhD1BIaepYrWnztBR4KsHb94vpJuykE/s1600/killrdp.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;110&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjb3rWx9CI9ZofkBBcpyUwkhxrsdN-gjxeyBvj_V-EfWPl_fv-fSfM9EtqG4LbmkVxR0PUAwVN35z4tTI2wpeOQ0s8FJkwQeQpx4CHz5m5dL0bqnhD1BIaepYrWnztBR4KsHb94vpJuykE/s320/killrdp.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Puertos de red abiertos&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
En todo momento resulta útil conocer que puertos están abiertos en el sistema, pero resulta mas útil conocer que procesos abrieron cada puerto.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;i&gt;&lt;b&gt;#Conexiones establecidas y el PID que lo atiende&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;netstat -oan &lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;i&gt;&lt;b&gt;#Puertos abiertos en modo LISTENING &lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;netstat -an | find /i &quot;listening&quot;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Depuración de espacio en disco&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Aunque siempre es posible depurar usando herramientas como ccleaner y remover aplicaciones que ya no usamos, existen unos directorios asociados las actualizaciones y services packs del sistema operativo. Estos deben ejecutarse como administrador.&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;i&gt;&lt;b&gt;#Archivos viejos de Service pack anteriores ya no usados&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Dism /online /cleanup-image /spsuperseded&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;i&gt;&lt;b&gt;#Archivos viejos de actualizaciones ya no usados.&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Dism /online /Cleanup-Image /StartComponentCleanup&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;&lt;/i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Para el caso de que tengamos archivos muy viejos que ya no se usan podemos borrarlos, colocandonos en el directorio donde se encuentran todos esos archivos, ejecutamos el siguiente comando donde borrariamos todos los archivos con antigüedad mayor a 45 días. Esto resulta ideal para una aplicación que escribe logs diariamente.&lt;/div&gt;
&lt;i&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/i&gt;
&lt;i&gt;&lt;b&gt;forfiles /m *.* /d -45 /c &quot;cmd /c del @file&quot;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Windows Update, reinicio no programado&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Si por alguna razón se nos quedaron los windows update encendidos configurados para actualizarse de manera automática, muy probablemente nos reiniciara el servidor sin darnos cuenta hasta afectar alguna plataforma de la empresa. La recomendación es controlar estas actualizaciones, permitiendo que se descarguen o no pero lo mas importante es que seamos nosotros quienes definamos el momento en que estas se realizan. Una manera de evitarlo, es decir, cancelar el reinicio automatico de windows server podemos dar de baja el servicio como se indica:&lt;/div&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;sc stop wuauserv&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Información rapida de usuarios en dominio&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Si queremos conseguir informacion mas rapida de un usuario de dominio sin ingresar al domain controller o sin tener instalado la aplicacion de Active Directory, podemos consultar de la siguiente manena&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;net user /DOMAIN &lt;/b&gt;&lt;/i&gt;&lt;username&gt;&lt;i&gt;&lt;b&gt;USERNAME&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Ligas simbólicas&lt;/b&gt;&lt;/span&gt;&lt;/username&gt;&lt;username&gt;Confieso que esto me sorprendió mucho, nunca pensé que en Windows se podría crear ligas simbólicas dentro de la misma unidad de disco o incluso hacia otro volumen. Esto puede resultar útil cuando el volumen no viene de una SAN y no se puede crecer. Una solución puede ser agregar mas disco local y con una liga simbólica escribir en el nuevo disco local añadido. Con el parametro /D definimos la liga simbólica y usamos rutas absolutas para el origen como el destino.&lt;/username&gt;&lt;br /&gt;
&lt;username&gt;&lt;/username&gt;&lt;username&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;mklink /D c:\dell\logs e:\dell\logs&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Uptime&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Si queremos saber desde cuando esta corriendo un windows server podemos ejecutar el comando siguiente y ver la parte de &quot;Statistics Since&quot;.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;net stats server&lt;/b&gt;&lt;/i&gt;&lt;/username&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://martin-edmundo.blogspot.com/feeds/522892404670496013/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/632987313637017278/522892404670496013' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/522892404670496013'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/522892404670496013'/><link rel='alternate' type='text/html' href='http://martin-edmundo.blogspot.com/2017/03/comandos-de-supervivencia-en-windows.html' title='Comandos de Supervivencia en Windows Server'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1a5TUOMlQVQ-v_1ggHc5X7JzoBvqNh6bS6lu2s04B5KzBjR-msZ3_hqw3kP2WPX8AWFnMm3iU9Go_B3x8NcY-4pMQ4lHfnkpDgH1pmflmeFEjvVDMgLZKB7FUzZOsw3AmnL9C2P2mhgA/s72-c/sessions.png" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Guadalajara, Jal., México</georss:featurename><georss:point>20.6596988 -103.34960920000003</georss:point><georss:box>20.4220003 -103.67233270000003 20.8973973 -103.02688570000004</georss:box></entry><entry><id>tag:blogger.com,1999:blog-632987313637017278.post-2356497401974413886</id><published>2017-02-23T12:52:00.003-06:00</published><updated>2017-02-23T12:52:54.033-06:00</updated><title type='text'>Nuevo proyecto - Anuncios en Mexico - www.anunciosenmexico.com.mx</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Hace unos días acabo de iniciar un nuevo proyecto, el cual consiste en un sitio de anuncios gratuitos. Dada la situación económica de México en los últimos años creo que un gran volumen de la población tiene necesidad de vender y buscar productos con precios atractivos.&lt;/div&gt;
&lt;br /&gt;
Queda a su disposición el sitio:&lt;br /&gt;
&lt;a href=&quot;http://www.anunciosenmexico.com.mx/&quot;&gt;www.anunciosenmexico.com.mx&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://martin-edmundo.blogspot.com/feeds/2356497401974413886/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/632987313637017278/2356497401974413886' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/2356497401974413886'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/2356497401974413886'/><link rel='alternate' type='text/html' href='http://martin-edmundo.blogspot.com/2017/02/nuevo-proyecto-anuncios-en-mexico.html' title='Nuevo proyecto - Anuncios en Mexico - www.anunciosenmexico.com.mx'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-632987313637017278.post-3923301027299875711</id><published>2016-08-09T10:46:00.003-05:00</published><updated>2017-03-16T18:10:08.703-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GNU Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Software Libre"/><title type='text'>Primer prototipo LoadBalancer con IPtables</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
El siguiente script en bash es el primer prototipo de LoadBalancer para un servicio TCP en dos o mas servidores simultaneamente utilizando iptables.&lt;/div&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;#!/bin/bash
local_ip=&quot;10.10.50.81&quot;

ip1=&quot;10.10.96.50&quot;
ip2=&quot;10.10.50.106&quot;
tcp_port=&quot;80&quot;


#Se valida que los servicios esten disponibles
nmap $ip1 -p $tcp_port | grep -i open &amp;gt;&amp;gt; /dev/null
service1=$?
nmap $ip2 -p $tcp_port | grep -i open &amp;gt;&amp;gt; /dev/null
service2=$?
let status=$service1+$service2
echo &quot;Valor: $status&quot;
let remakerules=10

while [ 0 -eq 0 ]; do

        if [ &quot;$remakerules&quot; != &quot;$status&quot; ]; then
                # You need these system settings.
                echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward
                for f in /proc/sys/net/ipv4/conf/*/rp_filter ; do echo 1 &amp;gt; $f ; done

                # Clear iptables/netfilter settings.
                iptables -F
                iptables -X
                iptables -t nat -F
                iptables -t nat -X
                iptables -t filter -F
                iptables -t filter -X
                iptables -t mangle -F
                iptables -t mangle -X


                iptables -P INPUT ACCEPT
                iptables -P OUTPUT ACCEPT
                iptables -P FORWARD ACCEPT
                iptables -t nat -P PREROUTING ACCEPT
                iptables -t nat -P POSTROUTING ACCEPT

                if [ &quot;$service1&quot; == &quot;0&quot; -a &quot;$service2&quot; == &quot;0&quot; ]; then
                        #Los dos servicios estan disponibles
                        iptables -t nat -A PREROUTING -p tcp -d $local_ip --dport $tcp_port -m state --state NEW -m statistic --mode random --probability .5 -j DNAT --to $ip1:$tcp_port
                        iptables -t nat -A PREROUTING -p tcp -d $local_ip --dport $tcp_port -m state --state NEW -m statistic --mode random --probability .5 -j DNAT --to $ip2:$tcp_port
                else
                        if [ &quot;$service2&quot; == &quot;0&quot; ]; then
                                #Unicamente el servicio2 esta arriba
                                iptables -t nat -A PREROUTING -p tcp -d $local_ip --dport $tcp_port -m state --state NEW -m statistic --mode nth --every 1 --packet 0 -j DNAT --to $ip2:$tcp_port
                        else
                                if [ &quot;$service1&quot; == &quot;0&quot; ]; then
                                        #Unicamente el servicio1 esta arriba
                                        iptables -t nat -A PREROUTING -p tcp -d $local_ip --dport $tcp_port -m state --state NEW -m statistic --mode nth --every 1 --packet 0 -j DNAT --to $ip1:$tcp_port
                                else
                                        echo &quot;CRITICAL: Los dos Servicios estan abajo&quot;
                                fi
                        fi
                fi


                iptables -A INPUT -j ACCEPT
                iptables -A OUTPUT -j ACCEPT
                iptables -A FORWARD -j ACCEPT
                iptables -A INPUT -j LOG --log-prefix &quot;iptables: &quot; --log-level 4
                iptables -A OUTPUT -j LOG --log-prefix &quot;iptables: &quot; --log-level 4
                iptables -A FORWARD -j LOG --log-prefix &quot;iptables: &quot; --log-level 4

                iptables -t nat -A POSTROUTING  -j MASQUERADE
                echo &quot;Cambio de reglas...&quot;
        fi

        #sleep 1200
        sleep 1

        #Se valida que los servicios esten disponibles
        nmap $ip1 -p $tcp_port | grep -i open &amp;gt;&amp;gt; /dev/null
        service1=$?
        nmap $ip2 -p $tcp_port | grep -i open &amp;gt;&amp;gt; /dev/null
        service2=$?
        let remakerules=$status
        let status=$service1+$service2
        echo &quot;Valor: $status&quot;

done
&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://martin-edmundo.blogspot.com/feeds/3923301027299875711/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/632987313637017278/3923301027299875711' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/3923301027299875711'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/3923301027299875711'/><link rel='alternate' type='text/html' href='http://martin-edmundo.blogspot.com/2016/08/primer-prototipo-loadbalancer-con.html' title='Primer prototipo LoadBalancer con IPtables'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Guadalajara, Jal., México</georss:featurename><georss:point>20.6596988 -103.34960920000003</georss:point><georss:box>20.4220003 -103.67233270000003 20.8973973 -103.02688570000004</georss:box></entry><entry><id>tag:blogger.com,1999:blog-632987313637017278.post-3435341880019069775</id><published>2016-05-29T00:54:00.001-05:00</published><updated>2016-05-29T01:00:32.405-05:00</updated><title type='text'>Certificados SSL para Web Server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
La instalación de certificados sobre un web server es muy sencilla. En este post vamos a mostrar como instalar un certificado en Apache Web Server. &lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
En sintesis primeramente debemos escoger un proveedor de certificados digitales para hacer el proceso de compra con el, este proveedor requiere que le enviemos una solicitud conocido como archivo CSR, es muy importante generar este archivo CSR en el servidor donde vamos a instanciar el web server y que al mismo tiempo debe ser el mismo donde se colocara el certificado. Despues de que enviemos el CSR el proveedor nos enviara un archivo CRT, con este archivo podremos configurar el certificado.&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIkAkY0oSd2OWK6GHsskS-RuqQVSMTbc70BC7OMdPcY6nAp7P67b83lzQrgNaykfAU-xMMqnoc0GAnaNo54bZAC1p089rScYmtBC_f3b63mqcZQIHceQQWdgSePIv02GDTnUVp8jlBjT0/s1600/g5058.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;140&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIkAkY0oSd2OWK6GHsskS-RuqQVSMTbc70BC7OMdPcY6nAp7P67b83lzQrgNaykfAU-xMMqnoc0GAnaNo54bZAC1p089rScYmtBC_f3b63mqcZQIHceQQWdgSePIv02GDTnUVp8jlBjT0/s320/g5058.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Realizáremos paso a paso el proceso en el interprete de comandos de GNU/Linux, como buena practica recomiendo llamar al archivo igual que el FQDN a certificar, para nuestro caso vamos a suponer que nuestro objetivo es certificar a www.midominio.com. &lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Creamos una llave de seguridad de 2048 bits, se nos pedirá que ingresemos el passphrase. Desde luego es muy importante guardar el passphrase. &lt;/div&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;openssl genrsa -des3 -out www.midominio.com.key 2048
&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Creamos el archivo csr a partir de la llave que creamos anteriormente y con una vigencia de 365 dias. Se nos pedirá información del FQDN a certificar y datos de ubicación de la empresa que solicita el certificado.&lt;/div&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;openssl req -days 365 -new -key www.midominio.com.key -out www.midominio.com.csr
&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Ahora ya podemos enviarle el csr al proveedor para que el nos regrese el CRT, este crt debe incluir el certificado para el webserver y un certificado de autoridad (CA). Ya que tenemos todo, podemos configurar los certificados en la secciones de host virtuales en el FQDN que estamos configurando, se modificaran los siguientes parametros:&lt;/div&gt;
&lt;b&gt;SSLCertificateFile:&lt;/b&gt; Archivo CRT con el certificado para el web server.&lt;br /&gt;
&lt;b&gt;SSLCertificateKeyFile:&lt;/b&gt; Archivo llave&lt;br /&gt;
&lt;b&gt;SSLCACertificateFile&lt;/b&gt;: Archivo CRT con el CA.&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Despues de hacer estos cambios se reiniciara el web server y por cuestiones de seguridad, cada reinicio o inicialización del servicio pedirá la clave, por un lado es bueno que solo las personas autorizadas puedan reiniciar el servicio web, pero que pasa si el servidor completo se reinicia... el web server no arrancara por que se quedara esperando el passphrase. Existe una manera de evitar esto y es reemplazar la llave por otra que no requiera passphrase, eso se puede reaizar con el siguiente comando:&lt;/div&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;openssl genrsa -out www.midominio.com.key.nopass 2048
&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Finalmente solo reemplazamos en el parametro del Apache &quot;SSLCertificateKeyFile&quot; con valor www.midominio.com.key por www.midominio.com.key.nopass&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://martin-edmundo.blogspot.com/feeds/3435341880019069775/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/632987313637017278/3435341880019069775' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/3435341880019069775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/3435341880019069775'/><link rel='alternate' type='text/html' href='http://martin-edmundo.blogspot.com/2016/05/certificados-ssl-para-web-server.html' title='Certificados SSL para Web Server'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIkAkY0oSd2OWK6GHsskS-RuqQVSMTbc70BC7OMdPcY6nAp7P67b83lzQrgNaykfAU-xMMqnoc0GAnaNo54bZAC1p089rScYmtBC_f3b63mqcZQIHceQQWdgSePIv02GDTnUVp8jlBjT0/s72-c/g5058.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-632987313637017278.post-7082216566566331993</id><published>2016-02-05T17:36:00.002-06:00</published><updated>2016-02-05T19:13:03.343-06:00</updated><title type='text'>Recuperando password de Administrator de iLO4 en servidor HP</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Despues de algunos meses o incluso años, esto pensando en retomar el blog con nuevos proyectos y problemas del día a día.&lt;br /&gt;
&lt;br /&gt;
Hace unos días me tope con la necesidad de actualizar el driver de la interface de red de un servidor HP que esta en otra ciudad diferente a la ciudad donde vivo. Dada esta necesidad había una situación que no me dejaba tranquilo ya que el servidor esta en otra ciudad ¿que pasa si no queda funcionando la interface de red? ¿Voy a tener que ir físicamente a actualizarlo?. La única opción para hacer esto es a traves de la Consola Remota de la iLO, pero tampoco tenia la clave y había que conseguirla de algún modo sin tener que viajar solo a eso.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
La información del equipo es:&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;SO: Debian GNU/Linux 7.1&lt;br /&gt;Kernel: 3.2.0-4-686-pae&lt;br /&gt;Hp Server: ProLiant DL360p Gen8 (i&lt;/span&gt;LO 4)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Paso 1. Agregar los repositorios de HPe a Debian para instalar HP Advanced Server Recovery Daemon, el cual nos permitira el acceso a la HP iLO.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;sudo echo &quot;deb http://downloads.linux.hpe.com/downloads/ManagementComponentPack/ubuntu precise current/non-free&quot; &amp;gt;&amp;gt; /etc/apt/sources.list
sudo apt-get update
sudo apt-get install hponcfg
sudo apt-get install ams
sudo apt-get install hp-healt
&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Paso 2. Descargar &quot;HP Lights-Out XML PERL Scripting Sample for Linux&quot; al dia de hoy el archivo es linux-LOsamplescripts4.00.0.tgz, este archivo esta disponible en la URL &lt;span style=&quot;color: blue;&quot;&gt;http://h20564.www2.hpe.com/hpsc/swd/public/detail?swItemId=MTX_2e178c5435a742d5bbb60a3b0c&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;
Ya en la linea de comandos con el archivo en el home, ejecutamos lo siguiente&lt;/div&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;mkdir linux-LOsamplescripts
mv linux-LOsamplescripts4.00.0.tgz linux-LOsamplescripts
cd linux-LOsamplescripts
tar -xvzf linux-LOsamplescripts4.00.0.tgz
&lt;/pre&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;
Se modificara el archivo Administrator_reset_pw.xml, como se muestra a continuación:
&lt;br /&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;&lt;ribcl version=&quot;2.0&quot;&gt;
   &lt;login password=&quot;boguspassword&quot; user_login=&quot;Administrator&quot;&gt;
      &lt;user_info mode=&quot;write&quot;&gt;
         &lt;mod_user user_login=&quot;Administrator&quot;&gt;
            &lt;password value=&quot;newpasswd&quot;&gt;
         &lt;/password&gt;&lt;/mod_user&gt;
      &lt;/user_info&gt;
   &lt;/login&gt;
&lt;/ribcl&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
En la etiqueta &quot;PASSWORD&quot; a su parametro value se le asigna la nueva contraseña para la iLO. y se ejecuta el siguiente comando&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;sudo hponcfg -f Administrator_reset_pw.xml -l log.txt &amp;gt; output.txt
&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Para el ejemplo, una vez realizado esto ya podemos ingresar a la iLO del servidor. Con las credenciales:&lt;br /&gt;
User: Administrator&lt;br /&gt;Passwd: newpasswd&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjfwMiKBXMyGKD3i80eUaOxwqWDkgCt7SxhltOPjojjxe2F-5oia17H6APpgm_FONqHQY5eOjBbmjNsrVI7tUwZEI84ULCuCisvv8Thyphenhyphen5qgxMioboDJgENePoo_tLkWwtGFAGAcMIR65U/s1600/ilo.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;115&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjfwMiKBXMyGKD3i80eUaOxwqWDkgCt7SxhltOPjojjxe2F-5oia17H6APpgm_FONqHQY5eOjBbmjNsrVI7tUwZEI84ULCuCisvv8Thyphenhyphen5qgxMioboDJgENePoo_tLkWwtGFAGAcMIR65U/s400/ilo.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://martin-edmundo.blogspot.com/feeds/7082216566566331993/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/632987313637017278/7082216566566331993' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/7082216566566331993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/7082216566566331993'/><link rel='alternate' type='text/html' href='http://martin-edmundo.blogspot.com/2016/02/recuperando-password-de-administrator.html' title='Recuperando password de Administrator de iLO4 en servidor HP'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjfwMiKBXMyGKD3i80eUaOxwqWDkgCt7SxhltOPjojjxe2F-5oia17H6APpgm_FONqHQY5eOjBbmjNsrVI7tUwZEI84ULCuCisvv8Thyphenhyphen5qgxMioboDJgENePoo_tLkWwtGFAGAcMIR65U/s72-c/ilo.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-632987313637017278.post-7894691021086675950</id><published>2012-08-29T17:21:00.000-05:00</published><updated>2012-08-29T17:22:03.734-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="LPI"/><title type='text'>Mi primer certificación LPIC</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Hace unos&amp;nbsp;días, la llegada de un paquete a mi casa me puso en gran medida emocionado, no me&amp;nbsp;había&amp;nbsp;buscado el espacio para compartirlo con el mundo, sin embargo, ahora les comento que me llego la&amp;nbsp;certificación&amp;nbsp;LPIC-1.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Después&amp;nbsp;de aprobar los&amp;nbsp;exámenes&amp;nbsp;101 y 102, espere un poco mas de seis semanas para recibir mi documento. Ustedes pueden leer mis comentarios preliminares para el proceso que&amp;nbsp;seguí&amp;nbsp;[&amp;nbsp;&lt;a href=&quot;http://www.elrincondemartin.org/2012/04/lpic-en-mexico.html&quot; target=&quot;_blank&quot;&gt;aquí&lt;/a&gt;&amp;nbsp;]. Los&amp;nbsp;exámenes&amp;nbsp;no son para nada&amp;nbsp;fáciles, hay que estudiar mucho, son precisos (parámetros&amp;nbsp;exactos, rutas absolutas, archivos de&amp;nbsp;configuración, comandos, etc). Pero..., ¿Que fue lo que me llego?:&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Certificación.&lt;/li&gt;
&lt;li&gt;Tarjeta&amp;nbsp;de&amp;nbsp;Certificación&amp;nbsp;(algo&amp;nbsp;así&amp;nbsp;como una&amp;nbsp;cédula&amp;nbsp;profesional&amp;nbsp;en&amp;nbsp;México).&lt;/li&gt;
&lt;li&gt;Una revista Linux Magazine.&lt;/li&gt;
&lt;li&gt;Certificacion adicional: &lt;a href=&quot;http://www.novell.com/training/certinfo/cla/&quot; target=&quot;_blank&quot;&gt;Novell Certified Linux Administrator&lt;/a&gt;, la cual requiere un registro y esperar un tiempo adicional.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigTVbGcSmxXgdzIlNVmnnUAq87FOUucPJDudF9yutQhvxvt1cLWamewXajAfiG-_IPwWXfvnOhcmYfv1DDK63HGwzR9sckaVvA8-CN7AJu3b5S3OThQnzNDsP4zqVFXnW3RTypH2W_dsI/s1600/LPIC.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;238&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigTVbGcSmxXgdzIlNVmnnUAq87FOUucPJDudF9yutQhvxvt1cLWamewXajAfiG-_IPwWXfvnOhcmYfv1DDK63HGwzR9sckaVvA8-CN7AJu3b5S3OThQnzNDsP4zqVFXnW3RTypH2W_dsI/s320/LPIC.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://martin-edmundo.blogspot.com/feeds/7894691021086675950/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/632987313637017278/7894691021086675950' title='3 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/7894691021086675950'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/7894691021086675950'/><link rel='alternate' type='text/html' href='http://martin-edmundo.blogspot.com/2012/08/mi-primer-certificacion-lpic.html' title='Mi primer certificación LPIC'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigTVbGcSmxXgdzIlNVmnnUAq87FOUucPJDudF9yutQhvxvt1cLWamewXajAfiG-_IPwWXfvnOhcmYfv1DDK63HGwzR9sckaVvA8-CN7AJu3b5S3OThQnzNDsP4zqVFXnW3RTypH2W_dsI/s72-c/LPIC.jpg" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-632987313637017278.post-1525267830511922709</id><published>2012-07-19T20:56:00.000-05:00</published><updated>2012-07-20T10:55:54.438-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Desarrollo"/><category scheme="http://www.blogger.com/atom/ns#" term="otrs"/><title type='text'>Otrs stat from last week, last month, last everyday</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Hace unos días había tenido la necesidad de automatizar el envió de reportes en &lt;a href=&quot;http://www.otrs.com/es/&quot; target=&quot;_blank&quot;&gt;OTRS&lt;/a&gt; (3.1.2), lo que buscábamos era enviar el reporte de las actividades realizadas en los últimos N días, por ejemplo enviar automáticamente cada domingo por la noche un reporte semanal de los tickets creados en la semana actual.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;u&gt;El problema:&lt;/u&gt;&lt;/b&gt; Las estadísticas con objetos dinámicos no permiten especificar un parámetro como &lt;i&gt;&quot;LastWeek&quot;&lt;/i&gt;, solo permite dos opciones&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Definir un rango de fechas estéticamente.&lt;/li&gt;
&lt;li&gt;Dejar a elección del usuario escoger la fecha en la interface web.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;i&gt;¿Que pasa con el script de generación de estadísticas?&lt;/i&gt;&lt;br /&gt;
El script &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #e06666;&quot;&gt;otrs.GenerateStats.pl&lt;/span&gt; recibe algunos parámetros como el ID de la estadística, el directorio destino donde colocara el archivo, el formato en que entregara la estadística (csv, pdf). Incluso una opción &quot;-p&quot; que recibe valores para Format, GraphSize, StatID &amp;nbsp;y ExchangeAxis. Debo mencionar que esta parte tiene una documentación muy pobre.&lt;br /&gt;
&lt;br /&gt;
Como la idea es automatizar el proceso, tenemos que pensar en cron job, pero cron implica &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #e06666;&quot;&gt;otrs.GenerateStats.pl&lt;/span&gt;, y este ultimo no tiene el soporte que ocupamos, esperando que esta descripción sea clara ¿quien podrá ayudarnos?&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;La solución:&lt;/u&gt;&lt;/b&gt; &amp;nbsp;Construcción de un script traductor.&lt;br /&gt;
&lt;br /&gt;
En la &lt;a href=&quot;https://dl.dropbox.com/u/6443236/OTRSDatabaseDiagram.png&quot; target=&quot;_blank&quot;&gt;base de datos de OTRS&lt;/a&gt;, las estadísticas se almacenan en &quot;xml_storage&quot;, cada generación de estadísticas consultara las fechas primeramente en un cache y luego en la tabla&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;select * from xml_storage where xml_key=29&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;center&gt;
&lt;table border=&quot;1&quot;&gt; 
&lt;tbody&gt;
&lt;tr&gt; 
    &lt;td&gt;&lt;b&gt;xml_type&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;xml_key&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;xml_content_key&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;xml_content_value&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
    &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;Stats&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;29&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;[0]{&#39;otrs_stats&#39;}[1]{&#39;UseAsRestriction&#39;}[1]{&#39;TimeStop&#39;}&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;2012-07-18 23:59:59&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
    &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;Stats&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;29&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;[0]{&#39;otrs_stats&#39;}[1]{&#39;UseAsRestriction&#39;}[1]{&#39;TimeStart&#39;}&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;2012-07-11 00:00:00&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;&lt;br /&gt;
&lt;br /&gt;
Es recomendable crear un usuario en mysql con acceso de select/update a nuestra tabla y nada mas, este para ser usado en nuestro script. Con esta información preliminar les presento el script resultante:&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;#!/bin/bash

################################################
# Martin Edmundo, [ Julio 2012 ]
# @martinedmundo
# www.elrincondemartin.org
# Funcion: Script de generacion de estadisticas
#          basado en los ultimos dias.
# Release: OTRS 3.1.2
################################################

#Definicion de variables usadas
OTRS_DIR=/opt/otrs
OTRS_BIN=$OTRS_DIR/bin
BODYMAIL=/usr/local/sbin/bodymail.txt

DBUSER=&#39;otrsstat&#39;
DBPASSWD=&#39;xxxxxx&#39;
DBNAME=&#39;otrs&#39;
DBTABLE=&#39;xml_storage&#39;

STATNUM=&#39;&#39;;
TARGETDIR=$HOME;
DAYSNUM=&#39;7&#39;;
FILENAME=&#39;&#39;;

FILENAMESTAT=&#39;&#39;;
PREFIXFILENAMESTAT=&#39;Estad&#39;;
datestart=&#39;&#39;
datestop=&#39;&#39;

function phelp {
        echo -e &quot;Usage: $0 -n &lt;stat_number&gt; -o &lt;target_dir&gt; -d &lt;days_number&gt; | -h&quot;
        echo -e &quot;  -n Numero de estadistica.&quot;
        echo -e &quot;  -o Directorio destino de la estadistica. [ Predeterminado: $HOME ]&quot;
        echo -e &quot;  -d Rango de fechas de los utimos dias hasta hoy. [ Predeterminado: 7 ]&quot;
        echo -e &quot;  -h Ayuda, este mensaje.\n&quot;
}

function chdb {
        #Se define el rango de fechas para los ultimos DAYSNUM dias
        datestart=`date --date=&quot;-$DAYSNUM day&quot; +&quot;%F &quot;`00:00:00;
        datestop=`date +&quot;%F %H:%M:%S&quot;`;

        #Limpiamos cache de estadisticas
        rm $OTRS_DIR/var/tmp/CacheFileStorable/XML/* 2&amp;gt; /dev/null

        #Actualizamos fechas de estadisticas
        mysql -u $DBUSER -p$DBPASSWD --database=$DBNAME --execute=&quot;UPDATE $DBTABLE SET xml_content_value=&#39;$datestart&#39; WHERE xml_key=$STATNUM and xml_content_key LIKE &#39;%TimeStart%&#39;&quot;
        mysql -u $DBUSER -p$DBPASSWD --database=$DBNAME --execute=&quot;UPDATE $DBTABLE SET xml_content_value=&#39;$datestop&#39; WHERE xml_key=$STATNUM and xml_content_key LIKE &#39;%TimeStop%&#39;&quot;
}

function sendmail_ {
        #Nos vamos al diretorio de los reportes
        cd $TARGETDIR

        #Se revisa los destinatarios de correo
        for mail in `cat $FILENAME`; do
                isComment=`echo &quot;$mail&quot; | cut -d &quot;#&quot; -f1`

                #Si no es un comentario, analizamos
                if [ -n &quot;$isComment&quot; ]; then
                        #Se requiere mejorar la expresion regular para correo
                        isMail=`echo &quot;$mail&quot; | grep &quot;.*@.*&quot;`

                        #Enviamos correo electronico
                        if [ &quot;$?&quot; = &quot;0&quot; ]; then
                                ( echo -e &quot;Reporte de actividades correspondientes al siguiente periodo: \n
[ $datestart a $datestop ]&quot;; uuencode $FILENAMESTAT Reporte_$STATNUM.pdf  ) | mail -s &quot;Servicios update&quot; $mail
                        else
                                echo &quot;Formato de correo desconocido: $mail&quot;
                        fi
                fi
        done
}

while getopts n:o:d:f:h OPT
do
        case $OPT in
                n) STATNUM=&quot;$OPTARG&quot; ;;
                o) TARGETDIR=&quot;$OPTARG&quot; ;;
                d) DAYSNUM=&quot;$OPTARG&quot; ;;
                f) FILENAME=&quot;$OPTARG&quot; ;;
                h)
                        phelp
                        exit 0
                ;;
                ?)
                        phelp
                        exit 1
                ;;
                esac
done

if [ -z &quot;$STATNUM&quot; ]; then
        echo &quot;*** Ocurrio un error o hace falta el parametro -n&quot;
        phelp
        exit 1;
fi

#Se actualiza la base de datos
chdb

#Se genera el reporte
rm $TARGETDIR/*.pdf 2&amp;gt; /dev/null
FILENAMESTAT=`$OTRS_BIN/otrs.GenerateStats.pl -n $STATNUM -o $TARGETDIR -f Print 2&amp;gt; /dev/null | grep -o &quot;$PREFIXFILENAMESTAT.*pdf&quot;`

#¿Quiere que se envie por correo?
if [ -n &quot;$FILENAME&quot; ]; then
        if [ -f $FILENAME ]; then
                sendmail_
        else
                echo &quot;No existe el archivo $FILENAME&quot;
                exit 1;
        fi
fi

exit 0;
&lt;/days_number&gt;&lt;/target_dir&gt;&lt;/stat_number&gt;&lt;/pre&gt;
&lt;br /&gt;
Como lo usamos:&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;martinbarriga@monitoreo:/usr/local/sbin$ ./otrs.GenerateStats.sh -h
Usage: ./otrs.GenerateStats.sh -n &lt;stat_number&gt; -o &lt;target_dir&gt; -d &lt;days_number&gt; | -h
 -n Numero de estadística.
 -o Directorio destino de la estadistica. [ Predeterminado: /home/user ]
 -d Rango de fechas de los utimos dias hasta hoy. [ Predeterminado: 7 ]
 -h Ayuda, este mensaje.
&lt;/days_number&gt;&lt;/target_dir&gt;&lt;/stat_number&gt;&lt;/pre&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martin-edmundo.blogspot.com/feeds/1525267830511922709/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/632987313637017278/1525267830511922709' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/1525267830511922709'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/1525267830511922709'/><link rel='alternate' type='text/html' href='http://martin-edmundo.blogspot.com/2012/07/otrs-stat-from-last-week-last-month.html' title='Otrs stat from last week, last month, last everyday'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-632987313637017278.post-1459357029808370613</id><published>2012-07-02T17:31:00.002-05:00</published><updated>2012-07-02T17:54:53.686-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Actividad Social"/><title type='text'>Resultados Elecciones 2012</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Como parte de mi compromiso social con mi patria el pasado 1 de Julio fui a votar y el&amp;nbsp;día&amp;nbsp;2 de Julio a verificar los resultados con los registrados por el PREP. Esto ultimo por que&amp;nbsp;encontré&amp;nbsp;algunas&amp;nbsp;imágenes&amp;nbsp;compartidas en las redes sociales donde se pone en evidencias supuestas&amp;nbsp;anomalías&amp;nbsp;en el proceso de&amp;nbsp;contabilización.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Basado en esta&amp;nbsp;información&amp;nbsp;me&amp;nbsp;decidí&amp;nbsp;a tomar una muy pequeña muestra de mis distritos vecinos para validar la veracidad de los&amp;nbsp;números&amp;nbsp;mostrados en el PREP. No&amp;nbsp;encontré&amp;nbsp;ningún&amp;nbsp;error, en mi pequeña muestra, les paso las&amp;nbsp;imágenes&amp;nbsp;para que uds. mismos las verifiquen en [ &lt;a href=&quot;http://r12.eleccionesenmexico.mx/prep/introduccion.html&quot; target=&quot;_blank&quot;&gt;aqui&lt;/a&gt; ] y corresponden al estado de Michoacan:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Sección: 1148, Casilla contigua&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNQiUaRtcObNJK1xVtKBqwpJCQBJ2NfKIDWoHN-NWkKdgf_R1M-7LcMRbGiGdEHg55UFppXChPywxuZLTl-NGJN1q8wEuCWk2wtEE4q-7D3zdqmVE7gIA0idBVktKOE2UVHerzv1ceIGg/s1600/1148B.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;238&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNQiUaRtcObNJK1xVtKBqwpJCQBJ2NfKIDWoHN-NWkKdgf_R1M-7LcMRbGiGdEHg55UFppXChPywxuZLTl-NGJN1q8wEuCWk2wtEE4q-7D3zdqmVE7gIA0idBVktKOE2UVHerzv1ceIGg/s320/1148B.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Sección:&amp;nbsp;1150, Casilla&amp;nbsp;básica&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXw9a9r4cZEs1My6UkFTFcfKDUz0eueFkGClf4D5dgxqm2prM7luaq-iGBRxSlEgXU0Ch8BjcW3WFt_Afi6KtRgJx2Deo29S6m-b70jBCNJ8cPjnF-2mc-brMnClM9llrVCHcSg7QVfJE/s1600/1150A.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;238&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXw9a9r4cZEs1My6UkFTFcfKDUz0eueFkGClf4D5dgxqm2prM7luaq-iGBRxSlEgXU0Ch8BjcW3WFt_Afi6KtRgJx2Deo29S6m-b70jBCNJ8cPjnF-2mc-brMnClM9llrVCHcSg7QVfJE/s320/1150A.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Sección:&amp;nbsp;1151, Casilla&amp;nbsp;básica&amp;nbsp;y contigua&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7XQDVAt-a1mFuaiZfcze3ZZMcP5N6pwJ17FdvQhr_GIeGDteWKxkd6ZNFigqtFF4wjoov-9SuW_Mha-h7cezDa1jkH85N5YjYYbfjy5c3_kDKKOn14ap0RvBi8aJyzNR9ula2JN1jJjc/s1600/1151A.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;238&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7XQDVAt-a1mFuaiZfcze3ZZMcP5N6pwJ17FdvQhr_GIeGDteWKxkd6ZNFigqtFF4wjoov-9SuW_Mha-h7cezDa1jkH85N5YjYYbfjy5c3_kDKKOn14ap0RvBi8aJyzNR9ula2JN1jJjc/s320/1151A.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEQyWYe2XP6n6_nI7LEpTy7X5Qxli_DYObxRHuZi8CKrDNo9pUB0lDcBSS2iDBArMTiKAcUEoqwU0nLHhpcwfMFoE9WqhMaCinIA3CYNeXYRturvcnvAjrhQSKepnE-CT07tYOhyphenhyphennE7E4/s1600/1151B.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;238&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEQyWYe2XP6n6_nI7LEpTy7X5Qxli_DYObxRHuZi8CKrDNo9pUB0lDcBSS2iDBArMTiKAcUEoqwU0nLHhpcwfMFoE9WqhMaCinIA3CYNeXYRturvcnvAjrhQSKepnE-CT07tYOhyphenhyphennE7E4/s320/1151B.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Sección:&amp;nbsp;1152, Casilla&amp;nbsp;básica&amp;nbsp;y contigua&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjr0_dW0imjtuE1hpRNp3hIay7oTys50ibnsTQW0gof9YVwGxslk2Tzuv6CsS_fd-qM3LKRYEbtzQb0813r3ikBErPFKbX0_Lyhle3s9YHHKrY-yqfWFAx7aN4MRp8jgNXGMiAIC1hQWM/s1600/1152A.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;238&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjr0_dW0imjtuE1hpRNp3hIay7oTys50ibnsTQW0gof9YVwGxslk2Tzuv6CsS_fd-qM3LKRYEbtzQb0813r3ikBErPFKbX0_Lyhle3s9YHHKrY-yqfWFAx7aN4MRp8jgNXGMiAIC1hQWM/s320/1152A.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbAu2M5TboaTYdIee1ERW2qVa71V5XnY5weHObvgxDbiGPq8o9sMNdiAwNNb_kxEnb63NS87WqETh-t5iEUcf5t-f9nFAT9s9mlH7FjtHssrufCXd0JCqe_GgVfHEmNY5xdkgqtoVab2c/s1600/1152B.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;238&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbAu2M5TboaTYdIee1ERW2qVa71V5XnY5weHObvgxDbiGPq8o9sMNdiAwNNb_kxEnb63NS87WqETh-t5iEUcf5t-f9nFAT9s9mlH7FjtHssrufCXd0JCqe_GgVfHEmNY5xdkgqtoVab2c/s320/1152B.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Sección:&amp;nbsp;1153, Casilla&amp;nbsp;básica&amp;nbsp;y contigua&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1sT7ZIaMn7_YYck7JZ8I2V8h91r3yiNo6YR6bWl0-cKINACt9KQKZB6d8iWKHfmKKu-Kr1_JN6mADvedI5DkCwJPx9CC0s4a8cj3UEJp1_8QNilCPfib1Ac6662XZfe0uOJ3s2v6sZUE/s1600/1153A.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;238&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1sT7ZIaMn7_YYck7JZ8I2V8h91r3yiNo6YR6bWl0-cKINACt9KQKZB6d8iWKHfmKKu-Kr1_JN6mADvedI5DkCwJPx9CC0s4a8cj3UEJp1_8QNilCPfib1Ac6662XZfe0uOJ3s2v6sZUE/s320/1153A.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizyrYMX7f_RFVccAZLZaZjOLPNH9AmlHI7clzk7o1bwD4FCBxYIqF5EbOCyDjbV0RX8ZX-5ohIPHEheLzTmsAkaxq7FQj_DuGHgRQkh2GEVh92Q3Fi99pqh4TmJjgzuk_xoRE514OWpwU/s1600/1153B.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;238&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizyrYMX7f_RFVccAZLZaZjOLPNH9AmlHI7clzk7o1bwD4FCBxYIqF5EbOCyDjbV0RX8ZX-5ohIPHEheLzTmsAkaxq7FQj_DuGHgRQkh2GEVh92Q3Fi99pqh4TmJjgzuk_xoRE514OWpwU/s320/1153B.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Sección:&amp;nbsp;1154, Casilla&amp;nbsp;básica&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKdKsJGSkyvbuyD_1XrU_fIOGrfTNdbN7k1DA5bQieQl902sUwq9ZntupviDhJZxqhRKtgVIAHFOQuALfn3Vt7R2nh3lUAKQ0KBaCaHQluBB_u_wKSpgZwu8ERN-zwEraqnRbtNIdzi20/s1600/1154A.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;238&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKdKsJGSkyvbuyD_1XrU_fIOGrfTNdbN7k1DA5bQieQl902sUwq9ZntupviDhJZxqhRKtgVIAHFOQuALfn3Vt7R2nh3lUAKQ0KBaCaHQluBB_u_wKSpgZwu8ERN-zwEraqnRbtNIdzi20/s320/1154A.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
También&amp;nbsp;revise la&amp;nbsp;sección&amp;nbsp;1149 pero ya se&amp;nbsp;habían&amp;nbsp;robado los resultados, incluso de la 1148 tampoco estaba los resultados de la casilla&amp;nbsp;básica, mi&amp;nbsp;revisión&amp;nbsp;la&amp;nbsp;realice&amp;nbsp;en la mañana. &amp;nbsp;Debo agregar que me interese por hacer esta&amp;nbsp;tarea&amp;nbsp;debido a las fotos que circulan en las redes sociales y las cuales no coinciden con los datos del PREP donde en el mejor de los casos se trata de errores de captura (para no pensar que existe malas intenciones en afectar un resultado en favor de&amp;nbsp;algún&amp;nbsp;candidato):&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;b&gt;DISTRITO FEDERAL&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Distrito 25 - IZTAPALAPA&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Sección 2937&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnBHlU_SD6MOVVvkQ28xpvOxMNCZlRDe0xbLZiMsxSyw1X2lWMVq3izmGMcSaaZZKtzHrrL4Ll9YXj9yeQOdbBrOcKmxulEmyE-Gbu57JsW1YojbPV4qb0CmsApjtVZudvGXdpMg1dXDE/s1600/DF+2937.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;139&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnBHlU_SD6MOVVvkQ28xpvOxMNCZlRDe0xbLZiMsxSyw1X2lWMVq3izmGMcSaaZZKtzHrrL4Ll9YXj9yeQOdbBrOcKmxulEmyE-Gbu57JsW1YojbPV4qb0CmsApjtVZudvGXdpMg1dXDE/s320/DF+2937.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;b&gt;DISTRITO FEDERAL&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Distrito 04 - IZTAPALAPA&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Sección 2641&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Nota: compartida por&amp;nbsp;@joseluigarcia&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3GqBxglyeXpY3K55r5yuyhih_GgNCUOnxaiVgljqw-xpYzPSn9iLg8koBY0epKTNyCBblwygXaw0HEQdfKXmfGVje21NjKISxUN8TzpIThlaVBWdRX4wL0FP6h9infatLA9XlDxdfWHI/s1600/DF+2641.jpg-large&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;178&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3GqBxglyeXpY3K55r5yuyhih_GgNCUOnxaiVgljqw-xpYzPSn9iLg8koBY0epKTNyCBblwygXaw0HEQdfKXmfGVje21NjKISxUN8TzpIThlaVBWdRX4wL0FP6h9infatLA9XlDxdfWHI/s320/DF+2641.jpg-large&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;b&gt;NUEVO LEÓN&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Distrito 07 - MONTERREY&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Sección 1076&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgu5yMNyZ8DgRil2dN25AUgEmbXaqpdIZZcD8blnkKfZWrJb9VpO_EMkChVeJk3vDG1FmXWOZ4Y2gEWyp0mEoDdy9tb3S2ZArRnc7VhK8uCgtekSGK1xdsmKsRPDvrtsfc7wT7Po2HFhuc/s1600/NL+1076.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;198&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgu5yMNyZ8DgRil2dN25AUgEmbXaqpdIZZcD8blnkKfZWrJb9VpO_EMkChVeJk3vDG1FmXWOZ4Y2gEWyp0mEoDdy9tb3S2ZArRnc7VhK8uCgtekSGK1xdsmKsRPDvrtsfc7wT7Po2HFhuc/s320/NL+1076.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;b&gt;OAXACA&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Distrito 11 - SANTIAGO PINOTEPA NACIONAL&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Sección 2062&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
NOTA: Esta ya se ha corregido en PREP.&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtT7rVxH9t85Uuv0JAlosEdOZiAG_gQ64FmaGFP1BKiz9AOxNbrwur3qtuRzBg0nLSwctK9NvKrqBXbO175gcJjgaRPdIneuOHq4eJ9jWNZYUWxGe5phccdSxtTi_-ldAW-29dTv2zlRU/s1600/Oaxaca+2062.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;218&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtT7rVxH9t85Uuv0JAlosEdOZiAG_gQ64FmaGFP1BKiz9AOxNbrwur3qtuRzBg0nLSwctK9NvKrqBXbO175gcJjgaRPdIneuOHq4eJ9jWNZYUWxGe5phccdSxtTi_-ldAW-29dTv2zlRU/s320/Oaxaca+2062.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;b&gt;SAN LUIS POTOSÍ&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Distrito 02 - SOLEDAD DE GRACIANO SANCHEZ&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Sección 1257&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgItE_xSBQ-R8EMcT04tlkuHaRmEQf25jop9vIWzFGOgfCEH-rMq5jK-RdSHax1Ga-6fF599SihiOOI6rX8HGAKeG3FbQ5tB465j5O_hJgsQLHYdk0wpEQ2vvL8dKmWmYlZtakuj0FTOQ8/s1600/SLP+1257.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;310&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgItE_xSBQ-R8EMcT04tlkuHaRmEQf25jop9vIWzFGOgfCEH-rMq5jK-RdSHax1Ga-6fF599SihiOOI6rX8HGAKeG3FbQ5tB465j5O_hJgsQLHYdk0wpEQ2vvL8dKmWmYlZtakuj0FTOQ8/s320/SLP+1257.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;b&gt;TABASCO&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Distrito 06 - CENTRO&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Sección 0389&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Nota: Se corrige el valor anterior de 11, pero ahora actualizan con 112&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFwLQ4FDvl-5hvV9obyDWzPsptYf7t5j_YHblqOhLEoyOhKN-KhLi1NulgdKtfWEewsSORUBHBJlZMXvMqX5hKCkX3U1PYl09RjazZiDoOcDrheWD0KDuAkycKZxIstFIad1PUhEm3dOs/s1600/Tabasco+0389.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;304&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFwLQ4FDvl-5hvV9obyDWzPsptYf7t5j_YHblqOhLEoyOhKN-KhLi1NulgdKtfWEewsSORUBHBJlZMXvMqX5hKCkX3U1PYl09RjazZiDoOcDrheWD0KDuAkycKZxIstFIad1PUhEm3dOs/s320/Tabasco+0389.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Si alguien tiene&amp;nbsp;información&amp;nbsp;de errores en la captura del PREP, por favor compartan.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martin-edmundo.blogspot.com/feeds/1459357029808370613/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/632987313637017278/1459357029808370613' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/1459357029808370613'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/1459357029808370613'/><link rel='alternate' type='text/html' href='http://martin-edmundo.blogspot.com/2012/07/resultados-elecciones-2012.html' title='Resultados Elecciones 2012'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNQiUaRtcObNJK1xVtKBqwpJCQBJ2NfKIDWoHN-NWkKdgf_R1M-7LcMRbGiGdEHg55UFppXChPywxuZLTl-NGJN1q8wEuCWk2wtEE4q-7D3zdqmVE7gIA0idBVktKOE2UVHerzv1ceIGg/s72-c/1148B.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-632987313637017278.post-8387813758087607353</id><published>2012-06-30T01:35:00.000-05:00</published><updated>2012-06-30T01:35:09.180-05:00</updated><title type='text'>RRDTool Primeros pasos - Parte 1</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Este sera la primera de dos entradas en mi blog donde hablare un poco RRDtool, una herramienta que apenas estoy conociendo, pero que me resulta mucho muy divertida. Hoy en día varios proyectos de software lo usan como centreon, mrtg, ipcop, cacti, etc.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
En lo poco que he explorado a RRDtool puedo comentarles que me ha ayudado a graficar valores en 2D sobre una linea de tiempo, haciendo uso de archivos con una estructura muy parecida a una base de datos donde almacena muchos parámetros y valores.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;i&gt;&lt;b&gt;Graficando.&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Nuestro objetivo en esta entrada va a ser graficar los tiempos de respuesta ICMP hacia un servidor en Internet. Para comenzar a graficar se requiere el conjunto de RRDtool, esto lo hacemos en Debian instalando el siguiente paquete:&lt;/div&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;sudo apt-get install rrdtool
&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
La información de las graficas se almacenan en archivos con el postfijo &quot;rrd&quot;, el primer paso es definir y crear estos archivos. Lo que hace divertido graficar es que nuestras graficas únicamente estan limitadas por nuestra imaginación y dominio de gnu shell. Vamos entonces a definir nuestro archivo rrd para la latencia hacia un servidor de google:&lt;/div&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;user@localhost:~/rrd$ rrdtool create latency.rrd --step 60 DS:latency:GAUGE:300:0:100000000 RRA:AVERAGE:0.5:1:259200 RRA:AVERAGE:0.5:12:100946
&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
El parámetro step, nos indica que tendremos representaciones lineales individuales cada 60 segundos, el DS:latency indica que nuestro DasaSource se llama &quot;latency&quot;, el GAUGE indica que usaremos este Datasource para medir los valores que le pasaremos en el futuro. Después de esta definición, se crea el archivo &quot;latency.rrd&quot; y podemos ver la información de sus parámetros con:&lt;/div&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;user@localhost:~/rrd$ rrdtool info latency.rrd
filename = &quot;latency.rrd&quot;
rrd_version = &quot;0003&quot;
step = 60
last_update = 1341035342
header_size = 740
ds[latency].index = 0
ds[latency].type = &quot;GAUGE&quot;
ds[latency].minimal_heartbeat = 300
ds[latency].min = 0.0000000000e+00
ds[latency].max = 1.0000000000e+08
ds[latency].last_ds = &quot;143&quot;
ds[latency].value = 2.9254425200e+02
ds[latency].unknown_sec = 0
rra[0].cf = &quot;AVERAGE&quot;
rra[0].rows = 259200
rra[0].cur_row = 103763
rra[0].pdp_per_row = 1
rra[0].xff = 5.0000000000e-01
rra[0].cdp_prep[0].value = NaN
rra[0].cdp_prep[0].unknown_datapoints = 0
rra[1].cf = &quot;AVERAGE&quot;
rra[1].rows = 100946
rra[1].cur_row = 74902
rra[1].pdp_per_row = 12
rra[1].xff = 5.0000000000e-01
rra[1].cdp_prep[0].value = 1.4305392777e+02
rra[1].cdp_prep[0].unknown_datapoints = 0
&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Una vez que tenemos nuestra base de datos RRD, nos queda estar actualizandolo para estar alimentandolo de información. En la secuencia siguiente primeramente vemos como conseguir el tiempo de respuesta usando la salida del comando ping, después indicamos como se alimenta el archivo con un valor contante y finalmente indicamos como lo actualizamos con el tiempo de respuesta, el cual tiene que estar cambiando en canda instante del tiempo.&lt;/div&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;user@localhost:~/rrd$ ping -c 1 8.8.8.8 | grep -o time=[0-9]* | cut -d &quot;=&quot; -f2
145
user@localhost:~/rrd$ rrdtool update ~/rrd/latency.rrd N:100
user@localhost:~/rrd$ rrdtool update ~/rrd/latency.rrd N:`ping -c 1 8.8.8.8 | grep -o time=[0-9]* | cut -d &quot;=&quot; -f2`
&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Siendo mas prácticos podemos colocar esta ultima linea en nuestro cron par que se actualice cada minuto.&lt;/div&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;*/1 * * * * /usr/bin/rrdtool update ~/rrd/latency.rrd N:`ping -c 1 8.8.8.8 | egrep -o time=[0-9]* | cut -d &quot;=&quot; -f2`
&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Hasta aquí vamos a estar actualizando el archivo cada minuto. Lo ultimo que nos queda es conseguir graficas de estos datos que estamos pasando. Las graficas las podemos hacer basandonos en un periodo de tiempo, por ejemplo si quisieramos las ultimas 3 horas y colocarlo en el archivo &lt;i&gt;latency.png&lt;/i&gt;:&lt;/div&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;user@localhost:~/rrd$ rrdtool graph latency.png --title=&quot;Latencia&quot; --vertical-label &quot;Time (ms)&quot; --end now --start end-10800s DEF:time=latency.rrd:latency:AVERAGE &amp;nbsp;LINE1:time#ff0000:Tiempo
497x173
user@localhost:~/rrd$
&lt;/pre&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEindnPTTZElAcQHRWGGQjcRkeWalFLHAxKcKS-VhIVI6Ib2QrD6r64CiZ569AEhGCwNYn7qZLW6a0WFwGM2GIyY0UbMtv6yz8Z2N9cSHRVyAaI_JmdMfBqdSUc8wHISrEU6oTf0gypMtp4/s1600/latency+3hrs.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;111&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEindnPTTZElAcQHRWGGQjcRkeWalFLHAxKcKS-VhIVI6Ib2QrD6r64CiZ569AEhGCwNYn7qZLW6a0WFwGM2GIyY0UbMtv6yz8Z2N9cSHRVyAaI_JmdMfBqdSUc8wHISrEU6oTf0gypMtp4/s320/latency+3hrs.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Puede ser que solo queremos ver la ultima hora, podemos graficarlo así:&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;user@localhost:~/rrd$ rrdtool graph latency.png --title=&quot;Latencia&quot; --vertical-label &quot;Time (ms)&quot; --end now --start end-3600s DEF:time=latency.rrd:latency:AVERAGE &amp;nbsp;LINE1:time#ff0000:Tiempo
497x173
user@localhost:~/rrd$
&lt;/pre&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIzXSwWrUtufZZWdbEWyO9ft31MbnWcFjvdo4drUTeiw1ciBn0BCNr8gt2ljyP7xvhs2a4i-CKsbpeBFG1DbdB_m4VUr377S2I3WIUgIzRb_0kFgvO96vUQXpo5j97pKO8QcA8iUbbD_o/s1600/latency+1hrs.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;111&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIzXSwWrUtufZZWdbEWyO9ft31MbnWcFjvdo4drUTeiw1ciBn0BCNr8gt2ljyP7xvhs2a4i-CKsbpeBFG1DbdB_m4VUr377S2I3WIUgIzRb_0kFgvO96vUQXpo5j97pKO8QcA8iUbbD_o/s320/latency+1hrs.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Finalmente podemos ver que es posible graficar muchas cosas con la ayuda de varios comandos. En la próxima entrada les mostrare como estoy graficando algunos de los recursos de mi notebook y graficas con un poco de mejor diseño.&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martin-edmundo.blogspot.com/feeds/8387813758087607353/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/632987313637017278/8387813758087607353' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/8387813758087607353'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/8387813758087607353'/><link rel='alternate' type='text/html' href='http://martin-edmundo.blogspot.com/2012/06/rrdtool-primeros-pasos-parte-1.html' title='RRDTool Primeros pasos - Parte 1'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEindnPTTZElAcQHRWGGQjcRkeWalFLHAxKcKS-VhIVI6Ib2QrD6r64CiZ569AEhGCwNYn7qZLW6a0WFwGM2GIyY0UbMtv6yz8Z2N9cSHRVyAaI_JmdMfBqdSUc8wHISrEU6oTf0gypMtp4/s72-c/latency+3hrs.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-632987313637017278.post-1120279534811418130</id><published>2012-05-30T23:12:00.000-05:00</published><updated>2012-05-30T23:12:44.559-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GNU Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="mail"/><category scheme="http://www.blogger.com/atom/ns#" term="Software Libre"/><title type='text'>Enviar y recibir correo desde nuestro GNU Shell con fetchmail y ssmtp</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
En este ultimo par de días, me ha tocado realizar algunas pruebas de correo electrónico, por lo que creo que tengo un poco de información agrupada aquí que les puede servir para manejar básicamente un correo electrónico desde nuestro shell (en mi caso mis pruebas son con &lt;i&gt;bash&lt;/i&gt;).&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Para enviar correo electrónico usamos el protocolo smtp, por lo tanto requerimos un servidor que ofrezca este servicio. Por otro lado, en cuanto a la recepción de correo nos apoyamos de los servidores pop. Conocer un poco mas de estos detalles es importante a la hora de comenzar nuestro trabajo de configurar un cliente de correo cualquiera que este sea. En nuestra practica vamos a configurar una cuenta de &lt;i&gt;Gmal&lt;/i&gt;. A continuación les dejo un muy breve listado con algunos servidores.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;center&gt;
&lt;table border=&quot;1&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;b&gt;Propietario&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;&lt;b&gt;Servidor&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;&lt;b&gt;Protocolo&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;&lt;b&gt;Cifrado&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;&lt;b&gt;Puerto&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gmail&lt;/td&gt;
&lt;td&gt;imap.googlemail.com&lt;/td&gt;
&lt;td&gt;imap&lt;/td&gt;
&lt;td&gt;ssl&lt;/td&gt;
&lt;td&gt;993&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gmail&lt;/td&gt;
&lt;td&gt;pop.googlemail.com&lt;/td&gt;
&lt;td&gt;pop3&lt;/td&gt;
&lt;td&gt;ssl&lt;/td&gt;
&lt;td&gt;995&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gmail&lt;/td&gt;
&lt;td&gt;smtp.googlemail.com&lt;/td&gt;
&lt;td&gt;smtp&lt;/td&gt;
&lt;td&gt;ssl&lt;/td&gt;
&lt;td&gt;465&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Yahoo&lt;/td&gt;
&lt;td&gt;imap.mail.yahoo.com&lt;/td&gt;
&lt;td&gt;imap&lt;/td&gt;
&lt;td&gt;ssl&lt;/td&gt;
&lt;td&gt;993&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Yahoo&lt;/td&gt;
&lt;td&gt;pop.mail.yahoo.com&lt;/td&gt;
&lt;td&gt;pop3&lt;/td&gt;
&lt;td&gt;ssl&lt;/td&gt;
&lt;td&gt;995&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Yahoo&lt;/td&gt;
&lt;td&gt;smtp.mail.yahoo.com&lt;/td&gt;
&lt;td&gt;smtp&lt;/td&gt;
&lt;td&gt;ssl&lt;/td&gt;
&lt;td&gt;465&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hotmail&lt;/td&gt;
&lt;td&gt;pop3.live.com&lt;/td&gt;
&lt;td&gt;pop3&lt;/td&gt;
&lt;td&gt;ssl/tls&lt;/td&gt;
&lt;td&gt;995&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hotmail&lt;/td&gt;
&lt;td&gt;smtp.live.com&lt;/td&gt;
&lt;td&gt;smtp&lt;/td&gt;
&lt;td&gt;starttls&lt;/td&gt;
&lt;td&gt;587&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;color: #cc0000;&quot;&gt;1. Enviar correo&lt;/b&gt;&lt;br /&gt;
En el envió de correo vamos ocupar instalar un agente de envió: &lt;i&gt;ssmtp&lt;/i&gt;. Es un paquete muy básico y simple: &lt;i&gt;ssmtp&lt;/i&gt;. Primero hacemos la instalación y luego modificamos su archivo de configuración.&lt;br /&gt;
&lt;br /&gt;
&lt;i style=&quot;font-family: inherit;&quot;&gt;user@localhost:~$ sudo apt-get install ssmtp&lt;br /&gt;user@localhost:~$ sudo vim /etc/ssmtp/ssmtp.conf&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
En la configuración tenemos que especificar correo electrónico, contraseña para identificarnos, servidor smtp, tipo de cifrado, etc. A continuación les muestro parcialmente mi archivo &lt;i&gt;ssmtp.conf&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;root=martingmail@gmail.com
mailhub=smtp.gmail.com:587
AuthUser=martingmail
AuthPass=xxxxxxxxxx
UseSTARTTLS=YES
FromLineOverride=YES
rewriteDomain=
hostname=martingmail@gmail.com
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Una vez configurado los datos de la cuenta, asociamos el correo con una cuenta local de nuestro sistema en el archivo &lt;i&gt;/etc/ssmtp/revaliases&lt;/i&gt;, eso lo hacemos colocando la siguiente linea &lt;i&gt;&quot;martin:martingmail@gmail.com:smtp.gmail.com:587&quot;&lt;/i&gt;.&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Si nuestra configuracion y atutentificacion es correcta ya podemos enviar correos con mail command.&lt;/div&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;#Envio de correo, con redaccion interactiva
mail -s &quot;Mi primer correo&quot; miamigo@sudominio.org
#Envio de correo con redaccion desde el mismo shell
echo &quot;Hola&quot; | mail -s &quot;Mi primer correo&quot; miamigo@sudominio.org
cat miarchivo.txt | mail -s &quot;Mi primer correo&quot; miamigo@sudominio.org
#Enviar correo con archivo adjunto
uuencode ~/mifoto.png mifoto.png | mail -s &quot;Mi foto&quot; milindaamiga@sudominio.org
#Enviar correo con archivo adjunto y texto
( cat declaraciondeamor.txt ; uuencode ~/mifoto.png mifoto.png ) | mail -s &quot;Mi foto&quot; milindaamiga@sudominio.org
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Para el caso donde adjuntamos archivos el comando &lt;i&gt;uuencode&lt;/i&gt; lo encontramos en el paquete sharutils, por lo que tendríamos que instalarlo también.&lt;/div&gt;
&lt;br /&gt;
&lt;b style=&quot;color: #cc0000;&quot;&gt;2. Recibir correo&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Fetchmail es un programa que nos ayuda a traer los nuestros correos de un mail server remoto, por lo tanto es el que no va a traer los correos de nuestro buzón gmail. El siguiente paso es instalar fechtmail y configurar su archivo:&lt;/div&gt;
&lt;br /&gt;
&lt;i&gt;user@localhost:~$ sudo apt-get install fetchmail&lt;br /&gt;user@localhost:~$ sudo vim ~/fetchmailrc&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
El siguiente es mi archivo de configuración parcial (¿Por que parciales?, por que no puedo mostrar mis datos personales)&lt;/div&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;#Cada 600 segundos actualizar
set daemon 600
set logfile fetchmail.log
poll pop.googlemail.com proto POP3
user &quot;martingmail@gmail.com&quot; pass &quot;xxxxxxxxx&quot; is &quot;martin&quot;
ssl
mda &quot;/usr/bin/procmail -f %F -d %T&quot;
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Ya configurado esto, podemos leer los correos con el mail command, y hacer las operaciones básicas que este nos ofrece, principalmente la redacción y respuesta de correos. El uso de comandos internos del mail command, no lo voy a tratar aquí ya que es un tema muy extenso y no lo domino ampliamente, por lo que en ese aspecto les tocara investigar.&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martin-edmundo.blogspot.com/feeds/1120279534811418130/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/632987313637017278/1120279534811418130' title='1 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/1120279534811418130'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/1120279534811418130'/><link rel='alternate' type='text/html' href='http://martin-edmundo.blogspot.com/2012/05/enviar-y-recibir-correo-desde-nuestro.html' title='Enviar y recibir correo desde nuestro GNU Shell con fetchmail y ssmtp'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total><georss:featurename>Morelia, MICH, México</georss:featurename><georss:point>19.7027778 -101.1922222</georss:point><georss:box>19.6429818 -101.2711862 19.7625738 -101.1132582</georss:box></entry><entry><id>tag:blogger.com,1999:blog-632987313637017278.post-507379755186982479</id><published>2012-05-11T20:23:00.002-05:00</published><updated>2012-05-11T20:23:20.670-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Nagios"/><category scheme="http://www.blogger.com/atom/ns#" term="otrs"/><category scheme="http://www.blogger.com/atom/ns#" term="Software Libre"/><title type='text'>OTRS y Nagios/Centreon</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Como les&amp;nbsp;había&amp;nbsp;comentado antes,&amp;nbsp;había&amp;nbsp;estado trabajando un poco en OTRS para el control de servicios dentro de una unidad&amp;nbsp;organizacional. Por simple curiosidad se me&amp;nbsp;ocurrió&amp;nbsp;agregar dos&amp;nbsp;características&amp;nbsp;al monitoreo para que se generen&amp;nbsp;gráficas&amp;nbsp;estadistas&amp;nbsp;del los servicios que se realizan.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;¿Por que construir un propio plugin y no usar los mecanismos que otrs nos ofrece para integrarse con Nagios?&lt;/i&gt; Primeramente por cuestiones de facilidad de implementación, la&amp;nbsp;documentación&amp;nbsp;de estos mecanismos no son muy claros (al menos para mi), sobre todo por que otrs ha cambiado entre versiones. La otra&amp;nbsp;razón&amp;nbsp;es por que los mecanismos de otrs tienen la limitante de trabajar&amp;nbsp;únicamente&amp;nbsp;en un entorno donde conviven en un mismo servidor Otrs/Nagios.&lt;br /&gt;
&lt;br /&gt;
El script es muy&amp;nbsp;básico, para este post, soporta &amp;nbsp;únicamente&amp;nbsp;el monitoreo de tickets abiertos y tickets creados por&amp;nbsp;día:&lt;br /&gt;
&lt;br /&gt;

&lt;pre class=&quot;brush: bash&quot;&gt;
#!/bin/bash

dbHostname=&quot;127.0.0.1&quot;
dbUser=&quot;otrsguest&quot;
dbPasswd=&quot;qwerty&quot;
dbName=&quot;otrs&quot;
dbWhere=&quot;&quot;

WARNING=10
CRITICAL=15
TYPE=&quot;&quot;

# Plugin return codes
STATE_OK=0
STATE_WARNING=1
STATE_CRITICAL=2
STATE_UNKNOWN=3

function report {
        val=`mysql -h $dbHostname -u $dbUser -p$dbPasswd --database=$dbName --execute=&quot;select count(*) as open from ticket $dbWhere&quot; | awk &#39;BEGIN{FS=&quot;\n&quot;; RS=&quot;\n\n&quot;;}{print $2}&#39;`
        if [ &quot;$val&quot; -le &quot;$WARNING&quot;  ]; then
                echo &quot;Tickets $TYPE: $val [ OK ] | value=$val&quot;
                exit $STATE_OK
        else
                if [ &quot;$val&quot; -le &quot;$CRITICAL&quot; ]; then
                        echo &quot;Tickets $TYPE: $val [ WARNING ] | value=$val&quot;
                        exit $STATE_WARNING
                else
                        echo &quot;Tickets $TYPE: $val [ CRITICAL ] | value=$val&quot;
                        exit $STATE_CRITICAL
                fi
        fi
}

function phelp {
        echo -e &quot;Usage: $0 -t &lt;abiertos|creados&gt; -w &lt;warning&gt; -c &lt;critical&gt; | -h&quot;
        echo -e &quot;  -t Tipo de tickets a consultar&quot;
        echo -e &quot;  -c Valor critico&quot;
        echo -e &quot;  -w Valor warning&quot;
        echo -e &quot;  -h Help, this message.\n&quot;
}

while getopts t:w:c:h OPT
do
        case $OPT in
                t) TYPE=&quot;$OPTARG&quot; ;;
                w) WARNING=&quot;$OPTARG&quot; ;;
                c) CRITICAL=&quot;$OPTARG&quot; ;;
                h)
                        phelp
                        exit $STATE_UNKNOWN
                ;;
        esac
done


if [ &quot;$TYPE&quot; = &quot;abiertos&quot; ]; then
        dbWhere=&quot;where ticket_state_id=&#39;4&#39;&quot;
        report
else
        if [ &quot;$TYPE&quot; = &quot;creados&quot; ]; then
                date=`date +&quot;%Y-%m-%d&quot;`
                dbWhere=&quot;where create_time like &#39;$date%&#39;&quot;
                report
        else
                echo &quot;Carecteristica a monitorear desconocida. Conocidas: abiertos, creados&quot;
                exit $STATE_UNKNOWN
        fi
fi

&lt;/pre&gt;

&lt;br /&gt;
La siguiente&amp;nbsp;gráfica&amp;nbsp;nos representa la actividad de tickets abiertos para los&amp;nbsp;últimos&amp;nbsp;dos&amp;nbsp;días.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjucHxThY9FpD9Fp1jf6pPPXoIfWCU1_Zb7DD1HQJgIDfpECdE9b_aeuSx4y-v2cC-uzLAuVfZ1Aai9SGb6ameOkjlz3Ab2R6Swg1J4W8hcy0bMaM2xkSl4oaQDsrWf84jEncTcSWERsi0/s1600/otrsAbiertos.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;131&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjucHxThY9FpD9Fp1jf6pPPXoIfWCU1_Zb7DD1HQJgIDfpECdE9b_aeuSx4y-v2cC-uzLAuVfZ1Aai9SGb6ameOkjlz3Ab2R6Swg1J4W8hcy0bMaM2xkSl4oaQDsrWf84jEncTcSWERsi0/s320/otrsAbiertos.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&amp;nbsp;La siguiente&amp;nbsp;gráfica&amp;nbsp;nos representa la actividad de tickets creados por&amp;nbsp;día, en los&amp;nbsp;últimos&amp;nbsp;tres&amp;nbsp;días.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxYOByLxkJI1-Z8jmx6J8vTa73OflyjPzLC9XGY4t5ZMqGq0e1dCMPkd8KolBCayj5REUjgISOzrbqbkPSkMcaU5dCD295ki-wnDTShtPXDGhyphenhyphenoyzaRSyCfT6EURozr9z-hMelbkQRrGc/s1600/otrsCreados.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;131&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxYOByLxkJI1-Z8jmx6J8vTa73OflyjPzLC9XGY4t5ZMqGq0e1dCMPkd8KolBCayj5REUjgISOzrbqbkPSkMcaU5dCD295ki-wnDTShtPXDGhyphenhyphenoyzaRSyCfT6EURozr9z-hMelbkQRrGc/s320/otrsCreados.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martin-edmundo.blogspot.com/feeds/507379755186982479/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/632987313637017278/507379755186982479' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/507379755186982479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/507379755186982479'/><link rel='alternate' type='text/html' href='http://martin-edmundo.blogspot.com/2012/05/otrs-y-nagioscentreon.html' title='OTRS y Nagios/Centreon'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjucHxThY9FpD9Fp1jf6pPPXoIfWCU1_Zb7DD1HQJgIDfpECdE9b_aeuSx4y-v2cC-uzLAuVfZ1Aai9SGb6ameOkjlz3Ab2R6Swg1J4W8hcy0bMaM2xkSl4oaQDsrWf84jEncTcSWERsi0/s72-c/otrsAbiertos.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-632987313637017278.post-1905745928894369450</id><published>2012-05-07T20:28:00.001-05:00</published><updated>2012-05-09T12:42:14.840-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Desarrollo"/><category scheme="http://www.blogger.com/atom/ns#" term="GNU Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Nagios"/><category scheme="http://www.blogger.com/atom/ns#" term="Software Libre"/><title type='text'>Construcción de Plugin Nagios/Centreon para HP Printer</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixHDBzyCkRpVVL81jkc6gAmsn2OjryDIhWJvcfU7WG4I6bnBnQDnt3fKHbRKerDNT9agAvsdRBJrzk5kUMOEYtMCtb83h5YHbc4rTNm8dVYe_wDVi9g-yKz8hDPK55ugAHL_oBRl_qlTs/s1600/LogoCentreon-BI_m.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;95&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixHDBzyCkRpVVL81jkc6gAmsn2OjryDIhWJvcfU7WG4I6bnBnQDnt3fKHbRKerDNT9agAvsdRBJrzk5kUMOEYtMCtb83h5YHbc4rTNm8dVYe_wDVi9g-yKz8hDPK55ugAHL_oBRl_qlTs/s320/LogoCentreon-BI_m.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Hace unas horas termine un script en bash para monitorear los consumibles de unas impresoras HP, la idea de agregarlas a &lt;a href=&quot;http://www.centreon.com/&quot;&gt;centreon&lt;/a&gt; es para darnos conocer en buen momento cuando uno de los consumibles se&amp;nbsp;están&amp;nbsp;por terminar&amp;nbsp;así&amp;nbsp;como un&amp;nbsp;histórico&amp;nbsp;(usando las graficas) de cuanto se esta consumiendo. A posteriori, este script se&amp;nbsp;tendría&amp;nbsp;que poder usar en cualquier impresora HP con SNMP activado, los modelos de&amp;nbsp;impresoras&amp;nbsp;que tenemos son las siguientes:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;HP LaserJet 4700 Color&lt;/li&gt;
&lt;li&gt;HP LaserJet 4600 Color&lt;/li&gt;
&lt;li&gt;HP LaserJet 4250&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Requerimientos del script:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;awk&lt;/li&gt;
&lt;li&gt;snmpwalk&lt;/li&gt;
&lt;li&gt;A nivel de red, acceso al segmento de las impresoras.&lt;/li&gt;
&lt;li&gt;bash&lt;/li&gt;
&lt;li&gt;etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;#!/bin/bash
# Martin Barriga 2012

# Default options
COMMUNITY=&quot;public&quot;
HOSTNAME=&quot;127.0.0.1&quot;
CONSUMMABLE=&quot;black&quot;
WARNING=20
CRITICAL=10
SNMPVERSION=2c
SHEETCOUNT=&quot;0&quot;
sheetcount=&quot;&quot;

#used MIBs
MAINMIB=&quot;mib-2.43.11.1.1.6.1&quot;
SHEETMIB=&quot;enterprises.11.2.3.9.4.2.1.4.1.10.5.1.1&quot;

# Plugin return codes
STATE_OK=0
STATE_WARNING=1
STATE_CRITICAL=2
STATE_UNKNOWN=3

# Option processing
function phelp {
  echo -e &quot;Usage: $0 -H &lt;ip&gt; -C &lt;community&gt; -v &lt;version&gt; -o &lt;color&gt; -w &lt;warning&gt; -c &lt;critical&gt;  [ -l | -s ] | -h &quot;
  echo -e &quot;  -H IP Addres HP Printer&quot;
  echo -e &quot;  -C SNMP Community. Default &#39;public&#39;&quot;
  echo -e &quot;  -v SNMP Version. Default &#39;2c&#39;&quot;
  echo -e &quot;  -o Color Tonner: black, cyan, magenta, yellow, transfer, fuser. Default &#39;black&#39;&quot;
  echo -e &quot;  -w Warning Value. Default &#39;80&#39;&quot;
  echo -e &quot;  -c Critical Value. Default &#39;90&#39;&quot;
  echo -e &quot;  -l List consumible support.&quot;
  echo -e &quot;  -s Print with sheet count available.&quot;
  echo -e &quot;  -h Help, this message.\n&quot;
}

function list {
        allinfo=`snmpwalk -c $COMMUNITY -v $SNMPVERSION $HOSTNAME $MAINMIB`;
        echo &quot;$allinfo&quot; | ( while read line; do
                echo $line | cut -d &quot;\&quot;&quot; -f2;
        done )
}

function withsheetcount {
        index=`echo &quot;$1&quot; | cut -d &quot;.&quot; -f8`;
        count=`snmpwalk -c $COMMUNITY -v $SNMPVERSION $HOSTNAME $SHEETMIB.$index | cut -d &quot; &quot; -f4`;
        sheetcount=&quot;, Sheet Available: $count&quot;;
}

while getopts H:C:v:o:w:c:slh OPT
do
  case $OPT in
    H) HOSTNAME=&quot;$OPTARG&quot; ;;
    C) COMMUNITY=&quot;$OPTARG&quot; ;;
    v) SNMPVERSION=&quot;$OPTARG&quot; ;;
    o) CONSUMMABLE=&quot;$OPTARG&quot; ;;
    w) WARNING=$OPTARG ;;
    c) CRITICAL=$OPTARG ;;
    s) SHEETCOUNT=&quot;1&quot; ;;
    l)
       list
       exit $STATE_UNKNOWN
    ;;
    h)
       phelp
       exit $STATE_UNKNOWN
    ;;
    #V)
    #  print_version
    #  exit $STATE_UNKNOWN
    #  ;;
   esac
done

info=`snmpwalk -c $COMMUNITY -v $SNMPVERSION $HOSTNAME $MAINMIB | grep -i $CONSUMMABLE`
if [ &quot;$info&quot; != &quot;&quot; ]; then
        name=`echo &quot;$info&quot; | cut -d &quot;\&quot;&quot; -f 2`;
        mib=`echo &quot;$info&quot; | cut -d &quot; &quot; -f 1 | cut -d &quot;:&quot; -f 3`;
        newmib=`echo &quot;$info&quot; | cut -d &quot; &quot; -f 1 | cut -d &quot;:&quot; -f 3 | awk -F. -v OFS=. &#39;{$6=8}1&#39;`;
        size=`snmpwalk -c $COMMUNITY -v $SNMPVERSION $HOSTNAME $newmib | cut -d &quot; &quot; -f4`;
        newmib=`echo &quot;$info&quot; | cut -d &quot; &quot; -f 1 | cut -d &quot;:&quot; -f 3 | awk -F. -v OFS=. &#39;{$6=9}1&#39;`;
        value=`snmpwalk -c $COMMUNITY -v $SNMPVERSION $HOSTNAME $newmib | cut -d &quot; &quot; -f4`;
        let porcent=($value*100)/$size;

        #If sheet count is required
        if [ &quot;$SHEETCOUNT&quot; = &quot;1&quot; ]; then
                withsheetcount $mib
        fi

        if [ &quot;$porcent&quot; -le &quot;$CRITICAL&quot; ]; then
                echo &quot;$name: Status: $value/$size $porcent% available [ CRITICAL ] | size=$size used=$value&quot;;
                exit $STATE_CRITICAL;
        else
                if [ &quot;$porcent&quot; -le &quot;$WARNING&quot; ]; then
                        echo &quot;$name: Status: $value/$size $porcent% available [ WARNING ] | size=$size used=$value&quot;;
                        exit $STATE_WARNING;
                else
                        echo &quot;$name: Status: $value/$size $porcent% available [ OK ] | size=$size used=$value&quot;;
                        exit $STATE_OK;
                fi
        fi
else
        echo &quot;No se encuentra consumible $CONSUMMABLE en $HOSTNAME [ UNKNOW ]&quot;
        exit $STATE_UNKNOWN
fi

&lt;/pre&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
[ &lt;a href=&quot;http://www.elrincondemartin.org/2011/06/construccion-de-plugin-nagioscentreon.html&quot; target=&quot;_blank&quot;&gt;Información relacionada&lt;/a&gt; ]
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martin-edmundo.blogspot.com/feeds/1905745928894369450/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/632987313637017278/1905745928894369450' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/1905745928894369450'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/1905745928894369450'/><link rel='alternate' type='text/html' href='http://martin-edmundo.blogspot.com/2012/05/construccion-de-plugin-nagioscentreon.html' title='Construcción de Plugin Nagios/Centreon para HP Printer'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixHDBzyCkRpVVL81jkc6gAmsn2OjryDIhWJvcfU7WG4I6bnBnQDnt3fKHbRKerDNT9agAvsdRBJrzk5kUMOEYtMCtb83h5YHbc4rTNm8dVYe_wDVi9g-yKz8hDPK55ugAHL_oBRl_qlTs/s72-c/LogoCentreon-BI_m.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-632987313637017278.post-6796022639590245228</id><published>2012-04-24T22:28:00.001-05:00</published><updated>2012-05-28T18:18:55.822-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Actividad Social"/><category scheme="http://www.blogger.com/atom/ns#" term="Colaboracion"/><category scheme="http://www.blogger.com/atom/ns#" term="GNU Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="LPI"/><category scheme="http://www.blogger.com/atom/ns#" term="Software Libre"/><title type='text'>LPIC en México</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQRcNE_D2r4Ee9NDwkddvjDPLvqQoJ2_9bVD5mY2om85-cp2vDqgjK2XbvAneLmqkrQPM1bh1m_qcGS02nWEW8IY3ynH07B3ntgfRfmfd5pE2TuxT957rZW93bd7ENtWd__tdbuokbrKQ/s1600/lpi-logo.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQRcNE_D2r4Ee9NDwkddvjDPLvqQoJ2_9bVD5mY2om85-cp2vDqgjK2XbvAneLmqkrQPM1bh1m_qcGS02nWEW8IY3ynH07B3ntgfRfmfd5pE2TuxT957rZW93bd7ENtWd__tdbuokbrKQ/s200/lpi-logo.jpg&quot; width=&quot;128&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Debo comentar que me encuentro en los pasos finales de alcanzar el nivel 1 de LPIC (Linux Professional Institute Certification). Para lograr la certificación LPIC-1, es necesrio la acreditacion de dos examenes 101 y 102.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Hace meses mis dudas eran ¿Cuanto cuesta? ¿Donde me certifico? ¿Cuanto se tardan los resultados en llegar?. Despues de enviar varios correos en algunas empresas de México e instituciones LPI fuera de México y basandonos en mi propia experiencia les dejo mis propias respuestas.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;¿Cuanto cuesta?&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
El precio por cada examen es $160 dolares, en este momento es algo asi como $2,100 pesos. En algunas empresas de México me llegaron a cotizar en $3,500 + iva, no voy a decir nombres. El pago se realiza con tarjeta.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;¿Donde me certifico?&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Amablemente personas de LPI España recomendaron que todo aspirante debera registrarse en algunos de los dos centros de certificacion internacional &lt;a href=&quot;http://www.vue.com/&quot;&gt;VUE&lt;/a&gt; y &lt;a href=&quot;http://www.prometric.com/&quot;&gt;Prometric&lt;/a&gt;, en ambos casos se requiere un registro previo en la pagina &lt;a href=&quot;http://www.lpi.org/&quot;&gt;Oficial de LPI&lt;/a&gt;, para que se genere un LPI ID. En los centros de certificacion, el aspirante debera de buscar un lugar donde pueda aplicar el examen mas cercano a su region o donde el quiera.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;¿Cuanto se tardan los resultados en llegar?&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Las empresas de México me comentaron que los paquetes se tenia que enviar a Brasil y que los resultados eran de 2 a 3 meses. En la Universidad donde realize el examen, me lo aplicaron en linea, y los resultados fueron inmediatamente despues de mi ultimo clic en el boton de finalizar.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;¿Recomendaciones?&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Estudiar mucho.&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martin-edmundo.blogspot.com/feeds/6796022639590245228/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/632987313637017278/6796022639590245228' title='2 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/6796022639590245228'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/6796022639590245228'/><link rel='alternate' type='text/html' href='http://martin-edmundo.blogspot.com/2012/04/lpic-en-mexico.html' title='LPIC en México'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQRcNE_D2r4Ee9NDwkddvjDPLvqQoJ2_9bVD5mY2om85-cp2vDqgjK2XbvAneLmqkrQPM1bh1m_qcGS02nWEW8IY3ynH07B3ntgfRfmfd5pE2TuxT957rZW93bd7ENtWd__tdbuokbrKQ/s72-c/lpi-logo.jpg" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-632987313637017278.post-8379596963112232116</id><published>2012-03-27T10:49:00.006-06:00</published><updated>2012-05-11T20:25:16.961-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Bases de datos"/><category scheme="http://www.blogger.com/atom/ns#" term="Desarrollo"/><category scheme="http://www.blogger.com/atom/ns#" term="GNU Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="otrs"/><category scheme="http://www.blogger.com/atom/ns#" term="Software Libre"/><title type='text'>Exportando M$ Active Directory a MySQL</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;El siguiente script me ayudo para exportar las cuentas de Active Directoy a una base de datos en MySql. El problema y/o interés surgió debido a la implementación de otrs, una solución para la gestión de servicios IT y help desk, donde se pretendía centralizar las cuentas locales de Active Directory como clientes en el contexto de la aplicación (otrs).&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Para la solución de este problema (pensando en la automatización) había que hacer dos cosas, llenar la tabla de clientes con los datos de cada cuenta en la base de datos y cambiar el tipo de autentificación usando ldap.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;b&gt;Requisitos:&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;awk&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;openLdap&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;mysql-client&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;b&gt;Script: ldap2mysql.sh&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class=&quot;brush: bash&quot;&gt;#!/bin/bash&lt;br /&gt;# Martin Edmundo 2012&lt;br /&gt;# Orden del listado AD: sn, givename, userPrincipalName&lt;br /&gt;&lt;br /&gt;#Inicialización de variables&lt;br /&gt;dbUser=&quot;otrs&quot;;&lt;br /&gt;dbPasswd=&quot;/Gvxsn1CFaj5Q&quot;;&lt;br /&gt;dbName=&quot;otrs&quot;;&lt;br /&gt;let _i=0;&lt;br /&gt;&lt;br /&gt;searchBase=&quot;DC=PGJ,DC=MICH&quot;;&lt;br /&gt;bindDistinguishedName=&quot;account@domain&quot;;&lt;br /&gt;ldapPasswd=&quot;AcbjdaIQ6P/9g&quot;;&lt;br /&gt;ldapHost=&quot;ldap://172.16.1.2&quot;;&lt;br /&gt;&lt;br /&gt;apellido=&quot;&quot;;&lt;br /&gt;nombre=&quot;&quot;;&lt;br /&gt;user=&quot;&quot;;&lt;br /&gt;&lt;br /&gt;#Leemos el arbol completo de usuarios&lt;br /&gt;tree=`ldapsearch -x -z 0 -b $searchBase -D $bindDistinguishedName -w $ldapPasswd &quot;(objectclass=user)&quot; -H $ldapHost | egrep &quot;userPrincipalName|givenName|sn\: &quot;`&lt;br /&gt;&lt;br /&gt;#Leemos el ultimo customer_id que se tiene en la BD, sobre ese se incrementaran los siguientes INSERT&lt;br /&gt;let lastCustomer=`mysql -u $dbUser -p$dbPasswd --database=$dbName --execute=&quot;select max(customer_id) as a from customer_user&quot; | awk &#39;BEGIN{FS=&quot;\n&quot;; RS=&quot;\n\n&quot;;}{print $2}&#39; `&lt;br /&gt;&lt;br /&gt;echo &quot;$tree&quot; | (&lt;br /&gt;     while read linea;&lt;br /&gt;             do&lt;br /&gt;             te_conozco=`echo $linea | cut -c1-2`&lt;br /&gt;             if [ &quot;$te_conozco&quot; = &quot;sn&quot; ]; then&lt;br /&gt;                     apellido=`echo $linea | cut -f2 -d&quot; &quot;`;&lt;br /&gt;             fi&lt;br /&gt;             if [ &quot;$te_conozco&quot; = &quot;gi&quot; ]; then&lt;br /&gt;                     nombre=`echo $linea | cut -f2 -d&quot; &quot;`;&lt;br /&gt;             fi&lt;br /&gt;             if [ &quot;$te_conozco&quot; = &quot;us&quot; ]; then&lt;br /&gt;                     user=`echo $linea | cut -f2 -d&quot; &quot;`;&lt;br /&gt;                     if [ &quot;$apellido&quot; != &quot;&quot; -a &quot;$nombre&quot; != &quot;&quot; ]; then&lt;br /&gt;                             let lastCustomer+=1;&lt;br /&gt;                             uid=`echo $user | cut -f1 -d&quot;@&quot;`&lt;br /&gt;                             daleDale=`mysql -u $dbUser -p$dbPasswd --database=$dbName --execute=&quot;select login from customer_user where login=&#39;$uid&#39;&quot; | awk &#39;BEGIN{FS=&quot;\n&quot;; RS=&quot;\n\n&quot;;}{print $2}&#39;`&lt;br /&gt;&lt;br /&gt;                             #Si la cuenta no esta ya registra en DB, se hace el INSERT&lt;br /&gt;                             if [ &quot;$daleDale&quot; == &quot;&quot; ]; then&lt;br /&gt;                                     let _i+=1;&lt;br /&gt;                                     sqlStm=&quot;INSERT INTO customer_user (login, email, customer_id, pw, title, first_name, last_name, valid_id, create_time, create_by, change_time, change_by)  VALUES (&#39;$uid&#39;, &#39;informaticapgjmich@gmail.com&#39;,$lastCustomer, &#39;&#39;, &#39;Importado por openLdap&#39;, &#39;$nombre&#39;, &#39;$apellido&#39;, 1, &#39;2012-03-23 20:00:00&#39;, 1, &#39;2012-03-23 20:00:00&#39;, 1)&quot;;&lt;br /&gt;                                     #echo &quot;$sqlStm&quot;&lt;br /&gt;                                     mysql -u $dbUser -p$dbPasswd --database=$dbName --execute=&quot;$sqlStm&quot;;&lt;br /&gt;                                     echo &quot;*** Importado ($_i): $uid&quot;&lt;br /&gt;                             fi&lt;br /&gt;&lt;br /&gt;                     fi&lt;br /&gt;                     apellido=&quot;&quot;;&lt;br /&gt;                     nombre=&quot;&quot;;&lt;br /&gt;             fi&lt;br /&gt;     done&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://martin-edmundo.blogspot.com/feeds/8379596963112232116/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/632987313637017278/8379596963112232116' title='3 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/8379596963112232116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/8379596963112232116'/><link rel='alternate' type='text/html' href='http://martin-edmundo.blogspot.com/2012/03/exportando-m-active-directory-mysql.html' title='Exportando M$ Active Directory a MySQL'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-632987313637017278.post-3073893229759393912</id><published>2011-06-02T19:38:00.002-05:00</published><updated>2012-04-06T21:52:02.164-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Nagios"/><category scheme="http://www.blogger.com/atom/ns#" term="Redes"/><category scheme="http://www.blogger.com/atom/ns#" term="Software Libre"/><title type='text'>Construcción de Plugin Nagios/Centreon para inodos</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;En esta ocación quiero compartir con ustedes un plugin muy básico para revisar el estado de los inodos en un FileSystem remoto a nuestro servidor de monitorio Nagios vía SNMP.&lt;/div&gt;&lt;div&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyO1vcud1C7_0DMImOglVpGf3jTgr6l0oU9yiQ9ToChE1bDJA-DZohaBNIprr5oXRUPXZJYHjLtwH7nnTFtoAH5mLccQiTmzrkL_kbL61KxJarsW-IR94gaSpJ1Suw6ye4KrWLn8W0-Ik/s320/Funcionamiento.png&quot; style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 126px;&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5613794257600641138&quot; /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Para conseguir que el agente SNMP, nos pueda regresar información de los i-nodos de su sistema se requiere autorización, eso lo hacemos con el atributo &quot;disk&quot; y como parámetro se me envía cada uno de los FileSystem que deseamos monitorear. Esto seria agregando por ejemplo unas lineas al archivo snmpd.conf como las que siguen:&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;disk /&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;disk /home&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Ya con este cambio solo queda reiniciar el servicio. Se puede verificar con el comando snmpwalk o el plugin que tenemos, desde el servidor de monitoreo o NMS.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class=&quot;brush: bash&quot;&gt;#!/bin/bash&lt;br /&gt;#check_snmp_inodes.sh&lt;br /&gt;# Argumentos:&lt;br /&gt;# 1. Community&lt;br /&gt;# 2. Version&lt;br /&gt;# 3. IP Address&lt;br /&gt;# 4. FS&lt;br /&gt;# 5. warning&lt;br /&gt;# 6. critical&lt;br /&gt;if [ $# -eq  6 ]; then&lt;br /&gt;       #Se localiza el indice del FS&lt;br /&gt;       isExist=`snmpwalk  -c $1 -v $2 $3 dsktable | grep  -e  &quot;$4$&quot; | wc -l`&lt;br /&gt;       if [ $isExist -eq 1 ]; then&lt;br /&gt;               index=`snmpwalk  -c $1 -v $2 $3 dsktable | grep  -e  &quot;$4$&quot; | awk &#39;BEGIN{FS=&quot;.&quot;}{print $2}&#39; | awk &#39;{print $1}&#39;`&lt;br /&gt;               uso=`snmpwalk  -c $1 -v $2 $3 .1.3.6.1.4.1.2021.9.1.10.$index | awk &#39;{print $4}&#39;`&lt;br /&gt;               valor=&quot;&quot;&lt;br /&gt;               #Menor que&lt;br /&gt;               if [ $uso -lt $5 ]; then&lt;br /&gt;                       echo &quot;I-nodos OK $4 Esta usando $uso% de sus inodos | size=100 used=$uso&quot;&lt;br /&gt;                       exit 0&lt;br /&gt;               else&lt;br /&gt;                       if [ $uso -lt $6 ]; then&lt;br /&gt;                               echo &quot;I-nodos WARNING $4 Esta usando $uso% de sus inodos | size=100 used=$uso&quot;&lt;br /&gt;                               exit 1&lt;br /&gt;                       else&lt;br /&gt;                               echo &quot;I-nodos CRITICAL $4 Esta usando $uso% de sus inodos | size=100 used=$uso&quot;&lt;br /&gt;                               exit 2&lt;br /&gt;                       fi&lt;br /&gt;               fi&lt;br /&gt;               echo &quot;I-nodos $valor: $4 Esta usando $uso% de sus inodos | size=100 used=$uso&quot;&lt;br /&gt;               exit 0&lt;br /&gt;       else&lt;br /&gt;               echo &quot;No existe el FileSystem $4&quot;&lt;br /&gt;               exit 3&lt;br /&gt;       fi&lt;br /&gt;&lt;br /&gt;else&lt;br /&gt;       echo &quot;Error en el paso de parametros&quot;&lt;br /&gt;       exit 3&lt;br /&gt;fi&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martin-edmundo.blogspot.com/feeds/3073893229759393912/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/632987313637017278/3073893229759393912' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/3073893229759393912'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/3073893229759393912'/><link rel='alternate' type='text/html' href='http://martin-edmundo.blogspot.com/2011/06/construccion-de-plugin-nagioscentreon.html' title='Construcción de Plugin Nagios/Centreon para inodos'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyO1vcud1C7_0DMImOglVpGf3jTgr6l0oU9yiQ9ToChE1bDJA-DZohaBNIprr5oXRUPXZJYHjLtwH7nnTFtoAH5mLccQiTmzrkL_kbL61KxJarsW-IR94gaSpJ1Suw6ye4KrWLn8W0-Ik/s72-c/Funcionamiento.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-632987313637017278.post-811789525976302264</id><published>2011-05-13T11:47:00.001-05:00</published><updated>2012-04-06T22:07:18.677-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Desarrollo"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Arbol de directorios con objeto Tree de java IceFaces.</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;Saludos, en esta ocación y de manera muy rapida tengo para ustedes un breve ejemplo de como llenar un objeto Tree en JavaIceFaces.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class=&quot;brush: java&quot;&gt;&lt;br /&gt;public class Page3 extends AbstractPageBean {&lt;br /&gt;private static final String DIR_OPEN_ICON = &quot;./xmlhttp/css/xp/css-images/tree_folder_open.gif&quot;;&lt;br /&gt;private static final String DIR_CLOSE_ICON = &quot;./xmlhttp/css/xp/css-images/tree_folder_close.gif&quot;;&lt;br /&gt;private static final String DIR_LEAF_ICON = &quot;./xmlhttp/css/xp/css-images/tree_document.gif&quot;;&lt;br /&gt;&lt;br /&gt;private void get_tree(String dir, DefaultMutableTreeNode parent){&lt;br /&gt;//Apertura del directorio&lt;br /&gt;File a = new File(dir);&lt;br /&gt;//Conseguimos un listado de los archivos y subdirectorios&lt;br /&gt;String[] ficheros = a.list();&lt;br /&gt;int i = 0;&lt;br /&gt;&lt;br /&gt;//Agregamos los nodos al arbol, por cada archivo encontrado&lt;br /&gt;try{&lt;br /&gt;while ( i &lt; ficheros.length ){&lt;br /&gt;File tmp = new File( a.getCanonicalPath() +&quot;/&quot;+ ficheros[i]);&lt;br /&gt;&lt;br /&gt;DefaultMutableTreeNode branchNode = new DefaultMutableTreeNode();&lt;br /&gt;IceUserObject branchObject = new IceUserObject(branchNode);&lt;br /&gt;branchObject.setText( ficheros[i] );&lt;br /&gt;branchObject.setBranchContractedIcon(DIR_CLOSE_ICON);&lt;br /&gt;branchObject.setBranchExpandedIcon(DIR_OPEN_ICON);&lt;br /&gt;branchObject.setLeafIcon(DIR_LEAF_ICON);&lt;br /&gt;branchObject.setExpanded(false);&lt;br /&gt;&lt;br /&gt;//Si el archivo es un directorio volvemos a invocar el metodo.&lt;br /&gt;if ( tmp.isDirectory() ){&lt;br /&gt;branchObject.setLeaf( false );&lt;br /&gt;this.get_tree( a.getCanonicalPath() +&quot;/&quot;+ ficheros[i] , branchNode);&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;branchObject.setLeaf( true );&lt;br /&gt;&lt;br /&gt;branchNode.setUserObject(branchObject);&lt;br /&gt;parent.add(branchNode);&lt;br /&gt;i++;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;catch (IOException e){&lt;br /&gt;this.setLblCurrentDir(&quot;Error: &quot; + e.getMessage());&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void lectura2(){&lt;br /&gt;DefaultMutableTreeNode root = new DefaultMutableTreeNode();&lt;br /&gt;IceUserObject itemx = new IceUserObject(root);&lt;br /&gt;itemx.setText(&quot;Directorios&quot;);&lt;br /&gt;itemx.setExpanded(true);&lt;br /&gt;itemx.setLeaf(false);&lt;br /&gt;itemx.setBranchContractedIcon(DIR_CLOSE_ICON);&lt;br /&gt;itemx.setBranchExpandedIcon(DIR_OPEN_ICON);&lt;br /&gt;itemx.setLeafIcon(DIR_LEAF_ICON);&lt;br /&gt;root.setUserObject(itemx);&lt;br /&gt;&lt;br /&gt;//Directorio a visualizar&lt;br /&gt;this.get_tree(&quot;..&quot;, root);&lt;br /&gt;&lt;br /&gt;DefaultTreeModel model = new DefaultTreeModel(root);&lt;br /&gt;this.tree1Model.setModel(model);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0wUdk1uox15tS3igz8Qcecm6HaJLy_cqAMCLpb3iyU6xR2S5Frlg5_PQzV-cgsYktMPXUjWqxCm_omIYYaheC9IUYout04UKZYdu0ZDVUxt6T-eROCib_Af5dCIixYBuPiW8hzmFKL6Y/s320/tree.png&quot; style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 210px;&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5606243930902060770&quot; /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martin-edmundo.blogspot.com/feeds/811789525976302264/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/632987313637017278/811789525976302264' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/811789525976302264'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/811789525976302264'/><link rel='alternate' type='text/html' href='http://martin-edmundo.blogspot.com/2011/05/arbol-de-directorios-con-objeto-tree-de.html' title='Arbol de directorios con objeto Tree de java IceFaces.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0wUdk1uox15tS3igz8Qcecm6HaJLy_cqAMCLpb3iyU6xR2S5Frlg5_PQzV-cgsYktMPXUjWqxCm_omIYYaheC9IUYout04UKZYdu0ZDVUxt6T-eROCib_Af5dCIixYBuPiW8hzmFKL6Y/s72-c/tree.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-632987313637017278.post-8183786203651106940</id><published>2011-03-31T20:58:00.000-06:00</published><updated>2012-05-28T18:18:38.436-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Colaboracion"/><category scheme="http://www.blogger.com/atom/ns#" term="GNU Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="LPI"/><category scheme="http://www.blogger.com/atom/ns#" term="Software Libre"/><title type='text'>Sintesis: Exploring Linux Command-Line Tools</title><content type='html'>&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjE_QFhmAP-1W80YuYbqKINChAjO6XlUcKhRVVbwK1sD8EY6nunKEZILIqfea2f-Ci_O9gANq5uDxBgMPe8XSl3L7n9sHTUFgJvqnY9I5cyLE7-AP0mMKnwnOCqmTFX7BB2cNTH3nI5guA/s1600/g4996.png&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 295px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjE_QFhmAP-1W80YuYbqKINChAjO6XlUcKhRVVbwK1sD8EY6nunKEZILIqfea2f-Ci_O9gANq5uDxBgMPe8XSl3L7n9sHTUFgJvqnY9I5cyLE7-AP0mMKnwnOCqmTFX7BB2cNTH3nI5guA/s320/g4996.png&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5590463306411476386&quot; /&gt;&lt;/a&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Brevemente solo quiero presentar una sintesis del primer capitulo de la Guía &lt;i&gt;LPI Exploring Linux Command-Line Tools&lt;/i&gt;. Son algunos comandos para manupulación de archivos de texto.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;b&gt;cat:&lt;/b&gt;&lt;br /&gt;-E final de linea con $&lt;br /&gt;-n numero de linea (incluso lineas vacias)&lt;br /&gt;-b numero de linea&lt;br /&gt;&lt;br /&gt;&lt;b&gt;join: combina dos archivos por algun campo en común.&lt;/b&gt;&lt;br /&gt;join listing1.1.txt listing1.2.txt (defecto campo 1)&lt;br /&gt;join -1 3 -2 2 people.txt numbers.txt (archivo 1 campo 3)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;paste: combina dos archivos (linea a linea).&lt;/b&gt;&lt;br /&gt;paste listing1.1.txt listing1.2.txt&lt;br /&gt;&lt;br /&gt;&lt;b&gt;expand: cambia los tabs a espacios en blanco&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;od: nuestra un archivo en formato octal&lt;/b&gt;&lt;br /&gt;od listing1.2.txt&lt;br /&gt;&lt;br /&gt;&lt;b&gt;sort: Ordena listados.&lt;/b&gt;&lt;br /&gt;-i Ignora si son mayusculas o munisculas.&lt;br /&gt;-r Orden invertido&lt;br /&gt;-k ¿por cual campo hacemos el ordenamiento?&lt;br /&gt;sort -k 3 listing1.1.txt&lt;br /&gt;&lt;br /&gt;&lt;b&gt;split: Divide un archivo en dos o mas archivos. Se le pasa el prefix.&lt;/b&gt;&lt;br /&gt;-b Los divide por tamaño en bytes&lt;br /&gt;-l Por lineas&lt;br /&gt;split -l 2 listing1.1.txt numbers&lt;br /&gt;&lt;br /&gt;&lt;b&gt;tac: concantena archivos pero con lineas en orden invertidos. Aplicando tac a cada archivo y despues concantena.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;tr: Remplaza caracteres los del SET1 con el equivalente del SET2&lt;/b&gt;&lt;br /&gt;-t Trunca el SET1 al SET2&lt;br /&gt;-d Elimina los caracteres del SET1&lt;br /&gt;[:alnum:] (all numbers and letters)&lt;br /&gt;[:upper:] (all uppercase letters)&lt;br /&gt;[:lower:] (all lowercase letters)&lt;br /&gt;[:digit:] (all digits).&lt;br /&gt;tr BCJ bc &amp;lt; listing1.1.txt&lt;br /&gt;&lt;br /&gt;&lt;b&gt;unexpand: Convierte los multiples espacios a tabs.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;uniq: Elimina elementos duplicados de una lista.&lt;br /&gt;&lt;br /&gt;fmt: Formato para archivos con lineas muy largas o irregulares.&lt;br /&gt;&lt;br /&gt;nl: Enumerar las lineas.&lt;br /&gt;&lt;br /&gt;pr: Formato para imprimir&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;head: Muestra el encabezado de archivos&lt;/b&gt;&lt;br /&gt;head -n 10 file.txt&lt;br /&gt;&lt;br /&gt;&lt;b&gt;tail: Muestra la cola de un archivo.&lt;/b&gt;&lt;br /&gt;tail -n 10 file.txt&lt;br /&gt;tail -f file.txt&lt;br /&gt;&lt;br /&gt;&lt;b&gt;cut: Extrae porciones de texto de la su STDIN y lo manda a su STDOUT, por columnas&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;cat file1.txt | cut -c 2-&lt;/b&gt;&lt;br /&gt;ifconfig eth0 | grep HW | cut -d &quot; &quot; -f 11&lt;br /&gt;&lt;br /&gt;&lt;b&gt;wc: Contador de palabras.&lt;/b&gt;&lt;br /&gt;-l  Lineas.&lt;br /&gt;-w  Palabras.&lt;br /&gt;-c  Bytes.&lt;br /&gt;-m  Caracteres.&lt;br /&gt;-L  Longitud de la linea mas larga.</content><link rel='replies' type='application/atom+xml' href='http://martin-edmundo.blogspot.com/feeds/8183786203651106940/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/632987313637017278/8183786203651106940' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/8183786203651106940'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/8183786203651106940'/><link rel='alternate' type='text/html' href='http://martin-edmundo.blogspot.com/2011/03/sintesis-exploring-linux-command-line.html' title='Sintesis: Exploring Linux Command-Line Tools'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjE_QFhmAP-1W80YuYbqKINChAjO6XlUcKhRVVbwK1sD8EY6nunKEZILIqfea2f-Ci_O9gANq5uDxBgMPe8XSl3L7n9sHTUFgJvqnY9I5cyLE7-AP0mMKnwnOCqmTFX7BB2cNTH3nI5guA/s72-c/g4996.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-632987313637017278.post-7843334665360754910</id><published>2011-03-20T22:06:00.000-06:00</published><updated>2011-03-20T22:48:50.440-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GNU Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="OpenLaszlo"/><category scheme="http://www.blogger.com/atom/ns#" term="Software Libre"/><title type='text'>Limitando los recursos de Tomcat.</title><content type='html'>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj65JOMnnIvxXagyPAmpncWVu9lBH2ynslwxkVBGZeEgT_79-X3bQv9jPTPG5w0UMVjD3wTEqRubLIAAZoB_hAfuMMn2ZBuhvZnDV4YG9uqJFKdFWSOfnk1hCopPhMIBgqVPbeKGueqNEk/s1600/tomcat.gif&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 146px; height: 92px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj65JOMnnIvxXagyPAmpncWVu9lBH2ynslwxkVBGZeEgT_79-X3bQv9jPTPG5w0UMVjD3wTEqRubLIAAZoB_hAfuMMn2ZBuhvZnDV4YG9uqJFKdFWSOfnk1hCopPhMIBgqVPbeKGueqNEk/s320/tomcat.gif&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5586390241942214546&quot; /&gt;&lt;/a&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Hace unos meses trabajando con OpenLaszlo 4.9 y Tomcat 5.0 en mi vieja notebook Compaq v2617la de 512Mb Ram,  dramáticamente me estaba quedando sin memoria muy seguido, esto debido a los procesos que podemos ver en la siguiente expresión:&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;Mysqld + browser (iceweasel) + Apache + Laszlo = Frustración, tristeza y desesperación&lt;/span&gt;.&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;El proceso Tomcat que inicialmente era propiedad del &lt;i&gt;root&lt;/i&gt;, causaba que al terminarse la Ram, comenzara a tener una gran demanda en el uso del SWAP al extremo de provocarme síntomas parecidos a los provocados en &lt;a href=&quot;http://es.wikipedia.org/wiki/Ataque_de_denegaci%C3%B3n_de_servicio&quot;&gt;DoS&lt;/a&gt;, por el uso intensivo del disco. Las medidas que aplicamos fueron:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Aumentar la memoria Swap ( &lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; &quot;&gt;&lt;a href=&quot;http://tinyurl.com/4m2tene&quot;&gt;ver&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; &quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;).&lt;/li&gt;&lt;li&gt;Cambiar a un browser mas ligero (&lt;a href=&quot;http://es.wikipedia.org/wiki/Google_Chrome&quot;&gt;google-chrome&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;Cambiar a un windowmanager mas ligero (&lt;a href=&quot;http://es.wikipedia.org/wiki/Fluxbox&quot;&gt;Fluxbox&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;Cambiar a un reproductor mp3 mas ligero (&lt;a href=&quot;http://www.mpg123.de/&quot;&gt;mpg123&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;Limitar los umbrales de recursos disponibles de Tomcat ( &lt;a href=&quot;http://martin-edmundo.blogspot.com/2011/01/ulimit-limitsconf-recursos-del-sistema.html&quot;&gt;ver&lt;/a&gt; ).&lt;/li&gt;&lt;li&gt;Crear el usuario &quot;tomcat&quot;, limitarlo en el uso de consumo de memoria, y entregarle permisos sobre el servicio Tomcat.&lt;/li&gt;&lt;/ul&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Los umbrales para la configuración de recursos de tomcat los ajuste en uno de los scripts de inicio del mismo tomcat $CATALINA_HOME/bin/catalina.sh.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt; Cambiando el parámetro &lt;i&gt;export JAVA_OPTS=&quot;-Xms128m -Xmx512m $JAVA_OPTS&quot;&lt;/i&gt; por &lt;i&gt;export JAVA_OPTS=&quot;-Xms128m -Xmx256m $JAVA_OPTS&quot;&lt;/i&gt;.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Para limitar los recursos del sistema usados por el usuario tomcat, en su archivo ~.bashrc colocarle &lt;i&gt;ulimit -m 200000, &lt;/i&gt;para que solo tome 200mb como memoria maxima.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Estos ajustes los realize como ambiente de pruebas, mismos que hasta ahora me han ayudado a trabajar mas feliz.&lt;/div&gt;&lt;div&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqg_iEHMxssDIDXLwOqiRgMim0TJNdh-80dNa2AcNskEQgpxS0vMSOW6JXlwx0GE9KD7nEY3R-jRtnTQIx2jRwEzFY6oJ8JeAMWhkGVf5m6qqmaE200w6BEtjYoAydPb5HaZUXV3IFBdw/s320/tomcat.png&quot; style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 231px;&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5586388975876297122&quot; /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martin-edmundo.blogspot.com/feeds/7843334665360754910/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/632987313637017278/7843334665360754910' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/7843334665360754910'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/7843334665360754910'/><link rel='alternate' type='text/html' href='http://martin-edmundo.blogspot.com/2011/03/limitando-los-recursos-de-tomcat.html' title='Limitando los recursos de Tomcat.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj65JOMnnIvxXagyPAmpncWVu9lBH2ynslwxkVBGZeEgT_79-X3bQv9jPTPG5w0UMVjD3wTEqRubLIAAZoB_hAfuMMn2ZBuhvZnDV4YG9uqJFKdFWSOfnk1hCopPhMIBgqVPbeKGueqNEk/s72-c/tomcat.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-632987313637017278.post-2403674797684298284</id><published>2011-02-27T23:01:00.000-06:00</published><updated>2011-02-27T23:33:17.759-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GNU Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Software Libre"/><title type='text'>Agregando mas SWAP en Volumen Logico</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;En últimos días el trabajo en mi viejo equipo portátil se ha vuelto un poco pesado por lo escaso de mi memoria Ram, para mi desgracia DDR (costosa y un poco mas difícil de conseguir).&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Como alternativa de prueba, se me ocurrió aumentar tamaño de mi memoria swap. Vamos a ver como esta la situacion actual:&lt;/div&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-4dhu8tu0HFp_7soz9t92Pw47xINdaaySwLqrXYEAzWKVn-O35Dl26C6o80KpCCnKT52CrRY7nl4iWC27qnFWdkehc1F2YZCGDpM2wc2o3CvWlU2tPMO3bTy83i-4inYpez-bdwKpVgs/s320/memoria01.png&quot; style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 162px;&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5578602857408819826&quot; /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Tenemos &lt;i&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;512Mb&lt;/span&gt;&lt;/i&gt; en Ram y &lt;i&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;256Mb&lt;/span&gt;&lt;/i&gt; en Swap (Aun sigo reprochándome por que deje tan poco).  Afortunadamente como medida preventiva cuando me instale este sistema deje un Volumen Lógico con algunos sistemas de archivos y espacio libre en el volumen.&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;i&gt;Algoritmo:&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;1. Por cuestiones de seguridad en la integridad de datos, se recomienda desmontar todos los sistemas de archivos usados para realizar cambios en el volumen. Así que la recomendación es reiniciar, login como root, detener todos los servicios, desmontar sistemas de archivos en el volumen. Para esto nos podemos apoyar del comando &lt;i&gt;lsof &lt;/i&gt;buscando procesos haciendo uso de directorios.&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;2. Crear el espacio que necesitamos adentro del volumen. En mi caso definimos un espacio de 512Mb en el volumen volgrp01:&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;Poseidon:~# lvcreate -L 512M volgrp01&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;3. Verificar el tamaño creado y el dispositivo asignado, solo mostraremos un resumen de la salida:&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;i&gt;Poseidon:~# lvdisplay&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;i&gt;...&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;i&gt;--- Logical volume ---&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;i&gt;LV Name                /dev/volgrp01/lvol0&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;i&gt;VG Name                volgrp01&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;i&gt;LV Write Access        read/write&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;LV Size                &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;512.00&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;&gt; MB&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;4. Crear y activar la nueva swap:&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;i&gt;Poseidon:~# mkswap /dev/volgrp01/lvol0&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;i&gt;Poseidon:~# swapon /dev/volgrp01/lvol0&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;5. Verificar que las estadísticas de la memoria en el sistema y confirmamos que tenemos (512+512+256)Mb.&lt;/div&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1XfYtUS18YCRBDtaMnj7QO_A0wH4WUABai7qpBTUdJbCWxF2JQ26O8fuL34H28sqdihd3hi_ELsbY0_In6wTGsMn_hhF7-DmKLvPvT8_JRW3bcUmnGtn0bA9_iqiS-hPXHfkCfHLduiw/s320/memoria02.png&quot; style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 152px;&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5578608571451740482&quot; /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martin-edmundo.blogspot.com/feeds/2403674797684298284/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/632987313637017278/2403674797684298284' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/2403674797684298284'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/632987313637017278/posts/default/2403674797684298284'/><link rel='alternate' type='text/html' href='http://martin-edmundo.blogspot.com/2011/02/agregando-mas-swap-en-volumen-logico.html' title='Agregando mas SWAP en Volumen Logico'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-4dhu8tu0HFp_7soz9t92Pw47xINdaaySwLqrXYEAzWKVn-O35Dl26C6o80KpCCnKT52CrRY7nl4iWC27qnFWdkehc1F2YZCGDpM2wc2o3CvWlU2tPMO3bTy83i-4inYpez-bdwKpVgs/s72-c/memoria01.png" height="72" width="72"/><thr:total>0</thr:total></entry></feed>