Page 3 of 5

Re: Problem with enabling notifications with postfix

Posted: Fri Jul 10, 2015 3:10 pm
by Jessuzz94
tgriep the notifications are enabled.

my notifications commands? ok, the path that i put in commands.cfg in notify-host-by-email and notify-service-by-email is /usr/bin/mail

Re: Problem with enabling notifications with postfix

Posted: Mon Jul 13, 2015 9:04 am
by jdalrymple
jdalrymple wrote:We need to see your notification commands, notify-host-by-email and notify-service-by-email.
Jessuzz94 wrote:ok, the path that i put in commands.cfg in notify-host-by-email and notify-service-by-email is /usr/bin/mail
Please share with us the entire command from commands.cfg. Please help us help you.

Are you sure that the path is /usr/bin/mail?

Code: Select all

/usr/bin/mail -V

Re: Problem with enabling notifications with postfix

Posted: Mon Jul 13, 2015 2:12 pm
by Jessuzz94
Is the path where i have mail, for default, were /bin/mail and in this path i have nothing, i wil post the information

Re: Problem with enabling notifications with postfix

Posted: Mon Jul 13, 2015 3:38 pm
by tgriep
You can run this on your system to see where the mail program is on your system.

Code: Select all

which mail
Can you upload the commands.cfg file to this post so we can see how the commands are defined?

Re: Problem with enabling notifications with postfix

Posted: Tue Jul 14, 2015 4:08 pm
by Jessuzz94
Yeah is correct, /usr/bin/mail

Re: Problem with enabling notifications with postfix

Posted: Wed Jul 15, 2015 9:03 am
by jdalrymple
Here is the deal Jessuzz94 - we've asked you for your notify-host-by-email and notify-service-by-email commands at least 4 times and you have yet to provide them. They are absolutely 100% the next thing we need to see in order to help you. If you cannot provide them we cannot help you. Kindly provide them please or else we'll have to lock the topic.

Re: Problem with enabling notifications with postfix

Posted: Thu Jul 16, 2015 2:22 pm
by Jessuzz94
Sorry, i cant connected to the server from ssh to copy all the code, it can copy all the text with some editor using only the console witthout mouse?

Re: Problem with enabling notifications with postfix

Posted: Thu Jul 16, 2015 2:30 pm
by jdalrymple
screen capture is fine. We just need to review it.

Re: Problem with enabling notifications with postfix

Posted: Mon Jul 20, 2015 12:28 pm
by Jessuzz94

Code: Select all

# 'notify-host-by-email' command definition
define command{
        command_name    notify-host-by-email
        command_line    /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAd
dress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | usr/bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE
$ **" $CONTACTEMAIL$  -r [email protected]
        }

# 'notify-service-by-email' command definition
define command{
        command_name    notify-service-by-email
        command_line    /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALI
AS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n" | usr/bin/mail -s "** $NOTIF
ICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$ -r [email protected]
        }

Re: Problem with enabling notifications with postfix

Posted: Mon Jul 20, 2015 12:38 pm
by jdalrymple
In both commands...

Code: Select all

/usr/bin/mail
not

Code: Select all

usr/bin/mail