在使用cacti进行监控的时候发现监控linux/freebsd等系统都没有问题,监控windows的时候发现CPU数据监控不到,经过相关搜寻方法如下:
监控服务端环境:CentOS5.5 cacti-0.8.6j
相关准备:
1. 免费软件: snmp informant
下载地址:
在Windows服务器上下载SNMP Informant-STD v1.6并安装,不需要做任何配置工作。
当然之前还需要配置一下SNMP服务。
2. Windows监控模版插件下载:
acti_SNMP_INFORMANT_STD_W32_Metrics_v9.zip
下载地址:
或者
http://6509e.blog.51cto.com/attachment/200901/542252_1231223045.zip解压后有10个文件,
(1) 以下五个文件上传到服务器cacti安装目录的resource/snmp_queries目录下。
snmp_informant_disk.xml
snmp_informant_objects.xml
snmp_informant_memory.xml
snmp_informant_cpu.xml
snmp_informant_network.xml
(2) 以下五个文件在cactit管理界面,Concole->Import Templates导入
cacti_data_query_w32_-_cpu_statistics.xml
cacti_data_query_w32_-_network_statistics.xml
cacti_data_query_w32_-_disk_statistics.xml
cacti_data_query_w32_-_object_statistics.xml
cacti_data_query_w32_-_memory_statistics.xml
(3) 然后添加设备的时候选择Associated Data Queries中选择我们添加的模板选项,如CPU, Disk, Memory Network等。保存,然后Create Graphs for this Host。OK了
(4) 然后把该服务器加图形树就OK了。
导入templates时,提示:Error: XML: Hash version does not exist.解决方法:
将新版本到处的cacti模板导入到旧版本的时候,就会报Error: XML: Hash version does not exist.,解决的办法是修改xml里面的相关hash值就可以了。
以下是cacti xml hash的一些说明:
Take the following example:
The first 2 digits are the type of the template.
The next 4 digits are the Cacti version it was created on.
The next 32 digits are a random number.
List of Versions
"0.8.4" => "0000",
"0.8.5" => "0001",
"0.8.5a" => "0002",
"0.8.6" => "0003",
"0.8.6a" => "0004",
"0.8.6b" => "0005",
"0.8.6c" => "0006",
"0.8.6d" => "0007",
"0.8.6e" => "0008",
"0.8.6f" => "0009",
"0.8.6g" => "0010",
"0.8.6h" => "0011",
"0.8.6i" => "0012",
"0.8.6j" => "0013",
"0.8.7" => "0014",
"0.8.7a" => "0015",
"0.8.7b" => "0016",
"0.8.7c" => "0017",
"0.8.7d" => "0018"
"0.8.7e" => "0019"
For the example above, this template was exported with Cacti 0.8.7d.
所以需要导入新版cacti模板的时候,只需要修改hash里面的version相关所有字段即可。
阅读(4301) | 评论(3) | 转发(0) |