Page 2 of 3

Re: My email notifications from nagios have stopped

Posted: Mon Mar 03, 2014 4:24 pm
by billperrotta
see my commands.cfg below

Code: Select all

###############################################################################
# COMMANDS.CFG - SAMPLE COMMAND DEFINITIONS FOR NAGIOS 3.5.0
#
# Last Modified: 05-31-2007
#
# NOTES: This config file provides you with some example command definitions
#        that you can reference in host, service, and contact definitions.
#       
#        You don't need to keep commands in a separate file from your other
#        object definitions.  This has been done just to make things easier to
#        understand.
#
###############################################################################


################################################################################
#
# 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.
#
################################################################################


# '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$
	}

# '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: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
	}





################################################################################
#
# SAMPLE HOST CHECK COMMANDS
#
################################################################################


# This command checks to see if a host is "alive" by pinging it
# The check must result in a 100% packet loss or 5 second (5000ms) round trip 
# average time to produce a critical error.
# Note: Five ICMP echo packets are sent (determined by the '-p 5' argument)

# 'check-host-alive' command definition
define command{
        command_name    check-host-alive
        command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
        }




################################################################################
#
# SAMPLE SERVICE CHECK COMMANDS
#
# These are some example service check commands.  They may or may not work on
# your system, as they must be modified for your plugins.  See the HTML 
# documentation on the plugins for examples of how to configure command definitions.
#
# NOTE:  The following 'check_local_...' functions are designed to monitor
#        various metrics on the host that Nagios is running on (i.e. this one).
################################################################################

# 'check_local_disk' command definition
define command{
        command_name    check_local_disk
        command_line    $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
        }


# 'check_local_load' command definition
define command{
        command_name    check_local_load
        command_line    $USER1$/check_load -w $ARG1$ -c $ARG2$
        }


# 'check_local_procs' command definition
define command{
        command_name    check_local_procs
        command_line    $USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
        }


# 'check_local_users' command definition
define command{
        command_name    check_local_users
        command_line    $USER1$/check_users -w $ARG1$ -c $ARG2$
        }


# 'check_local_swap' command definition
define command{
	command_name	check_local_swap
	command_line	$USER1$/check_swap -w $ARG1$ -c $ARG2$
	}


# 'check_local_mrtgtraf' command definition
define command{
	command_name	check_local_mrtgtraf
	command_line	$USER1$/check_mrtgtraf -F $ARG1$ -a $ARG2$ -w $ARG3$ -c $ARG4$ -e $ARG5$
	}


################################################################################
# NOTE:  The following 'check_...' commands are used to monitor services on
#        both local and remote hosts.
################################################################################

# 'check_ftp' command definition
define command{
        command_name    check_ftp
        command_line    $USER1$/check_ftp -H $HOSTADDRESS$ $ARG1$
        }


# 'check_hpjd' command definition
define command{
        command_name    check_hpjd
        command_line    $USER1$/check_hpjd -H $HOSTADDRESS$ $ARG1$
        }


# 'check_snmp' command definition
define command{
        command_name    check_snmp
        command_line    $USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$
        }


# 'check_http' command definition
define command{
        command_name    check_http
        command_line    $USER1$/check_http -I $HOSTADDRESS$ $ARG1$
        }

define command{
	command_name 	check_https
	command_line 	$USER1$/check_http -I $HOSTADDRESS$ $ARG1$ -S
}

# 'check_ssh' command definition
define command{
	command_name	check_ssh
	command_line	$USER1$/check_ssh $ARG1$ $HOSTADDRESS$
	}


# 'check_dhcp' command definition
define command{
	command_name	check_dhcp
	command_line	$USER1$/check_dhcp $ARG1$
	}


# 'check_ping' command definition
define command{
        command_name    check_ping
        command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5
        }


# 'check_pop' command definition
define command{
        command_name    check_pop
        command_line    $USER1$/check_pop -H $HOSTADDRESS$ $ARG1$
        }


# 'check_imap' command definition
define command{
        command_name    check_imap
        command_line    $USER1$/check_imap -H $HOSTADDRESS$ $ARG1$
        }


