Good to Know Database

Raspbian Wheezy: Longshine LCS-GS9428 mit MRTG überwachen


Durch die auf dieser Seite gezeigten Konfiguration können Sie die 24 Ports des Ethernet-Switches LCS-GS9428 von Longshine mit MRTG überwachen und die Trafficstatistiken grafisch aufbereiten. Die folgende Vorgehensweise setzt voraus, dass Sie MRTG bereits wie in der Anleitung Raspbian Wheezy: MRTG als Daemon installieren beschrieben installiert und konfiguriert haben.

Mit dem Programm cfgmaker können Sie sich einfach eine Beispielkonfiguration für MRTG erstellen lassen. Dazu wird per SNMP ermittelt welche Informationen das Gerät zur Verfügung stellt und eine entsprechende Konfiguration erstellt. Diese Konfiguration können Sie mit dem Parameter --output in eine Datei speichern und anschließend an Ihre Bedürfnisse anpassen. In der folgenden Anleitung soll eine bereits angepasste Konfiguration für den Longshine LCS-GS9428 vorgestellt und verwendet werden.

pi@raspberrypi ~ $ sudo cfgmaker public@192.168.10.254 --output mrtg_switch.cfg

Öffnen Sie die MRTG-Konfigurationsdatei /etc/mrtg.cfg mit einem Editor.

pi@raspberrypi ~ $ sudo vi /etc/mrtg.cfg

Fügen Sie am Ende der Datei die folgende Konfiguration ein. Ersetzen Sie dabei alle Vorkommen der IP-Adresse 192.168.10.254 durch die IP-Adresse Ihres eigenen Ethernet-Switches.

######################################################################
# System: LCS-GS9428
# Description: 24 Port Gigabit Switch
######################################################################

Target[lcs-gs9428_1]: 1:public@192.168.10.254:
MaxBytes[lcs-gs9428_1]: 125000000
Title[lcs-gs9428_1]: Traffic Analysis for LCS-GS9428 Port 1
PageTop[lcs-gs9428_1]: <h1>Traffic Analysis for LCS-GS9428 Port 1</h1>
  <div id="sysdetails">
    <table>
      <tr>
        <td>System:</td>
        <td>LCS-GS9428</td>
      </tr>
      <tr>
        <td>IP Address:</td>
        <td>192.168.10.254 (switch.home.lan)</td>
      </tr>
      <tr>
        <td>Description:</td>
        <td>Port 1</td>
      </tr>
      <tr>
        <td>Max Speed:</td>
        <td>125.0 MBytes/s</td>
      </tr>
    </table>
  </div>

Target[lcs-gs9428_2]: 2:public@192.168.10.254:
MaxBytes[lcs-gs9428_2]: 125000000
Title[lcs-gs9428_2]: Traffic Analysis for LCS-GS9428 Port 2
PageTop[lcs-gs9428_2]: <h1>Traffic Analysis for LCS-GS9428 Port 2</h1>
  <div id="sysdetails">
    <table>
      <tr>
        <td>System:</td>
        <td>LCS-GS9428</td>
      </tr>
      <tr>
        <td>IP Address:</td>
        <td>192.168.10.254 (switch.home.lan)</td>
      </tr>
      <tr>
        <td>Description:</td>
        <td>Port 2</td>
      </tr>
      <tr>
        <td>Max Speed:</td>
        <td>125.0 MBytes/s</td>
      </tr>
    </table>
  </div>

Target[lcs-gs9428_3]: 3:public@192.168.10.254:
MaxBytes[lcs-gs9428_3]: 125000000
Title[lcs-gs9428_3]: Traffic Analysis for LCS-GS9428 Port 3
PageTop[lcs-gs9428_3]: <h1>Traffic Analysis for LCS-GS9428 Port 3</h1>
  <div id="sysdetails">
    <table>
      <tr>
        <td>System:</td>
        <td>LCS-GS9428</td>
      </tr>
      <tr>
        <td>IP Address:</td>
        <td>192.168.10.254 (switch.home.lan)</td>
      </tr>
      <tr>
        <td>Description:</td>
        <td>Port 3</td>
      </tr>
      <tr>
        <td>Max Speed:</td>
        <td>125.0 MBytes/s</td>
      </tr>
    </table>
  </div>

