<?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>风叶 &#187; rrd</title>
	<atom:link href="http://blog.myhnet.cn/tag/rrd/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.myhnet.cn</link>
	<description>秋湍泻石髓 风叶聚云根</description>
	<lastBuildDate>Fri, 20 Aug 2010 15:05:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>cacti安装与配置</title>
		<link>http://blog.myhnet.cn/2009/04/09/how-to-install-and-configure-cacti/</link>
		<comments>http://blog.myhnet.cn/2009/04/09/how-to-install-and-configure-cacti/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 03:17:14 +0000</pubDate>
		<dc:creator>myhnet</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[cacti]]></category>
		<category><![CDATA[状态监控]]></category>
		<category><![CDATA[监控]]></category>
		<category><![CDATA[系统监控]]></category>
		<category><![CDATA[网络流量监控]]></category>
		<category><![CDATA[rrd]]></category>
		<category><![CDATA[rrdtool]]></category>
		<category><![CDATA[snmp]]></category>
		<category><![CDATA[snmpd.conf]]></category>
		<category><![CDATA[安装配置]]></category>
		<category><![CDATA[安装配置入门]]></category>

		<guid isPermaLink="false">http://blog.myhnet.cn/?p=744</guid>
		<description><![CDATA[原来我写过一篇文件讲过怎么样安装配置mrtg与nagios来进行系统监控，今天，我继续介绍一个新的系统监控软件：cacti。 cacti其实是一套php程序，它运用snmpget采集数据，使用rrdtool绘图。它的界面非常漂亮，更难能可贵的是，它提供了强大的数据管理和用户管理功能，一张图是属于一个host的，每一个host又可以挂载到一个树状的结构上。用户的管理上，作为一个开源软件，它居然做到为指定一个用户能查看的“树”、host、甚至每一张图，还可以与LDAP结合进行用户的验证！ 介绍完功能之后，我们开始来正式安装cacti。 下载cacti： cacti是一个开源的软件，我们可以在他的官方网站上下载到最新的稳定版本（目前为0.8.7c），下载地址如下： http://www.cacti.net/spine_download.php 下载完毕之后，将其解压到相应位置，并配置好你相应的web程序（apache,ngnix等） 运行条件： 1，mysql服务器： cacti是依赖于mysql来运行的。所以： 你的php必须支持mysql连接 有一个可读写的mysql数据库 &#160; 确定好这两个之后，修改cacti解压后根目录里面的include/config.php文件，并将cacti.sql导入到数据库里面。 2，rrdtool： 因为cacti绘图是依赖于rrdtool这个工具，所以，我们还要安装他相关的rpm包。这些包，RHEL(CentOS)的网方源中是没有的，但是我们可以从rpmforge上面找到，当然，应该也可以到rrdtool的官方网站上找到。我这里只提供rpm的下载地址： rrdtool-1.2.30-1.el5.rf.i386.rpm rrdtool-devel-1.2.30-1.el5.rf.i386.rpm perl-rrdtool-1.2.30-1.el5.rf.i386.rpm 我们要下载并安装以上三个包才可以正常使用cacti。 3，snmp的配置 因为cacti要使用到snmpget等一系列的snmp命令，我们要在采集机器上（也就是安装cacti的机器上）安装net-snmp-utils以及perl-Net-SNMP。这个相对来说就非常简单了，我们用yum就可以直接搞定。 被采集的机器上面必须要安装snmpd服务，其配置方法可以参看我那篇关于MRTG的文件（点击这里进入） 这里有一个样版，可以参考一下： rocommunity&#160; &#160; &#160;publiccom2sec notConfigUser&#160; default&#160; &#160; &#160; &#160;publicgroup&#160; &#160;notConfigGroup v1&#160; &#160; &#160; &#160; &#160; &#160;notConfigUsergroup&#160; &#160;notConfigGroup v2c&#160; &#160; &#160; &#160; &#160; &#160;notConfigUserview&#160; &#160; systemview&#160; &#160; &#160;included&#160; &#160; &#160; systemaccess&#160; notConfigGroup &#34;&#34;&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>原来我写过一篇文件讲过怎么样安装配置mrtg与nagios来进行系统监控，今天，我继续介绍一个新的系统监控软件：cacti。</p>
<p>cacti其实是一套php程序，它运用snmpget采集数据，使用rrdtool绘图。它的界面非常漂亮，更难能可贵的是，它提供了强大的数据管理和用户管理功能，一张图是属于一个host的，每一个host又可以挂载到一个树状的结构上。用户的管理上，作为一个开源软件，它居然做到为指定一个用户能查看的“树”、host、甚至每一张图，还可以与LDAP结合进行用户的验证！</p>
<p>介绍完功能之后，我们开始来正式安装cacti。</p>
<p><strong>下载cacti</strong>：<br />
cacti是一个开源的软件，我们可以在他的官方网站上下载到最新的稳定版本（目前为0.8.7c），下载地址如下：<br />
<a href="http://www.cacti.net/spine_download.php">http://www.cacti.net/spine_download.php</a></p>
<p>下载完毕之后，将其解压到相应位置，并配置好你相应的web程序（apache,ngnix等）</p>
<h3>运行条件：</h3>
<p><strong>1，mysql服务器：</strong><br />
cacti是依赖于mysql来运行的。所以：</p>
<ul>
<li>你的php必须支持mysql连接</li>
<li>有一个可读写的mysql数据库</li>
</ul>
<p>&nbsp;</p>
<p>
确定好这两个之后，修改cacti解压后根目录里面的<em>include/config.php</em>文件，并将<em>cacti.sql</em>导入到数据库里面。</p>
<p><strong>2，rrdtool：</strong><br />
因为cacti绘图是依赖于rrdtool这个工具，所以，我们还要安装他相关的rpm包。这些包，RHEL(CentOS)的网方源中是没有的，但是我们可以从rpmforge上面找到，当然，应该也可以到rrdtool的官方网站上找到。我这里只提供rpm的下载地址：<br />
<a href="http://packages.sw.be/rrdtool/rrdtool-1.2.30-1.el5.rf.i386.rpm">rrdtool-1.2.30-1.el5.rf.i386.rpm</a><br />
<a href="http://packages.sw.be/rrdtool/rrdtool-devel-1.2.30-1.el5.rf.i386.rpm">rrdtool-devel-1.2.30-1.el5.rf.i386.rpm</a><br />
<a href="http://packages.sw.be/rrdtool/perl-rrdtool-1.2.30-1.el5.rf.i386.rpm">perl-rrdtool-1.2.30-1.el5.rf.i386.rpm</a><br />
我们要下载并安装以上三个包才可以正常使用cacti。</p>
<p><strong>3，snmp的配置</strong><br />
因为cacti要使用到snmpget等一系列的snmp命令，我们要在采集机器上（也就是安装cacti的机器上）安装net-snmp-utils以及perl-Net-SNMP。这个相对来说就非常简单了，我们用yum就可以直接搞定。</p>
<p>被采集的机器上面必须要安装snmpd服务，其配置方法可以参看我那篇关于MRTG的文件（<a href="http://blog.myhnet.cn/2008/02/26/mrtg%ef%bc%88%e7%bd%91%e7%bb%9c%e6%b5%81%e9%87%8f%e7%9b%91%e6%8e%a7%ef%bc%8c%e7%bb%9f%e8%ae%a1%ef%bc%8c%e5%88%86%e6%9e%90%ef%bc%89%e5%ae%89%e8%a3%85%e4%b8%8e%e9%85%8d%e7%bd%ae/">点击这里进入</a>）</p>
<p>这里有一个样版，可以参考一下：</p>
<div class="hl-surround"><div class="hl-main">rocommunity&nbsp; &nbsp; &nbsp;public<br />com2sec notConfigUser&nbsp; default&nbsp; &nbsp; &nbsp; &nbsp;public<br />group&nbsp; &nbsp;notConfigGroup v1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;notConfigUser<br />group&nbsp; &nbsp;notConfigGroup v2c&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;notConfigUser<br />view&nbsp; &nbsp; systemview&nbsp; &nbsp; &nbsp;included&nbsp; &nbsp; &nbsp; system<br />access&nbsp; notConfigGroup &quot;&quot;&nbsp; &nbsp; &nbsp; any&nbsp; &nbsp; &nbsp; &nbsp;noauth&nbsp; &nbsp; exact&nbsp; systemview none none<br />syscontact	root &lt;root@localhost&gt; (configure /etc/snmp/snmp.local.conf or use snmpconf)<br />syslocation	Not defined (edit /etc/snmp/snmpd.conf or use snmpconf)<br />proc mountd<br />proc ntalkd 4<br />proc postfix 10 1<br />proc /usr/sbin/sshd 100 0<br />proc httpd2 100 0<br />exec echotest /bin/echo hello world<br />disk / 10000<br />load 12 14 14<br />pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat</div></div>
<h3>安装cacti</h3>
<p>cacti的安装相对来说非常简单，只要你把我说的做到位（特别是mysql方面的东西），这个就非常简单了。</p>
<p>打开你开始设置的cacti的位置（我这里设置的http://127.0.0.1/cacti/），一直点击NEXT就可以了。</p>
<p>在点击FINISH之后，就会跳转到cacti的登陆页面，这个时候我们要输入默认的用户名与密码admin/admin，之后，会要求你输入两次一个新的密码。</p>
<h3>配置cacti</h3>
<p><strong>系统配置</strong><br />
为了让生成的图例中文字正常显示，我们要先设置字体文件位置。</p>
<p>点击左上的<em>Console</em>按钮，然后点击左则列表下面的<em>settings</em>，最后点击<em>Visual</em>标签项，在下面的<em>Default RRDtool 1.2 Fonts</em>中的font size位置全部填上：</p>
<div class="hl-surround"><div class="hl-main">/usr/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf</div></div>
<p>在<em>Path</em>标签项中的<em>RRDTool Default Font Path</em>也填 上面的文件路径。</p>
<p>当然，你也可以用别的字体，可以自己测试下。</p>
<p>其他的配置，网上相关的教程就很多了，我这里就不说了。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.myhnet.cn/2009/04/09/how-to-install-and-configure-cacti/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