# 'check_smtp' command definition
define command{
        command_name    check_smtp
        command_line    $USER1$/check_smtp -H $HOSTADDRESS$ $ARG1$
        }


# 'check_tcp' command definition
define command{
	command_name	check_tcp
	command_line	$USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$
	}


# 'check_udp' command definition
define command{
	command_name	check_udp
	command_line	$USER1$/check_udp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$
	}


# 'check_nt' command definition
define command{
	command_name	check_nt
	command_line	$USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v $ARG1$ $ARG2$
	}


# 'check_nrpe" command definition
define command{
	command_name 	check_nrpe
	command_line 	$USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$ -t 20
}



################################################################################
#
# SAMPLE PERFORMANCE DATA COMMANDS
#
# These are sample performance data commands that can be used to send performance
# data output to two text files (one for hosts, another for services).  If you
# plan on simply writing performance data out to a file, consider using the 
# host_perfdata_file and service_perfdata_file options in the main config file.
#
################################################################################


# 'process-host-perfdata' command definition
define command{
	command_name	process-host-perfdata
	command_line	/usr/bin/printf "%b" "$LASTHOSTCHECK$\t$HOSTNAME$\t$HOSTSTATE$\t$HOSTATTEMPT$\t$HOSTSTATETYPE$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$\n" >> /var/lib/nagios/host-perfdata.out
	}


# 'process-service-perfdata' command definition
define command{
	command_name	process-service-perfdata
	command_line	/usr/bin/printf "%b" "$LASTSERVICECHECK$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICESTATE$\t$SERVICEATTEMPT$\t$SERVICESTATETYPE$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$\n" >> /var/lib/nagios/service-perfdata.out
	}

Code: Select all

and here is templates.cfg see below

###############################################################################
# TEMPLATES.CFG - SAMPLE OBJECT TEMPLATES
#
# Last Modified: 10-03-2007
#
# NOTES: This config file provides you with some example object definition
# templates that are refered by other host, service, contact, etc.
# definitions in other config files.
#
# You don't need to keep these definitions in a separate file from your
# other object definitions. This has been done just to make things
# easier to understand.
#
###############################################################################



###############################################################################
###############################################################################
#
# CONTACT TEMPLATES
#
###############################################################################
###############################################################################

# Generic contact definition template - This is NOT a real contact, just a template!

define contact{
name generic-contact ; The name of this contact template
service_notification_period 24x7 ; service notifications can be sent anytime
host_notification_period 24x7 ; host notifications can be sent anytime
service_notification_options w,u,c,r,f,s ; send notifications for all service states, flapping events, and scheduled downtime events
host_notification_options d,u,r,f,s ; send notifications for all host states, flapping events, and scheduled downtime events
service_notification_commands notify-service-by-email ; send service notifications via email
host_notification_commands notify-host-by-email ; send host notifications via email
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL CONTACT, JUST A TEMPLATE!
}




###############################################################################
###############################################################################
#
# HOST TEMPLATES
#
###############################################################################
###############################################################################

# Generic host definition template - This is NOT a real host, just a template!

define host{
name generic-host ; The name of this host template
notifications_enabled 1 ; Host notifications are enabled
event_handler_enabled 1 ; Host event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
failure_prediction_enabled 1 ; Failure prediction is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
notification_period 24x7 ; Send host notifications at any time
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}


# Linux host definition template - This is NOT a real host, just a template!

define host{
name linux-server ; The name of this host template
use generic-host ; This template inherits other values from the generic-host template
check_period 24x7 ; By default, Linux hosts are checked round the clock
check_interval 5 ; Actively check the host every 5 minutes
retry_interval 1 ; Schedule host check retries at 1 minute intervals
max_check_attempts 10 ; Check each Linux host 10 times (max)
check_command check-host-alive ; Default command to check Linux hosts
notification_period workhours ; Linux admins hate to be woken up, so we only notify during the day
; Note that the notification_period variable is being overridden from
; the value that is inherited from the generic-host template!
notification_interval 120 ; Resend notifications every 2 hours
notification_options d,u,r ; Only send notifications for specific host states
contact_groups admins ; Notifications get sent to the admins by default
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
statusmap_image desktop-server.gd2
}



# Windows host definition template - This is NOT a real host, just a template!

define host{
name windows-server ; The name of this host template
use generic-host ; Inherit default values from the generic-host template
check_period 24x7 ; By default, Windows servers are monitored round the clock
check_interval 5 ; Actively check the server every 5 minutes
retry_interval 1 ; Schedule host check retries at 1 minute intervals
max_check_attempts 10 ; Check each server 10 times (max)
check_command check-host-alive ; Default command to check if servers are "alive"
notification_period 24x7 ; Send notification out at any time - day or night
notification_interval 30 ; Resend notifications every 30 minutes
notification_options d,r ; Only send notifications for specific host states
contact_groups admins ; Notifications get sent to the admins by default
hostgroups windows-servers ; Host groups that Windows servers should be a member of
register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
statusmap_image rack-server.gd2
}


# We define a generic printer template that can be used for most printers we monitor

define host{
name generic-printer ; The name of this host template
use generic-host ; Inherit default values from the generic-host template
check_period 24x7 ; By default, printers are monitored round the clock
check_interval 5 ; Actively check the printer every 5 minutes
retry_interval 1 ; Schedule host check retries at 1 minute intervals
max_check_attempts 10 ; Check each printer 10 times (max)
check_command check-host-alive ; Default command to check if printers are "alive"
notification_period workhours ; Printers are only used during the workday
notification_interval 30 ; Resend notifications every 30 minutes
notification_options d,r ; Only send notifications for specific host states
contact_groups admins ; Notifications get sent to the admins by default
register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
}


# Define a template for switches that we can reuse
define host{
name generic-switch ; The name of this host template
use generic-host ; Inherit default values from the generic-host template
check_period 24x7 ; By default, switches are monitored round the clock
check_interval 5 ; Switches are checked every 5 minutes
retry_interval 1 ; Schedule host check retries at 1 minute intervals
max_check_attempts 10 ; Check each switch 10 times (max)
check_command check-host-alive ; Default command to check if routers are "alive"
notification_period 24x7 ; Send notifications at any time
notification_interval 30 ; Resend notifications every 30 minutes
notification_options d,r ; Only send notifications for specific host states
contact_groups admins ; Notifications get sent to the admins by default
register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
statusmap_image firewall.gd2
}


# Define a template for routers that we can reuse
define host{
name generic-router ; The name of this host template
use generic-host ; Inherit default values from the generic-host template
check_period 24x7 ; By default, switches are monitored round the clock
check_interval 5 ; Switches are checked every 5 minutes
retry_interval 1 ; Schedule host check retries at 1 minute intervals
max_check_attempts 10 ; Check each switch 10 times (max)
check_command check-host-alive ; Default command to check if routers are "alive"
notification_period 24x7 ; Send notifications at any time
notification_interval 30 ; Resend notifications every 30 minutes
notification_options d,r ; Only send notifications for specific host states
contact_groups admins ; Notifications get sent to the admins by default
register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
statusmap_image router.gd2
}




###############################################################################
###############################################################################
#
# SERVICE TEMPLATES
#
###############################################################################
###############################################################################

# Generic service definition template - This is NOT a real service, just a template!

define service{
name generic-service ; The 'name' of this service template
active_checks_enabled 1 ; Active service checks are enabled
passive_checks_enabled 1 ; Passive service checks are enabled/accepted
parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems)
obsess_over_service 1 ; We should obsess over this service (if necessary)
check_freshness 0 ; Default is to NOT check service 'freshness'
notifications_enabled 1 ; Service notifications are enabled
event_handler_enabled 1 ; Service event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
failure_prediction_enabled 1 ; Failure prediction is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
is_volatile 0 ; The service is not volatile
check_period 24x7 ; The service can be checked at any time of the day
max_check_attempts 3 ; Re-check the service up to 3 times in order to determine its final (hard) state
normal_check_interval 10 ; Check the service every 10 minutes under normal conditions
retry_check_interval 2 ; Re-check the service every two minutes until a hard state can be determined
contact_groups admins ; Notifications get sent out to everyone in the 'admins' group
notification_options w,c,r ; Send notifications about warning, unknown, critical, and recovery events
notification_interval 60 ; Re-notify about service problems every hour
notification_period 24x7 ; Notifications can be sent out at any time
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
}


