<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>gjw_apparitor 博客 &#187; Monitor</title>
	<atom:link href="http://www.apparitor.info/category/monitor/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.apparitor.info</link>
	<description>孤独是一种态度</description>
	<lastBuildDate>Wed, 16 May 2012 07:36:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>nagios 配置详解</title>
		<link>http://www.apparitor.info/2011/04/07/nagios-%e9%85%8d%e7%bd%ae%e8%af%a6%e8%a7%a3/</link>
		<comments>http://www.apparitor.info/2011/04/07/nagios-%e9%85%8d%e7%bd%ae%e8%af%a6%e8%a7%a3/#comments</comments>
		<pubDate>Thu, 07 Apr 2011 07:03:42 +0000</pubDate>
		<dc:creator>gjw_apparitor</dc:creator>
				<category><![CDATA[Monitor]]></category>
		<category><![CDATA[nagios]]></category>

		<guid isPermaLink="false">http://www.apparitor.info/?p=269</guid>
		<description><![CDATA[1、定义服务的配置文件 services.cfg define service { host_name test//主机名字 hosts.cfg配置，多写以“，”号分割。 service_description check_http//监控服务的描述 contact_groups gjw_apparitor//联系组 contacts.cfg配置 check_period 24x7//检查时间 timeperiods.cfg配置 max_check_attempts 3//最大尝试次数2～3次 normal_check_interval 5//正常检查的间隔/分 retry_check_interval 2//重试检查的间隔/分 notification_interval 10//报警的间和时间/分 active_checks_enabled 1 //启用活动监测服务 passive_checks_enabled 1 //启用被动监测服务 parallelize_check 1 //启用并发活动监测服务 obsess_over_service 1 //启用服务防停滞 check_freshness 0 //关闭更新监测 notifications_enabled 1 //启用事件通知 event_handler_enabled 1 //启用事件处理程序 flap_detection_enabled 1 //启用状态抖动监测 failure_prediction_enabled 1 //启用故障预测 process_perf_data 1 //启用进程性能数据记录 retain_status_information]]></description>
			<content:encoded><![CDATA[<p>1、定义服务的配置文件</p>
<p>services.cfg</p>
<pre>define service {
      	host_name                       test//主机名字 hosts.cfg配置，多写以“，”号分割。
      	service_description             check_http//监控服务的描述
      	contact_groups                  gjw_apparitor//联系组 contacts.cfg配置
      	check_period                    24x7//检查时间 timeperiods.cfg配置
     	max_check_attempts             3//最大尝试次数2～3次
       	normal_check_interval         5//正常检查的间隔/分
      	retry_check_interval            2//重试检查的间隔/分
      	notification_interval           10//报警的间和时间/分
    	active_checks_enabled      1  //启用活动监测服务
     	passive_checks_enabled        1  //启用被动监测服务
      	parallelize_check                1  //启用并发活动监测服务
      	obsess_over_service               1  //启用服务防停滞
      	check_freshness                  0  //关闭更新监测
      	notifications_enabled             1  //启用事件通知
      	event_handler_enabled          1  //启用事件处理程序
      	flap_detection_enabled          1  //启用状态抖动监测
      	failure_prediction_enabled     1  //启用故障预测
      	process_perf_data                   1  //启用进程性能数据记录
      	retain_status_information      1 //启用状态信息保存功能
      	retain_nonstatus_information     1  //启用非状态信息保存功能
      	is_volatile                             0         //设定服务非易失
      	notification_period             24x7//报警的时间 timeperiods.cfg配置
      	notification_options            w,u,c,r//报警的状态：w—报警(warning),u—未知(unkown),c—严重(critical),或者r—从异常情况恢复正常
      	check_command                   check_tcp!80//检查的命令 commands.cfg 配置
<span id="more-269"></span>}</pre>
<p>2、定义主机的配置文件<br />
hosts.conf</p>
<pre>define host {
        host_name                test         //主机名名字
        alias                        test_host_group //主机别名
        address                 10.168.1.100 //主机IP
        contact_groups        gjw_apparitor//联系组 contacts.cfg配置
        check_period                            24x7        //检查时间 timeperiods.cfg配置
        max_check_attempts              3        //最大尝试次数，建议2～3次
        normal_check_interval         5         //正常检查的间隔/分
        retry_check_interval         2        //重试检查的间隔/分
        notification_interval           10        //报警的间和时间/分
        notifications_enabled                  1         //启用主机事件通知
        event_handler_enabled           1        //启用主机事件处理程序
        flap_detection_enabled         1        //启用状态抖动监测
        failure_prediction_enabled     1        //启用故障预测
        process_perf_data                       1        //启用进程性能数据记录
        retain_status_information      1        //启用状态信息保存功能
        retain_nonstatus_information       1        //启用非状态信息保存功能
        notification_period                     24x7        //报警的时间 timeperiods.cfg配置
        notification_options               d,u,r        //报警的状态：d—宕机(down),u—未知(unkown),或者r—从异常情况恢复正常。
        check_command                   check-host-alive//检查的命令 commands.cfg 配置

}</pre>
<p>3、定义主机组的配置文件</p>
<p>hostgroup.cfg</p>
<pre>define hostgroup {
        hostgroup_name               test_group              //组名字
        alias                           xxx_test_group       //组别名
        members                      test                   //主机名，多写以“，”号分割。
}</pre>
<p>4、定义联系人的配置文件</p>
<p>contacts.cfg</p>
<pre>define contact{
        contact_name                 test_name            //联系人名字
        alias                        test_name_admin      //联系人别名
        service_notification_period     24x7              //主机报警时间 timeperiods.cfg配置
        host_notification_period        24x7             //服务报警时间 timeperiods.cfg配置
        service_notification_options    w,u,c,r,f,s      //报警的状态：w—报警(warning),u—未知(unkown),c—严重(critical),或者r—从异常情况恢复正常
        host_notification_options       d,u,r,f,s       //报警的状态：d—宕机(down),u—未知(unkown),或者r—从异常情况恢复正常。
        service_notification_commands   notify-service-by-email         //服务报警类型（邮件）
        host_notification_commands      notify-host-by-email           //主机报警类型（邮件）
        email                           gjw.apparitor@gmail.com        //邮件地址
        pager                           13810000000                    //手机号
}

define contactgroup{
contactgroup_name gjw_apparitor    //联系组名字
aliasnagios Admin                  //联系组别名
memberstest_name                   //联系人名字，多写以“，”号分割。
}</pre>
<div style="margin-top: 15px; font-style: italic">
<p><strong>原创文章，转载请注明：</strong> 转载自<a href="http://www.apparitor.info/">gjw_apparitor 博客</a></p>
<p><strong>本文链接地址:</strong> <a href="http://www.apparitor.info/2011/04/07/nagios-%e9%85%8d%e7%bd%ae%e8%af%a6%e8%a7%a3/">nagios 配置详解</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.apparitor.info/2011/04/07/nagios-%e9%85%8d%e7%bd%ae%e8%af%a6%e8%a7%a3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>cacti 监控nginx</title>
		<link>http://www.apparitor.info/2011/04/07/cacti-%e7%9b%91%e6%8e%a7nginx/</link>
		<comments>http://www.apparitor.info/2011/04/07/cacti-%e7%9b%91%e6%8e%a7nginx/#comments</comments>
		<pubDate>Thu, 07 Apr 2011 07:00:26 +0000</pubDate>
		<dc:creator>gjw_apparitor</dc:creator>
				<category><![CDATA[Monitor]]></category>
		<category><![CDATA[cacti]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://www.apparitor.info/?p=267</guid>
		<description><![CDATA[一、修改nginx配置 1、nginx编译时允许http_stub_status_module 2、修改nginx配置文件 0 1 2 3 4 5 6 7 8 9 # vi nginx.conf server { …… …… location /NginxStatus { stub_status on; allow 192.168.8.8;#允许cacti IP 访问 access_log off; } } 3、nginx配置文件生效 # kill -HUP `cat /usr/local/nginx/logs/nginx.pid` 二、cacti上安装插件 1、下载cacti for nginx 插件包： http://www.oschina.net/uploads/code/cacti-nginx.tar.gz # tar zxvf cacti-nginx.tar.gz # cd cacti-nginx # chown -R]]></description>
			<content:encoded><![CDATA[<p>一、修改nginx配置</p>
<p>1、nginx编译时允许http_stub_status_module<br />
2、修改nginx配置文件</p>

<div class="wp_codebox"><table><tr id="p2672"><td class="line_numbers"><pre>0
1
2
3
4
5
6
7
8
9
</pre></td><td class="code" id="p267code2"><pre class="text" style="font-family:monospace;"> # vi nginx.conf
server {
……
……
        location /NginxStatus {
        stub_status on;
        allow 192.168.8.8;#允许cacti IP 访问    
             access_log off;
       }
}</pre></td></tr></table></div>

<p>3、nginx配置文件生效</p>
<pre># kill -HUP `cat /usr/local/nginx/logs/nginx.pid`</pre>
<p> <span id="more-267"></span><br />
二、cacti上安装插件<br />
1、下载cacti for nginx 插件包： http://www.oschina.net/uploads/code/cacti-nginx.tar.gz</p>
<pre># tar zxvf cacti-nginx.tar.gz
# cd cacti-nginx
# chown -R cacti. *.pl
# cp *.pl /www/WEB/www/cacti/scripts/</pre>
<p>导入的方式是 Import Templates  >  Import Template from Local File (浏览导入插件包另外2个文件)<br />
cacti_graph_template_nginx_clients_stat.xml<br />
cacti_graph_template_nginx_sockets_stat.xml<br />
导入 cacti_graph_template_nginx_clients_stat.xml 跟 cacti_graph_template_nginx_sockets_stat.xml  的时候，</p>
<p>cacti 出现红字提醒：<br />
Error: XML: Hash version does not exist.</p>
<p>解决：因为你的 cacti 版本太旧了，去Cacti 下个最新版吧：http://www.cacti.net/download_cacti.php
<div style="margin-top: 15px; font-style: italic">
<p><strong>原创文章，转载请注明：</strong> 转载自<a href="http://www.apparitor.info/">gjw_apparitor 博客</a></p>
<p><strong>本文链接地址:</strong> <a href="http://www.apparitor.info/2011/04/07/cacti-%e7%9b%91%e6%8e%a7nginx/">cacti 监控nginx</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.apparitor.info/2011/04/07/cacti-%e7%9b%91%e6%8e%a7nginx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CACTI 安装</title>
		<link>http://www.apparitor.info/2011/04/07/cacti-%e5%ae%89%e8%a3%85/</link>
		<comments>http://www.apparitor.info/2011/04/07/cacti-%e5%ae%89%e8%a3%85/#comments</comments>
		<pubDate>Thu, 07 Apr 2011 06:58:16 +0000</pubDate>
		<dc:creator>gjw_apparitor</dc:creator>
				<category><![CDATA[Monitor]]></category>
		<category><![CDATA[cacti]]></category>

		<guid isPermaLink="false">http://www.apparitor.info/?p=265</guid>
		<description><![CDATA[一、环境MAP安装 安装MYSQL # cd /software/map # wget http://dev.mysql.com/get/Downloads/MySQL-5.1/mysql-5.1.34.tar.gz/from/ftp://ftp.stu.edu.tw/pub/Unix/Database/Mysql/ # tar zxvf mysql-5.1.34.tar.gz # cd mysql-5.1.34 # useradd mysql # ./configure –prefix=/data_server/map/mysql # make # make install # cp support-files/my-medium.cnf /etc/my.cnf # vi /etc/my.cnf #skip-federated # cp support-files/mysql.server /etc/init.d/mysqld # chmod +x /etc/init.d/mysqld # cd /data/map/mysql # chown -R mysql:mysql /data/map/mysql/ # bin/mysql_install_db –user=mysql # chkconfig]]></description>
			<content:encoded><![CDATA[<p>一、环境MAP安装</p>
<p>安装MYSQL</p>
<pre># cd /software/map
# wget http://dev.mysql.com/get/Downloads/MySQL-5.1/mysql-5.1.34.tar.gz/from/ftp://ftp.stu.edu.tw/pub/Unix/Database/Mysql/
# tar zxvf mysql-5.1.34.tar.gz
# cd mysql-5.1.34
# useradd mysql
# ./configure –prefix=/data_server/map/mysql
# make
# make install
# cp support-files/my-medium.cnf /etc/my.cnf</pre>
<p><span id="more-265"></span></p>
<pre># vi /etc/my.cnf
#skip-federated</pre>
<pre># cp support-files/mysql.server /etc/init.d/mysqld
# chmod +x /etc/init.d/mysqld
# cd /data/map/mysql
# chown -R mysql:mysql /data/map/mysql/
# bin/mysql_install_db –user=mysql
# chkconfig –add mysqld
# service mysqld start
# ln -s /data_server/map/mysql/bin/* /usr/local/bin/</pre>
<p>安装APACHE</p>
<p>代码:</p>
<pre># cd /software/map/
# wget http://apache.mirror.phpchina.com/httpd/httpd-2.2.11.tar.gz
# tar zxvf httpd-2.2.11.tar.gz
# cd httpd-2.2.11
# ./configure –prefix=/data_server/map/http/ –with-mpm=worker –enable-so
# make
# make install
# cd /data_server/map/http
# cp bin/apachectl /etc/init.d/httpd</pre>
<pre># vi /etc/init.d/httpd #在开头插入以下内容

# chkconfig: – 85 15
# description: Apache is a World Wide Web server. It is used to serve \
# HTML files and CGI.</pre>
<pre># Chkconfig --add httpd</pre>
<pre># vi /data_server/map/http/conf/httpd.conf

DocumentRoot “/data11/www”

AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-tar .tgz
ddType application/x-httpd-php .php
AddType image/x-icon .ico
DirectoryIndex index.php index.html</pre>
<pre># service httpd start</pre>
<p>安装PHP</p>
<p>代码:</p>
<pre># wget
# tar zxvf php-5.2.9.tar.gz
# ./configure –prefix=/data_server/map/php \
–with-apxs2=/data_server/map/http/bin/apxs \
–with-mysql=/data_server/map/mysql \
–enable-mbstring \
–enable-sockets \
–with-openssl
# make
# make install</pre>
<p>安装 RRDTOOL<br />
rrdtool 1.2.x以后不用GD画图了。用freetype 和 libart_lgpl<br />
所以不用在安装GD了<br />
代码:</p>
<pre># BUILD_DIR=/gjw/rrdbuild
# INSTALL_DIR=/usr/local/rrdtool-1.2.30
# set BUILD_DIR=/gjw/rrdbuild
# set INSTALL_DIR=/usr/local/rrdtool-1.2.30
# mkdir -p $BUILD_DIR
# cd $BUILD_DIR
# wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.2.23.tar.gz
# tar zxf rrdtool-1.2.30.tar.gz
# cd $BUILD_DIR
# wget http://oss.oetiker.ch/rrdtool/pub/libs/zlib-1.2.3.tar.gz
# tar zxf zlib-1.2.3.tar.gz
# cd zlib-1.2.3
# env CFLAGS=”-O3 -fPIC” ./configure –prefix=$BUILD_DIR/lb
# make
# make install
# cd $BUILD_DIR
# wget http://oss.oetiker.ch/rrdtool/pub/libs/libpng-1.2.10.tar.gz
# tar zxvf libpng-1.2.10.tar.gz
# cd libpng-1.2.10
# env CPPFLAGS=”-I$BUILD_DIR/lb/include” LDFLAGS=”-L$BUILD_DIR/lb/lib” CFLAGS=”-O3 -fPIC” \
# ./configure –disable-shared –prefix=$BUILD_DIR/lb
# make
# make install
# cd $BUILD_DIR
# wget http://oss.oetiker.ch/rrdtool/pub/libs/freetype-2.1.10.tar.bz2
# tar jxvf freetype-2.1.10.tar.bz2
# cd freetype-2.1.10
# env CPPFLAGS=”-I$BUILD_DIR/lb/include” LDFLAGS=”-L$BUILD_DIR/lb/lib” CFLAGS=”-O3 -fPIC” \
# ./configure –disable-shared –prefix=$BUILD_DIR/lb
# make
# make install
# cd $BUILD_DIR
# wget http://oss.oetiker.ch/rrdtool/pub/libs/libart_lgpl-2.3.17.tar.gz
# tar zxvf libart_lgpl-2.3.17.tar.gz
# cd libart_lgpl-2.3.17
# env CFLAGS=”-O3 -fPIC” ./configure –disable-shared –prefix=$BUILD_DIR/lb
# make
# make install
# ranlib $BUILD_DIR/lb/lib/*.a
# IR=-I$BUILD_DIR/lb/include
# CPPFLAGS=”$IR $IR/libart-2.0 $IR/freetype2 $IR/libpng”
# LDFLAGS=”-L$BUILD_DIR/lb/lib”
# CFLAGS=-O3
# export CPPFLAGS LDFLAGS CFLAGS PATH
# cd $BUILD_DIR/rrdtool-1.2.30
# ./configure –prefix=$INSTALL_DIR –disable-python –disable-tcl
# make clean
# make
# make install
# cat rrdtool-1.2.30/doc/rrdbuild.txt</pre>
<p>这个文档就是安装rrdtool的说明</p>
<p>安装 net-snmp<br />
NET-SNMP 官方网站:http://www.net-snmp.org/<br />
代码:</p>
<pre># cd /software/cacti
# wget http://nchc.dl.sourceforge.net/sourceforge/net-snmp/net-snmp-5.4.2.1.tar.gz
# tar zxvf net-snmp-5.4.2.1.tar.gz
# cd net-snmp-5.4.2.1
# ./configure –prefix=/data_server/net-snmp –enable-developer
# make
# make install
# ln –s /data_server/net-snmp/bin/* /usr/local/bin/</pre>
<p>安装 cacti<br />
代码:</p>
<pre># wget http://www.cacti.net/downloads/cacti-0.8.7d.tar.gz
# tar zxvf cacti-0.8.7d.tar.gz
# cd cacti-0.8.7d
# useradd cacti
# mysqladmin -uroot -p create cacti
# mysql -uroot -p cacti &lt; cacti.sql</pre>
<pre># mysql -uroot -p

GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY ‘cacti’;
flush privileges;
quit
# vi include/config.php

$database_default = “cacti”;
$database_hostname = “127.0.0.1″;
$database_username = “cacti”;
$database_password = “cacti”;
-0.8.7d</pre>
<pre># cp -r cacti-0.8.7d/ /data11/www 复制到你的apache的访问目录
# chown -R cacti:cacti /data11/www/cacti/
用浏览器打开http://ip/cacti/</pre>
<p>name:admin<br />
passwd:admin<br />
之后会提示更改密码。修改后可以进入cacti了。</p>
<p>安装 cacti 插件</p>
<p>http://cactiusers.org/获取插件最新版本,安装插件前必须要做一件事就是安装</p>
<p>Plugin Architecture,这个是所有插件的基础,目前对应 0.8.7d 的 Plugin Architecture 版本为<br />
安装 Plugin Architecture 方法:<br />
代码:</p>
<pre># wget http://mirror.cactiusers.org/downloads/plugins/cacti-plugin-0.8.7d-PA-v2.4.zip
# unzip cacti-plugin-0.8.7d-PA-v2.4.zip</pre>
<p>打补丁</p>
<p>打补丁方法1</p>
<pre># cd /data11/htdocs/cacti
# patch -p1 -N &lt; /software/CACTI/cacti-plugin-0.8.7d-PA-v2.4/cacti-plugin-0.8.7d-PA-v2.4.diff</pre>
<p>打补丁方法2</p>
<pre># cp -rf cacti-plugin-0.8.7d-PA-v2.4/files-0.8.7d/* /data11/htdocs/cacti</pre>
<p>导入sql、修改配置文件</p>
<pre># mysql -uroot -pmysql cacti &lt; pa.sql
# cd /data11/www/cacti</pre>
<pre># vi include/global.php
将$config['url_path'] = ‘/’;改为

$config['url_path'] = ‘/cacti/’;</pre>
<p>安装 thold 和 monitor 插件<br />
代码:</p>
<pre># wget http://cactiusers.org/downloads/monitor.tar.gz
# tar zxvf monitor.tar.gz
# cp -r monitor /data11/www/cacti/plugins/
# wget http://cactiusers.org/downloads/thold.tar.gz
# tar zxvf thold.tar.gz
# cp -r thold /data11/www/cacti/plugins/
# wget http://mirror.cactiusers.org/downloads/plugins/settings-0.5.tar.gz
# tar zxvf settings-0.5.tar.gz
# cp -r settings /data11/www/cacti/plugins/
# cd /data11/htdocs/cacti</pre>
<pre># vi include/global.php
找到 $plugins = array();
在下边加入

$plugins[] = ‘monitor’;
$plugins[] = ‘thold’;
$plugins[] = ’settings’;</pre>
<p>安装spine<br />
代码:</p>
<pre># wget http://www.cacti.net/downloads/spine/cacti-spine-0.8.7c.tar.gz
# tar zxvf cacti-spine-0.8.7c.tar.gz
# cd cacti-spine-0.8.7c
# libtoolize –force
# autoconf
# autoheader
# automake
# ./configure
# chmod +x configure
# ./configure –prefix=/data_server/spine \
–with-mysql=/data_server/map/mysql \
–with-snmp=/data_server/net-snmp/
# make
# make install</pre>
<pre># vi /data_server/spine/etc/spine.conf
DB_Host localhost
DB_Database cacti
DB_User cacti
DB_Pass cacti
DB_Port 3306</pre>
<p>打开cacti界面<br />
console &gt; settings &gt; Paths &gt; Spine Poller File Path<br />
/data02/tmp/spine/bin/spine<br />
save<br />
console &gt; settings &gt; Poller &gt; Poller Type<br />
选择：spine<br />
save<br />
代码:</p>
<pre># cd /data11/www/
# chown -R cacti: rra/ log/
# su – cacti
# crontab -e

*/5 * * * * /usr/local/bin/php/data11/htdocs/cacti/poller.php &gt; /dev/null 2&gt;&amp;1</pre>
<div style="margin-top: 15px; font-style: italic">
<p><strong>原创文章，转载请注明：</strong> 转载自<a href="http://www.apparitor.info/">gjw_apparitor 博客</a></p>
<p><strong>本文链接地址:</strong> <a href="http://www.apparitor.info/2011/04/07/cacti-%e5%ae%89%e8%a3%85/">CACTI 安装</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.apparitor.info/2011/04/07/cacti-%e5%ae%89%e8%a3%85/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>snmp 抓取超过100M的bond</title>
		<link>http://www.apparitor.info/2011/04/02/snmp-%e6%8a%93%e5%8f%96%e8%b6%85%e8%bf%87100m%e7%9a%84bond/</link>
		<comments>http://www.apparitor.info/2011/04/02/snmp-%e6%8a%93%e5%8f%96%e8%b6%85%e8%bf%87100m%e7%9a%84bond/#comments</comments>
		<pubDate>Sat, 02 Apr 2011 07:34:26 +0000</pubDate>
		<dc:creator>gjw_apparitor</dc:creator>
				<category><![CDATA[Monitor]]></category>
		<category><![CDATA[snmp]]></category>

		<guid isPermaLink="false">http://www.apparitor.info/?p=149</guid>
		<description><![CDATA[snmp 抓取超过100M的bond cacti的默认模板里 bond最大数为10000000 再网卡超过80M的时候图就会乱。 同事告诉我在snmp.conf的配置文件里添加 0 interface bond0 6 1000000000 原创文章，转载请注明： 转载自gjw_apparitor 博客 本文链接地址: snmp 抓取超过100M的bond]]></description>
			<content:encoded><![CDATA[<p>snmp 抓取超过100M的bond </p>
<p>cacti的默认模板里 bond最大数为10000000 再网卡超过80M的时候图就会乱。<br />
同事告诉我在snmp.conf的配置文件里添加</p>

<div class="wp_codebox"><table><tr id="p1494"><td class="line_numbers"><pre>0
</pre></td><td class="code" id="p149code4"><pre class="text" style="font-family:monospace;">interface  bond0     6 1000000000</pre></td></tr></table></div>

<div style="margin-top: 15px; font-style: italic">
<p><strong>原创文章，转载请注明：</strong> 转载自<a href="http://www.apparitor.info/">gjw_apparitor 博客</a></p>
<p><strong>本文链接地址:</strong> <a href="http://www.apparitor.info/2011/04/02/snmp-%e6%8a%93%e5%8f%96%e8%b6%85%e8%bf%87100m%e7%9a%84bond/">snmp 抓取超过100M的bond</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.apparitor.info/2011/04/02/snmp-%e6%8a%93%e5%8f%96%e8%b6%85%e8%bf%87100m%e7%9a%84bond/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>cacti画图Squid命中率</title>
		<link>http://www.apparitor.info/2011/03/24/cacti%e7%94%bb%e5%9b%besquid%e5%91%bd%e4%b8%ad%e7%8e%87/</link>
		<comments>http://www.apparitor.info/2011/03/24/cacti%e7%94%bb%e5%9b%besquid%e5%91%bd%e4%b8%ad%e7%8e%87/#comments</comments>
		<pubDate>Thu, 24 Mar 2011 08:48:51 +0000</pubDate>
		<dc:creator>gjw_apparitor</dc:creator>
				<category><![CDATA[Monitor]]></category>
		<category><![CDATA[cacti]]></category>

		<guid isPermaLink="false">http://www.apparitor.info/?p=8</guid>
		<description><![CDATA[cacti画图Squid命中率 1、编译squid 编译Squid加上 &#8211;enable-snmp 支持snmp 2、# vi squid.conf 在配置文件加上。 acl CactiHost src 10.168.1.215 acl SNMP snmp_community Squid_snmp snmp_port 3401 snmp_access allow SNMP CactiHost snmp_access deny all &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- 注释： acl CactiHost src 10.168.1.215 ＃定义允许snmp探测的机器IP acl SNMP snmp_community Squid_snmp ＃设置snmp的 community snmp_port 3401 # 监听的端口 snmp_access allow SNMP CactiHost snmp_access deny all 3、测试。再cacti上运行 ＃ snmpwalk -v 1]]></description>
			<content:encoded><![CDATA[<p>cacti画图Squid命中率</p>
<p>1、编译squid<br />
编译Squid加上 &#8211;enable-snmp 支持snmp</p>
<p>2、# vi squid.conf 在配置文件加上。<br />
acl CactiHost src 10.168.1.215<br />
acl SNMP snmp_community Squid_snmp<br />
snmp_port 3401<br />
snmp_access allow SNMP CactiHost<br />
snmp_access deny all<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
<span id="more-8"></span>注释：<br />
acl CactiHost src 10.168.1.215 ＃定义允许snmp探测的机器IP<br />
acl SNMP snmp_community Squid_snmp ＃设置snmp的 community<br />
snmp_port 3401 # 监听的端口<br />
snmp_access allow SNMP CactiHost<br />
snmp_access deny all</p>
<p>3、测试。再cacti上运行<br />
＃ snmpwalk -v 1 -c Squid_snmp 10.168.1.48:3401 .1.3.6.1.4.1.3495.1</p>
<p>4、添加模板</p>
<p>http://forums.cacti.net/download/file.php?id=79</p>
<p>unzip SquidStats-0.1.zip<br />
mv webcache_squid_*.xml cacti_Path/resource/snmp_queries/<br />
打开cacti的WEB<br />
Console -&gt; Import Templates -&gt; 选择文件<br />
导入cacti_host_template_webcache_squid_server_snmp.xml 保存</p>
<p>5、添加监控<br />
Host Template 里选择 WebCache &#8211; Squid-Server(SNMP)<br />
在 Downed Device Detection 选项中不要选择带有snmp的选项。<br />
Ping Method 着个可以随便选择。<br />
SNMP Version 选择 Version 1<br />
SNMP Port   选择 3401</p>
<p>其他的按照你的配置填。
<div style="margin-top: 15px; font-style: italic">
<p><strong>原创文章，转载请注明：</strong> 转载自<a href="http://www.apparitor.info/">gjw_apparitor 博客</a></p>
<p><strong>本文链接地址:</strong> <a href="http://www.apparitor.info/2011/03/24/cacti%e7%94%bb%e5%9b%besquid%e5%91%bd%e4%b8%ad%e7%8e%87/">cacti画图Squid命中率</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.apparitor.info/2011/03/24/cacti%e7%94%bb%e5%9b%besquid%e5%91%bd%e4%b8%ad%e7%8e%87/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

