cacti 对 squid的监控


Cacti是一款网络监控软件,对许多东西都能监控,有监数据库的有监PHP的等,下面讲下cacti 对 squid的监控!

刚做完了一个cacti对squid的监控,下面把步骤写下来

cacti服务器端的设置

1 下载cacti 对squid监控的模板,将模板解压缩后放入/cacti/resource/snmp_queries/文件夹下面

http://u.028life.com/link.php?url=http://forums.cacti.net%2Fdownload.php%3Fid%3D79

2 将模板下载到本地机一份,解压缩后,将其中名字为:cacti_host_template_webcache_squid_server_snmp

导入cacti中

做法:点击Import/Export 下 Export Templates

点击浏览/save.

3 被监控的squid服务上配置如下

1 确认squid 编译有--enable-snmp选项

configure options: '--prefix=/user/squid' '--enable-dlmalloc' '--enable-gnuregex' '--enable-async-io' '--enable-storeio=aufs,diskd,ufs' '--enable-snmp' '--enable-cachemgr-hostname' '--enable-arp-acl' '--enable-htcp' '--enable-ssl' '--enable-large-cache-files' '--disable-internal-dns' '--disable-linux-netfilter' '--disable-ident-lookups' '--enable-truncate' '--with-maxfd=6553500' '--enable-forw-via-db' '--disable-cache-digests' '--enable-referer-log' '--enable-useragent-log' '--enable-delay-pools' '--enable-kill-parent-hack' '--disable-carp' '--disable-icmp' '--enable-auth' '--enable-epoll' '--enable-follow-x-forwarded-for' '--with-pthreads'

2 编辑squid.conf

加入如下行:

acl CactiServer src 119.16.24.10

acl SNMP snmp_community net

snmp_port 3401

snmp_access allow SNMP CactiServer

解释 acl CactiServer src 119.16.24.10 此IP为cacti服务器的名称。

3 vi /etc/snmp

snmpwalk -v 1 -c 'net' 127.0.0.1:3401 .1.3.6.1.4.1.3495.1

加入此行重启服务

4 在cacti 服务器添加监控

Host Template 选择 WebCache - squid server选项

Downed Device Detection 选择ping 选项

SNMP Version 选择1

SNMP port 输入 3401

5 剩下的就是添加机器的事情了,结束

通过上面的五点,我们学会了cacti 对 squid的监控 的具体方法!希望对你们有用!

相关内容