nagios logs não estavam sendo atualizados

0

sempre que eu estou tentando reiniciar o meu nagios e postfix no ubuntu, o arquivo var / log / mail.log não estava sendo atualizado com os procedimentos atuais. Por favor me ajude a resolver este problema.

    
por veeru 26.10.2015 / 04:49

1 resposta

0

Nagios para enviar e-mail usando o comando de /usr/local/nagios/etc/objects/commands.cfg .

Baseado em nagios comments

################################################################################
#
# SAMPLE NOTIFICATION COMMANDS
#
# These are some example notification commands.  They may or may not work on
# your system without modification.  As an example, some systems will require 
# you to use "/usr/bin/mailx" instead of "/usr/bin/mail" in the commands below.
#
################################################################################

Instale mail ou xmail

sudo apt-get install mailx

e no mesmo arquivo check do comando use /usr/bin/mail

Exemplo

# '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 "## $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ ##" $CONTACTEMAIL$
    }
    
por 2707974 26.10.2015 / 12:48