<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>DSL on ohneKontur – der Blog</title>
		<link>https://www.ohnekontur.de/tags/dsl/</link>
		<description>Recent content in DSL on ohneKontur – der Blog</description>
		<generator>Hugo</generator>
		<language>de-DE</language>
		
		
		
		
			<lastBuildDate>Sat, 20 Feb 2010 03:30:05 +0000</lastBuildDate>
		
			<atom:link href="https://www.ohnekontur.de/tags/dsl/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>[ munin ] Fritzbox traffic monitoring</title>
				<link>https://www.ohnekontur.de/2010/02/20/munin-fritzbox-traffic-monitoring/</link>
				<pubDate>Sat, 20 Feb 2010 03:30:05 +0000</pubDate>
				<guid>https://www.ohnekontur.de/2010/02/20/munin-fritzbox-traffic-monitoring/</guid>
				<description>&lt;p&gt;&#xA;&#xA;&lt;img&#xA;      &#xA;         src=&#39;https://www.ohnekontur.de/2010/02/20/munin-fritzbox-traffic-monitoring/1258691_50996273-150x150.jpg&#39;&#xA;      &#xA;        alt=&#39;&#39; &#xA;      &#xA;&#x9;  &#xA;&#x9;loading=&#34;lazy&#34;&gt;Wann benötige ich wieviel Traffic,&lt;br&gt;&#xA;so hier,&lt;br&gt;&#xA;so von meinem DSL?&lt;/p&gt;&#xA;&lt;p&gt;Diese Frage kam mir, und der Wunsch den Traffic den ich über meine Fritzbox ins Internet blase mal Mengenmäßig zu erfassen.&lt;/p&gt;&#xA;&lt;p&gt;Also musste ein Munin Script her, welches die entsprechenden Werte aus der Fritzbox Admininterface herrauszulesen.&lt;/p&gt;&#xA;&lt;p&gt;Hier kommts :&lt;/p&gt;&#xA;&lt;pre lang=&#34;bash&#34;&gt;#!/bin/sh&#xA;# &#xA;# Plugin to monitor the fritzbox traffic&#xA;&#xA;#%# family=auto&#xA;#%# capabilities=autoconf&#xA;&#xA;# If run with the &#34;autoconf&#34;-parameter, give our opinion on wether we&#xA;# should be run on this system or not. This is optinal, and only used by&#xA;# munin-config. In the case of this plugin, we should most probably&#xA;# always be included.&#xA;&#xA;if [ &#34;$1&#34; = &#34;autoconf&#34; ]; then&#xA;        echo yes&#xA;        exit 0&#xA;fi&#xA;&#xA;# If run with the &#34;config&#34;-parameter, give out information on how the&#xA;# graphs should look. &#xA; &#xA;if [ &#34;$1&#34; = &#34;config&#34; ]; then&#xA;#        LOAD_WARN=${load_warn:-10}&#xA;#        LOAD_CRIT=${load_crit:-120}&#xA;#&#xA;#       # The title of the graph&#xA;        echo &#39;graph_title fritz.box dayly traffic&#39;&#xA;#       # Arguments to &#34;rrdtool graph&#34;. In this case, tell it that the&#xA;        # lower limit of the graph is &#39;0&#39;, and that 1k=1000 (not 1024)&#xA;        echo &#39;graph_args --base 1000 -l 0&#39;&#xA;        # The Y-axis label&#xA;        echo &#39;graph_vlabel Data&#39;&#xA;        # Graph category. Defaults to &#39;other&#39;&#xA;        echo &#39;graph_category network&#39;&#xA;        # The fields. &#34;label&#34; is used in the legend. &#34;label&#34; is the only&#xA;        # required subfield. &#xA;        echo &#39;load.label traffic&#39;&#xA;        # These two are optional. They are only used if you have&#xA;        # configured your munin to tell a Nagios-server about any&#xA;        # problems&#xA;        #echo &#34;load.warning $LOAD_WARN&#34;&#xA;        #echo &#34;load.critical $LOAD_CRIT&#34;&#xA;        # This one is purely to add an explanation to the web page. The first&#xA;        # one is for the graph itself, while the second one is for the field&#xA;        # &#34;load&#34;.&#xA;        echo &#39;graph_info The load average of the machine describes how many processes are in the run-queue (scheduled to run &#34;immediately&#34;).&#39;&#xA;        echo &#39;load.info Average load for the five minutes.&#39;&#xA;&#xA;        # Last, if run with the &#34;config&#34;-parameter, quit here (don&#39;t&#xA;        # display any data)&#xA;        exit 0&#xA;fi&#xA;&#xA;# If not run with any parameters at all (or only unknown ones), do the&#xA;# real work - i.e. display the data. Almost always this will be&#xA;# &#34;value&#34; subfield for every data field.&#xA;&#xA;###############################&#xA;#&#xA;# Change password here&#xA;#&#xA;###############################&#xA;&#xA;FRITZBOX_ADMIN_PASSWORD=&#39;PASSWORD123&#39; # Hier password ersetzen&#xA;&#xA;################################&#xA;#&#xA;# End change password&#xA;#&#xA;################################&#xA;&#xA;&#xA;echo -n &#34;load.value &#34;&#xA;VAR=`wget -qO- --post-data &#34;getpage=../html/de/menus/menu2.html&amp;var:pagename=inetstat&amp;var:menu=internet&amp;var:lang=de&amp;errorpage=../html/index.html&amp;login:command/password=$FRITZBOX_ADMIN_PASSWORD&#34; http://fritz.box/cgi-bin/webcm | cat`;&#xA;INL=`echo &#34;$VAR&#34; | grep  &#34;var inl = &#34; |  sed &#39;s/[a-zA-Z =]*\([0-9]*\).*/\1/&#39;`;&#xA;OUT=`echo &#34;$VAR&#34; | grep &#34;var outl = &#34; | sed &#39;s/[a-zA-Z =]*\([0-9]*\).*/\1/&#39;`;&#xA;let RES=$INL+$OUT;&#xA;echo $RES;&#xA;&lt;/pre&gt;&#xA;&lt;p&gt;Enjoy using it.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