Target[lcs-gs9428_4]: 4:public@192.168.10.254:
MaxBytes[lcs-gs9428_4]: 125000000
Title[lcs-gs9428_4]: Traffic Analysis for LCS-GS9428 Port 4
PageTop[lcs-gs9428_4]: <h1>Traffic Analysis for LCS-GS9428 Port 4</h1>
  <div id="sysdetails">
    <table>
      <tr>
        <td>System:</td>
        <td>LCS-GS9428</td>
      </tr>
      <tr>
        <td>IP Address:</td>
        <td>192.168.10.254 (switch.home.lan)</td>
      </tr>
      <tr>
        <td>Description:</td>
        <td>Port 4</td>
      </tr>
      <tr>
        <td>Max Speed:</td>
        <td>125.0 MBytes/s</td>
      </tr>
    </table>
  </div>

Target[lcs-gs9428_5]: 5:public@192.168.10.254:
MaxBytes[lcs-gs9428_5]: 125000000
Title[lcs-gs9428_5]: Traffic Analysis for LCS-GS9428 Port 5
PageTop[lcs-gs9428_5]: <h1>Traffic Analysis for LCS-GS9428 Port 5</h1>
  <div id="sysdetails">
    <table>
      <tr>
        <td>System:</td>
        <td>LCS-GS9428</td>
      </tr>
      <tr>
        <td>IP Address:</td>
        <td>192.168.10.254 (switch.home.lan)</td>
      </tr>
      <tr>
        <td>Description:</td>
        <td>Port 5</td>
      </tr>
      <tr>
        <td>Max Speed:</td>
        <td>125.0 MBytes/s</td>
      </tr>
    </table>
  </div>

Target[lcs-gs9428_6]: 6:public@192.168.10.254:
MaxBytes[lcs-gs9428_6]: 125000000
Title[lcs-gs9428_6]: Traffic Analysis for LCS-GS9428 Port 6
PageTop[lcs-gs9428_6]: <h1>Traffic Analysis for LCS-GS9428 Port 6</h1>
  <div id="sysdetails">
    <table>
      <tr>
        <td>System:</td>
        <td>LCS-GS9428</td>
      </tr>
      <tr>
        <td>IP Address:</td>
        <td>192.168.10.254 (switch.home.lan)</td>
      </tr>
      <tr>
        <td>Description:</td>
        <td>Port 6</td>
      </tr>
      <tr>
        <td>Max Speed:</td>
        <td>125.0 MBytes/s</td>
      </tr>
    </table>
  </div>

Target[lcs-gs9428_7]: 7:public@192.168.10.254:
MaxBytes[lcs-gs9428_7]: 125000000
Title[lcs-gs9428_7]: Traffic Analysis for LCS-GS9428 Port 7
PageTop[lcs-gs9428_7]: <h1>Traffic Analysis for LCS-GS9428 Port 7</h1>
  <div id="sysdetails">
    <table>
      <tr>
        <td>System:</td>
        <td>LCS-GS9428</td>
      </tr>
      <tr>
        <td>IP Address:</td>
        <td>192.168.10.254 (switch.home.lan)</td>
      </tr>
      <tr>
        <td>Description:</td>
        <td>Port 7</td>
      </tr>
      <tr>
        <td>Max Speed:</td>
        <td>125.0 MBytes/s</td>
      </tr>
    </table>
  </div>

Target[lcs-gs9428_8]: 8:public@192.168.10.254:
MaxBytes[lcs-gs9428_8]: 125000000
Title[lcs-gs9428_8]: Traffic Analysis for LCS-GS9428 Port 8
PageTop[lcs-gs9428_8]: <h1>Traffic Analysis for LCS-GS9428 Port 8</h1>
  <div id="sysdetails">
    <table>
      <tr>
        <td>System:</td>
        <td>LCS-GS9428</td>
      </tr>
      <tr>
        <td>IP Address:</td>
        <td>192.168.10.254 (switch.home.lan)</td>
      </tr>
      <tr>
        <td>Description:</td>
        <td>Port 8</td>
      </tr>
      <tr>
        <td>Max Speed:</td>
        <td>125.0 MBytes/s</td>
      </tr>
    </table>
  </div>

Target[lcs-gs9428_9]: 9:public@192.168.10.254:
MaxBytes[lcs-gs9428_9]: 125000000
Title[lcs-gs9428_9]: Traffic Analysis for LCS-GS9428 Port 9
PageTop[lcs-gs9428_9]: <h1>Traffic Analysis for LCS-GS9428 Port 9</h1>
  <div id="sysdetails">
    <table>
      <tr>
        <td>System:</td>
        <td>LCS-GS9428</td>
      </tr>
      <tr>
        <td>IP Address:</td>
        <td>192.168.10.254 (switch.home.lan)</td>
      </tr>
      <tr>
        <td>Description:</td>
        <td>Port 9</td>
      </tr>
      <tr>
        <td>Max Speed:</td>
        <td>125.0 MBytes/s</td>
      </tr>
    </table>
  </div>

