Browsed by
Month: 2010 年 6 月

weathermap配合Cacti显示网络流量图(2)

weathermap配合Cacti显示网络流量图(2)

Cacti有个插件叫Advanced Ping,可以显示服务器到各个地方的ping延时和丢包率

,配合weathermap可以做出一个基于地图的延时和丢包率,看起来比较方便

首先用google地图,截图,大小看你要监控的范围而定,然后把图片文件放到/images目录下,在weathermap的editor里选map

properties里的背景图片,然后放置节点,建立连接,之后把连接与rrd文件一一对应,因为weathermap默认是显示带宽,所以要稍

微调节一下rrd文件,data source里面改成

TARGET gauge:/usr/local/apache2/htdocs/cacti-0.8.7e/rra/18/109.rrd:avg:loss

其中gauge是表示数据不用×8,因为rrd文件给的流量单位是byte,所以weathermap自动×8变成bit,而时间和丢包率是不用换算的

avg和loss是通过查看data source里面Turn On Data Source Debug Mode下显示出来的数据,类似这样
Data Source Debug

/usr/bin/rrdtool create \
/usr/local/apache2/htdocs/cacti-0.8.7e/rra/24/117.rrd \
–step 60 \
DS:loss:GAUGE:120:0:100 \
DS:avg:GAUGE:120:0:500 \
DS:max:GAUGE:120:0:500 \
DS:dev:GAUGE:120:0:500 \
DS:min:GAUGE:120:0:500 \
RRA:AVERAGE:0.5:1:500 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:500 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \

都做完后weathermap自动生成的图

From Weathermap
weathermap配合Cacti显示网络流量图(1)

weathermap配合Cacti显示网络流量图(1)

weathermap是一个强大的cacti插件,可以显示网络即时流量或者延时的情况

首先cacti要能正常运行,然后下载weathermap,在cacti的plugin目录下解压,但这时weathermap并没有启用,要编辑cacti目录/included/global.php,加入

$plugins = array();   //找到此行,下边可以看到一堆$plugins[]
$plugins[] = ‘weathermap’   //加入此行

然后到Utilities->User Management->admin,把weathermap前边的几个框框勾上,使admin有权限运行,这样基本能用了

然后到/plugin/weathermap目录下把editor-config.php-dist重命名为editor-config.php,这样就可以编辑自己的网络拓扑图,但还要添加以下权限

chown www configs
chmod u+w configs

都做好以后,可以在weathermap的选项下单击editor,创建网络节点和链接,然后选则对应的网络Data Source,做完图后,在console->Management->Weathermaps添加就好了

下面图是随手做的,不太整齐,要追求好看的话用编辑器的命令行进行编辑

From Weathermap
cisco设备添加Radius/Tacacs+ 认证

cisco设备添加Radius/Tacacs+ 认证

aaa new-model

radius-server/tacacs-server host 182.23.153.5 auth-port 1812 acct-port 1813 key test

//首先radius/tacacs认证,连不上服务器则用本地的认证
aaa authentication login first group radius/tacacs+ local

//直接本地认证
aaa authentication login second local enable

//console口直接本地认证
line con 0
login authentication second

//telnet用radius/tacacs认证
line vty 0 4
login authentication first