Cacti.0.8_Beginner.Guide
the following is main content that i founded at
Cacti.0.8_Beginner.Guide
You can find a list of these Cacti variables at the following link: http://docs.cacti. net/manual:087:6_reference.variables#variables.
This basic example can be adapted to create a data template for any kind of SNMP. A good webpage to find SNMP OIDs/MIBs to poll is the www.mibdepot.com site.
Let’s assume that you have a server with performance issues. Maybe users are unable to connect to it at a specific time of the day. Wouldn’t it be good to have some data on the server which will provide some valuable information for further troubleshooting or even letting us identify a problem before the users are aware of it? In this special case, we want to know the number of currently established TCP connections on a system to identify a possible build up of connections to a point where no more connections can be created. What does the data template for this look like? A small hint: Look for the TCP-MIB.
Solution: Take the data template example and duplicate it. Go to Templates | Data Templates and select it. From the drop-down box at the bottom select Duplicate and then Go. In the following page, enter TCP-MIB: Established TCP Connections as the title then click on Continue. Edit the template again and change the name fields to fit the new data. Enter tcpCurrEstab as the Internal Data Source Name and use .1.3.6.1.2.1.6.9.0 as the OID. Click on Save and you’re done.
You can now assign this graph template to a device. After you have added the graph template to a device, you need to wait for three polls to pass. The first poll actually creates the necessary RRD file. The other two polls are needed for the RRDtool as it will start graphing values only when it has at least two data values within the RRD file.
查看cacti的doc
http://www.cacti.net/downloads/docs/html/check_rrd_graph.html
查看其他人的模版脚本的script
http://forums.cacti.net/about9861.%20html
cacti的模版doc
http://docs.cacti.net/templates
cacti维护问题
今天碰到一个问题,cacti的graphs页面不显示图片了,
然后通过打印sql语句放到mysql的客户端中执行后发现报了一个错误。
Got a packet bigger than ‘max_allowed_packet’ bytes
这是由于下面的原因
当MySQL客户端或mysqld服务器收到大于max_allowed_packet字节的信息包时,将发出“信息包过大”错误,并关闭连接。对于某些客户端,如果通信信息包过大,在执行查询期间,可能会遇到“丢失与MySQL服务器的连接”错误。
修改
root@localhost# vim /etc/my.conf
add these followed and restart mysql service
max_allowed_packet=500M
root@localhost# service mysqld restart
之后就解决了这个问题,刷新页面,图片再一次展示出来。