|
4#
楼主 |
发表于 2008-11-21 16:36:54
|
只看该作者
回复 2# 的帖子
网上提供的这两种方法:
第一种方法:
服务器端的准备工作:
1、登陆服务器,验证snmp服务能不能监控到mysql和http进程信息:
snmpwalk -Os -c public -v 1 172.16.100.28|grep mysql
snmpwalk -Os -c public -v 1 172.16.100.28|grep http
有数据即可。
如果没有数据,那么需要手工配置下文件。进入步骤 2
2、
[root@cherry root]# cd /etc/snmp/
[root@cherry snmp]# vi snmpd.conf
扩大监控范围: 将 view systemview included?? **** 后面的数据改成更大的范围
3、运行下面命令
[root@cherry snmp]# /etc/init.d/portmap start
[root@cherry snmp]# /etc/init.d/snmpd start
4、再次验证
验证snmp服务能不能监控到mysql和http进程信息:
snmpwalk -Os -c public -v 1 172.16.100.28|grep mysql
snmpwalk -Os -c public -v 1 172.16.100.28|grep http
LunnerRunner中添加监控参数
1、控制场景-RUN-添加SNMP到监控窗口
2、在SNMP到监控窗口点击右键,添加服务器和 mysql、appache的 PID
添加PID的路径:mgmt--mib-2--host—hrswrunperf--runperftable-- hrswrunperfEnter -- hrswrunperfcpu(如果是要监控内存那么应该是***Mem)查找需要的PID
第二种办法:
利用HP SiteScope工具进行监控
Monitoring mySQL Databases
Monitoring a MySQL database requires the use of a JDBC driver. To enable SiteScope to monitor a MySQL database:
1. Download the JDBC driver from http://www.mysql.com/downloads/api-jdbc.html
2. Uncompress the distribution file
3. Among all the other files, you should find a file with a .jar extension.
4. Copy the .jar file into the <SiteScope install path>/SiteScope/java/lib/ext directory
5. Stop and restart SiteScope
6. Now, use your browser to add a Database Query Monitor within SiteScope.
The Database Connection URL format for the MySQL JDBC driver is:
jdbc:mysql://<database hostname>[:<tcp port>]/<database>
For example to connect to the MySQL database "aBigDatabase" on a machine using the standard MySQL port number 3306 you would use:
jdbc:mysql://206.168.191.19/aBigDatabase
If you are using a different port to connect to the database then you should include that port number as part of the IP address.
The specification for the MySQL JDBC driver is: org.gjt.mm.mysql.Driver
Enter this string into the Database Driver text box under the Advanced Options section of the Add Database Query Monitor form.
但没有一种可以!~ |
|