zabbix监控rds
zabbix监控rds问题:使用zabbix监控rds,用之前的脚本,执行总是会有密码安全提示:# sh rds.sh Uptimemysqladmin: Using a password on the command line interface can be insecure.8784465这样解决方案【按照一下直接修改脚本即可】: 1、使用mysql_config_editor先创建一个login-path:# mysql_config_editor set --login-path=rds --user=bzpt --password -hrm-2zee412l7n1r4air8.mysql.rds.aliyuncs.com -P3306Enter password:创建好后,.mylogin.cnf将保存在用户的家目录下,此处我用的是RHEL6,即/home/op下。该文件是不可读的,它类似于选项组,包含单个身份的验证信息。 使用原来的方式,还是会有密码安全提示:# mysqladmin -ubzpt -pI9sGSa5IdJT6 -hrm-2zee412l7n1r4air8.mysql.rds.aliyuncs.com -P3306 statusmysqladmin: Using a password on the command line interface can be insecure.Uptime: 8784486Threads: 22Questions: 132212856Slow queries: 2012Opens: 175271Flush tables: 1Open tables: 599Queries per second avg: 15.050 指定创建的login-path名,就没有密码安全提示了:# mysqladmin --login-path=rds statusUptime: 8784531Threads: 22Questions: 132213030Slow queries: 2012Opens: 175271Flush tables: 1Open tables: 599Queries per second avg: 15.050 mysql_config_editor用法:http://blog.itpub.net/29773961/viewspace-1817640/ 2、错误输出重定向 2>/dev/null # mysqladmin -ubzpt -pI9sGSa5IdJT6 -hrm-2zee412l7n1r4air8.mysql.rds.aliyuncs.com -P3306 status 2>/dev/null|cut -f2 -d":"|cut -f1 -d"T" 8784844 posted on 2017-05-05 17:27 lzfj 阅读(...) 评论(...)编辑 收藏
页:
[1]