2016-08-09 1 views
0

Nagios를 사용하는 시스템에서 실행중인 원격 서비스를 어떻게 모니터링합니까? 다음과 같이 나는 CFG 파일을 만든 : 나는 구성 파일을 다시로드 할 때 지금, 그것은 오류 다음 던졌습니다Nagios에서 80 이외의 포트에서 실행중인 서비스 모니터링

define command { 
     command_name     check_http 
     command_line     /usr/lib64/nagios/plugins/check_http -H $HOSTADDRESS$ -p 8082 
     } 

:

Warning: Duplicate definition found for command 'check_http' (config file '/etc/nagios/servers/cfbase-prod.cfg', starting on line 19) 
Error: Could not add object property in file '/etc/nagios/servers/cfbase-prod.cfg' on line 20. 
    Error processing object config files! 

을 나는 문제가 무엇인지 알아낼 수 없습니다입니다. 도와주세요!

답변

1

기본 문제는 command_name 값이 원래/표준 check_http 명령과 충돌합니다. 몇 가지 선택 사항이 있습니다 (최소) :

  1. command_name으로 설정하십시오. check_http_8082.
  2. 인수로 전달 된 임의 포트에서 http를 확인하는 명령을 정의하십시오. 예 :

    define command{ 
        command_name check_http_port 
        command_line /usr/lib64/nagios/plugins/check_http -H $HOSTADDRESS$ -p $ARG1$ 
    } 
    
관련 문제