<?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>Alonso.ch &#187; Lenny</title>
	<atom:link href="http://blog.alonso.ch/tag/lenny/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.alonso.ch</link>
	<description>Nonsport Blog</description>
	<lastBuildDate>Wed, 01 Feb 2012 08:33:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Cowsay &#8211; Ascii Spass für die Konsole</title>
		<link>http://blog.alonso.ch/paste-bin/cowsay-ascii-spass-fur-die-konsole/</link>
		<comments>http://blog.alonso.ch/paste-bin/cowsay-ascii-spass-fur-die-konsole/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 00:55:56 +0000</pubDate>
		<dc:creator>Alonso</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[paste.bin]]></category>
		<category><![CDATA[ASCII]]></category>
		<category><![CDATA[Lenny]]></category>

		<guid isPermaLink="false">http://blog.alonso.ch/?p=57</guid>
		<description><![CDATA[Cowsay (bzw. Cowthink) erstellt ein paar simple ASCII-Grafiken auf der Konsole mit einem beliebigen Textinhalt. Könnte man z.B. benutzen um MOTD-Banner zu erstellen, oder die Benutzer über die .bashrc auf eine spezielle Art und Weise zu begrüssen. Installation unter Debian Lenny: apt-get install cowsay ln -s /usr/games/cowsay /usr/bin/cowsay Das wars eigentlich schon. Ein erster Test: [...]]]></description>
			<content:encoded><![CDATA[<p>Cowsay (bzw. Cowthink) erstellt ein paar simple ASCII-Grafiken auf der Konsole mit einem beliebigen Textinhalt. Könnte man z.B. benutzen um MOTD-Banner zu erstellen, oder die Benutzer über die .bashrc auf eine spezielle Art und Weise zu begrüssen.<br />
<span id="more-57"></span><br />
Installation unter Debian Lenny:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> cowsay
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>games<span style="color: #000000; font-weight: bold;">/</span>cowsay <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>cowsay</pre></div></div>

<p>Das wars eigentlich schon.</p>
<p>Ein erster Test:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">cowsay <span style="color: #ff0000;">&quot;blog.alonso.ch&quot;</span></pre></div></div>

<p>Müsste zu folgendem Resultat führen:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"> ________________
&lt; blog.alonso.ch &gt;
 ----------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||</pre></div></div>

<p>Unter <em>/usr/share/cowsay/cows/</em> sind ausserdem diverse Templates vorhanden, welche alternativ über den Parameter -f verwendet werden können.</p>
<p>Ein weiteres Beispiel:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">cowsay <span style="color: #660033;">-f</span> bunny <span style="color: #ff0000;">&quot;blog.alonso.ch&quot;</span></pre></div></div>

<p>Müsste zu folgendem Resultat führen:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"> ________________
&lt; blog.alonso.ch &gt;
 ----------------
  \
   \   \
        \ /\
        ( )
      .( o ).</pre></div></div>

<p>Natürlich kann die Kuh auch über die Pipe gefüttert werden.</p>
<p>Ein letztes Beispiel:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>meminfo <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> MemFree <span style="color: #000000; font-weight: bold;">|</span> cowsay <span style="color: #660033;">-f</span> tux</pre></div></div>

<p>Müsste zu folgendem Resultat führen:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">  ____________________
&lt; MemFree: 369624 kB &gt;
 --------------------
   \
    \
        .--.
       |o_o |
       |:_/ |
      //   \ \
     (|     | )
    /'\_   _/`\
    \___)=(___/</pre></div></div>

<p>Natürlich kann die Kuh noch viel mehr, siehe Manpage</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.alonso.ch/paste-bin/cowsay-ascii-spass-fur-die-konsole/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quickstart: Nagios3 auf Debian Lenny installieren</title>
		<link>http://blog.alonso.ch/tech/nagios/quickstart-nagios3-auf-debian-lenny-installieren/</link>
		<comments>http://blog.alonso.ch/tech/nagios/quickstart-nagios3-auf-debian-lenny-installieren/#comments</comments>
		<pubDate>Sun, 20 Dec 2009 15:49:38 +0000</pubDate>
		<dc:creator>Alonso</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[Lenny]]></category>

		<guid isPermaLink="false">http://blog.alonso.ch/?p=10</guid>
		<description><![CDATA[Die Basisinstallation von Nagios3 unter Debian Lenny ist eigentlich keine grosse Herausforderung und innert Minuten erledigt. Die Anforderungen: Betriebsfähiges Debian Lenny (32 oder 64Bit) mit intaktem Netzwerksetup Konsole oder SSH Zugang mit Root-Account ca. 200MB freier Speicherplatz (/usr, /var) Texteditor (z.B. vim) Die Installation kann direkt über die Packete aus dem Repository gestartet werden: apt-get [...]]]></description>
			<content:encoded><![CDATA[<p>Die Basisinstallation von Nagios3 unter Debian Lenny ist eigentlich keine grosse Herausforderung und innert Minuten erledigt.</p>
<p>Die Anforderungen:</p>
<ol>
<li>Betriebsfähiges Debian Lenny (32 oder 64Bit) mit intaktem Netzwerksetup</li>
<li>Konsole oder SSH Zugang mit Root-Account</li>
<li>ca. 200MB freier Speicherplatz (/usr, /var)</li>
<li>Texteditor (z.B. vim)</li>
</ol>
<p><span id="more-10"></span></p>
<p>Die Installation kann direkt über die Packete aus dem Repository gestartet werden:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> nagios3 apache2</pre></div></div>

<p>(Durch die Packetabhängigkeiten werden alle notwendigen Packete automatisch mitinstalliert)</p>
<p>Damit ist schon ein beachtlicher Teil der Installation erledigt. Nun braucht es noch ein paar kleine Anpassungen.</p>
<p>Die Nagios-Konfiguration ist weitgehend unter /etc/nagios3 zu finden. Dort brauchen wir als erstes nun einen gültigen User für die HTTP-Autentifizierung.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>nagios3
htpasswd <span style="color: #660033;">-c</span> htpasswd.users IHRBENUTZERNAME</pre></div></div>

<p>Danach wird das Passwort abgefragt. Mit diese Kombination aus User/Passwort können wir uns anschliessend auf unserer Nagios-Installation anmelden.</p>
<p>Als nächstes sollten wir nun die external commands aktivieren. Dadurch können wir direkt über Weboberfläche die Alarmierung aktivieren/deaktivieren.</p>
<p>Dazu bearbeiten wir die nagios.cfg:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>nagios3<span style="color: #000000; font-weight: bold;">/</span>nagios.cfg</pre></div></div>

<p>Dort suchen wir uns folgende Zeile:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">check_external_commands=0</pre></div></div>

<p>Diese aktivieren wir durch ändern dieses Wertes auf 1:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">check_external_commands=1</pre></div></div>

<p>Danach müssen noch die Berechtigungen auf dem Filesystem angepasst werden, wa wir sonst diesen Fehler erhalten:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Error: Could not stat() command file '/var/lib/nagios3/rw/nagios.cmd'!</pre></div></div>

<p>Dies können wir relativ einfach beheben durch:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>nagios3<span style="color: #000000; font-weight: bold;">/</span>rw<span style="color: #000000; font-weight: bold;">/</span>nagios.cmd
dpkg-statoverride <span style="color: #660033;">--update</span> <span style="color: #660033;">--add</span> nagios www-data <span style="color: #000000;">2710</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>nagios3<span style="color: #000000; font-weight: bold;">/</span>rw
dpkg-statoverride <span style="color: #660033;">--update</span> <span style="color: #660033;">--add</span> nagios nagios <span style="color: #000000;">751</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>nagios3
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>nagios3 restart</pre></div></div>

<p>Das wars. Nun sollten sie unter http://NAGIOSIP/nagios3 auf ihr soeben installiertes Nagios zugreiffen können. </p>
<p>Natürlich braucht unser Nagios danach noch eine <a href="http://blog.alonso.ch/tech/nagios-basiskonfiguration/">Konfiguration</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.alonso.ch/tech/nagios/quickstart-nagios3-auf-debian-lenny-installieren/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