# Local service definition template - This is NOT a real service, just a template!

define service{
name local-service ; The name of this service template
use generic-service ; Inherit default values from the generic-service definition
max_check_attempts 4 ; Re-check the service up to 4 times in order to determine its final (hard) state
normal_check_interval 5 ; Check the service every 5 minutes under normal conditions
retry_check_interval 1 ; Re-check the service every minute until a hard state can be determined
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
}

Re: My email notifications from nagios have stopped

Posted: Tue Mar 04, 2014 10:25 am
by slansing
Looks like mail, if a host/service goes into a critical, or if you manually send a custom notification, please attach a snippit from your email log:

Code: Select all

tail -50 /var/log/maillog

Re: My email notifications from nagios have stopped

Posted: Tue Mar 04, 2014 11:15 am
by billperrotta
no maillog file see contents of /var/log below

Code: Select all

ahgmonitor:/var/log # ls
NetworkManager        krb5                   mail.info-20140302.xz
Xorg.0.log            lastlog                mail.info-20140303.xz
Xorg.0.log.old        localmessages          mail.warn
Xorg.1.log            mail                   messages
Xorg.1.log.old        mail-20131114.xz       messages-20131123.xz
YaST2                 mail-20131115.xz       messages-20131211.xz
acpid                 mail-20131116.xz       messages-20131231.xz
alternatives.log      mail-20131117.xz       messages-20140221.xz
apache2               mail-20131118.xz       mysql
boot.log              mail-20140225.xz       nagios
btmp                  mail-20140226.xz       net-snmpd.log
cacti                 mail-20140227.xz       news
cups                  mail-20140228.xz       ntp
faillog               mail-20140301.xz       pbl.log
firewall              mail-20140302.xz       pk_backend_zypp
firewall-20131120.xz  mail-20140303.xz       pk_backend_zypp-1
firewall-20131202.xz  mail.err               pm-powersave.log
firewall-20131210.xz  mail.info              samba
firewall-20131214.xz  mail.info-20131114.xz  squid
firewall-20131219.xz  mail.info-20131115.xz  squidGuard
firewall-20131225.xz  mail.info-20131116.xz  warn
firewall-20131231.xz  mail.info-20131117.xz  wtmp
firewall-20140103.xz  mail.info-20131118.xz  zypp
firewall-20140106.xz  mail.info-20140225.xz  zypper.log
firewall-20140224.xz  mail.info-20140226.xz  zypper.log-20131118.xz
firewall-20140228.xz  mail.info-20140227.xz  zypper.log-20140106.xz
hp                    mail.info-20140228.xz
kdm.log               mail.info-20140301.xz
ahgmonitor:/var/log #

Code: Select all

contents of mail.err

2013-11-11T11:45:55.437026-05:00 linux postfix/postfix-script[2554]: fatal: th e Postfix mail system is not running
2013-11-11T11:46:02.494250-05:00 linux postfix/postfix-script[4140]: fatal: th e Postfix mail system is not running
2013-11-18T10:27:37.217893-05:00 ahgmonitor postfix[15410]: fatal: usage: post fix [-c config_dir] [-Dv] command
2013-11-18T11:09:01.704083-05:00 ahgmonitor postfix[17941]: error: to submit m ail, use the Postfix sendmail command
2013-11-18T11:09:01.704555-05:00 ahgmonitor postfix[17941]: fatal: the postfix command is reserved for the superuser
2013-11-18T11:09:09.909224-05:00 ahgmonitor postfix[17963]: error: to submit m ail, use the Postfix sendmail command
]>2013-11-18T11:09:09.910251-05:00 ahgmonitor postfix[17963]: fatal: the postfix command is reserved for the superuser
~
Can't connect even with suse firewall disabled

C:\Documents and Settings\bperrotta>telnet 10.1.0.16 25
Connecting To 10.1.0.16...Could not open connection to the host, on port 25: Connect failed