Target[lcs-gs9428_10]: 10:public@192.168.10.254:
MaxBytes[lcs-gs9428_10]: 125000000
Title[lcs-gs9428_10]: Traffic Analysis for LCS-GS9428 Port 10
PageTop[lcs-gs9428_10]: <h1>Traffic Analysis for LCS-GS9428 Port 10</h1>
  <div id="sysdetails">
    <table>
      <tr>
        <td>System:</td>
        <td>LCS-GS9428</td>
      </tr>
      <tr>
        <td>IP Address:</td>
        <td>192.168.10.254 (switch.home.lan)</td>
      </tr>
      <tr>
        <td>Description:</td>
        <td>Port 10</td>
      </tr>
      <tr>
        <td>Max Speed:</td>
        <td>125.0 MBytes/s</td>
      </tr>
    </table>
  </div>

Target[lcs-gs9428_11]: 11:public@192.168.10.254:
MaxBytes[lcs-gs9428_11]: 125000000
Title[lcs-gs9428_11]: Traffic Analysis for LCS-GS9428 Port 11
PageTop[lcs-gs9428_11]: <h1>Traffic Analysis for LCS-GS9428 Port 11</h1>
  <div id="sysdetails">
    <table>
      <tr>
        <td>System:</td>
        <td>LCS-GS9428</td>
      </tr>
      <tr>
        <td>IP Address:</td>
        <td>192.168.10.254 (switch.home.lan)</td>
      </tr>
      <tr>
        <td>Description:</td>
        <td>Port 11</td>
      </tr>
      <tr>
        <td>Max Speed:</td>
        <td>125.0 MBytes/s</td>
      </tr>
    </table>
  </div>

Target[lcs-gs9428_12]: 12:public@192.168.10.254:
MaxBytes[lcs-gs9428_12]: 125000000
Title[lcs-gs9428_12]: Traffic Analysis for LCS-GS9428 Port 12
PageTop[lcs-gs9428_12]: <h1>Traffic Analysis for LCS-GS9428 Port 12</h1>
  <div id="sysdetails">
    <table>
      <tr>
        <td>System:</td>
        <td>LCS-GS9428</td>
      </tr>
      <tr>
        <td>IP Address:</td>
        <td>192.168.10.254 (switch.home.lan)</td>
      </tr>
      <tr>
        <td>Description:</td>
        <td>Port 12</td>
      </tr>
      <tr>
        <td>Max Speed:</td>
        <td>125.0 MBytes/s</td>
      </tr>
    </table>
  </div>

Target[lcs-gs9428_13]: 13:public@192.168.10.254:
MaxBytes[lcs-gs9428_13]: 125000000
Title[lcs-gs9428_13]: Traffic Analysis for LCS-GS9428 Port 13
PageTop[lcs-gs9428_13]: <h1>Traffic Analysis for LCS-GS9428 Port 13</h1>
  <div id="sysdetails">
    <table>
      <tr>
        <td>System:</td>
        <td>LCS-GS9428</td>
      </tr>
      <tr>
        <td>IP Address:</td>
        <td>192.168.10.254 (switch.home.lan)</td>
      </tr>
      <tr>
        <td>Description:</td>
        <td>Port 13</td>
      </tr>
      <tr>
        <td>Max Speed:</td>
        <td>125.0 MBytes/s</td>
      </tr>
    </table>
  </div>

Target[lcs-gs9428_14]: 14:public@192.168.10.254:
MaxBytes[lcs-gs9428_14]: 125000000
Title[lcs-gs9428_14]: Traffic Analysis for LCS-GS9428 Port 14
PageTop[lcs-gs9428_14]: <h1>Traffic Analysis for LCS-GS9428 Port 14</h1>
  <div id="sysdetails">
    <table>
      <tr>
        <td>System:</td>
        <td>LCS-GS9428</td>
      </tr>
      <tr>
        <td>IP Address:</td>
        <td>192.168.10.254 (switch.home.lan)</td>
      </tr>
      <tr>
        <td>Description:</td>
        <td>Port 14</td>
      </tr>
      <tr>
        <td>Max Speed:</td>
        <td>125.0 MBytes/s</td>
      </tr>
    </table>
  </div>

