From: <ben...@ca...> - 2009-11-13 18:54:01
|
Beleza, Jotagera. Entendi. E até fiz uns testes. Mas percebi que no meu caso, esses contadores não ajudam muito, pois o servidores são de arquivos e backup, exclusivamente. Então, não haverá contador para eles. Mas estive pensando em outra coisa, talvez você possa ajudar. Eu ativei o serviço SNMP do Servidor Windows2003 e Do Nagios. Os traps de sistema estão chegando lá bonitinho. Só que percebi que o ntbackup (software da Microsoft que utilizo para fazer backup) não gera trap nenhum. Então não chega lá no Nagios. Aí pensei o seguinte: O backup que eu faço (agendado) é através de um script que fiz. Ele gera um log em .txt com o histórico do backup, inclusive contendo mensagens se terminou com sucesso ou não. O que eu precisaria então é ler esse arquivo e mandar um trap SNMP para o servidor Nagios com uma mensagem, por exemplo, "Backup realizado com Sucesso". Aí lá eu trataria e enviaria para o Nagios através de um plugin que eu já fiz aqui e funciona. Só não sei como enviar essa trap de mensagem personalizada. ENTÃO EU PERGUNTO: será que existe algum comando SNMP que envie trap personalizada, além daquelas automáticas de sistema? Se puderem retornar, agradeço bastante. Diramos De: Jose Oliveira [mailto:jot...@gm...] Enviada em: quarta-feira, 11 de novembro de 2009 20:47 Para: Benedito Ramos Assunto: Re: Monitoração hosts Windows remotos Oi Não esquenta com o moderador. Eu sou o terceiro responsável... Só que o primeiro (criador da lista) e o segundo sumiram... kkkk Dá pouco trabalho... Quanto aos comandos que podem ser consultados, realmente não sei ao certo porque windows não é bem minha praia, mas qualquer coisa que voce pode colocar no perfmon pode ser monitorada com uma linha similar a esta. No windows xp (que estou pilotando agora), vou em painel de controle ferramentas administrativas desempenho Este é o aplicativo que o pessoal do windows chama de perfmon. clicando com o clique da direita no gráfico, podem ser escolhidos contadores para incluir. Escolhe o tipo de "objeto de desempenho", depois o contador e depois a instância. Depos de instalar o exchange, sql server, iis, oracle, lotus notes e (com certeza) outros, eles incluem um novo objeto de desempenho para este novo aplicativo... Simples e bacaninha... Observe que o \\ no linux é traduzido em uma barra só... Sempre que precisar pode perguntar. Mande tambem para o forum boas experiências. A gente precisa disto... Estou terminando uma documentação de instalação de um conjunto legal de amiguinhos do Nagios e pretendo publicar em breve. Juntei ao Nagios 3.2 o ndoutils, ndodb graph, nagiosql e nagvis. []s 2009/11/11 <ben...@ca...> Caro Jotagera, Não sabia que você era o moderador do site! E eu falando mal. Hehehe. Desculpa! J Informações valiosíssimas essas que você me passou desde que iniciei o tópico. Muito obrigado! Achei muito interessante o comando: $USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -t 30 -v COUNTER -l "\\MSExchangeMTA\\Work Queue Length","Total de mensagens a serem entregues %.0f " -w $ARG1$ -c $ARG2$ Aí eu pergunto: onde conseguir uma lista de todos os parâmetros similares a "\\MSExchangeMTA\\Work Queue Length", possíveis para passar? Tem algum artigo? Pois, a partir daí vou testando aqui e vejo o que me serve. Mui grato! PS: fico devendo mais essa. E prometo colaborar mais com o fórum, como forma de te aliviar de tanto trampo. Abraço, Diramos De: Jose Oliveira [mailto:jot...@gm...] Enviada em: quarta-feira, 11 de novembro de 2009 18:11 Para: Benedito Ramos Assunto: Re: Monitoração hosts Windows remotos Caro Diramos As mensagens costumam demorar porque sou eu mesmo o moderador... :) A melhor maneira de voce ver as capacidades do nsclient é verificar em seu "consumidor", o check_nt. Use, no seu servidor Linux com Nagios, check_nt --help. Voce verá as opções disponíveis. Recomendo voce testar na linha de comando antes de implementar a monitoração, pois principalmente consultas a contadores e a instâncias dá uma boa briga. Aqui na CSU temos, além de performance e ocupação de disco, monitoração da fila de mensagens do exchange com a seguinte linha de comando: $USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -t 30 -v COUNTER -l "\\MSExchangeMTA\\Work Queue Length","Total de mensagens a serem entregues %.0f " -w $ARG1$ -c $ARG2$ Passamos via services.cfg valores pertinentes para cada servidor. E para monitoração de serviço usamos: $USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -t 30 -v SERVICESTATE -l msexchangemta Monitorar log é uma pedreira... A gente está testando um software free que manda o event viewer do windows para um Syslog de Linux. Neste estamos tentando uns scripts para pegar as coisas importantes... O software é GPL, chama-se Syslog Agent e está disponível no site http://www.syslogserver.com/syslogagent.html Tem um software que monitora log e gera eventos, inclusive alarme para o nagios... Chama-se splunk.e tem alguma coisa free. Eu ainda não tive tempo de testar... http://www.splunk.com/ Desculpe não ter respondido antes, mas o bicho pegou aqui hoje com força. Tivemos um problemão num Banco Oracle em São Paulo, que travou nas quatro rodas por causa do apagão de ontem a noite... O no-break segurou um pouco e o gerador assumiu como é normal, e o pessoal de operação do data-center de lá relaxou. O gerador deu aquecimento e parou e ningue mviu o alarme de baixa autonomia do no-break, até que deu no que deu... Derrubou tudo..... Estou na peleja, junto com o DBA (eu sou de *Nix) deste as 5 da manhã... []s 2009/11/11 <ben...@ca...> Caro Jotagera, Como as mensagens do fórum demoram um pouco prá serem enviadas, resolvi mandar direto prá você. Leia, por favor. Diramos -----Mensagem original----- De: Benedito Ramos Enviada em: terça-feira, 10 de novembro de 2009 14:07 Para: Unofficial Brazilian (Portuguese) Nagios Users List Assunto: [Nagios-users-br]Nagios - Monitoração hosts Windows remotos Ôpa, Jotagera, Segui teu conselho e instalei o nsclient++ aqui. Moleza de configurar. Já estou monitorando: uso de CPU, uso de memória e espaço em disco. Maravilha! Fiz testes e funciona direitinho com alertas, emails, etc. Gostei muito. Mas, aproveitando mais da sua bondade, será que o nsclient monitora também o event viewer do Windows? Pois tem uns eventos críticos lá que gostaria de monitorar. Se sim, como? Outra coisa: um dos servidores que instalei o nsclient é o servidor onde rodam backup de outros. Será que tem algum esquema de checar se os backup terminaram normal? A última pergunta: sabe uma lista completa das checagens do nsclient? Além de CPULOAD, MEMUSE e USEDDISKSPACE. E como fazer para monitorar os aplicativos do windows? Será que dá prá monitorar o aplicativo ntbackup? Gratíssimo!!!!!!!! Diramos -----Mensagem original----- De: Jose Oliveira [mailto:jot...@gm...] Enviada em: terça-feira, 10 de novembro de 2009 10:28 Para: Unofficial Brazilian (Portuguese) Nagios Users List Assunto: Re: [Nagios-users-br]Nagios - Monitoração hosts Windows remotos Diramos Onde trabalho utilizamos o nsclient++, disponivel em http://nsclient.org/nscp/ <http://nsclient.org/nscp/>O nsclient implementa várias monitorações por sí só, tais como espaço em disco, performance (modelo nix com média de load de 1, 5 e 15 minutos), status de serviços e processos. Fornece ainda acesso aos contadores de performance do windows. O acesso aos contadores permite que voce monitore qualquer aplicativo do windows que utilize estas métricas, tais como isa-server, sql-server, oracle, lotus notes... O nsclient++ implementa ainda o protocolo nrpe, de maneira que voce pode usar plugins prontos ou implementar os seus proprios. Eu prefiro o nsclient++ do que o snmp, mas somente pela simplicidade do nsclient... O nsclient funciona em todos os "sabores" de windows server, desde o NT até o 2008 da mesma maneira. Como ainda temos NT em produção... O nsclient usa uma porta para responder serviços de nsclient (usando plugin check_nt) e outra para serviços de nrpe (usando plugin check_nrpe). O nrpe é opcional... O nsca, que voce citou, é usado para monitoração ativa ou seja, nos casos que o servidor monitore a si mesmo e envie traps para o Nagios em caso de eventos fora do padrão. Muito similar a trap snmp mas também bem mais simples... O nrpe e o nsclient são passivos ou seja, apenas respondem às "perguntas" do Nagios. []s 2009/11/9 <ben...@ca...> > PessoALL, > > > > Trabalho num grande banco estatal brasileiro. > > Já uso o Nagios há tempos para monitorar hosts Linux e Windows. > > Mas, pela política de segurança da empresa, os plugins do Nagios não podem > ser instalados em máquinas remotas Windows. > > Então, até agora eu uso só para checar o PING (check_ping) nas máquinas > Windows, que não precisam ter plugins instalados localmente. > > Ocorre que, recentemente instalei algumas máquinas com Windows 2003 Server, > que poderão ter esses plugins instalados. > > Preciso checar espaço em disco, uso de memória, serviços, etc, etc. > > Dei uma olhada na Net e verifiquei que tem duas maneiras de se fazer isso: > NRPE e NSCA > > Então queria ver com vocês o seguinte: > > 1 - Existe diferença entre os dois plugins? > 2 - Quais vocês me indicariam? > 3 - Qual consome menos recursos de redes? > 4 - Qual abre menos portas para checagens? > > E teriam aí um tutorial bem completo para eu instalar aqui? > > Grato e um abraço a todos. > > Diramos > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > -- > Nag...@li... mailing list > https://lists.sourceforge.net/lists/listinfo/nagios-users-br > Wiki: http://nagios-br.sf.net/wiki > -- Abraços JGeraldo ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july -- Nag...@li... mailing list https://lists.sourceforge.net/lists/listinfo/nagios-users-br Wiki: http://nagios-br.sf.net/wiki -- Abraços JGeraldo -- Abraços JGeraldo |