Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
sinkak
Posts: 158 Joined: Thu Jul 30, 2015 1:30 pm
Post
by sinkak » Tue Nov 17, 2015 11:48 am
if i did this step
Code: Select all
./configure --with-nagios-group=nagios --with-command-group=nagcmd
and missed to add this at the end
is there any way to configure with out re-compile and re-installing everything again.
ssax
Dreams In Code
Posts: 7682 Joined: Wed Feb 11, 2015 12:54 pm
Post
by ssax » Tue Nov 17, 2015 6:13 pm
I suppose you could always make /usr/sbin/sendmail a symbolic link to somewhere else.
Code: Select all
mv /usr/sbin/sendmail /usr/sbin/sendmail.old
ln -s /your/other/path /usr/sbin/sendmail
sinkak
Posts: 158 Joined: Thu Jul 30, 2015 1:30 pm
Post
by sinkak » Wed Nov 18, 2015 11:36 am
In the initial step of nagios configuration.
./configure --with-nagios-group=nagios --with-command-group=nagcmd and missed to add this at the end
-–with-mail=/usr/bin/mail or -–with-mail=/usr/sbin/sendmail
I forgot to add mail option to it before i did
make install step.
how creating new symbolic link will connect mail to nagios?
i have this in commands.cfg
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$\nAddress: $HOSTADDRESS$\
nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/mail -s "** WSA $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
}
# '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: $HOSTALIAS$\nAddress: $HOSTAD
DRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n" | /usr/bin/mail -s "** WSA $NOTIFICATIONTYPE$ Service Alert: $HOSTA
LIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
}
rkennedy
Posts: 6579 Joined: Mon Oct 05, 2015 11:45 am
Post
by rkennedy » Wed Nov 18, 2015 1:25 pm
The command @ssax posted above should work, what this will do is have Nagios look for your sendmail in the proper location that Nagios defaults to.
Former Nagios Employee
sinkak
Posts: 158 Joined: Thu Jul 30, 2015 1:30 pm
Post
by sinkak » Wed Nov 18, 2015 1:56 pm
i am using /usr/bin/mail in commands.cfg
in these steps.
Code: Select all
mv /usr/bin/mail /usr/bin/mail.old
ln -s /your/other/path /usr/bin/mail
what is
/your/other/path
rkennedy
Posts: 6579 Joined: Mon Oct 05, 2015 11:45 am
Post
by rkennedy » Wed Nov 18, 2015 2:15 pm
It is the source path that you're looking to link your sendmail from to the /usr/bin/mail.
Former Nagios Employee
sinkak
Posts: 158 Joined: Thu Jul 30, 2015 1:30 pm
Post
by sinkak » Wed Nov 18, 2015 2:23 pm
i am not using send mail. i am using /usr/bin/mail in commands.cfg
rkennedy
Posts: 6579 Joined: Mon Oct 05, 2015 11:45 am
Post
by rkennedy » Wed Nov 18, 2015 2:27 pm
Where is your sendmail configured at on your system?
Former Nagios Employee
sinkak
Posts: 158 Joined: Thu Jul 30, 2015 1:30 pm
Post
by sinkak » Wed Nov 18, 2015 2:39 pm
i have not configured sendMail on my nagios server.
i am using only /usr/bin/mail. which i forgot to add in the nagios configuration step.
i just used it as an example to ask if i forgot to add sendmail or mail in configuration step before make install. how do you configure it later.
rkennedy
Posts: 6579 Joined: Mon Oct 05, 2015 11:45 am
Post
by rkennedy » Thu Nov 19, 2015 10:56 am
Can you run the command and post the output -
/usr/bin/mail -V
Former Nagios Employee