久久精品人人爽,华人av在线,亚洲性视频网站,欧美专区一二三

nagios中如何使用check

144次閱讀
沒有評論

共計 1984 個字符,預計需要花費 5 分鐘才能閱讀完成。

nagios 中如何使用 check_mysql 監控 mysql,相信很多沒有經驗的人對此束手無策,為此本文總結了問題出現的原因和解決方法,通過這篇文章希望你能解決這個問題。

nagios 監控 mysql 服務器:
 
1、建立專用數據庫:
[root@svr3 ~]# /usr/local/webserver/mysql/bin/mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 51910
Server version: 5.5.3-m3-log Source distribution
 
Type help; or \h for help. Type \c to clear the current input statement.
 
mysql create database nagios;
Query OK, 1 row affected (0.00 sec)
 
mysql grant select on nagios.* to  identified by 123qweasd
Query OK, 0 rows affected (0.00 sec)
 
flush privileges;
Query OK, 0 rows affected (0.00 sec)
 
mysql select User,Password,Host from user;
+—————-+——————————————-+——————+
| User  | Password  | Host  |
+—————-+——————————————-+——————+
| root  | *84BB5DF4823DA319BBF86C99624479A198E6EEE9 | localhost  |
| nagios  | *A1F1CB851D62F002C09A0C9C4A76262473432F55 | %  |
+—————-+——————————————-+——————+
14 rows in set (0.00 sec)
12 rows in set (0.00 sec)
 
[root@svr3 ~]# /usr/local/nagios/libexec/check_mysql -H 10.1.1.30 -u nagios -d nagios -p 123qweasd
Uptime: 970046  Threads: 1  Questions: 684583  Slow queries: 3  Opens: 672  Flush tables: 1  Open tables: 
 
369  Queries per second avg: 0.705
 
[root@svr4 nrpe_install]# /usr/local/nagios/libexec/check_mysql -H 10.1.1.30 -u nagios -d nagios -p 123qweasd
Uptime: 970348  Threads: 1  Questions: 684584  Slow queries: 3  Opens: 672  Flush tables: 1  Open tables: 369  Queries per second avg: 0.705
 
果斷開始設置:
#定義用戶
#定義組,及隸屬用戶
#用戶增加
 
在 command.cfg 里增加插件命令:
#check mysql
define command{
command_name check_mysql
command_line $USER1$/check_mysql -H $HOSTADDRESS$ -u nagios -d nagios -p 123qweasd
}
 
#定義服務:
define service {
  host_name svr3.labexam.com
  service_description MysqlDB
  check_period 24×7
  max_check_attempts 2
  normal_check_interval 1
  retry_check_interval 1
  contact_groups sagroup,dbagroup
  notification_interval 5
  notification_period 24×7
  notification_options w,u,c,r
  check_command check_mysql
}

看完上述內容,你們掌握 nagios 中如何使用 check_mysql 監控 mysql 的方法了嗎?如果還想學到更多技能或想了解更多相關內容,歡迎關注丸趣 TV 行業資訊頻道,感謝各位的閱讀!

正文完
 
丸趣
版權聲明:本站原創文章,由 丸趣 2023-08-03發表,共計1984字。
轉載說明:除特殊說明外本站除技術相關以外文章皆由網絡搜集發布,轉載請注明出處。
評論(沒有評論)
主站蜘蛛池模板: 巴塘县| 江山市| 绥化市| 闽侯县| 新野县| 桦川县| 修武县| 汤阴县| 施甸县| 东兴市| 京山县| 轮台县| 申扎县| 博客| 洪雅县| 德州市| 阿城市| 和平区| 东莞市| 佳木斯市| 游戏| 布尔津县| 利川市| 乐昌市| 栾城县| 峡江县| 永寿县| 台东市| 宁乡县| 高平市| 廉江市| 兴文县| 南宫市| 四川省| 松潘县| 讷河市| 阜南县| 长寿区| 阿瓦提县| 会昌县| 东明县|