Page 1 of 1

Not sure which email service was sending my nagios alerts?

Posted: Tue Mar 04, 2014 8:58 am
by billperrotta
What is the easiest way to figure out which email service was sending my Nagios alerts?

The email alerts have stopped working sinc the old admin left.

I do not think it is postfix because it doesn't respond to service postfix restart

Can somebody please tell me how to make nagios send a test email?

In Yast I have been able to determine it looks like postfix.

However I need to know how to make nagios send a test email.

Also how do i use chkconfig to start postfix at startup?

I need help testing this. Also how to define conditions to send the email.

I changed the old Admins email in contacts.cfg to the new admins. and no emails are being sent when servers go down.

Re: Not sure which email service was sending my nagios alert

Posted: Tue Mar 04, 2014 2:01 pm
by sreinhardt
Well, let's start with what notification commands your contacts are setup to use and how they are defined. Also are you using an internal or external mail server?

Re: Not sure which email service was sending my nagios alert

Posted: Tue Mar 04, 2014 2:13 pm
by billperrotta
we have all internal mail servers. exchange unrelated. There is no nagios email there.

Postfix appears to be installed on my nagios server

see my contacts.cfg below

Code: Select all

###############################################################################
# CONTACTS.CFG - SAMPLE CONTACT/CONTACTGROUP DEFINITIONS
#
# Last Modified: 05-31-2007
#
# NOTES: This config file provides you with some example contact and contact
#        group definitions that you can reference in host and service
#        definitions.
#       
#        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.
#
###############################################################################



###############################################################################
###############################################################################
#
# CONTACTS
#
###############################################################################
###############################################################################

# Just one contact defined by default - the Nagios admin (that's you)
# This contact definition inherits a lot of default values from the 'generic-contact' 
# template which is defined elsewhere.

define contact{
        contact_name                    nagiosadmin		; Short name of user
	use				generic-contact		; Inherit default values from generic-contact template (defined above)
        alias                           Nagios Admin		; Full name of user

        email                           [email protected]	; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
        }

define contact{
	contact_name 			nagiosuser
	use 				generic-contact
	alias 				Nagios User
	email 				[email protected]
	contactgroups 			admins
}

Code: Select all

###############################################################################
###############################################################################
#
# CONTACT GROUPS
#
###############################################################################
###############################################################################

# We only have one contact in this simple configuration file, so there is
# no need to create more than one contact group.

define contactgroup{
        contactgroup_name       admins
        alias                   Nagios Administrators
        members                 nagiosadmin
        }
Please use

Code: Select all

 [/ code] tags for large blocks of text, commands, and configurations[/color][/size]

Re: Not sure which email service was sending my nagios alert

Posted: Tue Mar 04, 2014 4:13 pm
by sreinhardt
Since your contacts do not have a notification command defined, could you show the generic-contact template? Please use

Code: Select all

[code]
[/code] tags for submitting large text, commands, and configs.

Locking thread, as you have an identical one here: http://support.nagios.com/forum/viewtop ... 5840#90384