Cacti导入模板报错 Error: XML: Hash version does not exist.
将新版本到处的cacti模板导入到旧版本的时候,就会报Error: XML: Hash version does not exist.,
解决的办法是修改xml里面的相关hash值。
以下是cacti xml hash的一些说明:
Take the following example: <hash_040018258d1c9487a6c58dd804f4a012007664>
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.@H_403_30@
查找相应的xml文件中关键字“0018”,根据自己的环境找到对应版本替换即可,以下是最新cacti hash版本表@H_403_30@
@H_403_30@
$hash_version_codes = array(@H_403_30@
"0.8.4" => "0000",@H_403_30@
"0.8.5" => "0001",@H_403_30@
"0.8.5a" => "0002",@H_403_30@
"0.8.6" => "0003",@H_403_30@
"0.8.6a" => "0004",@H_403_30@
"0.8.6b" => "0005",@H_403_30@
"0.8.6c" => "0006",@H_403_30@
"0.8.6d" => "0007",@H_403_30@
"0.8.6e" => "0008",@H_403_30@
"0.8.6f" => "0009",@H_403_30@
"0.8.6g" => "0010",@H_403_30@
"0.8.6h" => "0011",@H_403_30@
"0.8.6i" => "0012",@H_403_30@
"0.8.6j" => "0013",@H_403_30@
"0.8.7" => "0014",@H_403_30@
"0.8.7a" => "0015",@H_403_30@
"0.8.7b" => "0016",@H_403_30@
"0.8.7c" => "0017",@H_403_30@
"0.8.7d" => "0018",@H_403_30@
"0.8.7e" => "0019",@H_403_30@
"0.8.7f" => "0020",@H_403_30@
"0.8.7g" => "0021",@H_403_30@
"0.8.7h" => "0022",@H_403_30@
"0.8.7i" => "0023",@H_403_30@
"0.8.8" => "0024",@H_403_30@
"0.8.8a" => "0024",@H_403_30@
"0.8.8b" => "0024"@H_403_30@
);@H_403_30@
查看这些文件可以看到对应的信息/var/www/html/include/global_arrays.PHP config_arrays.PHP
@H_403_30@
需要导入新版cacti模板的时候,只需要修改hash里面的version相关字段即可,记住是全部修改,可以用记事本查找替换,一般都有上百处替换。@H_403_30@