mab1376
May 12th, 2010, 02:27 PM
The e-mail notifications don't seem to be working, I found a tutorial which said I should install the package "mailx" which has 3 candidates and I don't know which one to use.
http://www.ubuntugeek.com/nagios-network-monitoring-system-setup-in-ubuntu.html
sudo apt-get install mailx
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package mailx is a virtual package provided by:
mailutils 1:2.1+dfsg1-4ubuntu1
heirloom-mailx 12.4-1.1
bsd-mailx 8.1.2-0.20090911cvs-2ubuntu1
You should explicitly select one to install.
E: Package mailx has no installation candidate
I tried the first package, "mailutils" and still it's not working.
This is the command that is supposed to send out the email.
# 'host-notify-by-email' command definition
define command{
command_name host-notify-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/mailx -s "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
}
http://www.ubuntugeek.com/nagios-network-monitoring-system-setup-in-ubuntu.html
sudo apt-get install mailx
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package mailx is a virtual package provided by:
mailutils 1:2.1+dfsg1-4ubuntu1
heirloom-mailx 12.4-1.1
bsd-mailx 8.1.2-0.20090911cvs-2ubuntu1
You should explicitly select one to install.
E: Package mailx has no installation candidate
I tried the first package, "mailutils" and still it's not working.
This is the command that is supposed to send out the email.
# 'host-notify-by-email' command definition
define command{
command_name host-notify-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/mailx -s "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
}