免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 7123 | 回复: 15
打印 上一主题 下一主题

nagios check_mysql的用法&&check_oracle [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-11-19 11:25 |只看该作者 |倒序浏览
10可用积分
nagios check_mysql的用法
求解!!!!
是不是被监控的主机必须有指定的库才能够进行check呢???
我配置之后的日志显示这样的:
1227062469] SERVICE ALERT: 192.168.168.5;DB;CRITICAL;SOFT;8;Access denied for user 'nagios'@'192.168.168.251' (using password: YES)
上面的这个问题已经解决!!!!!!!!!!


还有就是请教check_oracle这个插件的写法,小弟对oracle一无所知,谢谢大家啦

[ 本帖最后由 ppiqq 于 2008-11-19 17:23 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2008-11-19 12:40 |只看该作者
你的DB上有nagios这个用户吗》允许'192.168.168.251' 远程msyql连接吗?

论坛徽章:
0
3 [报告]
发表于 2008-11-19 12:58 |只看该作者

回复 #1 ppiqq 的帖子

check_mysql v1991 (nagios-plugins 1.4.12)
Copyright (c) 1999-2007 Nagios Plugin Development Team
        <nagiosplug-devel@lists.sourceforge.net>

This program tests connections to a mysql server


Usage: check_mysql [-d database] [-H host] [-P port] [-s socket]
       [-u user] [-p password] [-S]

Options:
-h, --help
    Print detailed help screen
-V, --version
    Print version information
-H, --hostname=ADDRESS
    Host name, IP Address, or unix socket (must be an absolute path)
-P, --port=INTEGER
    Port number (default: 3306)
-s, --socket=STRING
    Use the specified socket (has no effect if -H is used)
-d, --database=STRING
    Check database with indicated name
-u, --username=STRING
    Connect using the indicated username
-p, --password=STRING
    Use the indicated password to authenticate the connection
    ==> IMPORTANT: THIS FORM OF AUTHENTICATION IS NOT SECURE!!! <==
    Your clear-text password could be visible as a process table entry
-S, --check-slave
    Check if the slave thread is running properly.
-w, --warning
    Exit with WARNING status if slave server is more than INTEGER seconds
    behind master
-c, --critical
    Exit with CRITICAL status if slave server is more then INTEGER seconds
    behind master

There are no required arguments. By default, the local database is checked
using the default unix socket. You can force TCP on localhost by using an
IP address or FQDN ('localhost' will use the socket as well).

Send email to nagios-users@lists.sourceforge.net if you have questions
regarding use of this software. To submit patches or suggest improvements,
send email to nagiosplug-devel@lists.sourceforge.net

论坛徽章:
0
4 [报告]
发表于 2008-11-19 13:37 |只看该作者
mysql> select host,user,password from user;
+-----------------------+-----------+------------------+
| host                  | user      | password         |
+-----------------------+-----------+------------------+
| localhost             | root      |                  |
| localhost.localdomain | root      |                  |
| 127.0.0.1             | root      |                  |
| localhost             |           |                  |
| localhost.localdomain |           |                  |
| localhost             | cactiuser | 68cbcc4c7090bf2e |
| %                     | nagios    | 2d19ba4f0b364985 |
+-----------------------+-----------+------------------+
7 rows in set (0.00 sec)

mysql>

可是我已经在我的监控服务器上面开了权限了啊

论坛徽章:
0
5 [报告]
发表于 2008-11-19 13:46 |只看该作者
那求教各位大哥 应该怎样解决呢 谢谢大家了
[1227073132] SERVICE ALERT: 192.168.168.94;MYSQL  status;CRITICAL;SOFT;1;Access denied for user 'nagios'@'192.168.168.251' (using password: YES)
[1227073192] SERVICE ALERT: 192.168.168.94;MYSQL  status;CRITICAL;SOFT;2;Access denied for user 'nagios'@'192.168.168.251' (using password: YES)
[1227073252] SERVICE ALERT: 192.168.168.94;MYSQL  status;CRITICAL;SOFT;3;Access denied for user 'nagios'@'192.168.168.251' (using password: YES)
[1227073312] SERVICE ALERT: 192.168.168.94;MYSQL  status;CRITICAL;SOFT;4;Access denied for user 'nagios'@'192.168.168.251' (using password: YES)
[1227073372] SERVICE ALERT: 192.168.168.94;MYSQL  status;CRITICAL;SOFT;5;Access denied for user 'nagios'@'192.168.168.251' (using password: YES)
[1227073432] SERVICE ALERT: 192.168.168.94;MYSQL  status;CRITICAL;SOFT;6;Access denied for user 'nagios'@'192.168.168.251' (using password: YES)
[1227073492] SERVICE ALERT: 192.168.168.94;MYSQL  status;CRITICAL;SOFT;7;Access denied for user 'nagios'@'192.168.168.251' (using password: YES)
[1227073552] SERVICE ALERT: 192.168.168.94;MYSQL  status;CRITICAL;SOFT;8;Access denied for user 'nagios'@'192.168.168.251' (using password: YES)

论坛徽章:
0
6 [报告]
发表于 2008-11-19 15:15 |只看该作者
哦 是不是应该在我的被检测的机子上面 建立nagios用户呢?

论坛徽章:
0
7 [报告]
发表于 2008-11-19 15:47 |只看该作者
OK check_mysql已经搞定了 原来是需要在客户机那边建立和我的参数一样的mysql用户和密码 呵呵

求 check_oracle的!!!!!!!!!!!!

论坛徽章:
8
戌狗
日期:2014-09-26 16:39:44水瓶座
日期:2014-10-10 02:06:57金牛座
日期:2014-10-11 23:04:042015亚冠之首尔
日期:2015-06-23 15:37:0015-16赛季CBA联赛之天津
日期:2016-01-22 18:58:2915-16赛季CBA联赛之佛山
日期:2016-05-31 19:18:0815-16赛季CBA联赛之同曦
日期:2016-08-10 16:26:3315-16赛季CBA联赛之辽宁
日期:2018-01-10 11:47:40
8 [报告]
发表于 2008-11-19 15:49 |只看该作者
你做nagios监控系统? 你到服务器板块看看我写的文章就知道了

论坛徽章:
0
9 [报告]
发表于 2008-11-19 16:06 |只看该作者
check_mysql -H 192.168.168.5 -P 3306 -u nagios -p 密码
check_mysql -H 192.168.168.5 -P 3306 -u nagios -p 密码 -S ; check mysql slave server

论坛徽章:
0
10 [报告]
发表于 2008-11-19 17:23 |只看该作者
原帖由 wiliiwin 于 2008-11-19 15:49 发表
你做nagios监控系统? 你到服务器板块看看我写的文章就知道了


可否给个连接啊????
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP