我已经configuration了MRTG进行带宽监视,现在似乎工作,我怎么configurationMRTG监视IP别名? 我的意思是用ifconfig:
eth0 eth0:1 eth0:2
eth0:1和eth0:2是别名
对于真正的phisic界面/etc/mrtg.cfg如下:
Target[localhost_eth0]: #eth0 public@localhost SetEnv[localhost_eth0]: MRTG_INT_IP="xxx.xxx.xxx.xxx" MRTG_INT_DESCR="eth0" MaxBytes[localhost_eth0]: 1250000 Title[localhost_eth0]: Traffic Analysis for eth0 PageTop[localhost_eth0]: Traffic Analysis for eth0
对于IP别名,我只需要configuration如下
Target[localhost_eth0:1]: #eth0:1 public@localhost SetEnv[localhost_eth0:1]: MRTG_INT_IP="xxx.xxx.xxx.xxx" MRTG_INT_DESCR="eth0:1" MaxBytes[localhost_eth0:1]: 1250000 Title[localhost_eth0:1]: Traffic Analysis for eth0:1 PageTop[localhost_eth0:1]: <h1>Traffic Analysis for eth0:1</h1>
提前感谢
我不相信你可以做你想做的事情,至less你想做什么。
我不相信Linux执行每个地址的数据包计费,只有每个接口。 由于eth0:X实际上都是相同的接口,只是不同的地址,它们都将在eth0统计中被考虑。
你可以做的是看看防火墙的东西是如何工作的。 有机会计数数据包/字节在那里,你可以设置规则来计算每个别名。 然后你可以查询这些计数器并生成你的图表。 但是,我怀疑MRTG会为你做那些事情。
看看https://lists.oetiker.ch/pipermail/mrtg/2003-May/024190.html这似乎是关于主题。