<?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>sperrgebiet&#039;s world &#187; Nabaztag</title>
	<atom:link href="http://www.sperrgebiet.org/tag/nabaztag/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sperrgebiet.org</link>
	<description>penguins (and ducks) are friends, no food</description>
	<lastBuildDate>Sun, 22 Aug 2010 12:38:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Nabaztag as a MPCB (Music Playback Control Bunny)</title>
		<link>http://www.sperrgebiet.org/2010/08/nabaztag-as-a-mpcb-music-playback-control-bunny/</link>
		<comments>http://www.sperrgebiet.org/2010/08/nabaztag-as-a-mpcb-music-playback-control-bunny/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 22:53:49 +0000</pubDate>
		<dc:creator>Hans</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Nabaztag]]></category>
		<category><![CDATA[Winamp]]></category>

		<guid isPermaLink="false">http://www.sperrgebiet.org/?p=335</guid>
		<description><![CDATA[Listen to music on a computer is quite nice. Specially with a new JBL Creature III Sound System J But how to Stop/Start the playback in a cool way? I mean, just to click Play/Stop is so &#8220;old-fashion&#8221;. Puh, I though it&#8217;s time for a new purpose of my Nabaztag-Bunnies. So I&#8217;ve solved this problem&#8230;]]></description>
			<content:encoded><![CDATA[<p>Listen to music on a computer is quite nice. Specially with a new JBL Creature III Sound System <span style="font-family:Wingdings">J</span> But how to Stop/Start the playback in a cool way? I mean, just to click Play/Stop is so &#8220;old-fashion&#8221;.
</p>
<p>Puh, I though it&#8217;s time for a new purpose of my Nabaztag-Bunnies. So I&#8217;ve solved this problem with the following steps. You can see the result at: <a href="http://www.youtube.com/watch?v=DyhCD34xJNo">http://www.youtube.com/watch?v=DyhCD34xJNo</a>
	</p>
<p>
 </p>
<p>First and the most important part: Winamp. Furthermore I need something to easily access the controls of it. So I&#8217;ve found a very cool plugin called Winamp Web Interface (v.7.5.10).
</p>
<p><img src="http://www.sperrgebiet.org/wp-content/uploads/2010/08/080510_2253_Nabaztagasa1.png" alt=""/>
	</p>
<p>
 </p>
<p>This minimalistic web interface is also cool on the Mobile. Tested it with HTC HD Mini and HTC Touch Diamond (Win Mobile 6.5 and Win Mobile 6.1) <span style="font-family:Wingdings">J</span>
	</p>
<p>But it isn&#8217;t useable for Nabaztag <span style="font-family:Wingdings">L</span>
	</p>
<p>So first I started to write a small PHP Script which parses the output of the &#8216;original&#8217; Web Interface and provide me a smaller and easier view.  OK, I have not the full functionality, but because I can control it with GET-Requests it&#8217;s easier to handle with Nabaztag.
</p>
<p><img src="http://www.sperrgebiet.org/wp-content/uploads/2010/08/080510_2253_Nabaztagasa2.png" alt=""/>
	</p>
<p>
 </p>
<p>So, I have included also a small logic which queries the current status and if the playback is stopped it will be started and vice versa. So it&#8217;s possible to use the same URL for Nabaztag, because there I can use configure a simple URL where it will execute a GET on it.
</p>
<p><img src="http://www.sperrgebiet.org/wp-content/uploads/2010/08/080510_2253_Nabaztagasa3.png" alt=""/>
	</p>
<p>So basically when a Nano:ztag (the little Bunnies) come in the near of the real Nabaztag&#8217;s it&#8217;s sending a GET-Request to the above URL with a parameter. If this parameter is specified I send a GET from PHP to the Winamp-Webserver, parse the Output and so I&#8217;ll find out which is the current state. And whatever state it is, I make a new GET to the Winamp-Webserver with the opposite task <img src='http://www.sperrgebiet.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />
</p>
<p>So all in all quite simple <span style="font-family:Wingdings">J</span>
	</p>
<p>
 </p>
<p>I&#8217;ll attach the PHP-Script later on. But I think I should rewrite it. Currently it&#8217;s not a nice coding style <img src='http://www.sperrgebiet.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />
</p>
<p>So let the force be with you <span style="font-family:Wingdings">J</span>
	</p>
<p>_Hans</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sperrgebiet.org/2010/08/nabaztag-as-a-mpcb-music-playback-control-bunny/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nabaztag tells you your Nagios/Icinga status</title>
		<link>http://www.sperrgebiet.org/2010/02/nabaztag-tells-you-your-nagiosicinga-status/</link>
		<comments>http://www.sperrgebiet.org/2010/02/nabaztag-tells-you-your-nagiosicinga-status/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 02:23:49 +0000</pubDate>
		<dc:creator>Hans</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Icinga]]></category>
		<category><![CDATA[Nabaztag]]></category>
		<category><![CDATA[Nagios]]></category>

		<guid isPermaLink="false">http://www.sperrgebiet.org/?p=146</guid>
		<description><![CDATA[I thought it&#8217;s a good idea to use Nabaztag also for a regular status message about the host and service state. Based on my other script notify-by-nabaztag.php (see this post)  i&#8217;ve wrote another little PHP-Script which gets the Nagios/Icinga Status from the nagiostats/icingastats utility and use my notify-by-nabaztag.php to send out a status message. Here&#8230;]]></description>
			<content:encoded><![CDATA[<p>I thought it&#8217;s a good idea to use Nabaztag also for a regular status message about the host and service state.</p>
<p>Based on my other script notify-by-nabaztag.php (<a href="http://www.sperrgebiet.org/2010/02/nagiosicinga-meets-nabaztag/">see this post</a>)  i&#8217;ve wrote another little PHP-Script which gets the Nagios/Icinga Status from the nagiostats/icingastats utility and use my notify-by-nabaztag.php to send out a status message. Here it is: <a href="http://www.sperrgebiet.org/wp-content/uploads/2010/02/status2nabaztag.txt">status2nabaztag.php</a></p>
<p>There are just a few steps to get up and running:</p>
<p>1. Grap my notify-by-nabaztag.php and the status2nabaztag.php scripts</p>
<blockquote><p><span style="FONT-SIZE: 10pt"><span style="FONT-FAMILY: Consolas">wget </span></span><span style="FONT-SIZE: 10pt"><span style="FONT-FAMILY: Consolas">http://www.sperrgebiet.org/wp-content/uploads/2010/02/notify-by-nabaztag.txt -O  /usr/local/icinga/libexec/notify-by-nabaztag.php</span></span></p></blockquote>
<blockquote><p><span style="FONT-SIZE: 10pt"><span style="FONT-FAMILY: Consolas">wget </span></span><span style="FONT-SIZE: 10pt"><span style="FONT-FAMILY: Consolas"><span style="FONT-SIZE: 10pt"><span style="FONT-FAMILY: Consolas">http://www.sperrgebiet.org/wp-content/uploads/2010/02/status2nabaztag.txt -O  /usr/local/icinga/bin/status2nabaztag.php</span></span></span></span></p></blockquote>
<p><span style="FONT-SIZE: 10pt"><span style="FONT-FAMILY: Consolas"><span style="FONT-SIZE: 10pt"><span style="FONT-FAMILY: Consolas">2. Change, if required, paths to the binaries. Specially $stats &amp; $php</span></span></span></span></p>
<p><span style="FONT-SIZE: 10pt"><span style="FONT-FAMILY: Consolas"><span style="FONT-SIZE: 10pt"><span style="FONT-FAMILY: Consolas">3. Test it <img src='http://www.sperrgebiet.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </span></span></span></span><span style="FONT-SIZE: 10pt"><span style="FONT-FAMILY: Consolas"><span style="FONT-SIZE: 10pt"><span style="FONT-FAMILY: Consolas"> </span></span></span></span></p>
<blockquote><p><span style="FONT-SIZE: 10pt"><span style="FONT-FAMILY: Consolas"><span style="FONT-SIZE: 10pt"><span style="FONT-FAMILY: Consolas">php /usr/local/icinga/bin/status2nabaztag.php</span></span></span></span><span style="FONT-SIZE: 10pt"><span style="FONT-FAMILY: Consolas"><span style="FONT-SIZE: 10pt"><span style="FONT-FAMILY: Consolas"> </span></span></span></span></p></blockquote>
<p>4. Assuming everything worked as expected you can add an entry to your crontab to regulary executes the script. I know, it would be a nicer to use the Nagios/Icinga timeperiod-definitions, but the crontab-entry is easier <img src='http://www.sperrgebiet.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
<span style="FONT-SIZE: 10pt"><span style="FONT-FAMILY: Consolas"></p>
<blockquote><p>vim /etc/crontab</p>
<p>0 6-23 * * *    root    /usr/bin/php /usr/local/icinga/bin/status2nabaztag.php</p></blockquote>
<p>This cron entry will executes the script every day between 6am and 11pm.</p>
<p></span>It&#8217;s just a short post, but i think the script should be self explaining too. Furthermore it&#8217;s quite late/early, so i&#8217;ll try to get some sleep because i have to get up in 3hours <img src='http://www.sperrgebiet.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Hope this script is useful too. Please let me know if you have any troubles to get it running.</p>
<p>Remember: In god we trust, the rest we monitor <img src='http://www.sperrgebiet.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <a href="http://www.sperrgebiet.org/wp-content/uploads/2010/02/status2nabaztag.txt"><br />
</a></p>
<p></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sperrgebiet.org/2010/02/nabaztag-tells-you-your-nagiosicinga-status/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Nagios/Icinga meets Nabaztag</title>
		<link>http://www.sperrgebiet.org/2010/02/nagiosicinga-meets-nabaztag/</link>
		<comments>http://www.sperrgebiet.org/2010/02/nagiosicinga-meets-nabaztag/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 23:25:46 +0000</pubDate>
		<dc:creator>Hans</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Icinga]]></category>
		<category><![CDATA[Nabaztag]]></category>
		<category><![CDATA[Nagios]]></category>

		<guid isPermaLink="false">http://www.sperrgebiet.org/?p=134</guid>
		<description><![CDATA[Since i have my Nabaztag-Bunny i ever wanted to use it for my Icinga notifications. I&#8217;ve found a perl script on the internet. But that one just sent out a message and not used LED flashing or ear movements also provided by the Nabaztag-API. So I&#8217;ve wrote my own notification script in PHP. You can download&#8230;]]></description>
			<content:encoded><![CDATA[<p><span style="font-family:Georgia; font-size:10pt">Since i have my <a href="http://www.nabaztag.com/" target="_blank">Nabaztag</a>-Bunny i ever wanted to use it for my <a href="http://www.icinga.org" target="_blank">Icinga</a> notifications. I&#8217;ve found a perl script on the internet. But that one just sent out a message and not used LED flashing or ear movements also provided by the <a href="http://doc.nabaztag.com/api/home.html" target="_blank">Nabaztag-API</a>.<br />
</span></p>
<p><span style="font-family:Georgia; font-size:10pt">So I&#8217;ve wrote my own notification script in PHP. You can download it here: <a href="http://www.sperrgebiet.org/wp-content/uploads/2010/02/notify-by-nabaztag.txt"><span style="color: #0000ff; text-decoration: underline;">notify-by-nabaztag.php</span></a></span><span style="font-family:Georgia; font-size:10pt"><span style="color: #0000ff; text-decoration: underline;"> </span></span></p>
<p>You can watch a video demonstrating it in action here in the following embedded Windows Media Player or at <a href="http://www.youtube.com/watch?v=Tx4EpTLMBV0" target="_blank">YouTube</a></p>
<p><object classid="clsid:6bf52a52-394a-11d3-b153-00c04f79faa6" width="640" height="480" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"><param name="autostart" value="false" /><param name="url" value="http://www.sperrgebiet.org/wp-content/uploads/2010/02/notify-by-nabaztag_en.wmv" /><param name="src" value="http://www.sperrgebiet.org/wp-content/uploads/2010/02/notify-by-nabaztag_en.wmv" /><embed type="application/x-mplayer2" width="640" height="480" src="http://www.sperrgebiet.org/wp-content/uploads/2010/02/notify-by-nabaztag_en.wmv" url="http://www.sperrgebiet.org/wp-content/uploads/2010/02/notify-by-nabaztag_en.wmv" autostart="false"></embed></object></p>
<p><span style="font-family:Georgia; font-size:10pt">The script is quite simple. It&#8217;s need two arguments. The first one is the message for the TTL (text-to-speech) and the second one is the &#8220;notification type&#8221;. The notification type is either the service or host state (OK, WARNING, CRITICAL, UNKNOWN, UP, DOWN, UNREACHABLE).<br />
</span><br />
<span style="font-family:Georgia; font-size:10pt">Depending on the notification type the bunny is flashing in a different color and moves it&#8217;s ears to another position:<br />
</span></p>
<table border="0">
<tbody>
<tr>
<td>OK/UP:</td>
<td>flashing green, ears going up</td>
</tr>
<tr>
<td>WARNING:</td>
<td>flashing yellow, both ears are moved to the front with an angle of 45°</td>
</tr>
<tr>
<td>CRITICAL/DOWN:</td>
<td>flashing red, ears going down</td>
</tr>
<tr>
<td>UNKNOWN/UNREACHABLE:</td>
<td>flashing blue, one ear to the front, one to the back, each with an angle of 45°</td>
</tr>
</tbody>
</table>
<p><span style="font-family:Georgia; font-size:10pt">You can configure the voice which should be used inside the script. I propose to use a US/UK one because the states are in English too. I think the script should be self-explaining. If not, just leave an comment.<br />
</span></p>
<p><span style="font-family:Georgia; font-size:10pt">When you already have Nagios/Icinga up and running you should also know how to add an new notification command. Otherwise here are the basic steps (assuming you are running Icinga within /usr/local/icinga):<br />
</span></p>
<p><span style="font-family:Georgia; font-size:10pt">1. We need php-cli installed so we can run the script on the CLI. Depending on your distro run on of the following commands</span></p>
<blockquote><p><span style="font-family:Georgia; font-size:10pt"> </span><span style="font-family:Consolas; font-size:10pt">aptitude install php-cli<br />
</span><span style="font-family:Georgia">or<br />
</span><span style="font-family:Consolas; font-size:10pt">yum install php-cli</span></p></blockquote>
<p><span style="font-size:10pt"><span style="font-family:Georgia">2. Download the script to your libexec-Directory:</span></span></p>
<blockquote><p><span style="font-size:10pt"><span style="font-family:Consolas">wget <a href="http://www.sperrgebiet.org/wp-content/uploads/2010/02/notify-by-nabaztag.txt -O /usr/local/icinga/libexec/notify-by-nabaztag.php">http://www.sperrgebiet.org/wp-content/uploads/2010/02/notify-by-nabaztag.txt -O /usr/local/icinga/libexec/notify-by-nabaztag.php</a><br />
</span></span></p></blockquote>
<p><span style="font-size:10pt"> </span></p>
<p> </p>
<p><span style="font-family:Georgia; font-size:10pt">3. Add a host and service notification command. If you want a more detailed output just add it to the right position. You&#8217;ll find all available Macros at <a href="http://nagios.sourceforge.net/docs/3_0/macrolist.html" target="_blank">http://nagios.sourceforge.net/docs/3_0/macrolist.html</a></span></p>
<blockquote><p><span style="font-family:Consolas; font-size:10pt">vim /usr/local/icinga/etc/objects/commands.cfg<br />
</span></p></blockquote>
<blockquote><p><span style="font-family:Consolas; font-size:10pt"># &#8216;notify-service-by-nabaztag&#8217; command<br />
define command{<br />
command_name notify-service-by-nabaztag<br />
command_line /usr/bin/php $USER1$/notify-by-nabaztag.php &#8220;Monitoring Notification: $NOTIFICATIONTYPE$ on $HOSTNAME$ (Hostalias is $HOSTALIAS$) with Service: $SERVICEDESC$. Current servicestate is $SERVICESTATE$&#8221; $SERVICESTATE$<br />
}<br />
</span></p></blockquote>
<blockquote><p><span style="font-family:Consolas; font-size:10pt"># &#8216;notify-host-by-nabaztag&#8217; command<br />
define command{<br />
command_name notify-host-by-nabaztag<br />
command_line /usr/bin/php $USER1$/notify-by-nabaztag.php &#8220;Monitoring Notification: $NOTIFICATIONTYPE$ on $HOSTNAME$ (Hostalias is $HOSTALIAS$). Hoststate is $HOSTSTATE$&#8221; $HOSTSTATE$<br />
}<br />
</span></p></blockquote>
<p><span style="font-family:Georgia; font-size:10pt">4. I&#8217;ve created a new time period, because I don&#8217;t want that my bunny is talking to me during the night <img src='http://www.sperrgebiet.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
</span></p>
<blockquote><p><span style="font-family:Consolas; font-size:10pt">vim /usr/local/icinga/etc/objects/timeperiods.cfg<br />
</span></p></blockquote>
<blockquote><p><span style="font-family:Consolas; font-size:10pt"># &#8216;nabazhours&#8217;<br />
</span></p></blockquote>
<blockquote><p><span style="font-family:Consolas; font-size:10pt">define timeperiod{<br />
timeperiod_name nabazhours<br />
alias Where my nabaztag is active<br />
monday 06:00-23:00<br />
tuesday 06:00-23:00<br />
wednesday 06:00-23:00<br />
thursday 06:00-23:00<br />
friday 06:00-23:00<br />
saturday 08:00-23:00<br />
sunday 08:00-23:00<br />
}<br />
</span></p></blockquote>
<p><span style="font-family:Georgia; font-size:10pt">5. After that a new contact is created which use the above added notification commands and the right time period<br />
</span></p>
<blockquote><p><span style="font-family:Consolas; font-size:10pt">vim /usr/local/icinga/etc/objects/contacts.cfg<br />
</span></p></blockquote>
<blockquote><p><span style="font-family:Consolas; font-size:10pt">define contact{<br />
contact_name nabaztag<br />
use generic-contact<br />
alias My Bunny<br />
service_notification_commands notify-service-by-nabaztag<br />
host_notification_commands notify-host-by-nabaztag<br />
service_notification_period nabazhours<br />
host_notification_period nabazhours<br />
}<br />
</span></p></blockquote>
<p><span style="font-family:Georgia; font-size:10pt">6. We should have enough time to run a config-check <img src='http://www.sperrgebiet.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
</span></p>
<blockquote><p><span style="font-family:Consolas; font-size:10pt">/usr/local/icinga/bin/icinga -v /usr/local/icinga/etc/icinga.cfg<br />
</span></p></blockquote>
<p><span style="font-family:Georgia; font-size:10pt">7. When no errors or warnings appear reload Nagios/Icinga and wait till problem occur <img src='http://www.sperrgebiet.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
</span></p>
<blockquote><p><span style="font-family:Consolas; font-size:10pt">/etc/init.d/icinga reload<br />
</span></p></blockquote>
<p><span style="font-family:Georgia">Hope everything works as expected and you&#8217;ll find this script useful. Have fun with Nagios/Icinga and your Bunny. </span><span style="font-family:Wingdings">J</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sperrgebiet.org/2010/02/nagiosicinga-meets-nabaztag/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
<enclosure url="http://www.sperrgebiet.org/wp-content/uploads/2010/02/notify-by-nabaztag_en.wmv" length="111055208" type="video/x-ms-wmv" />
		</item>
	</channel>
</rss>
