월간 인기 게시물

게시물 1,372건
   
Nagios + Mysql
글쓴이 : 최고관리자 날짜 : 2017-07-17 (월) 14:28 조회 : 9098
글주소 :
                                
참고 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.