Cacti版本: 0.8.8a 將 http://forums.cacti.net/about29832-0-asc-135.html 网址的template下载,有1,2,4,8,12,16核心的template及script抓下來,并将 host_mib_cpu.sh 复制到 cacti 根目录下的 scripts 文件夹中 將templat
Cacti版本: 0.8.8a
- 將 http://forums.cacti.net/about29832-0-asc-135.html 网址的template下载,有1,2,4,8,12,16核心的template及script抓下來,并将
host_mib_cpu.sh
复制到 cacti 根目录下的scripts
文件夹中
- 將template.xml 导入到cacti 主机,连上webe 管理界面,选择[Import Templates]
將下载的template都导入 => 点选浏览选择档案 => 右下方 [Import]
导入后再到 Data Templates 页面,可看到如下图
Graph Templates 会看到如下图:
制作多核心cpu使用率图表
在Management > devices > 找到要制作的主机 (范例这一台主机有1颗实体CPU,总共2核心)
在[Associated Graph Templates] 选择 [Host MIB-CPU Load 2] 点选 Add
然后回到当前页面头部,点击 [Create Graphs for this Host ]
建立完毕后,点选 Graph Management 后,选择该台主机,应该就會看到XXX-CPU Utilization – 2CPU
点选之后,可以看到该资讯每個cpu core 使用率整合在一张图表
其它备忘:
sudo cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.bak sudo vim /etc/snmp/snmpd.conf sudo service snmpd restart snmpbulkwalk -c public -v 2c 127.0.0.1
snmpd -v # 查看当前的snmp版本
snmpd.conf
版本 5.5 的 snmpd.conf
#### # First, map the community name "public" into a "security name" # sec.name source community #com2sec notConfigUser default public # i changed at below 1 line com2sec notConfigUser 127.0.0.1 public #### # Second, map the security name into a group name: # groupName securityModel securityName group notConfigGroup v1 notConfigUser group notConfigGroup v2c notConfigUser #### # Third, create a view for us to let the group have rights to: # Make at least snmpwalk -v 1 localhost -c public system fast again. # name incl/excl subtree mask(optional) view systemview included .1.3.6.1.2.1.1 view systemview included .1.3.6.1.2.1.25.1.1 # i changed at below 1 line view systemview included .1 #### # Finally, grant the group read-only access to the systemview view. # group context sec.model sec.level prefix read write notif #access notConfigGroup "" any noauth exact systemview none none # i changed access notConfigGroup "" any noauth exact all none none #view all included .1 80 # i changed view all included .1 80
版本 5.7.3 的 snmpd.conf
# system + hrSystem groups only view systemonly included .1.3.6.1.2.1.1 view systemonly included .1.3.6.1.2.1.25.1 # i add 2 line at blow view systemonly included .1 80 view systemview included .1
References
- CentOS 7-Cacti 0.8.8g 多核心CPU使用率整合一張圖表顯示 转载的主文