<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Snmp – Yeri Tiete</title><link>https://yeri.be/tag/snmp/</link><description>Yeri Tiete's blog</description><language>en</language><copyright>© Yeri Tiete</copyright><lastBuildDate>Sat, 05 Feb 2011 00:20:03 +0100</lastBuildDate><atom:link href="https://yeri.be/tag/snmp/index.xml" rel="self" type="application/rss+xml"/><item><title>Squid MRTG stats</title><link>https://yeri.be/squid-mrtg-stats/</link><pubDate>Sat, 05 Feb 2011 00:20:03 +0100</pubDate><author>Yeri Tiete</author><guid isPermaLink="true">https://yeri.be/squid-mrtg-stats/</guid><description>&lt;p&gt;I talked about &lt;a href="https://yeri.be/mrtg/"&gt;MRTG stats for Squid&lt;/a&gt; in the past but apparently forgot to include the .mib file.&lt;/p&gt;
&lt;p&gt;So, here it is. Download &lt;a href="https://static.yeri.be/2011/01/squid.mib_.txt" target="_blank" rel="noopener noreferrer"&gt;this file&lt;/a&gt; and put it in /usr/share/squid/mib.txt.&lt;/p&gt;
&lt;p&gt;I don&amp;rsquo;t quite remember where I found that mib file. Probably included with Squid on Gentoo or the world wide web&amp;hellip; But I couldn&amp;rsquo;t find it on Debian, so here it is. And be sure to add these lines to your Squid config:&lt;/p&gt;</description><content:encoded><![CDATA[<p>I talked about <a href="https://yeri.be/mrtg/">MRTG stats for Squid</a> in the past but apparently forgot to include the .mib file.</p>
<p>So, here it is.  Download <a href="https://static.yeri.be/2011/01/squid.mib_.txt" target="_blank" rel="noopener noreferrer">this file</a> and put it in /usr/share/squid/mib.txt.</p>
<p>I don&rsquo;t quite remember where I found that mib file. Probably included with Squid on Gentoo or the world wide web&hellip; But I couldn&rsquo;t find it on Debian, so here it is.  And be sure to add these lines to your Squid config:</p>
<pre style="background-color: #ffffff; line-height: 12pt; margin-right: 5px; padding: 5px; border: 1px dashed #489e06;">acl snmppublic snmp_community public
snmp_port 3401
snmp_access allow snmppublic all</pre>
<p>This is what it should look like (low usage Squid):</p>
<p style="text-align: center;"><a href="https://static.yeri.be/2011/02/mrtg.proxy-hit-day.png"><img class="alignnone size-full wp-image-2447" title="mrtg.proxy-hit-day" src="https://static.yeri.be/2011/02/mrtg.proxy-hit-day.png" alt="" width="500" height="135" /></a></p>
]]></content:encoded><category>Hardware</category><category>Linux</category><category>Misc</category><category>Networking</category><category>Software</category><category>www</category><category>mrtg</category><category>snmp</category><category>squid</category><category>stats</category></item><item><title>MRTG and network interfaces</title><link>https://yeri.be/mrtg-and-network-interfaces/</link><pubDate>Mon, 17 Jan 2011 15:09:54 +0100</pubDate><author>Yeri Tiete</author><guid isPermaLink="true">https://yeri.be/mrtg-and-network-interfaces/</guid><description>&lt;p&gt;I tend to restart OpenVPN a lot due to config changes. As a result, this brings quite some issues to &lt;a href="https://yeri.be/mrtg/"&gt;MRTG&lt;/a&gt; (or more precisely, SNMP), due to the fact tun devices change of ID.&lt;/p&gt;
&lt;p&gt;A while back, I found a quick fix for this; rename the interface targets from their respective ID to their name:&lt;/p&gt;
&lt;pre style="background-color: #ffffff; line-height: 12pt; margin-right: 5px; padding: 5px; border: 1px dashed #489e06;"&gt;Target[eth0]: &lt;span style="color: #ff0000;"&gt;2&lt;/span&gt;:public@localhost&lt;/pre&gt;
&lt;p&gt;becomes&lt;/p&gt;
&lt;pre style="background-color: #ffffff; line-height: 12pt; margin-right: 5px; padding: 5px; border: 1px dashed #489e06;"&gt;Target[eth0]: &lt;span style="color: #ff0000;"&gt;#eth0&lt;/span&gt;:public@localhost&lt;/pre&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;For example:&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;pre style="background-color: #ffffff; line-height: 12pt; margin-right: 5px; padding: 5px; border: 1px dashed #489e06;"&gt;
#
# Eth0 stats
#
Options[eth0]: growright, nobanner, pngdate, nopercent, noinfo
Target[eth0]: #eth0:public@localhost:
SetEnv[eth0]: MRTG_INT_DESCR="eth0"
MaxBytes[eth0]: 1250000
Title[eth0]: Traffic Analysis for deng
PageTop[eth0]: &amp;#060;H1&gt;Traffic Analysis for deng (eth0)&amp;#060;/H1&gt;
#
# Eth1 stats
#
Options[eth1]: growright, nobanner, pngdate, nopercent, noinfo
Target[eth1]: #eth1:public@localhost:
SetEnv[eth1]: MRTG_INT_DESCR="eth1"
MaxBytes[eth1]: 1250000
Title[eth1]: Traffic Analysis for deng
PageTop[eth1]: &amp;#060;H1&gt;Traffic Analysis for deng (eth1)&amp;#060;/H1&gt;
#
# tun0 stats
#
Options[tun0]: growright, nobanner, pngdate, nopercent, noinfo
Target[tun0]: #tun0:public@localhost:
SetEnv[tun0]: MRTG_INT_DESCR="tun0"
MaxBytes[tun0]: 1250000
Title[tun0]: Traffic Analysis for deng
PageTop[tun0]: &amp;#060;H1&gt;Traffic Analysis for deng (tun0)&amp;#060;/H1&gt;
&lt;/pre&gt;</description><content:encoded><![CDATA[<p>I tend to restart OpenVPN a lot due to config changes. As a result, this brings quite some issues to <a href="https://yeri.be/mrtg/">MRTG</a> (or more precisely, SNMP), due to the fact tun devices change of ID.</p>
<p>A while back, I found a quick fix for this; rename the interface targets from their respective ID to their name:</p>
<pre style="background-color: #ffffff; line-height: 12pt; margin-right: 5px; padding: 5px; border: 1px dashed #489e06;">Target[eth0]: <span style="color: #ff0000;">2</span>:public@localhost</pre>
<p>becomes</p>
<pre style="background-color: #ffffff; line-height: 12pt; margin-right: 5px; padding: 5px; border: 1px dashed #489e06;">Target[eth0]: <span style="color: #ff0000;">#eth0</span>:public@localhost</pre>
<div></div>
<div>For example:</div>
<div></div>
<pre style="background-color: #ffffff; line-height: 12pt; margin-right: 5px; padding: 5px; border: 1px dashed #489e06;">
#
# Eth0 stats
#
Options[eth0]: growright, nobanner, pngdate, nopercent, noinfo
Target[eth0]: #eth0:public@localhost:
SetEnv[eth0]: MRTG_INT_DESCR="eth0"
MaxBytes[eth0]: 1250000
Title[eth0]: Traffic Analysis for deng
PageTop[eth0]: &#060;H1>Traffic Analysis for deng (eth0)&#060;/H1>
#
# Eth1 stats
#
Options[eth1]: growright, nobanner, pngdate, nopercent, noinfo
Target[eth1]: #eth1:public@localhost:
SetEnv[eth1]: MRTG_INT_DESCR="eth1"
MaxBytes[eth1]: 1250000
Title[eth1]: Traffic Analysis for deng
PageTop[eth1]: &#060;H1>Traffic Analysis for deng (eth1)&#060;/H1>
#
# tun0 stats
#
Options[tun0]: growright, nobanner, pngdate, nopercent, noinfo
Target[tun0]: #tun0:public@localhost:
SetEnv[tun0]: MRTG_INT_DESCR="tun0"
MaxBytes[tun0]: 1250000
Title[tun0]: Traffic Analysis for deng
PageTop[tun0]: &#060;H1>Traffic Analysis for deng (tun0)&#060;/H1>
</pre>
]]></content:encoded><category>Hardware</category><category>Linux</category><category>Misc</category><category>Networking</category><category>Software</category><category>www</category><category>mrtg</category><category>snmp</category><category>stats</category></item></channel></rss>