cacti监控自己的ubuntu,mysql
开始学习cacti,对这个软件很陌生,先试着见自己的ubuntu加到cacti里面。ubuntu需要安装snmp协议,通过snmp本身获取系统的信息,然后传输给监控平台进行数据采集和分析,以供远程管理。#apt-get install snmp#apt-get install snmpd安装好了,修改配置文件,/etc/snmp/snmpd.conf#sudo vi /etc/snmp/snmpd.conf
整个配置文件如下:agentAddressudp:161 view systemonlyincluded .1.3.6.1.2.1.1 view systemonlyincluded .1.3.6.1.2.1.25.1
rocommunity secret192.168.1.18
rouser authOnlyUsercom2secpc 192.168.1.18 zd=8866 com2secpc 127.0.0.1zd=8866 groupservergroup v2c zdworkliyipc groupservergroup v1 zdworkliyipc access servergroup "" any noauth prefix all none none view allincluded .1
sysLocation Sitting on the Dock of the Bay sysContact Me <me@example.org> sysServices 72
procmountd procntalkd 4 procsendmail 10 1
disk / 10000 disk /var5% includeAllDisks10%
load 12 10 5
trapsink localhost public
iquerySecName internalUser rouser internalUser
defaultMonitors yes
linkUpDownNotificationsyes
extend test1 /bin/echoHello, world! extend-sh test2 echo Hello, world! ; echo Hi there ; exit 35 master agentx
连接上了之后就可以把自己的机器添加进去了。控制面板-->设备-->添加-->创建
cacti监控mysql
ssh 登录到cacti的远程机器192.168.1.18
1、下载这个插件#tar -zxvf mysql-cacti-templates-1.1.2.tar.gz2、复制mysql_stats.php到/usr/share/nginx/www/cacticn/scriptschmod 755 mysql_stats.php
3、然后到cacti界面导入模板。cacti_host_template_x_db_server_ht_0.8.6i.xml
4、进入mysql,为cacti添加权限grant process,super on *.* to cacti@192.168.1.18 identified by 'cacti';上面的意思就是创建一个用户cacti,密码为cacti的数据库用户,只允许从192.168.1.18的计算机上登录,并且赋予这个用户process,super权限。
修改mysql配置文件sudo vi /etc/mysql/my.conf将 bind-address = 127.0.0.1注释掉
5、添加图像模板到cacti界面,设备-->添加图像模板--为此设备生成图像。 路过,学习下 勿以坑小而不灌,勿以坑大而灌之。 我是来刷分的,嘿嘿 看尽天下A片,心中自然无码~ 我身在江湖,江湖里却没有我得传说。 恋爱就是无数个饭局,结婚就是一个饭局。
页:
[1]