时间:2021-07-01 10:21:17 帮助过:68人阅读
sudo cp /tmp/ss_get_mysql_stats.php /usr/share/cacti/site/
登录cacti网页,console----import templates,将本地的“cacti_host_template_x_db_server_ht_0.8.6i。xml”模板导入。
导入后会显示如下等信息:
Cacti has imported the following items:
CDEF
[success] X Negate CDEF [new]
GPRINT Preset
[success] X Normal [new]
Data Input Method
[success] X Get MySQL Stats/MyISAM Indexes IM [new]
[success] X Get MySQL Stats/InnoDB Buffer Pool IM [new]
[success] X Get MySQL Stats/InnoDB I/O IM [new]
[success] X Get MySQL Stats/InnoDB Insert Buffer IM [new]
[success] X Get MySQL Stats/InnoDB Semaphores IM [new]
[success] X Get MySQL Stats/InnoDB Row Operations IM [new]
[success] X Get MySQL Stats/MySQL Table Locks IM [new]
[success] X Get MySQL Stats/MySQL Connections IM [new]
[success] X Get MySQL Stats/MySQL Replication IM [new]
[success] X Get MySQL Stats/MySQL Query Cache IM [new]
[success] X Get MySQL Stats/MySQL Query Cache Memory IM [new]
[success] X Get MySQL Stats/MySQL Command Counters IM [new]
[success] X Get MySQL Stats/MySQL Select Types IM [new]
[success] X Get MySQL Stats/MySQL Sorts IM [new]
[success] X Get MySQL Stats/MySQL Temporary Objects IM [new]
[success] X Get MySQL Stats/MySQL Network Traffic IM [new]
[success] X Get MySQL Stats/InnoDB Buffer Pool Activity IM [new]
[success] X Get MySQL Stats/InnoDB I/O Pending IM [new]
[success] X Get MySQL Stats/InnoDB Log IM [new]
[success] X Get MySQL Stats/MySQL Binary/Relay Logs IM [new]
[success] X Get MySQL Stats/InnoDB Transactions IM [new]
[success] X Get MySQL Stats/MySQL Files and Tables IM [new]
[success] X Get MySQL Stats/MySQL Threads IM [new]
[success] X Get MySQL Stats/MySQL Processlist IM [new]
[success] X Get MySQL Stats/MySQL Transaction Handler IM [new]
[success] X Get MySQL Stats/MySQL Handlers IM [new]
。。。。。。
添加divice时,模板选择“X DB Server HT”,snmp版本为2,其他不用修改,save保存
创建图形 :“Create Graphs for this Host”,你会看到有二三十个可以监控的选项。选中“create”后,等一会。看一下日志。
如果有如下类似报错,而且在“graph”下面还无图无数据的
05/02/2015 09:20:02 AM - CMDPHP: Poller[0] Host[4] DS[39] WARNING:
Result from CMD not valid. Partial Result: Could not open input
05/02/2015 09:20:02 AM - CMDPHP: Poller[0] Host[4] DS[40] WARNING:
Result from CMD not valid. Partial Result: Could not open input
点击"console"---"settings"----"path",查看下面的“Spine Poller File Path”是否为绿色,如果是红色的,是你没有安装相应的包,执行“sudo apt-get install cacti-spine” 安装spine。
安装后,点击"console"---"settings"----”poller“,找到”Poller Type“,选择”spine“,save保存一下。
过五分钟后就有图有数据了。
cacti添加mysql监控模板
标签:cati添加mysql模板