월간 인기 게시물

게시물 111건
   
nagios + telegram
글쓴이 : 최고관리자 날짜 : 2017-07-17 (월) 15:42 조회 : 224769
글주소 :
                             

# cat contacts.cfg
......................
define contact{
        contact_name                    telegram
        alias                           neubd
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    w,u,c,r
        host_notification_options       d,r
        service_notification_commands   notify-service-by-telegram
        host_notification_commands      notify-host-by-telegram
        }
......................
define contactgroup{
        contactgroup_name       admins
        alias                   Nagios Administrators
        members                 telegram
        }


# cat 
......................
# commands to send host/service notifications
define command {
  command_name     notify-host-by-telegram
  command_line     /usr/local/bin/nagios_telegram.py --token 3021XXXXX:AAXXXXk2YZCCXXXXX22E34g_603CrPot-M8 --object_type host --contact "$USER2$" --notificationtype "$NOTIFICATIONTYPE$" --hoststate "$HOSTSTATE$" --hostname "$HOSTNAME$" --hostaddress "$HOSTADDRESS$" --output "$HOSTOUTPUT$"
}
define command {
  command_name     notify-service-by-telegram
  command_line     /usr/local/bin/nagios_telegram.py --token 3021XXXXX:AAXXXXk2YZCCXXXXX22E34g_603CrPot-M8 --object_type service --contact "$USER2$" --notificationtype "$NOTIFICATIONTYPE$" --servicestate "$SERVICESTATE$" --hostname "$HOSTNAME$" --servicedesc "$SERVICEDESC$" --output "$SERVICEOUTPUT$"
}



example)
      max_check_attempts              2         # 문제시 재시도 체크 횟수 / 2회
      check_interval                  1         # 체크주기 / 1분
      retry_interval                  1         # 문제시 재시도 주기
      check_period                    24x7      # 24시간 7일 -> 365일 내내 체크 
      check_freshness                 1         # 
      contact_groups                  admins
      notification_interval           60        # 알람전송 주기 / 60분
      notification_period             24x7      # 24시간 7일 -> 365일 모니터링 / 알람 허용시간 조정가능
      notifications_enabled           1         # 알람허용 유무 / 1은 허용 -
      register                        1         # 템플릿이면 0


이름 패스워드
비밀글 (체크하면 글쓴이만 내용을 확인할 수 있습니다.)
왼쪽의 글자를 입력하세요.
   

 



 
사이트명 : 모지리네 | 대표 : 이경현 | 개인커뮤니티 : 랭키닷컴 운영체제(OS) | 경기도 성남시 분당구 | 전자우편 : mojily골뱅이chonnom.com Copyright ⓒ www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.