<?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>jensschanz.de</title>
	<atom:link href="http://blog.jensschanz.de/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://blog.jensschanz.de</link>
	<description>Have some thoughts about ...</description>
	<lastBuildDate>Wed, 27 Feb 2013 10:09:20 +0000</lastBuildDate>
	<language>de-DE</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Icinga HTML-Mail-Extension &#8211; 0.2.1a</title>
		<link>http://blog.jensschanz.de/?p=1721</link>
		<comments>http://blog.jensschanz.de/?p=1721#comments</comments>
		<pubDate>Wed, 27 Feb 2013 10:09:20 +0000</pubDate>
		<dc:creator>Jens</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[icinga]]></category>

		<guid isPermaLink="false">http://blog.jensschanz.de/?p=1721</guid>
		<description><![CDATA[Aufgrund eines &#8220;kleinen&#8221; Schreibfehlers gibt es einen Patch der Mail-Extension für Icinga: http://icinga-html-mail-template.googlecode.com/files/icinga_mail.pl 0.2.1a -&#62; LASTSERVICEINKNOWN fixed and changed to LASTSERVICEUNKNOWN Der Dank geht an Simon Meggle für finden und melden.]]></description>
				<content:encoded><![CDATA[<p>Aufgrund eines &#8220;kleinen&#8221; Schreibfehlers gibt es einen Patch der Mail-Extension für Icinga:</p>
<p><a href="http://icinga-html-mail-template.googlecode.com/files/icinga_mail.pl">http://icinga-html-mail-template.googlecode.com/files/icinga_mail.pl</a></p>
<pre>0.2.1a -&gt; LASTSERVICEINKNOWN fixed and changed to LASTSERVICEUNKNOWN</pre>
<p>Der Dank geht an Simon Meggle für finden und melden.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jensschanz.de/?feed=rss2&#038;p=1721</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Icinga Reporting Bug &#8211; Servicegroup-Reports können nicht ausgewählt werden</title>
		<link>http://blog.jensschanz.de/?p=1709</link>
		<comments>http://blog.jensschanz.de/?p=1709#comments</comments>
		<pubDate>Fri, 01 Feb 2013 10:19:52 +0000</pubDate>
		<dc:creator>Jens</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[icinga]]></category>

		<guid isPermaLink="false">http://blog.jensschanz.de/?p=1709</guid>
		<description><![CDATA[Wessen Icinga-Web bei der Auswahl der Servicegroup-Reports so ausschaut und wer folgende Zeilen dazu im Logifle hat &#91;Fri Feb 1 10:50:50 2013&#93; &#91;fatal&#93; Uncaught AppKitPHPError: PHP Error array_key_exists&#40;&#41; expects parameter 2 to be array, null given &#40;/usr/local/icinga-web/app/modules/Reporting/models/JasperParameterStructModel.class.php:136&#41; &#40;/usr/local/icinga-web/app/modules/AppKit/lib/logging/AppKitExceptionHandler.class.php:59&#41; &#91;Fri Feb &#8230; <a href="http://blog.jensschanz.de/?p=1709">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><a href="http://blog.jensschanz.de/wp-content/uploads/2013/02/Bildschirmfoto-3.png"><img class="alignleft size-full wp-image-1710" alt="Bildschirmfoto-3" src="http://blog.jensschanz.de/wp-content/uploads/2013/02/Bildschirmfoto-3.png" width="1169" height="557" /></a></p>
<p>Wessen Icinga-Web bei der Auswahl der Servicegroup-Reports so ausschaut und wer folgende Zeilen dazu im Logifle hat</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>Fri Feb <span style="color: #000000;">1</span> <span style="color: #000000;">10</span>:<span style="color: #000000;">50</span>:<span style="color: #000000;">50</span> <span style="color: #000000;">2013</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>fatal<span style="color: #7a0874; font-weight: bold;">&#93;</span> Uncaught AppKitPHPError: PHP Error array_key_exists<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> expects parameter <span style="color: #000000;">2</span> to be array, null given <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>icinga-web<span style="color: #000000; font-weight: bold;">/</span>app<span style="color: #000000; font-weight: bold;">/</span>modules<span style="color: #000000; font-weight: bold;">/</span>Reporting<span style="color: #000000; font-weight: bold;">/</span>models<span style="color: #000000; font-weight: bold;">/</span>JasperParameterStructModel.class.php:<span style="color: #000000;">136</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>icinga-web<span style="color: #000000; font-weight: bold;">/</span>app<span style="color: #000000; font-weight: bold;">/</span>modules<span style="color: #000000; font-weight: bold;">/</span>AppKit<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>logging<span style="color: #000000; font-weight: bold;">/</span>AppKitExceptionHandler.class.php:<span style="color: #000000;">59</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> 
<span style="color: #7a0874; font-weight: bold;">&#91;</span>Fri Feb <span style="color: #000000;">1</span> <span style="color: #000000;">10</span>:<span style="color: #000000;">50</span>:<span style="color: #000000;">50</span> <span style="color: #000000;">2013</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>fatal<span style="color: #7a0874; font-weight: bold;">&#93;</span> Uncaught AppKitPHPError: PHP Error array_key_exists<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> expects parameter <span style="color: #000000;">2</span> to be array, null given <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>icinga-web<span style="color: #000000; font-weight: bold;">/</span>app<span style="color: #000000; font-weight: bold;">/</span>modules<span style="color: #000000; font-weight: bold;">/</span>Reporting<span style="color: #000000; font-weight: bold;">/</span>models<span style="color: #000000; font-weight: bold;">/</span>JasperParameterStructModel.class.php:<span style="color: #000000;">136</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>icinga-web<span style="color: #000000; font-weight: bold;">/</span>app<span style="color: #000000; font-weight: bold;">/</span>modules<span style="color: #000000; font-weight: bold;">/</span>AppKit<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>logging<span style="color: #000000; font-weight: bold;">/</span>AppKitExceptionHandler.class.php:<span style="color: #000000;">59</span><span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></td></tr></table></div>

<p>der muss seine Datei</p>
<p>/usr/local/icinga-web/app/modules/Reporting/config/module.xml</p>
<p>patchen.<br />
In Icinga-1.8.1 und in den Versionen davor, so ich es gesehen habe, fehlt der Block</p>
<pre>ae:parameter name="p_servicegroup_object_id"&gt;
&lt;ae:parameter name="className"&gt;Icinga.Reporting.inputControl.ApiSelectionField&lt;/ae:parameter&gt;
&lt;ae:parameter name="target"&gt;servicegroup&lt;/ae:parameter&gt;
&lt;ae:parameter name="columns"&gt;
&lt;ae:parameter&gt;SERVICEGROUP_OBJECT_ID&lt;/ae:parameter&gt;
&lt;ae:parameter&gt;SERVICEGROUP_NAME&lt;/ae:parameter&gt;
&lt;/ae:parameter&gt;
&lt;ae:parameter name="valueField"&gt;SERVICEGROUP_OBJECT_ID&lt;/ae:parameter&gt;
&lt;ae:parameter name="displayField"&gt;SERVICEGROUP_NAME&lt;/ae:parameter&gt;
&lt;/ae:parameter&gt;</pre>
<p>Dies führt dazu, dass beim Aufruf des Reports aus Icinga keine Variablen übergeben werden und der oben genannte Fehler im Icinga-Web Log auftaucht.</p>
<p>Der Patch dazu sieht folgendermaßen aus:</p>
<pre>--- module.xml    2013-02-01 11:03:02.000000000 +0100
+++ module_neu.xml    2013-02-01 11:04:28.000000000 +0100
@@ -99,6 +99,16 @@
                         &lt;ae:parameter name="displayField"&gt;SERVICE_NAME&lt;/ae:parameter&gt;
                         &lt;ae:parameter name="tpl"&gt;&lt;![CDATA[{HOST_NAME} - {SERVICE_NAME}]]&gt;&lt;/ae:parameter&gt;
                     &lt;/ae:parameter&gt;
+            &lt;ae:parameter name="p_servicegroup_object_id"&gt;
+            &lt;ae:parameter name="className"&gt;Icinga.Reporting.inputControl.ApiSelectionField&lt;/ae:parameter&gt;
+            &lt;ae:parameter name="target"&gt;servicegroup&lt;/ae:parameter&gt;
+            &lt;ae:parameter name="columns"&gt;
+            &lt;ae:parameter&gt;SERVICEGROUP_OBJECT_ID&lt;/ae:parameter&gt;
+            &lt;ae:parameter&gt;SERVICEGROUP_ALIAS&lt;/ae:parameter&gt;
+            &lt;/ae:parameter&gt;
+            &lt;ae:parameter name="valueField"&gt;SERVICEGROUP_OBJECT_ID&lt;/ae:parameter&gt;
+            &lt;ae:parameter name="displayField"&gt;SERVICEGROUP_ALIAS&lt;/ae:parameter&gt;
+            &lt;/ae:parameter&gt;
                 &lt;/setting&gt;

                 &lt;!-- Mapping for datatypes e.g. 4 == Date --&gt;		    
<!-- Mapping for datatypes e.g. 4 == Date --></pre>
<p>Ein offizieller Fix ist wohl in Icinga 1.8.3 enthalten. Der Bug-Report dazu ist hier zu finden:</p>
<p><a href="https://dev.icinga.org/issues/3503">https://dev.icinga.org/issues/3503</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jensschanz.de/?feed=rss2&#038;p=1709</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone Recovery-Modus</title>
		<link>http://blog.jensschanz.de/?p=1703</link>
		<comments>http://blog.jensschanz.de/?p=1703#comments</comments>
		<pubDate>Sun, 27 Jan 2013 18:13:05 +0000</pubDate>
		<dc:creator>Jens</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://blog.jensschanz.de/?p=1703</guid>
		<description><![CDATA[Weil ich gerade ein nicht richtig funktionierendes iPhone von einem der vielen Mods &#8220;befreien&#8221; musste. Die Anleitung wurde mit einem iPhone 3 und 4 getestet und funktioniert. Aktivierung “Restore mode” am iPhone Das iPhone an den PC (USB) anschließen und iTunes &#8230; <a href="http://blog.jensschanz.de/?p=1703">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Weil ich gerade ein nicht richtig funktionierendes iPhone von einem der vielen Mods &#8220;befreien&#8221; musste.</p>
<p>Die Anleitung wurde mit einem iPhone 3 und 4 getestet und funktioniert.</p>
<p>Aktivierung “Restore mode” am iPhone</p>
<ol>
<li>Das iPhone an den PC (USB) anschließen und iTunes öffnen</li>
<li>Power-Button (oben) und Home-Button (unten) gedrückt halten</li>
<li>Die Knöpfe gedrückt halten, damit das iPhone einen Neustart durchführt (Bildschirm schwarz)</li>
<li><strong>Erst wenn das Apfel-Logo erscheint, den Power-Button (oben) loslassen.</strong> Den Home-Button (unten) weiterhin gedrückt halten.</li>
<li>Nach ein paar Sekunden (~ 10) sollte jetzt ein iTunes- und ein Connector-Symbol zu sehen sein.</li>
<li>Jetzt sollte es in Windows Bing machen und die Installation der Gerätetreiber beginnen.</li>
<li>Ist die Installation beendet, meldet iTunes, dass ein iPhone zur Wiederherstellung gefunden wurde. Nach dem bestätigen wird wieder die originale Apple Firmware geladen.</li>
</ol>
<p>Voilà &#8230; Never touch a running closed source system &#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jensschanz.de/?feed=rss2&#038;p=1703</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>(SSH-)Login überwachen / QNAP / Debian</title>
		<link>http://blog.jensschanz.de/?p=1694</link>
		<comments>http://blog.jensschanz.de/?p=1694#comments</comments>
		<pubDate>Tue, 08 Jan 2013 19:31:37 +0000</pubDate>
		<dc:creator>Jens</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blog.jensschanz.de/?p=1694</guid>
		<description><![CDATA[Mal wieder ein bisschen Tech-Stuff zur Abwechslung. Viele kennen vermutlich das ungute Gefühl, wenn man einen Server mit aktiviertem SSH-Login im Internet hängen hat. Man weiß trotz Absicherung der SSH-Konfiguration und dem Einsatz von Fail2Ban oder ähnlichem nie genau, ob &#8230; <a href="http://blog.jensschanz.de/?p=1694">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Mal wieder ein bisschen Tech-Stuff zur Abwechslung.<br />
Viele kennen vermutlich das ungute Gefühl, wenn man einen Server mit aktiviertem SSH-Login im Internet hängen hat. Man weiß trotz Absicherung der SSH-Konfiguration und dem Einsatz von Fail2Ban oder ähnlichem nie genau, ob nicht doch irgendwo etwas schief geht. Ein etwas ungutes Gefühl hinterlassen stellenweise auch so genannte VServer welche bei diversen Unternehmen bezogen werden können.</p>
<p>Das folgende Skript bietet weder einen 100%igen Schutz noch kann es in allen Fällen einen Zugriff auf das System entdecken. Es bietet aber einen gute Basis um im Fall der Fälle vielleicht doch eine E-Mail zu bekommen um schnell zu reagieren.</p>
<p>Ich versuche mal die Einrichtung des Skripts anhand eines Debian-Servers und meiner QNAP zu beschreiben. In beiden Fällen funktioniert es bei mir problemlos. Kombiniert mit einem Dienst wie z.B. ifttt.com lassen sich aus den Mails auch SMS oder Telefonanrufe generieren.</p>
<h1>Debian</h1>
<p>Die Einrichtung unter Debian geht ziemlich einfach von statten. Normalerweise sollten alle benötigten Pakete (postfix, bsd-mailx) bereits installiert und funktionsfähig sein. Wenn nicht, kann auch die folgende Installation der QNAP mit nail als Mailer herangezogen werden.<br />
Mehr Informationen zum einrichten eines Mail-Servers unter Debian gibts z.B. hier:</p>
<p><a href="http://wiki.ubuntuusers.de/Postfix">http://wiki.ubuntuusers.de/Postfix</a></p>
<p>Im ersten Schritt wird ein Skript welches die benötigten Informationen sammelt irgendwo im Filesystem abgelegt. Für dieses Beispiel hier nennen wir das Skript einfachmal &#8220;alert.sh&#8221; und legen es nach &#8220;/usr/local/bin/&#8221;</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Login detected at <span style="color: #007800;">$(hostname)</span> / <span style="color: #007800;">$(date +%d.%m.%Y)</span> <span style="color: #007800;">$(date +%H:%M:%S)</span>&quot;</span>
<span style="color: #007800;">FROM</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$SSH_CONNECTION</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{ print $1 }'</span><span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Benutzer: <span style="color: #007800;">$USER</span>@<span style="color: #007800;">$FROM</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Uptime: &quot;</span>
<span style="color: #c20cb9; font-weight: bold;">uptime</span>
<span style="color: #7a0874; font-weight: bold;">echo</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Last Login Activity: &quot;</span>
<span style="color: #c20cb9; font-weight: bold;">last</span>
<span style="color: #7a0874; font-weight: bold;">echo</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Logged in Users: &quot;</span>
finger</pre></td></tr></table></div>

<p>Wer möchte kann dieses Skript natürlich nach seinen Wünschen anpassen und verbessern.<br />
Das Skript bekommt jetzt noch die passenden Rechte, damit es auch jeder Benutzer beim Login ausführen kann.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">755</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>alert.sh</pre></td></tr></table></div>

<p>Im &#8220;Normalfall&#8221; werden bei jedem Login die Profil-Daten gelesen. Erste Anlaufstelle ist meistens die /etc/profile. Genau da setzt der 2.Schritt dann an. Die Datei /etc/profile wird um folgendes erweitert:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">...
<span style="color: #666666; font-style: italic;"># send mail on successful login</span>
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>alert.sh <span style="color: #000000; font-weight: bold;">|</span> mailx <span style="color: #660033;">-s</span> <span style="color: #ff0000;">&quot;SSH Login at <span style="color: #007800;">$(hostname)</span> detected&quot;</span> mail<span style="color: #000000; font-weight: bold;">@</span>domain.de
...</pre></td></tr></table></div>

<h1>QNAP</h1>
<p>Auch auf den QNAP-Systemen lässt sich dieser Schritt vollziehen. Das Skript fällt an dieser Stelle aber etwas kürzer aus, da die Busybox der QNAP ziemlich sparsam bestückt ist und das IPKG-Paket z.B. Dinge wie &#8220;finger&#8221; oder &#8220;last&#8221; nicht mitliefert.<br />
Zuallererst brauchen wir auf der QNAP einen mailer. Hier bietet sich im Gegensatz zum Debian-Server nail an. nail kommt als IPKG-Paket mit und kann einfach angepasst werden.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">ipkg <span style="color: #c20cb9; font-weight: bold;">install</span> nail</pre></td></tr></table></div>

<p>Das Skript selbst kommt hier in einer minimalen Version</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Login detected at <span style="color: #007800;">$(hostname)</span> / <span style="color: #007800;">$(date +%d.%m.%Y)</span> <span style="color: #007800;">$(date +%H:%M:%S)</span>&quot;</span>
<span style="color: #007800;">FROM</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$SSH_CONNECTION</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{ print $1 }'</span><span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Benutzer: <span style="color: #007800;">$USER</span> @ <span style="color: #007800;">$FROM</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Uptime: &quot;</span>
<span style="color: #c20cb9; font-weight: bold;">uptime</span></pre></td></tr></table></div>

<p>Der Schritt mit der /etc/profile ist auch hier identisch, mit der Ausnahme, dass der Mailer mailx durch nail ersetzt wird.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># send mail on successful login</span>
<span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>catch <span style="color: #000000; font-weight: bold;">|</span> nail <span style="color: #660033;">-s</span> <span style="color: #ff0000;">&quot;SSH Login at <span style="color: #007800;">$(hostname)</span> detected&quot;</span> mail<span style="color: #000000; font-weight: bold;">@</span>domain.de</pre></td></tr></table></div>

<p>Damit nail auch noch ohne MTA den passenden Mailserver findet, kann dieser in der /opt/etc/nail.rc eingetragen werden:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">...
<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">smtp</span>=smtp:<span style="color: #000000; font-weight: bold;">//</span>smtp.domain.de
<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">from</span>=<span style="color: #ff0000;">&quot;qnap@domain.de (QNAP &amp;lt;MODELL&amp;gt;)&quot;</span>
<span style="color: #000000; font-weight: bold;">set</span> smtp-auth=<span style="color: #c20cb9; font-weight: bold;">login</span>
<span style="color: #000000; font-weight: bold;">set</span> smtp-auth-user=qnap
<span style="color: #000000; font-weight: bold;">set</span> smtp-auth-password=blubber123
...</pre></td></tr></table></div>

<p>Anschließend auch hier noch das Skript mit den passenden Rechten versorgen</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">775</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>alert.sh</pre></td></tr></table></div>

<h1>ACHTUNG</h1>
<p>Wie gesagt. Das Skript bietet nur rudimentäre Sicherheit. Es geht an dieser Stelle nichts über eine sinnvolle Härtung des Systems und sicheren Passwörtern oder Schlüsseln.<br />
Trotzdem bietet das Skript zumindest einen kleinen Informationswert und funktioniert auch bei Logins in virtuellen Umgebungen (z.B. &#8220;vzctl enter &lt;vid&gt; (OpenVZ)&#8221; oder &#8220;vserver &lt;vid&gt; enter&#8221;).<br />
Erfolgt der Zugriff allerdings direkt auf das Filesystem, in dem z.B . über den Root-Server<br />
auf das Verzeichnis oder Volume zugegriffen wird, passiert gar nichts.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jensschanz.de/?feed=rss2&#038;p=1694</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>#lastyear #bike #rockZ</title>
		<link>http://blog.jensschanz.de/?p=1689</link>
		<comments>http://blog.jensschanz.de/?p=1689#comments</comments>
		<pubDate>Tue, 01 Jan 2013 21:23:21 +0000</pubDate>
		<dc:creator>Jens</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[mount]]></category>
		<category><![CDATA[mountainbike]]></category>

		<guid isPermaLink="false">http://blog.jensschanz.de/?p=1689</guid>
		<description><![CDATA[Wird mal wieder Zeit für ein bisschen Mountainbike fahren. Das Wetter passt ja &#8230;]]></description>
				<content:encoded><![CDATA[<p>Wird mal wieder Zeit für ein bisschen Mountainbike fahren. Das Wetter passt ja &#8230; <img src='http://blog.jensschanz.de/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><a href="http://blog.jensschanz.de/wp-content/uploads/2013/01/Foto-2.jpg"><img class="alignleft size-full wp-image-1690" alt="Foto 2" src="http://blog.jensschanz.de/wp-content/uploads/2013/01/Foto-2.jpg" width="2592" height="1936" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jensschanz.de/?feed=rss2&#038;p=1689</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jetzt &#8230; #eoft</title>
		<link>http://blog.jensschanz.de/?p=1678</link>
		<comments>http://blog.jensschanz.de/?p=1678#comments</comments>
		<pubDate>Mon, 10 Dec 2012 06:39:00 +0000</pubDate>
		<dc:creator>Jens</dc:creator>
				<category><![CDATA[Allgemein]]></category>

		<guid isPermaLink="false">http://blog.jensschanz.de/?p=1678</guid>
		<description><![CDATA[]]></description>
				<content:encoded><![CDATA[<p><!-- This post is created by Instagrate to WordPress, a WordPress Plugin by polevaultweb.com - http://www.polevaultweb.com/plugins/instagrate-to-wordpress/ --><img src="http://blog.jensschanz.de/wp-content/uploads/2012/12/dfeede3e429311e2867a22000a9f1266_7.jpg" alt="Jetzt ... #eoft" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jensschanz.de/?feed=rss2&#038;p=1678</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Instagram Image</title>
		<link>http://blog.jensschanz.de/?p=1673</link>
		<comments>http://blog.jensschanz.de/?p=1673#comments</comments>
		<pubDate>Fri, 07 Dec 2012 21:14:23 +0000</pubDate>
		<dc:creator>Jens</dc:creator>
				<category><![CDATA[Allgemein]]></category>

		<guid isPermaLink="false">http://blog.jensschanz.de/?p=1673</guid>
		<description><![CDATA[]]></description>
				<content:encoded><![CDATA[<p><!-- This post is created by Instagrate to WordPress, a WordPress Plugin by polevaultweb.com - http://www.polevaultweb.com/plugins/instagrate-to-wordpress/ --><img src="http://blog.jensschanz.de/wp-content/uploads/2012/12/89cef3be40b211e28a3222000a9f17b2_7.jpg" alt="Instagram Image" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jensschanz.de/?feed=rss2&#038;p=1673</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>hpasmcli boot to PXE</title>
		<link>http://blog.jensschanz.de/?p=1668</link>
		<comments>http://blog.jensschanz.de/?p=1668#comments</comments>
		<pubDate>Tue, 06 Nov 2012 14:01:14 +0000</pubDate>
		<dc:creator>Jens</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[hp]]></category>
		<category><![CDATA[hpasmcli]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blog.jensschanz.de/?p=1668</guid>
		<description><![CDATA[Manchmal ist es nützlich, wenn man einem HP Proliant Server einfach sagen kann, dass er beim nächsten Boot per PXE booten soll. Gerade wenn man ein Firmware-Update per PXE einspielen will, erleichtert das die Arbeit ungemein, da man nicht mehr &#8230; <a href="http://blog.jensschanz.de/?p=1668">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Manchmal ist es nützlich, wenn man einem HP Proliant Server einfach sagen kann, dass er beim nächsten Boot per PXE booten soll. Gerade wenn man ein Firmware-Update per PXE einspielen will, erleichtert das die Arbeit ungemein, da man nicht mehr den Zeitpunkt für die Eingabe von F11 oder F12 im Boot-Screen abwarten muss.<br />
Der Server bootet also per PXE die Firmware, aktualisiert sich und bootet anschließend wieder normal per HDD. Feine Sache &#8230;</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">hpasmcli <span style="color: #660033;">-s</span> <span style="color: #ff0000;">&quot;SET BOOT ONCE PXE&quot;</span></pre></td></tr></table></div>

<p>Natürlich stehen auch andere Optionen noch zur Verfügung</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">	 SET BOOT FIRST <span style="color: #7a0874; font-weight: bold;">&#91;</span> CDROM <span style="color: #000000; font-weight: bold;">|</span> FLOPPY <span style="color: #000000; font-weight: bold;">|</span> HDD <span style="color: #000000; font-weight: bold;">|</span> PXE <span style="color: #000000; font-weight: bold;">|</span> USBKEY <span style="color: #7a0874; font-weight: bold;">&#93;</span>
	 SET BOOT ONCE <span style="color: #7a0874; font-weight: bold;">&#91;</span> CDROM <span style="color: #000000; font-weight: bold;">|</span> FLOPPY <span style="color: #000000; font-weight: bold;">|</span> HDD <span style="color: #000000; font-weight: bold;">|</span> PXE <span style="color: #000000; font-weight: bold;">|</span> RBSU <span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.jensschanz.de/?feed=rss2&#038;p=1668</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Icinga Check-Latency und die Rolle der idotuils, bzw. Datenbank</title>
		<link>http://blog.jensschanz.de/?p=1664</link>
		<comments>http://blog.jensschanz.de/?p=1664#comments</comments>
		<pubDate>Tue, 06 Nov 2012 08:07:37 +0000</pubDate>
		<dc:creator>Jens</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[icinga]]></category>

		<guid isPermaLink="false">http://blog.jensschanz.de/?p=1664</guid>
		<description><![CDATA[Wir haben ein Problem. Besser gesagt, wir hatten ein Problem. Seit einiger Zeit stieg die Latency in unserem Icinga-System kontinuierlich an. Zuerst hatten wir das Upgrade auf die Version 1.8.0 ein Stück weit im Verdacht. Mittlerweile hat sich aber herausgestellt, &#8230; <a href="http://blog.jensschanz.de/?p=1664">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Wir haben ein Problem. Besser gesagt, wir hatten ein Problem. Seit einiger Zeit stieg die Latency in unserem Icinga-System kontinuierlich an. Zuerst hatten wir das Upgrade auf die Version 1.8.0 ein Stück weit im Verdacht. Mittlerweile hat sich aber herausgestellt, dass die Performance der Datenbank eine unmittelbare Auswirkung auf die Performance des gesamten Icinga-Systems hat.<br />
Um das genauer zu erklären, muss erwähnt werden, dass wir für unsere Produktionsumgebung aus &#8220;Sicherheitsgründen&#8221; eine MySQL-Multi-Master Replikation einsetzen. Verwaltet wird diese Replikation über den <a href="http://mysql-mmm.org/">Multi-Master Replication Manager<br />
</a>Dieser sorgt dafür, dass eine Writer-Rolle und 2 Reader-Rollen immer passend über 2 Datenbanken gemappt werden. Zusätzlich wir damit vermieden, dass gleichzeitig in beide Datenbank geschrieben werden kann. Da wir den &#8220;Slave&#8221; bewusst nur für den Notfall ausgelegt haben, verfügt dieser natürlich nicht mal annähernd über die Ressourcen des eigentlichen Master-Systems:</p>
<p><strong>&#8220;Slave&#8221;</strong></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">Smart Array P410i <span style="color: #000000; font-weight: bold;">in</span> Slot <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>Embedded<span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
   array A
&nbsp;
      physicaldrive 1I:<span style="color: #000000;">1</span>:<span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>port 1I:box <span style="color: #000000;">1</span>:bay <span style="color: #000000;">1</span>, SAS, <span style="color: #000000;">300</span> GB, OK<span style="color: #7a0874; font-weight: bold;">&#41;</span>
      physicaldrive 2I:<span style="color: #000000;">1</span>:<span style="color: #000000;">5</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>port 2I:box <span style="color: #000000;">1</span>:bay <span style="color: #000000;">5</span>, SAS, <span style="color: #000000;">300</span> GB, OK<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></td></tr></table></div>

<p><strong>&#8220;Master&#8221;</strong></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">Smart Array P400 <span style="color: #000000; font-weight: bold;">in</span> Slot <span style="color: #000000;">1</span>
&nbsp;
   array A
&nbsp;
      physicaldrive 1I:<span style="color: #000000;">1</span>:<span style="color: #000000;">5</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>port 1I:box <span style="color: #000000;">1</span>:bay <span style="color: #000000;">5</span>, SAS, <span style="color: #000000;">146</span> GB, OK<span style="color: #7a0874; font-weight: bold;">&#41;</span>
      physicaldrive 1I:<span style="color: #000000;">1</span>:<span style="color: #000000;">6</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>port 1I:box <span style="color: #000000;">1</span>:bay <span style="color: #000000;">6</span>, SAS, <span style="color: #000000;">146</span> GB, OK<span style="color: #7a0874; font-weight: bold;">&#41;</span>
      physicaldrive 1I:<span style="color: #000000;">1</span>:<span style="color: #000000;">7</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>port 1I:box <span style="color: #000000;">1</span>:bay <span style="color: #000000;">7</span>, SAS, <span style="color: #000000;">146</span> GB, OK<span style="color: #7a0874; font-weight: bold;">&#41;</span>
      physicaldrive 1I:<span style="color: #000000;">1</span>:<span style="color: #000000;">8</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>port 1I:box <span style="color: #000000;">1</span>:bay <span style="color: #000000;">8</span>, SAS, <span style="color: #000000;">146</span> GB, OK<span style="color: #7a0874; font-weight: bold;">&#41;</span>
      physicaldrive 2I:<span style="color: #000000;">1</span>:<span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>port 2I:box <span style="color: #000000;">1</span>:bay <span style="color: #000000;">1</span>, SAS, <span style="color: #000000;">146</span> GB, OK<span style="color: #7a0874; font-weight: bold;">&#41;</span>
      physicaldrive 2I:<span style="color: #000000;">1</span>:<span style="color: #000000;">2</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>port 2I:box <span style="color: #000000;">1</span>:bay <span style="color: #000000;">2</span>, SAS, <span style="color: #000000;">146</span> GB, OK<span style="color: #7a0874; font-weight: bold;">&#41;</span>
      physicaldrive 2I:<span style="color: #000000;">1</span>:<span style="color: #000000;">3</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>port 2I:box <span style="color: #000000;">1</span>:bay <span style="color: #000000;">3</span>, SAS, <span style="color: #000000;">146</span> GB, OK<span style="color: #7a0874; font-weight: bold;">&#41;</span>
      physicaldrive 2I:<span style="color: #000000;">1</span>:<span style="color: #000000;">4</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>port 2I:box <span style="color: #000000;">1</span>:bay <span style="color: #000000;">4</span>, SAS, <span style="color: #000000;">146</span> GB, OK<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></td></tr></table></div>

<p>Was mit der Check-Latency passiert, wenn jetzt unbemerkt ein Switch der Writer-Adresse auf das eigentliche Slave-System passiert, kann man hier erkennen:<a href="http://blog.jensschanz.de/wp-content/uploads/2012/11/latency.png"><img class="alignleft size-full wp-image-1665" title="latency" src="http://blog.jensschanz.de/wp-content/uploads/2012/11/latency.png" alt="" width="847" height="565" /></a></p>
<p>Deutlich wird das Dillema, da gleichzeitig mit dem Anstieg der Latency die Inserts in der Datenbank drastisch zurückgehen.<a href="http://blog.jensschanz.de/wp-content/uploads/2012/11/mysql_insert-month.png"><img class="alignleft size-full wp-image-1666" title="mysql_insert-month" src="http://blog.jensschanz.de/wp-content/uploads/2012/11/mysql_insert-month.png" alt="" width="481" height="292" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Beim Switch auf das leistungsschwächere System (2 Platten im RAID10-Verbund) reduziert sich die Anzahl der maximalen Inserts von ursprünglich konstanten 240 Inserts/Sekunde auf einen Wert zwischen 40 und maximal 120 Inserts/Sekunde.<br />
Dies bedeutet eine Änderungen von den bisherigen ca. 7 Sekunden Check-Latency auf einen Wert um die 300 Sekunden.</p>
<p>Wir haben es jetzt sicherheitshalber einfach mal wieder zurückgestellt, da uns die Check-Latency von knapp 7 Sekunden im Schnitt besser gefällt.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jensschanz.de/?feed=rss2&#038;p=1664</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BUG: Icinga Reporting 1.8.0 (./configure: line 1682: AM_INIT_AUTOMAKE: command not found)</title>
		<link>http://blog.jensschanz.de/?p=1661</link>
		<comments>http://blog.jensschanz.de/?p=1661#comments</comments>
		<pubDate>Fri, 19 Oct 2012 09:37:53 +0000</pubDate>
		<dc:creator>Jens</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[icinga]]></category>
		<category><![CDATA[icinga reporting]]></category>

		<guid isPermaLink="false">http://blog.jensschanz.de/?p=1661</guid>
		<description><![CDATA[https://dev.icinga.org/issues/3313 Beschreibung Configure of icinga-reports-1.8.0 throws the following error: root@localhost:/usr/src/icinga-reports-1.8.0# ./configure &#8211;with-jasper-server=/opt/jasperreports-server-cp-4.7.0 ./configure: line 1682: AM_INIT_AUTOMAKE: command not found checking build system type&#8230; x86_64-unknown-linux-gnu checking host system type&#8230; x86_64-unknown-linux-gnu checking for jasperserver&#8230; configure: creating ./config.status config.status: creating Makefile The fix &#8230; <a href="http://blog.jensschanz.de/?p=1661">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><a href="https://dev.icinga.org/issues/3313">https://dev.icinga.org/issues/3313</a></p>
<blockquote><p><strong>Beschreibung</strong></p></blockquote>
<div>
<blockquote><p>Configure of icinga-reports-1.8.0 throws the following error:</p>
<p>root@localhost:/usr/src/icinga-reports-1.8.0# ./configure &#8211;with-jasper-server=/opt/jasperreports-server-cp-4.7.0<br />
./configure: line 1682: AM_INIT_AUTOMAKE: command not found<br />
checking build system type&#8230; x86_64-unknown-linux-gnu<br />
checking host system type&#8230; x86_64-unknown-linux-gnu<br />
checking for jasperserver&#8230; configure: creating ./config.status<br />
config.status: creating Makefile</p>
<p>The fix provided in Bug <a title="Can't compile icinga-reports-1.7.0 on Ubuntu-12.04 (Resolved)" href="https://dev.icinga.org/issues/2623">#2623</a> works here too -&gt; <a href="https://git.icinga.org/?p=icinga-reports.git;a=commit;h=c4e2d2b686eada065066b36bf5080640e0f58cbf">https://git.icinga.org/?p=icinga-reports.git;a=commit;h=c4e2d2b686eada065066b36bf5080640e0f58cbf</a></p>
<p>root@localhost:/usr/src/icinga-reports-1.8.0# rm configure<br />
root@localhost:/usr/src/icinga-reports-1.8.0# aclocal<br />
root@localhost:/usr/src/icinga-reports-1.8.0# autoconf<br />
root@localhost:/usr/src/icinga-reports-1.8.0# ./configure &#8211;with-jasper-server=/opt/jasperreports-server-cp-4.7.0<br />
checking for a BSD-compatible install&#8230; /usr/bin/install -c<br />
checking whether build environment is sane&#8230; yes<br />
checking for a thread-safe mkdir -p&#8230; /bin/mkdir -p<br />
checking for gawk&#8230; no<br />
checking for mawk&#8230; mawk<br />
checking whether make sets $(MAKE)&#8230; yes<br />
checking build system type&#8230; x86_64-unknown-linux-gnu<br />
checking host system type&#8230; x86_64-unknown-linux-gnu<br />
checking for jasperserver&#8230; configure: creating ./config.status<br />
config.status: creating Makefile</p>
<p>Maybee it&#8217;s better to provide an install.sh for this which creates the configure script in the local environment.</p></blockquote>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.jensschanz.de/?feed=rss2&#038;p=1661</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