Do you know anything about fixing postfix? I know I don't

viing the file called mail below

Code: Select all

2014-03-03T11:46:30.345566-05:00 ahgmonitor postfix/scache[7593]: statistics: start interval Mar 3 11:43:10
2014-03-03T11:46:30.345668-05:00 ahgmonitor postfix/scache[7593]: statistics: domain lookup hits=0 miss=1 success=0%
2014-03-03T11:46:30.345809-05:00 ahgmonitor postfix/scache[7593]: statistics: address lookup hits=0 miss=6 success=0%
2014-03-03T11:48:06.384295-05:00 ahgmonitor postfix/qmgr[15494]: 7DE151C2302: from=<[email protected]>, size=720, nrcpt=1 (queue active)
2014-03-03T11:48:06.483854-05:00 ahgmonitor postfix/qmgr[15494]: 70E261C1C64: from=<>, size=2774, nrcpt=1 (queue active)
2014-03-03T11:48:06.489504-05:00 ahgmonitor postfix/qmgr[15494]: 765971C1B63: from=<>, size=2694, nrcpt=1 (queue active)
2014-03-03T11:48:06.535996-05:00 ahgmonitor postfix/qmgr[15494]: 7205E1C2296: from=<>, size=2758, nrcpt=1 (queue active)
2014-03-03T11:48:06.590427-05:00 ahgmonitor postfix/error[8146]: 7DE151C2302: to=<[email protected]>, relay=none, delay=424388, delays=424388/0.11/0/0. 11, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to ams terdamhospitality.com.inbound10.mxlogic.net[208.65.144.3]:25: Connection refus ed)
2014-03-03T11:48:06.602424-05:00 ahgmonitor postfix/qmgr[15494]: 7DF921C2524: from=<>, size=2753, nrcpt=1 (queue active)
2014-03-03T11:48:06.638868-05:00 ahgmonitor postfix/qmgr[15494]: 725AC1C00B0: from=<>, size=2694, nrcpt=1 (queue active)
"mail" 114116L, 24564382C 1,1 Top
contents of mail.warn below

Code: Select all

>2013-11-11T11:45:55.437026-05:00 linux postfix/postfix-script[2554]: fatal: th e Postfix mail system is not running
2013-11-11T11:46:02.494250-05:00 linux postfix/postfix-script[4140]: fatal: th e Postfix mail system is not running
2013-11-12T12:45:22.439301-05:00 ahgmonitor postfix/master[5499]: warning: ser vice smtp: ignoring inet_interfaces change
2013-11-12T12:45:22.440538-05:00 ahgmonitor postfix/master[5499]: warning: to change inet_interfaces, stop and start Postfix
2013-11-12T12:46:58.462265-05:00 ahgmonitor postfix/master[5499]: warning: ser vice smtp: ignoring inet_interfaces change
2013-11-12T12:46:58.465127-05:00 ahgmonitor postfix/master[5499]: warning: to change inet_interfaces, stop and start Postfix
2013-11-12T12:47:06.567065-05:00 ahgmonitor postfix/master[5499]: warning: ser vice smtp: ignoring inet_interfaces change
2013-11-12T12:47:06.567073-05:00 ahgmonitor postfix/master[5499]: warning: to change inet_interfaces, stop and start Postfix
2013-11-12T12:49:15.649486-05:00 ahgmonitor postfix/master[5499]: warning: ser vice smtp: ignoring inet_interfaces change
2013-11-12T12:49:15.649523-05:00 ahgmonitor postfix/master[5499]: warning: to change inet_interfaces, stop and start Postfix
2013-11-12T12:50:37.486743-05:00 ahgmonitor postfix/master[5499]: warning: ser vice smtp: ignoring inet_interfaces change
Any clue or starting point would be useful

Re: My email notifications from nagios have stopped