Target[lcs-gs9428_15]: 15:public@192.168.10.254:
MaxBytes[lcs-gs9428_15]: 125000000
Title[lcs-gs9428_15]: Traffic Analysis for LCS-GS9428 Port 15
PageTop[lcs-gs9428_15]: <h1>Traffic Analysis for LCS-GS9428 Port 15</h1>
  <div id="sysdetails">
    <table>
      <tr>
        <td>System:</td>
        <td>LCS-GS9428</td>
      </tr>
      <tr>
        <td>IP Address:</td>
        <td>192.168.10.254 (switch.home.lan)</td>
      </tr>
      <tr>
        <td>Description:</td>
        <td>Port 15</td>
      </tr>
      <tr>
        <td>Max Speed:</td>
        <td>125.0 MBytes/s</td>
      </tr>
    </table>
  </div>

Target[lcs-gs9428_16]: 16:public@192.168.10.254:
MaxBytes[lcs-gs9428_16]: 125000000
Title[lcs-gs9428_16]: Traffic Analysis for LCS-GS9428 Port 16
PageTop[lcs-gs9428_16]: <h1>Traffic Analysis for LCS-GS9428 Port 16</h1>
  <div id="sysdetails">
    <table>
      <tr>
        <td>System:</td>
        <td>LCS-GS9428</td>
      </tr>
      <tr>
        <td>IP Address:</td>
        <td>192.168.10.254 (switch.home.lan)</td>
      </tr>
      <tr>
        <td>Description:</td>
        <td>Port 16</td>
      </tr>
      <tr>
        <td>Max Speed:</td>
        <td>125.0 MBytes/s</td>
      </tr>
    </table>
  </div>

Target[lcs-gs9428_17]: 17:public@192.168.10.254:
MaxBytes[lcs-gs9428_17]: 125000000
Title[lcs-gs9428_17]: Traffic Analysis for LCS-GS9428 Port 17
PageTop[lcs-gs9428_17]: <h1>Traffic Analysis for LCS-GS9428 Port 17</h1>
  <div id="sysdetails">
    <table>
      <tr>
        <td>System:</td>
        <td>LCS-GS9428</td>
      </tr>
      <tr>
        <td>IP Address:</td>
        <td>192.168.10.254 (switch.home.lan)</td>
      </tr>
      <tr>
        <td>Description:</td>
        <td>Port 17</td>
      </tr>
      <tr>
        <td>Max Speed:</td>
        <td>125.0 MBytes/s</td>
      </tr>
    </table>
  </div>

Target[lcs-gs9428_18]: 18:public@192.168.10.254:
MaxBytes[lcs-gs9428_18]: 125000000
Title[lcs-gs9428_18]: Traffic Analysis for LCS-GS9428 Port 18
PageTop[lcs-gs9428_18]: <h1>Traffic Analysis for LCS-GS9428 Port 18</h1>
  <div id="sysdetails">
    <table>
      <tr>
        <td>System:</td>
        <td>LCS-GS9428</td>
      </tr>
      <tr>
        <td>IP Address:</td>
        <td>192.168.10.254 (switch.home.lan)</td>
      </tr>
      <tr>
        <td>Description:</td>
        <td>Port 18</td>
      </tr>
      <tr>
        <td>Max Speed:</td>
        <td>125.0 MBytes/s</td>
      </tr>
    </table>
  </div>

Target[lcs-gs9428_19]: 19:public@192.168.10.254:
MaxBytes[lcs-gs9428_19]: 125000000
Title[lcs-gs9428_19]: Traffic Analysis for LCS-GS9428 Port 19
PageTop[lcs-gs9428_19]: <h1>Traffic Analysis for LCS-GS9428 Port 19</h1>
  <div id="sysdetails">
    <table>
      <tr>
        <td>System:</td>
        <td>LCS-GS9428</td>
      </tr>
      <tr>
        <td>IP Address:</td>
        <td>192.168.10.254 (switch.home.lan)</td>
      </tr>
      <tr>
        <td>Description:</td>
        <td>Port 19</td>
      </tr>
      <tr>
        <td>Max Speed:</td>
        <td>125.0 MBytes/s</td>
      </tr>
    </table>
  </div>

Target[lcs-gs9428_20]: 20:public@192.168.10.254:
MaxBytes[lcs-gs9428_20]: 125000000
Title[lcs-gs9428_20]: Traffic Analysis for LCS-GS9428 Port 20
PageTop[lcs-gs9428_20]: <h1>Traffic Analysis for LCS-GS9428 Port 20</h1>
  <div id="sysdetails">
    <table>
      <tr>
        <td>System:</td>
        <td>LCS-GS9428</td>
      </tr>
      <tr>
        <td>IP Address:</td>
        <td>192.168.10.254 (switch.home.lan)</td>
      </tr>
      <tr>
        <td>Description:</td>
        <td>Port 20</td>
      </tr>
      <tr>
        <td>Max Speed:</td>
        <td>125.0 MBytes/s</td>
      </tr>
    </table>
  </div>

