<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Vita di un sys-admin &#187; script</title>
	<atom:link href="http://blog.angelofailla.com/tag/script/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.angelofailla.com</link>
	<description>Storie, esperienze e pensieri da Dublino.</description>
	<lastBuildDate>Sun, 14 Aug 2011 22:11:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Monitoring SSL certificate expiration with Nagios</title>
		<link>http://blog.angelofailla.com/2008/07/17/monitoring-ssl-certificate-expiration-with-nagios/</link>
		<comments>http://blog.angelofailla.com/2008/07/17/monitoring-ssl-certificate-expiration-with-nagios/#comments</comments>
		<pubDate>Thu, 17 Jul 2008 10:49:42 +0000</pubDate>
		<dc:creator>pallotron</dc:creator>
				<category><![CDATA[English posts]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Informatica]]></category>
		<category><![CDATA[Lavoro]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programmazione]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[certificate]]></category>
		<category><![CDATA[expiration]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[nagios]]></category>
		<category><![CDATA[openssl]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://blog.angelofailla.com/?p=873</guid>
		<description><![CDATA[Hi Lads, This is a post for nerds so I&#8217;m writing it in English. If you don&#8217;t understand English or technical stuff please close this page I&#8217;m at work and I&#8217;ve just finished to write a Nagios script to monitor expiration date of a SSL certificate. I wanna share it with you. To have the [...]]]></description>
			<content:encoded><![CDATA[<p>Hi Lads,</p>
<p>This is a post for nerds so I&#8217;m writing it in English. If you don&#8217;t understand English or technical stuff please close this page <img src='http://blog.angelofailla.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /><br />
I&#8217;m at work and I&#8217;ve just finished to write a Nagios script to monitor expiration date of a SSL certificate.</p>
<p>I wanna share it with you.</p>
<p>To have the script working properly you just need to install OpenSSL and let the <span>openssl</span><br />
command be in your PATH environment.</p>
<p>This is the usage:</p>
<pre>
Usage:
check_ssl_cert.sh hostname port [warningdays]
</pre>
<p>Warning days default value is 30 days.</p>
<p>Some examples:</p>
<pre>[afailla@terminus ~]$  /usr/local/nagios/bin/check_ssl_cert.sh google.com 443
OK: Certificate is valid for 289 days expires on May  2 17:02:55 2009 GMT

[afailla@terminus ~]$  /usr/local/nagios/bin/check_ssl_cert.sh google.com 443 400
CRITICAL: Certificate will expire in 289 days on May  2 17:02:55 2009 GMT</pre>
<p>Download the script <a href="http://blog.angelofailla.com/wp-content/uploads/2008/07/check_ssl_cert.sh">here</a> and enjoy it.</p>
<img src="http://blog.angelofailla.com/?ak_action=api_record_view&id=873&type=feed" alt="" /><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.angelofailla.com%2F2008%2F07%2F17%2Fmonitoring-ssl-certificate-expiration-with-nagios%2F&amp;title=Monitoring%20SSL%20certificate%20expiration%20with%20Nagios" id="wpa2a_2"><img src="http://blog.angelofailla.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.angelofailla.com/2008/07/17/monitoring-ssl-certificate-expiration-with-nagios/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Lazyness</title>
		<link>http://blog.angelofailla.com/2009/03/13/lazyness/</link>
		<comments>http://blog.angelofailla.com/2009/03/13/lazyness/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 10:53:57 +0000</pubDate>
		<dc:creator>pallotron</dc:creator>
				<category><![CDATA[Informatica]]></category>
		<category><![CDATA[Lavoro]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[automazione]]></category>
		<category><![CDATA[nagios]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://blog.angelofailla.com/?p=1351</guid>
		<description><![CDATA[C&#8217;e&#8217; stata una migrazione qualche notte fa per $GRANDECLIENTE. Fortunatamente io non vi ho fatto parte, se no avrei dovuto passare la notte in ufficio. Uno step previsto per la migrazione consisteva nel disattivare tutti i check nagios della vecchia release ceh girava su una 20ina di server. La CGI Nagios e&#8217; notoriamente uno schifo. [...]]]></description>
			<content:encoded><![CDATA[<p>C&#8217;e&#8217; stata una migrazione qualche notte fa per $GRANDECLIENTE. Fortunatamente io non vi ho fatto parte, se no avrei dovuto passare la notte in ufficio.</p>
<p>Uno step previsto per la migrazione consisteva nel disattivare tutti i check nagios della vecchia release ceh girava su una 20ina di server. La CGI Nagios e&#8217; notoriamente uno schifo. Non c&#8217;e&#8217; nessuna funzionalita&#8217; tipo &#8220;select all&#8221; -&gt; click. Cosi&#8217; quei geni si sono messi <strong>a cliccare come pazzi, spendendo UN&#8217;ORA.</strong></p>
<p><strong>Ora, per me tu puoi fare quello che vuoi, ma siccome non si sa mai che in un futuro prossimo io debba essere al posto loro, ho rimediato con l&#8217;ennesimo script.<br />
</strong></p>
<p>Fossi io avrei preferito spendere un&#8217;ora a scrivermi uno script che non mi avrebbe fatto perdere un&#8217;ora ogni volta che avessi dovuto fare una cosa del genere. E cosi&#8217; ho fatto ieri sera dopo cena, non avendo un cazzo di molto interessante da fare.</p>
<p>Lo script e&#8217; <a href="http://www.pallotron.net/software/nagios_extcmd.sh">qui.</a></p>
<pre>
/home/pallotron/bin/nagios_extcmd.sh <-n | -N | -p | -P | -C | -c> host service_description <cmdfile_path>
/home/pallotron/bin/nagios_extcmd.sh -h

-n disable notification
-N enable notification

-p disable passive check
-P enable passive check

-c disable check
-C enable check</pre>
<p>Lo script scrive qualcosa nella pipe che il daemon Nagios piazza nel file system.</p>
<p>Ho preso la lista dei comandi da <a href="http://www.nagios.org/developerinfo/externalcommands/commandlist.php">qui.</a></p>
<p>Avrete bisogno di editarlo e cambiare il path della pipe in base al vostro sistema. Poi sbizzarrirvi con un robe del tipo:</p>
<pre>for i in web01de web02de web03de web04de
do
   nagios_extcmd.sh -n $i "SC Apache"
   nagios_extcmd.sh -p $i "SC Apache"
   nagios_extcmd.sh -c $i "SC Apache"
done</pre>
<img src="http://blog.angelofailla.com/?ak_action=api_record_view&id=1351&type=feed" alt="" /><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.angelofailla.com%2F2009%2F03%2F13%2Flazyness%2F&amp;title=Lazyness" id="wpa2a_4"><img src="http://blog.angelofailla.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.angelofailla.com/2009/03/13/lazyness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