Posted: Tue Mar 04, 2014 5:52 pm
by sreinhardt
So your error appears to be mxlogic (your mail filter?) is refusing the connection from the nagios\postfix system.
2014-03-03T11:48:06.590427-05:00 ahgmonitor postfix/error[8146]: 7DE151C2302: to=<[email protected]>, relay=none, delay=424388, delays=424388/0.11/0/0. 11, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to ams terdamhospitality.com.inbound10.mxlogic.net[208.65.144.3]:25: Connection refus ed)
As an additional note, postfix on the nagios system will not be able to accept port 25 connections, as it should only be configured to send not receive messages.

Re: My email notifications from nagios have stopped

Posted: Wed Mar 05, 2014 8:58 am
by billperrotta
"So your error appears to be mxlogic (your mail filter?) is refusing the connection from the nagios\postfix system."

Ok thanks identifying the problem. Now can you or anyone else tell me where and how to begin trouble shooting it.

Right now I am clueless.

And thanks again.

One more note I recently changed the first notificaion your email goes here from [email protected] to [email protected].

I made this change because the former admin has left and to send alerts to the entire it department.
Both of these addresses, [email protected] that has been deleted, and replaced it with [email protected] which still exists.
Both live, or have lived on our msexchange server and not on Nagios.

Re: My email notifications from nagios have stopped

Posted: Wed Mar 05, 2014 2:17 pm
by sreinhardt
I think the first step, since we have identified that your mail is going external to mxlogic then likely attempting to flow back in to your (internal?) exchange server, would be to verify that the internal dns\mx records for amsterdamhospitality.com point to the internal server and are not redirecting out to mxlogic.

Code: Select all

nslookup amsterdamhospitality.com
nslookup --querytype=mx amsterdamhospitality.com
If the exchange server is internal, and the records from the above commands are responding with external ip addresses, I would suggest creating an internal mx record that points to your mail server, and if needed open a connector within exchange to receive from nagios.

Alternatively, you could contact mxlogic and get the nagios emails whitelisted, either way is entirely up to you, however if the mail server is internal, I would suggest going the proper route of modifying your internal dns records.

Re: My email notifications from nagios have stopped

Posted: Wed Mar 05, 2014 3:39 pm
by billperrotta
Can I create an internal mx record without affecting my current exchange setup?
Nagios is only of secondary importance.

MXlogic is telling me that I need to give them a current nagios email alert with headers whic is impossoible right now.

Re: My email notifications from nagios have stopped

Posted: Wed Mar 05, 2014 4:23 pm
by sreinhardt
Yes you should be able to create a mx record on your internal dns server without causing any issues. You do NOT want to create an mx record on any external dns servers, such as what external people would request to get to your website, you still want those mx records pointed towards mxlogic for filtering.

As a side note, I would be surprised if you could not give mxlogic the time and your IP of when a nagios notification went out, to pull headers from. I have worked with mxlogic many times in the past, and they are usually very competent at things like that.

Re: My email notifications from nagios have stopped

Posted: Wed Mar 05, 2014 5:02 pm
by billperrotta
in What file could I get the time a notication went out?

Also is there directory where I can retrieve unsent mails from postfix on my linux server?

Could that help?

i already tried giving them my external ip and todays date from /var/log/mail.info. I found it hard to decipher the time there.

they still insisted I send them headers from a recent notification and wouldn't take headers from a february Nagios notification.

Thanks again.

If I want to relay to my yahoo or gmail from postfix nagios alerts can you please list all the config files I would have to edit to accomplish this.

I know very little about the postfix config but I would really like to fix this.

Re: My email notifications from nagios have stopped

Posted: Thu Mar 06, 2014 10:55 am
by sreinhardt
From your previous post where you sent some mail log files, and I noted the rejection from mxlogic, you would be looking for a line similar to:
2014-03-03T11:48:06.590427-05:00 ahgmonitor postfix/error[8146]: 7DE151C2302: to=<[email protected]>, relay=none, delay=424388, delays=424388/0.11/0/0. 11, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to ams terdamhospitality.com.inbound10.mxlogic.net[208.65.144.3]:25: Connection refus ed)
Honestly though, if this email is eventually returning to the same network, nagios->mxlogic->exchange, such that nagios and exchange are on the same network, there is absolutely no reason not to open exchange to the nagios system and setup an internal mx record for amsterdamhospitality.com.