[Nagios-users] RES: RES: RES: Parameters not passed to eventhandler'sscript

2008-03-05 Thread Bráulio H . Soares
I'm using to tests purposes the script attached.
It's only send a e-mail when a change status occurs, based on the parameters 
$SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$.

I'm thinking by the following way:
The conditions to the cases are not being matched.

Thx in advance.

Best Regards,
 brHS.

 
 

-Mensagem original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Em nome de Bráulio H. Soares
Enviada em: quarta-feira, 5 de março de 2008 15:11
Para: Marc Powell; nagios-users@lists.sourceforge.net
Assunto: [Nagios-users] RES: RES: Parameters not passed to eventhandler'sscript

You're correct!
I see fix issue but the outputs in the log are the same... and the Nagios' 
behaviour too.

To test, I'm using a firewall to drop ICMP in a host. When dropping ICPM 
packets, the host appears to be DOWN, and the log generate the message, like 
below. No e-mail is sent. When the firewall stops to drop ICMP the host appears 
UP, and a e-mail is sent, and the parameter are UP, HARD and 1, but any is 
passed to script, only is wrote in the log file.


Best Regards,
 brHS.

 
 

-Mensagem original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Em nome de Marc Powell
Enviada em: quarta-feira, 5 de março de 2008 14:55
Para: nagios-users@lists.sourceforge.net
Assunto: Re: [Nagios-users] RES: Parameters not passed to event handler'sscript



 -Original Message-
 From: [EMAIL PROTECTED] [mailto:nagios-users-
 [EMAIL PROTECTED] On Behalf Of Bráulio H. Soares
 Sent: Tuesday, March 04, 2008 2:35 PM
 To: Patrick Morris
 Cc: nagios-users@lists.sourceforge.net
 Subject: [Nagios-users] RES: Parameters not passed to event handler's
 script
 
 To test effects, consider the script like the example available at Nagios
 online docs, with some modifications (see the attachment).
 
 The command with the parameters is this:
 command_line /fakepath/nagios/fake_script $SERVICESTATE$
 $SERVICESTATETYPE$ $SERVICEATTEMPT$

See below...
 
 -Mensagem original-
 De: Patrick Morris [mailto:[EMAIL PROTECTED]
 Enviada em: terça-feira, 4 de março de 2008 17:24
 Para: Bráulio H. Soares
 Cc: nagios-users@lists.sourceforge.net
 Assunto: Re: [Nagios-users] Parameters not passed to event handler's
 script
 
 Hi Br?ulio!
 
 On Tue, 04 Mar 2008, Br?ulio H. Soares wrote:
 
  Hi people,
 
  I?ve a Nagios 3rc1 with a very simple configuration and I?m facing a
 problem while using Event Handler.
 
  When the script run, in the logs I can to verify that the parameters is
 not passed to the code. See below:
 
  [1204655932] SERVICE ALERT: host1.fake.int;PING;CRITICAL;SOFT;1;PING
 CRITICAL - Packet loss = 100%
  [1204655962] HOST ALERT: host1.fake.int;DOWN;SOFT;1;(Host Check Timed
 Out)
  [1204655962] HOST EVENT HANDLER:
 host1.fake.int;(null);(null);(null);fakescript

$SERVICESTATE$, $SERVICESTATETYPE$, $SERVICEATTEMPT$ macros are not valid for 
host event handlers, only service event handlers.

http://nagios.sourceforge.net/docs/3_0/macrolist.html

--
Marc

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null



Aviso de Confidencialidade: As informações contidas nesta mensagem de e-mail, 
incluindo quaisquer anexos, são confidenciais, e estão destinadas apenas à 
pessoa ou entidade para a qual foi diretamente endereçada. Se você não é o 
destinatário, nem o empregado ou agente responsável por encaminhar esta 
mensagem ao destinatário, então você está notificado de que não deverá rever, 
retransmitir, imprimir, copiar, usar ou distribuir esta mensagem de e-mail ou 
seus anexos. Se você recebeu este e-mail por engano, por favor, contate o 
remetente imediatamente e apague (delete) esta mensagem de seu computador ou de 
qualquer outro banco de dados. Opiniões pessoais, comentários e conclusões não 
são endossados pela Halógica Tecnologia e devem ser desconsideradas. Obrigado.


Confidentiality Notice: The information contained in this email message, 
including any attachment, is confidential and is intended only for the person 
or entity to which it is addressed. If you are neither the intended recipient 
nor the employee or agent responsible for delivering this message to the 
intended recipient, you are hereby notified that you may not review, 
retransmit, convert to hard copy, copy, use or distribute this email message or 
any attachments to it. If you have received this email in error, please contact 
the sender immediately and delete this message from any computer or other data

Re: [Nagios-users] RES: RES: RES: Parameters not passed to eventhandler'sscript

2008-03-05 Thread Joerg Linge
Bráulio H. Soares schrieb:
 I'm using to tests purposes the script attached.
 It's only send a e-mail when a change status occurs, based on the parameters 
 $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$.
 
 I'm thinking by the following way:
 The conditions to the cases are not being matched.

Hi,
please use the complete path to your printf and mail binaray.
$PATH is not set when nagios execute commands

Joerg



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null