[prev in list] [next in list] [prev in thread] [next in thread]
List: mrtg
Subject: Re: [mrtg] Syntax for 10Gbps interface name
From: Rick Pummel <rpummel () wwps ! org>
Date: 2016-12-06 20:16:04
Message-ID: CACG16k_TqiA2VVnh9B10tH5qkW++q6Kqv9AaAZdr+FaJj8zm8w () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Perfect, this is exactly the information I needed! Thank you!
Rick Pummel
Walla Walla Public Schools
On Tue, Dec 6, 2016 at 2:26 AM, Pavel Ruzicka <pavouk@pavouk.org> wrote:
> Hi Rick,
>
> > However, I have scoured the MRTG documentation and still cannot find the
> > appropriate syntax for a 10Gbps port on the same switch.
>
> First you can get Interface names with "snmpwalk" command. It is part of
> "net-
> snmp-utils" package on Centos for example.
>
> You can get interface names for machines (ifName) or for people (ifDescr).
> Here is example for C4507:
> [mrtg@mrtg ~]$ snmpwalk -v2c -c public c45switch ifName
> IF-MIB::ifName.2 = STRING: Te1/1
> IF-MIB::ifName.3 = STRING: Te1/2
> IF-MIB::ifName.4 = STRING: Gi1/3
> IF-MIB::ifName.5 = STRING: Gi1/4
> ...
>
> [mrtg@mrtg ~]$ snmpwalk -v2c -c public c45switch ifDescr
> IF-MIB::ifDescr.2 = STRING: TenGigabitEthernet1/1
> IF-MIB::ifDescr.3 = STRING: TenGigabitEthernet1/2
> IF-MIB::ifDescr.4 = STRING: GigabitEthernet1/3
> IF-MIB::ifDescr.5 = STRING: GigabitEthernet1/4
> ...
>
> Also it is not needed to create MRTG configuration manually. It is better
> to
> generate it automatically. Advantage is that somebody add new interface
> that
> it will be automatically measured.
> I am running my script which call "cfgmaker".
>
> cfgmaker is part of MRTG package and it automatically generate MRTG
> configuration file. You can call them for example 1 per day from cron at
> night. I use main mrtg.cfg file with Includes. One included file is per one
> switch/router.
>
> Here is example of cfgmaker:
> cfgmaker --ifref=name --snmp-options=:::2::2 public@c45switch
>
> Here is part of output for 10G interface:
>
> ----------------------------------------------
> ### Interface 2 >> Descr: 'TenGigabitEthernet1/1' | Name: 'Te1/1' | Ip: ''
> |
> Eth: '' ###
>
> Target[c45switch_Te1_1]: #Te1/1:public@c45switch:::2::2
> SetEnv[c45switch_Te1_1]: MRTG_INT_IP="" MRTG_INT_DESCR="
> TenGigabitEthernet1/1"
> MaxBytes[c45switch_Te1_1]: 1250000000
> Title[c45switch_Te1_1]: Traffic Analysis for Te1/1 -- C45SWITCH
> PageTop[c45switch_Te1_1]: <h1>Traffic Analysis for Te1/1 -- C45SWITCH</h1>
> <div id="sysdetails">
> <table>
> <tr>
> <td>System:</td>
> <td>C45SWITCH in </td>
> </tr>
> <tr>
> <td>Maintainer:</td>
> <td></td>
> </tr>
> <tr>
> <td>Description:</td>
> <td>TenGigabitEthernet1/1 Uplink
> port
> </td>
> </tr>
> <tr>
> <td>ifType:</td>
> <td>ethernetCsmacd (6)</td>
> </tr>
> <tr>
> <td>ifName:</td>
> <td>Te1/1</td>
> </tr>
> <tr>
> <td>Max Speed:</td>
> <td>1250.0 MBytes/s</td>
> </tr>
> </table>
> </div>
> ------------------------------------------------
>
> Best regards, Pavel.
>
>
[Attachment #5 (text/html)]
<div dir="ltr">Perfect, this is exactly the information I needed! Thank you!<div \
class="gmail_extra"><br clear="all"><div><div class="gmail_signature" \
data-smartmail="gmail_signature"><div dir="ltr"><div>Rick Pummel</div><div>Walla \
Walla Public Schools<br></div><div><br></div></div></div></div><div \
class="gmail_quote">On Tue, Dec 6, 2016 at 2:26 AM, Pavel Ruzicka <span \
dir="ltr"><<a href="mailto:pavouk@pavouk.org" \
target="_blank">pavouk@pavouk.org</a>></span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Hi Rick,<br> <span class=""><br>
> However, I have scoured the MRTG documentation and still cannot find the<br>
> appropriate syntax for a 10Gbps port on the same switch.<br>
<br>
</span>First you can get Interface names with "snmpwalk" command. It is \
part of "net-<br> snmp-utils" package on Centos for example.<br>
<br>
You can get interface names for machines (ifName) or for people (ifDescr).<br>
Here is example for C4507:<br>
[mrtg@mrtg ~]$ snmpwalk -v2c -c public c45switch ifName<br>
IF-MIB::ifName.2 = STRING: Te1/1<br>
IF-MIB::ifName.3 = STRING: Te1/2<br>
IF-MIB::ifName.4 = STRING: Gi1/3<br>
IF-MIB::ifName.5 = STRING: Gi1/4<br>
...<br>
<br>
[mrtg@mrtg ~]$ snmpwalk -v2c -c public c45switch ifDescr<br>
IF-MIB::ifDescr.2 = STRING: TenGigabitEthernet1/1<br>
IF-MIB::ifDescr.3 = STRING: TenGigabitEthernet1/2<br>
IF-MIB::ifDescr.4 = STRING: GigabitEthernet1/3<br>
IF-MIB::ifDescr.5 = STRING: GigabitEthernet1/4<br>
...<br>
<br>
Also it is not needed to create MRTG configuration manually. It is better to<br>
generate it automatically. Advantage is that somebody add new interface that<br>
it will be automatically measured.<br>
I am running my script which call "cfgmaker".<br>
<br>
cfgmaker is part of MRTG package and it automatically generate MRTG<br>
configuration file. You can call them for example 1 per day from cron at<br>
night. I use main mrtg.cfg file with Includes. One included file is per one<br>
switch/router.<br>
<br>
Here is example of cfgmaker:<br>
cfgmaker --ifref=name --snmp-options=:::2::2 public@c45switch<br>
<br>
Here is part of output for 10G interface:<br>
<br>
------------------------------<wbr>----------------<br>
### Interface 2 >> Descr: 'TenGigabitEthernet1/1' | Name: \
'Te1/1' | Ip: '' |<br>
Eth: '' ###<br>
<br>
Target[c45switch_Te1_1]: #Te1/1:public@c45switch:::2::2<br>
SetEnv[c45switch_Te1_1]: MRTG_INT_IP="" \
MRTG_INT_DESCR="<wbr>TenGigabitEthernet1/1"<br> MaxBytes[c45switch_Te1_1]: \
1250000000<br> Title[c45switch_Te1_1]: Traffic Analysis for Te1/1 -- C45SWITCH<br>
PageTop[c45switch_Te1_1]: <h1>Traffic Analysis for Te1/1 -- \
C45SWITCH</h1><br> <div id="sysdetails"><br>
<table><br>
<tr><br>
<td>System:</td><br>
<td>C45SWITCH in </td><br>
</tr><br>
<tr><br>
<td>Maintainer:</td><br>
<td></td><br>
</tr><br>
<tr><br>
<td>Description:</td><br>
<td>TenGigabitEthernet1/1 Uplink \
port<br> </td><br>
</tr><br>
<tr><br>
<td>ifType:</td><br>
<td>ethernetCsmacd (6)</td><br>
</tr><br>
<tr><br>
<td>ifName:</td><br>
<td>Te1/1</td><br>
</tr><br>
<tr><br>
<td>Max Speed:</td><br>
<td>1250.0 MBytes/s</td><br>
</tr><br>
</table><br>
</div><br>
------------------------------<wbr>------------------<br>
<br>
Best regards, Pavel.<br>
<br>
</blockquote></div><br></div></div>
_______________________________________________
mrtg mailing list
mrtg@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/mrtg
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic