在使用Cacti监控的时候,有时候我们要点一下实时流量图,然后选择realtime选项,进行cacti实时流量查看。这个realtime选项,默认是没有安装的,如果要安装,需要将插件导入到Cacti访问控制台的插件管理中,并启用。
可以去官网下载realtime的最新版本安装包,官方网址:http://docs.cacti.net/plugins# cd /home/wwwroot/default/cacti/plugins
# wget http://docs.cacti.net/_media/plugin:realtime-v0.5-2.tgz
# mv plugin:realtime-v0.5-2.tgz realtime-v0.5-2.tgz
# mkdir /home/wwwroot/default/cacti/cache
# chown www.www -R /home/wwwroot/default/cacti/cache
# tar zxf realtime-v0.5-2.tgz
然后到登录Cacti,进入[Console]-[configuration]-[Plugin Management],对realtime进行Install和Enable。
安装启动完之后,做一些简单的配置。
这就完成了安装,可以到cacti的图形树里查看一下图形,发现出现了realtime的小logo,然后点一下即可查看精确到10秒的图形
//给admin用户授权
登录Cacti,进行[Console]-[Utilities]-[User Management],点admin用户,在[Realm Permissions]中我,勾选“Plugin->Realtime”。
//第一次验证
此时,到[Graphs]中,找一个图,可以发现在其右侧已经出现“Realtime”的一个小Logo,但当点此logo进行realtime查看时,会发现弹出的窗口中显示“The Image Cache Directory directory does not exist. Please first create it and set permissions and then attempt to open another realtime graph.”,提示出没有Cache目录以及权限等。
//设置Cache目录及权限
在realtime插件包中的README中写到:Create a folder somewhere on your system that is accessible to the apache user for writing.
在官网的文档中对于Installation中也写到:You need to also create a folder somewhere on you system that is accessible to the apache user for writing.This folder should bo different than other transient folders used by plugins as it will b periodically pruned by this plugin.
所以,还要做如下操作。
[root@centos53 /]# mkdir /home/wwwroot/default/cacti/cache[root@centos53 /]# chown www.www -R /home/wwwroot/default/cacti/cache
之后,还要login cacti,进入[console]-[configuration]-[settings]-[Misc],设置“Cache Diredtiory”为“/home/wwwroot/default/cacti/cache”
//最终验证
按上面“第一次验证”的方法,验证一下,完美成功。
本站部分资源收集于网络,纯个人收藏,无商业用途,如有侵权请及时告知!