Re: Notification Status

Marcel <[email protected]>
Newsgroups gmane.network.nagios.user.brazil
Message-ID <[email protected]>
Então resolveu?

2010/4/14 Leandro da Silva de Souza <[email protected]>

> Marcel,
>
> Na verdade eu queria o status da notificacao geral , que eu acredito que
> seja enable_notifications . Pois ao desabilitar via external command a
> notificacao a unica linha que é alterada é a do enable_notifications.
> Esse script em python vai rodar via crontab para chegar uns processos
> internos para evitar mandar notificacao atoa para os usuarios
>
> Assim que eu faço um external command para habilitar/desabilitar e abaixo o
> status atual dele. Eu queria justamente achar onde estava o status
>
> printf \"[%lu] ENABLE_NOTIFICATIONS;\" " + data + " >
> /var/nagios/rw/nagios.cmd"
> printf \"[%lu] DISABLE_NOTIFICATIONS;\" " + data + " >
> /var/nagios/rw/nagios.cmd"
>
> Arquivo status.dat
> # grep enable_notifications status/status.dat
>        enable_notifications=0
> # grep enable_notifications status/status.dat
>        enable_notifications=1
>
> abs
> Leandro Souza
>
> Em 13 de abril de 2010 20:28, Marcel <[email protected]> escreveu:
>
> > Se eu te entendi direito, vc quer é usar MACROS (
> > http://nagios.sourceforge.net/docs/3_0/macrolist.html) pra realizar
> > validações lógicas antes de enviar um external command (
> > http://old.nagios.org/developerinfo/externalcommands/commandlist.php)
> para
> > desabilitar notificações de um determinado serviço.
> >
> > Para isso, vc precisa configurar um event handler (se esse python for um)
> > que executará o script que desabilitará as notificações.
> >
> > Ou, caso eu tenha te entendido mal, e vc está criando um CGI em python
> para
> > somente desabilitar as notificações enviando o comando diretamente no
> pipe
> > de comandos, vc não poderá usar as macros e terá que parsear o
> > /caminho/do/nagios/var/status.dat (ou será que é o objects.cache?) para
> > extrair a informação do status das notificações de cada serviço.
> >
> > Qualquer dúvida posso te ajudar, já fiz isso antes e é relativamente
> > trivial.
> >
> > []s
> >
> > 2010/4/13 Leandro da Silva de Souza <[email protected]>
> >
> > > Bom dia
> > >
> > > Estou fazendo uma rotina ( em python )  para habilitar/desabilitar a
> > > notificao via "external command" caso algum serviço esteja com falha
> para
> > > não prejudicar o desenpenho do servidor ( numero de processos abertos
> ).
> > A
> > > função de ENABLE/DISABLE da notificação esta ok, mas não estou
> > conseguindo
> > > verificar o seu status antes de tomar alguma ação ( se já estiver
> > > habilitada
> > > não habilita novamente ).
> > > Alguem sabe com eu verifico o status da Notificação  ?
> > >
> > >
> > > obrigado
> > > Leandro Souza
> > >
> > >
> >
> ------------------------------------------------------------------------------
> > > Download Intel&#174; Parallel Studio Eval
> > > Try the new software tools for yourself. Speed compiling, find bugs
> > > proactively, and fine-tune applications for parallel performance.
> > > See why Intel Parallel Studio got high marks during beta.
> > > http://p.sf.net/sfu/intel-sw-dev
> > > --
> > > [email protected] mailing list
> > > https://lists.sourceforge.net/lists/listinfo/nagios-users-br
> > > Wiki: http://nagios-br.sf.net/wiki
> > >
> >
> >
> ------------------------------------------------------------------------------
> > Download Intel&#174; Parallel Studio Eval
> > Try the new software tools for yourself. Speed compiling, find bugs
> > proactively, and fine-tune applications for parallel performance.
> > See why Intel Parallel Studio got high marks during beta.
> > http://p.sf.net/sfu/intel-sw-dev
> > --
> > [email protected] mailing list
> > https://lists.sourceforge.net/lists/listinfo/nagios-users-br
> > Wiki: http://nagios-br.sf.net/wiki
> >
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> --
> [email protected] mailing list
> https://lists.sourceforge.net/lists/listinfo/nagios-users-br
> Wiki: http://nagios-br.sf.net/wiki
>
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
-- 
[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.