I have a Cisco switch. My handoff from my home network to my carriers router is on FastEthernet0/8. I currently get statistics for that port using the following snippet from /etc/mrtg/mrtg.cfg:
### Interface 8 >> Descr: 'FastEthernet0/8' | Name: 'Fa0/8' | Ip: 'No Ip' | Eth:
'00-11-21-e4-db-c8' ###
Target[192.168.1.20_Fa0_8]: #Fa0/8:(snip ro-commstring)@192.168.1.20:
SetEnv[192.168.1.20_Fa0_8]: MRTG_INT_IP="No Ip" MRTG_INT_DESCR="FastEthernet0/8"
MaxBytes[192.168.1.20_Fa0_8]: 12500000
Title[192.168.1.20_Fa0_8]: Traffic Analysis for Fa0/8 -- Bubbaville_Switch
PageTop[192.168.1.20_Fa0_8]: <h1>Traffic Analysis for Fa0/8 -- Bubbaville_Switch
</h1>
<div id="sysdetails">
<table>
<tr>
<td>System:</td>
<td>Bubbaville_Switch in </td>
</tr>
<tr>
<td>Maintainer:</td>
<td></td>
</tr>
<tr>
<td>Description:</td>
<td>FastEthernet0/8 </td>
</tr>
<tr>
<td>ifType:</td>
<td>ethernetCsmacd (6)</td>
</tr>
<tr>
<td>ifName:</td>
<td>Fa0/8</td>
</tr>
<tr>
<td>Max Speed:</td>
<td>12.5 MBytes/s</td>
</tr>
<tr>
<td>Ip:</td>
<td>No Ip (No DNS name)</td>
</tr>
</table>
</div>
Would I create a new interface using the above as a model and adding your entries? While I tried to create a new entry, I must have duplicated something, as I only have FA0/8 still, without the daily stats.
Would I need to copy the above entry, change the target name to something like TotalTraffic_FA0/8, change SetEnv to also be TotalTraffic_FA0/8,then do the same for MaxBytes, Title and PageTop?
Then add these entries (maybe put them under MaxBytes?)
Suppress[]:dwm
Factor[]:86400
routers.cgi*Options[]:nototal bytes
YLegend[]:bytes transferred
LegendI[]:Total bytes transferred
Or would I use:
Suppress[TotalTraffic_FA0/8]:dwm
Factor[TotalTraffic_FA0/8]:86400
routers.cgi*Options[TotalTraffic_FA0/8]:nototal bytes
YLegend[TotalTraffic_FA0/8]:bytes transferred
LegendI[TotalTraffic_FA0/8]:Total bytes transferred
*Edit: I think the second option worked (creating a new target and naming everything in that target to TotalTraffic_FA0/8. I see a totaltraffic_fa0_8.rrd, and see two entries on the left hand side of routers2.cgi for FastEthernet0_8. One gives me daily, weekly, monthly and annual stats. The second gives one graph. No data yet, but hoping I'll see something tonight.Statistics: Posted by bruceg — Thu Jan 29, 2015 6:10 am
]]>