Re: [Nagios-users] missing info in notifications

2008-03-09 Thread Marc Powell

On Mar 9, 2008, at 10:11 PM, Nelson Serafica wrote:

> Thanks. My host_notification_commands is notify-by-email. Here is  
> the snippet of notify-by-email:
>
> define command{
> command_namenotify-by-email
> command_line/usr/bin/printf "%b" "* Nagios  *\n 
> \nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$ 
> \nHost: $HO
> STALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/ 
> Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /bin/ 
> mail -s "**
>  $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is  
> $SERVICESTATE$ **" $CONTACTEMAIL$
> }
>
> If macros are not enabled, why $HOSTALIAS$ and $HOSTADDRESS$ has a  
> value? Do you think the problem is in the services.cfg only because  
> most of the missing variables is related to services?

Macros are always enabled but in your case, $SERVICE*$ macros don't  
make any sense for host notifications and aren't available for them.  
They're only valid for service notifications. You need to use the  
corresponding $HOST*$ macros as detailed on the macros documentation.  
The sample config files ship with a notify-by-email for service  
notifications and host-notify-by-email for host notifications. You  
should see if you already have one defined and use it instead.

--
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


Re: [Nagios-users] missing info in notifications

2008-03-09 Thread Nelson Serafica
Thanks. My host_notification_commands is notify-by-email. Here is the snippet 
of notify-by-email:

define command{
command_namenotify-by-email
command_line/usr/bin/printf "%b" "* Nagios  
*\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: 
$HO
STALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: 
$LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /bin/mail -s "**
 $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" 
$CONTACTEMAIL$
}

If macros are not enabled, why $HOSTALIAS$ and $HOSTADDRESS$ has a value? Do 
you think the problem is in the services.cfg only because most of the missing 
variables is related to services?

I'm using Nagios 2.10








- Original Message 
From: Marc Powell <[EMAIL PROTECTED]>
To: Nagios Users Mailinglist 
Sent: Monday, March 10, 2008 10:27:44 AM
Subject: Re: [Nagios-users] missing info in notifications


On Mar 9, 2008, at 9:12 PM, Nelson Serafica wrote:

> I have enabled notification via email. I just notice there are some  
> missing info in the notification. Here is a sample
>
> * Nagios  *
>
> Notification Type: PROBLEM
>
> Service:
> Host: BAP Web1 Server
> Address: X.X.X.X
> State:
>
> Date/Time: Mon Mar 10 09:49:55 PHT 2008
>
> Additional Info:
>
> - Nothing follows
>
> It doesn't indicated the service,state and additional info. I have  
> checked misscommands.cfg but don't know where to look for the  
> variables.


Look at the *_notification_commands specified for the contact{}. Look  
at that command{} definitions for those commands. Verify that you are  
using $MACROS$ appropriate for your version of nagios. You almost  
certainly are not.

These links are for 2.x, the version you should probably be using... --

http://nagios.sourceforge.net/docs/2_0/xodtemplate.html#contact

http://nagios.sourceforge.net/docs/2_0/xodtemplate.html#command

http://nagios.sourceforge.net/docs/2_0/macros.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






  
 
Tired of spam? Yahoo! Mail has the best spam protection around 
http://ph.mail.yahoo.com -
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

Re: [Nagios-users] missing info in notifications

2008-03-09 Thread Marc Powell

On Mar 9, 2008, at 9:12 PM, Nelson Serafica wrote:

> I have enabled notification via email. I just notice there are some  
> missing info in the notification. Here is a sample
>
> * Nagios  *
>
> Notification Type: PROBLEM
>
> Service:
> Host: BAP Web1 Server
> Address: X.X.X.X
> State:
>
> Date/Time: Mon Mar 10 09:49:55 PHT 2008
>
> Additional Info:
>
> - Nothing follows
>
> It doesn't indicated the service,state and additional info. I have  
> checked misscommands.cfg but don't know where to look for the  
> variables.


Look at the *_notification_commands specified for the contact{}. Look  
at that command{} definitions for those commands. Verify that you are  
using $MACROS$ appropriate for your version of nagios. You almost  
certainly are not.

These links are for 2.x, the version you should probably be using... --

http://nagios.sourceforge.net/docs/2_0/xodtemplate.html#contact

http://nagios.sourceforge.net/docs/2_0/xodtemplate.html#command

http://nagios.sourceforge.net/docs/2_0/macros.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


[Nagios-users] missing info in notifications

2008-03-09 Thread Nelson Serafica
I have enabled notification via email. I just notice there are some missing 
info in the notification. Here is a sample

* Nagios  *

Notification Type: PROBLEM

Service:
Host: BAP Web1 Server
Address: X.X.X.X
State:

Date/Time: Mon Mar 10 09:49:55 PHT 2008

Additional Info:

- Nothing follows

It doesn't indicated the service,state and additional info. I have checked 
misscommands.cfg but don't know where to look for the variables.





  
 
Tired of spam? Yahoo! Mail has the best spam protection around 
http://ph.mail.yahoo.com -
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