Re: Monitorando sites com autentica ção

Jose Oliveira <[email protected]>
Newsgroups gmane.network.nagios.user.brazil
Message-ID <[email protected]>
Heitor

No windows tenho o seguinte script:
PATH=$PATH:/cygdrive/c/cygwin:/cygdrive/c/Prod:.
cd /cygdrive/c/Prod
"/cygdrive/c/Arquivos de programas/Badboy/badboy.exe" /playAll
/nosplash /autoExit "C:\Prod\extrato_csf_5.bb"
grep -q "4061.xxxx.xxxx.0137" "/cygdrive/c/tmp/extrato_csf_5.html"
if [ $? -eq 0 ]
then
   echo "Extrato Cliente 01 OK"
   exit 0
else
   echo "Extrato Cliente 01 com problemas"
   exit 2
fi



No mesmo windows tem o nsclient++ com o nrpe habilitado.
O servico está definido assim no nsc.ini:
check_extrato_csf=c:\cygwin\bash /cygdrive/c/Prod/extrato_csf_5.sh



Finalmente, no script do badboy tem a opção de salvar no arquivo
c:\tmp\extrato_csf_5.html



Abraços



Em 7 de fevereiro de 2010 23:17, Heitor Felipe Lessa
<[email protected]> escreveu:
>
> José,
>
> Mas o cygwin instala-se no Windows, como você executa o script no Windows via Nagios (NRPE)? Utilizo o NSclient com o check_nt, mas não vi esta opção.
>
>  Hmmm é esta opção que ainda não vi, porém também somente dei um overview na ferramenta para ver como ela trabalhava, amanhã verei com mais calma, pois o script fica executando em loop.
>
>  Eu estava até pensando em ver a opção de executar somente 3 vezes o script (para reduzir a geração de falsos positivos), e copiar o mesmo via um shell do Server do Nagios e depois filtrando o texto com o grep e gerar os exit 0 1 e 2.
>
>  Tem skype ou msn para melhor dissernimento das informações?
>
> Abraço
>
> Atenciosamente,
>
> Heitor Lessa
>
>
>
>
> Date: Sat, 6 Feb 2010 17:28:06 -0200
>> From: [email protected]
>> To: [email protected]
>> Subject: Re: [Nagios-users-br]        Monitorando sites com autenticação
>>
>> Oi
>>
>> Eu realmente uso o cygwin mas não da maneira que vc citou.
>>
>> Eu rodo o script uma vez só, usando o badboy mesmo, com uma opção que
>> não me lembro agora que ele entra, roda o script e termina. No meu
>> script badboy eu mandei ele gravar o resultado de uma pagina
>> especifica em um arquivo texto.
>>
>> Depois que ele termina, eu procuro alguma string neste arquivo texto,
>> com ajuda do shell script do cygwin.
>>
>> O Nagios então chama este script do cygwin periodicamente...
>>
>> []s
>>
>>
>> Em 5 de fevereiro de 2010 19:26, Heitor Felipe Lessa
>> <[email protected]> escreveu:
>> >
>> > Olá José,
>> >
>> >  Fiz o download do Badboy no 7, coloquei a página nele e mandei gravar, ele pegou todos os campos, frames e tudo mais, mandei salvar o script e ficou como .bb.
>> >
>> >  Chamei o script via bbcmd.exe e o mesmo fica em loop testando-o continuamente, certo?
>> >
>> >  Você colocou o cygwin para fazer um script com um While chamando o script do Badboy e apontando para um arquivo, depois usa o grep para pegar o resultado, se positivo exit 0, se não 2, isso?
>> >
>> >  Podes me ajudar com a montagem?
>> >
>> >  Eu fiz com um batch simples para ver, redirecionei a saída para um arquivo, parei o script e vi que a tag [Redirected] estava presente ;).
>> >
>> > Muito Grato.
>> >
>> > Atenciosamente,
>> >
>> > Heitor Lessa
>> >
>> >
>> >
>> >> Date: Fri, 5 Feb 2010 16:48:09 -0200
>> >> From: [email protected]
>> >> To: [email protected]
>> >> Subject: Re: [Nagios-users-br]        Monitorando sites com autenticação
>> >>
>> >> Oi
>> >>
>> >> Eu uso um script do bad boy (http://www.badboy.com.au/). O badboy é um
>> >> programa de teste para sites e roda sobre o Internet Explorer. Eu crio
>> >> o script com o mesmo e depois o rodo, a partir do Nagios, usando o
>> >> nrpe.
>> >>
>> >> Veja o badboy e, se quiser mais detalhes da implementação, me fale.
>> >>
>> >> []s
>> >>
>> >>
>> >> Em 5 de fevereiro de 2010 12:12, Heitor Felipe Lessa
>> >> <[email protected]> escreveu:
>> >> >
>> >> > Pessoal,
>> >> >
>> >> >  Gostaria de saber se alguém tem implementado no Nagios algum plugin que monitore aplicações Web que exigem autenticação e tenham página Dinâmica, ou se até chegaram a criar o próprio plugin em alguma linguagem.
>> >> >
>> >> >  Shell script por exemplo.
>> >> >
>> >> >
>> >> > Vlww !
>> >> >
>> >> >
>> >> >
>> >> > _________________________________________________________________
>> >> > Quer deixar seus vídeos mais divertidos? Com o Movie Maker isso fica fácil.
>> >> > http://www.windowslive.com.br/public/tip.aspx/view/87?product=4&ocid=Windows Live:Dicas - Movie Maker:Hotmail:Tagline:1x1:Titulo Legendas Creditos
>> >> > ------------------------------------------------------------------------------
>> >> > The Planet: dedicated and managed hosting, cloud storage, colocation
>> >> > Stay online with enterprise data centers and the best network in the business
>> >> > Choose flexible plans and management services without long-term contracts
>> >> > Personal 24x7 support from experience hosting pros just a phone call away.
>> >> > http://p.sf.net/sfu/theplanet-com
>> >> > --
>> >> > [email protected] mailing list
>> >> > https://lists.sourceforge.net/lists/listinfo/nagios-users-br
>> >> > Wiki: http://nagios-br.sf.net/wiki
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Abraços
>> >> JGeraldo
>> >>
>> >> ------------------------------------------------------------------------------
>> >> The Planet: dedicated and managed hosting, cloud storage, colocation
>> >> Stay online with enterprise data centers and the best network in the business
>> >> Choose flexible plans and management services without long-term contracts
>> >> Personal 24x7 support from experience hosting pros just a phone call away.
>> >> http://p.sf.net/sfu/theplanet-com
>> >> --
>> >> [email protected] mailing list
>> >> https://lists.sourceforge.net/lists/listinfo/nagios-users-br
>> >> Wiki: http://nagios-br.sf.net/wiki
>> >
>> > _________________________________________________________________
>> > Você sabia que o Windows 7 inicia e desliga mais rápido? Clique e conheça mais.
>> > http://www.microsoft.com/brasil/windows7/default.html?WT.mc_id=1539
>> > ------------------------------------------------------------------------------
>> > The Planet: dedicated and managed hosting, cloud storage, colocation
>> > Stay online with enterprise data centers and the best network in the business
>> > Choose flexible plans and management services without long-term contracts
>> > Personal 24x7 support from experience hosting pros just a phone call away.
>> > http://p.sf.net/sfu/theplanet-com
>> > --
>> > [email protected] mailing list
>> > https://lists.sourceforge.net/lists/listinfo/nagios-users-br
>> > Wiki: http://nagios-br.sf.net/wiki
>> >
>>
>>
>>
>> --
>> Abraços
>> JGeraldo
>>
>> ------------------------------------------------------------------------------
>> The Planet: dedicated and managed hosting, cloud storage, colocation
>> Stay online with enterprise data centers and the best network in the business
>> Choose flexible plans and management services without long-term contracts
>> Personal 24x7 support from experience hosting pros just a phone call away.
>> http://p.sf.net/sfu/theplanet-com
>> --
>> [email protected] mailing list
>> https://lists.sourceforge.net/lists/listinfo/nagios-users-br
>> Wiki: http://nagios-br.sf.net/wiki
>
> _________________________________________________________________
> Quer compartilhar fotos com seus amigos? Conheça agora o Windows Live Fotos.
> http://www.eutenhomaisnowindowslive.com.br/?utm_source=MSN_Hotmail&utm_medium=Tagline&utm_campaign=InfuseSocial
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> --
> [email protected] mailing list
> https://lists.sourceforge.net/lists/listinfo/nagios-users-br
> Wiki: http://nagios-br.sf.net/wiki
>



-- 
Abraços
JGeraldo

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
-- 
[email protected] mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users-br
Wiki: http://nagios-br.sf.net/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.