-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jonathan Williams wrote:

| [1217000677] Warning: Attempting to execute the command
| "/usr/local/nagios/libexec/notify-html-email.sh service" resulted in a
| return code of 127.  Make sure the script or binary you are trying to
| execute actually exists...

Sounds like you rely on thing in this scripts that only work with a
proper environment. That is not what killed your script. But I suggest
you fix it nevertheless.

Like:
# Generate unique MIME Content-ID base for multipart message
CONTENTIDBASE="`date [EMAIL PROTECTED] --fqdn`"

This will not work if your PATH is not set properly. I suggest you
define DATECMD first to point to the full path of date and then use
$DATECMD instead if date in your script.


And its seems your commandline ignores to add the required notification
type so this check will always make it fail:

# Check for proper usage
[ $1 ] || {
        echo -e "notify-html-email.sh $VERISON\n\nHTML 4.0 notification for
Nagios 2.x\n\nUsage: notify-html-email <notification_type>\n\nOptions:"
        echo -e " notification_type\n    Must be 'host' or 'service' indicating
the type of notification\n"
        echo -e "This script should be called by a Nagios e-mail notification
command\nfrom /usr/local/nagios/etc/misccommands.cfg"
        echo -e "It uses the NAGIOS_* environmental variables to generate and
send an HTML\nmessage to the recipient.  The format of the e-mail is
customizable by\nediting the script.\n"
        exit -1
}

So now you know why you always get the given return code.

Hugo.

- --
[EMAIL PROTECTED]               http://hugo.vanderkooij.org/
PGP/GPG? Use: http://hugo.vanderkooij.org/0x58F19981.asc

        A: Yes.
        >Q: Are you sure?
        >>A: Because it reverses the logical flow of conversation.
        >>>Q: Why is top posting frowned upon?

Bored? Click on http://spamornot.org/ and rate those images.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFIjCZLBvzDRVjxmYERAt6HAKCOatnBauB6VWweiuL+n2aHrrSmdgCguaRS
xt1aXDst0Zd6gwOLk3ojdh0=
=lsJI
-----END PGP SIGNATURE-----

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Nagios-users mailing list
[email protected]
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

Reply via email to