°Ô½Ã¹° 1,369°Ç
   
Nagios + Mysql
±Û¾´ÀÌ : ÃÖ°í°ü¸®ÀÚ ³¯Â¥ : 2017-07-17 (¿ù) 14:28 Á¶È¸ : 8791
±ÛÁÖ¼Ò :
                                
Âü°í http://www.techthings.org/monitor-mysql-server-with-nagios/

Server 
:: nagios »ç¿ëÀÚ»ý¼º
# CREATE USER 'nagios'@'localhost' IDENTIFIED BY '<password>'; 
# GRANT ALL PRIVILEGES ON *.* TO 'nagios'@'localhost';
# flush privileges;

:: processlist È®ÀÎ  (¸ð´ÏÅ͸µ ±âÁØ)
# SELECT COUNT(*) FROM information_schema.processlist;


:: Nagios Server 
# pwd
/usr/local/nagios/etc/servers

# cat xxxxx.cfg
..................

define service{
        host_name                       xxxxxxxxx
        service_description             mysql-connection-time
        max_check_attempts              1
        check_interval                  1
        retry_interval                  1
        check_period                    24x7
        check_freshness                 1
        contact_groups                  admins
        notification_interval           1
        notification_period             24x7
        notifications_enabled           1
        register                        1
}

# service nagios restart


Client
# /usr/local/nagios/libexec/check_mysql_health --hostname localhost --user nagios --password <PASSWORD> --mode threads-connected
CRITICAL - 429 client connection threads | 'threads_connected'=429;10;20;;

check_mysql_health ÆÄÀϼöÁ¤ 
............................
3661   if ($self->mode =~ /server::instance::connectedthreads/) {
3662     $self->get_check_status_var('threads_connected', 'Threads_connected',
3663         450, 900, '%d client connection threads');

# /usr/local/nagios/libexec/check_mysql_health --hostname localhost --user nagios --password <PASSWORD> --mode threads-connected 
OK - 432 client connection threads | 'threads_connected'=432;450;900;;



À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
   

 



 
»çÀÌÆ®¸í : ¸ðÁö¸®³× | ´ëÇ¥ : ÀÌ°æÇö | °³ÀÎÄ¿¹Â´ÏƼ : ·©Å°´åÄÄ ¿î¿µÃ¼Á¦(OS) | °æ±âµµ ¼º³²½Ã ºÐ´ç±¸ | ÀüÀÚ¿ìÆí : mojily°ñ¹ðÀÌchonnom.com Copyright ¨Ï www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.