This is the command i have in and that i keep getting the same errors
but "printf" that shouldnt matter because why would it work in general for
host down noticifations
Here is the command i have in now:
define command {
command_name host-notify-by-email
command_line /bin/echo -e "Subject:
$NOTIFICATIONTYPE$ alert - Host $HOSTNAME$ is $HOSTSTATE$\n\n*****
Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost:
$HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo:
$HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n\nAcknowledged By:
$HOSTACKAUTHOR$\nAcknowledgement: $HOSTACKCOMMENT$" | /bin/mail
$CONTACTEMAIL$
}
On 6/21/07, Adam Kennedy <[EMAIL PROTECTED]> wrote:
What is the full config entry for that command? I fear you are not using
printf when you should be.
Nedim Bicic wrote:
> I wish it was that easy but its still not working regardless of spelling
>
> I changed it of course but same error
>
> *> nagios -v /etc/nagios/nagios.cfg*
>
> Nagios 2.4
> Copyright (c) 1999-2006 Ethan Galstad (http://www.nagios.org)
> Last Modified: 05-31-2006
> License: GPL
>
> Reading configuration data...
>
> Error: Invalid command object directive
'$HOSTACKAUTHOR$\nAcknowledged:'.
> Error: Could not add object property in file
> '/etc/nagios/misccommands.cfg' on line 54.
>
>
>
> On 6/21/07, *Palle Jensen* <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>
> Could it be a spelling problem " Acnkowledgement:" -
Acknowledgement?
>
>
>
> > Error: Invalid command object directive
> '$HOSTACKAUTHOR$\nAcnkowledgement:'.
>
>
>
> - Palle
>
>
------------------------------------------------------------------------
>
> *From:* [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
> [mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>] *On Behalf Of
> *Nedim Bicic
> *Sent:* Thursday, June 21, 2007 2:11 PM
> *To: * Jim Perrin
> *Cc:* nagios-users@lists.sourceforge.net
> <mailto:nagios-users@lists.sourceforge.net>
> *Subject:* Re: [Nagios-users] Nagios Message Acknowledgment
>
>
>
> Hey this is the error i get when i try to debug the above command
> for the acknowledgement does anyone know why or how to fix it
>
>
>
>
>
> this is what i get:
>
>
>
> ** nagios -v /etc/nagios/nagios.cfg**
>
> Nagios 2.4
> Copyright (c) 1999-2006 Ethan Galstad ( http://www.nagios.org
> <http://www.nagios.org/>)
> Last Modified: 05-31-2006
> License: GPL
>
> Reading configuration data...
>
> Error: Invalid command object directive
> '$HOSTACKAUTHOR$\nAcnkowledgement:'.
> Error: Could not add object property in file
> '/etc/nagios/misccommands.cfg' on line 54.
>
> ***> One or more problems was encountered while processing the
> config files...
>
> Check your configuration file(s) to ensure that they contain
valid
> directives and data defintions. If you are upgrading from a
> previous
> version of Nagios, you should be aware that some
> variables/definitions
> may have been removed or modified in this version. Make sure
> to read
> the HTML documentation regarding the config files, as well as
the
> 'Whats New' section to find out what has changed.
>
>
>
>
>
>
>
>
> On 6/21/07, *Jim Perrin* < [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>
> On 6/21/07, Nedim Bicic <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
> wrote:
> > Do i have to stop nagios and restart it again for it to work
>
> Or reload nagios, yes. This is the case with most/all changes to
> config files. You have read the documentation, right?
>
> --
> During times of universal deceit, telling the truth becomes a
> revolutionary act.
> George Orwell
>
>
>
>
>
> ------------------------------------------------------------------------
>
>
-------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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
--
Adam Kennedy
Network Administrator
Cyberlink International
Phone: 888-293-3693 x4352
Fax: 888-293-3995
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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