Target[lcs-gs9428_21]: 21:public@192.168.10.254:
MaxBytes[lcs-gs9428_21]: 125000000
Title[lcs-gs9428_21]: Traffic Analysis for LCS-GS9428 Port 21
PageTop[lcs-gs9428_21]: <h1>Traffic Analysis for LCS-GS9428 Port 21</h1>
  <div id="sysdetails">
    <table>
      <tr>
        <td>System:</td>
        <td>LCS-GS9428</td>
      </tr>
      <tr>
        <td>IP Address:</td>
        <td>192.168.10.254 (switch.home.lan)</td>
      </tr>
      <tr>
        <td>Description:</td>
        <td>Port 21</td>
      </tr>
      <tr>
        <td>Max Speed:</td>
        <td>125.0 MBytes/s</td>
      </tr>
    </table>
  </div>

Target[lcs-gs9428_22]: 22:public@192.168.10.254:
MaxBytes[lcs-gs9428_22]: 125000000
Title[lcs-gs9428_22]: Traffic Analysis for LCS-GS9428 Port 22
PageTop[lcs-gs9428_22]: <h1>Traffic Analysis for LCS-GS9428 Port 22</h1>
  <div id="sysdetails">
    <table>
      <tr>
        <td>System:</td>
        <td>LCS-GS9428</td>
      </tr>
      <tr>
        <td>IP Address:</td>
        <td>192.168.10.254 (switch.home.lan)</td>
      </tr>
      <tr>
        <td>Description:</td>
        <td>Port 22</td>
      </tr>
      <tr>
        <td>Max Speed:</td>
        <td>125.0 MBytes/s</td>
      </tr>
    </table>
  </div>

Target[lcs-gs9428_23]: 23:public@192.168.10.254:
MaxBytes[lcs-gs9428_23]: 125000000
Title[lcs-gs9428_23]: Traffic Analysis for LCS-GS9428 Port 23
PageTop[lcs-gs9428_23]: <h1>Traffic Analysis for LCS-GS9428 Port 23</h1>
  <div id="sysdetails">
    <table>
      <tr>
        <td>System:</td>
        <td>LCS-GS9428</td>
      </tr>
      <tr>
        <td>IP Address:</td>
        <td>192.168.10.254 (switch.home.lan)</td>
      </tr>
      <tr>
        <td>Description:</td>
        <td>Port 23</td>
      </tr>
      <tr>
        <td>Max Speed:</td>
        <td>125.0 MBytes/s</td>
      </tr>
    </table>
  </div>

Target[lcs-gs9428_24]: 24:public@192.168.10.254:
MaxBytes[lcs-gs9428_24]: 125000000
Title[lcs-gs9428_24]: Traffic Analysis for LCS-GS9428 Port 24
PageTop[lcs-gs9428_24]: <h1>Traffic Analysis for LCS-GS9428 Port 24</h1>
  <div id="sysdetails">
    <table>
      <tr>
        <td>System:</td>
        <td>LCS-GS9428</td>
      </tr>
      <tr>
        <td>IP Address:</td>
        <td>192.168.10.254 (switch.home.lan)</td>
      </tr>
      <tr>
        <td>Description:</td>
        <td>Port 24</td>
      </tr>
      <tr>
        <td>Max Speed:</td>
        <td>125.0 MBytes/s</td>
      </tr>
    </table>
  </div>

Nachdem Sie die Konfigurationsdatei erweitert haben, müssen Sie die Index-Datei unter /var/www/mrtg aktualisieren.

pi@raspberrypi ~ $ sudo su -c 'indexmaker /etc/mrtg.cfg > /var/www/mrtg/index.html'

Starten Sie im Anschluss den MRTG-Daemon neu.

pi@raspberrypi ~ $ sudo /etc/init.d/mrtg restart

MRTG generiert jetzt die dazugehörigen Graphen und HTML-Seiten welche Sie über das MRTG-Webinterface abrufen können und sammelt regelmäßig die Übertragungsdaten vom Ethernet-Switch ein und aktualisiert die Graphen.


Dieser Eintrag wurde am 23.12.2013 erstellt und zuletzt am 25.09.2016 bearbeitet.

Direkter Link zu dieser Seite: http://www.gtkdb.de/index_36_2457.html

[ Zur Startseite ]   [ Zur Kategorie ]


Valid XHTML 1.0 Transitional Valid CSS Valid Atom 1.0

© 2004-2018 by Georg Kainzbauer