From: Jose O. <jot...@gm...> - 2007-10-30 12:49:02
|
Ol=E1 Ikami Na hora de voce definir o servi=E7o no services.cfg voce est=E1 incluindo u= ma palavra "Aplic" que ser=E1 repassada para o comando como $ARG1$. Mas os plugins esperam um n=FAmero. Mude a linha de check_command check_tcp!Aplic!8080 Para check_command check_tcp!8080 Que vai funcionar. O $HOSTADDRESS$ =E9 uma macro que o comando "herda" da configura=E7=E3o. Voce n=E3o precisa (e n=E3o pode) passar pelo services.cf= g. Em 29/10/07, ikami <ik...@ya...> escreveu: > > Ola lista! > A um tempo atr=E1s mandei um email perguntando sobre monitoramento do > JBoss. Os colegas Pedro Henrique e Jose Oliveira me ajudaram com ideias e > algumas dicas que eu n=E3o sabia! Por=E9m eu continuo n=E3o sabendo mexer= no > JBoss. Por essa raz=E3o estou colocando para monitorar apenas a porta que= ele > est=E1 escutando (isso at=E9 eu estudar o JBoss para colocar coisa melhor= ). > Estou usando os plugins check_tcp e check_http para isso. Quando > monitoro pelo check_http eu obtenho sucesso se o JBoss estiver na porta 8= 0. > Quando configurado na porta 8080 n=E3o consigo. > > NOTA: Todos os testes fiz pela linha de comando e depois coloquei no > nagios. Pela linha de comando todos funcionaram mas colocando no nagios > obtenho respostas inexperadas. > > Ex com o HTTP: > Pela linha de comando: > ./check_http -H 10.10.160.25 -p 8080 > HTTP OK HTTP/1.1 200 OK - 1831 bytes in 0.002 seconds |time=3D0.001658s;;= ;0.000000 > size=3D1831B;;;0 > > No nagios obtenho: > Jboss Web - CRITICAL - Connection refused > > Ex com o TCP: > Pela linha de comando: > ./check_tcp -H 10.10.160.25 -p 8080 > TCP OK - 0.000 second response time on port 8080|time=3D0.000332s > ;0.000000;0.000000;0.000000;10.000000 > > No nagios obtenho: > Jboss Porta - UNKNOWN - check_tcp: Port must be a positive integer > NOTA: Esse status de UNKNOWN eh retornado tanto para a porta 8080 quanto > para porta 80. > > Configura=E7=E3o do nagios: > # 'check_tcp' command definition > define command{ > command_name check_tcp > command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ > } > # 'check_http' command definition > define command{ > command_name check_http > command_line $USER1$/check_http -H $HOSTADDRESS$ -p $ARG1$ > } > > define service{ > use generic-service > host_name Aplic > service_description JBoss Porta > check_command check_tcp!Aplic!8080 > } > > define service{ > use generic-service > host_name Aplic > service_description JBoss Web > check_command check_http!Aplic!8080 > } > > > =CDkami > > > > Abra sua conta no Yahoo! Mail, o =FAnico sem limite de espa=E7o par= a > armazenamento! > http://br.mail.yahoo.com/ > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > -- > Nag...@li... mailing list > https://lists.sourceforge.net/lists/listinfo/nagios-users-br > Wiki: http://nagios-br.sf.net/wiki > --=20 Abra=E7os JGeraldo |