I'm fairly new to Ubuntu and way new to Nagios. I've done some digging and cant seem to find consistent answers on getting this set up.
I finally got to the point where I was able to send an email from the command line :
Code: Select all
echo "Subject: This Works" | sendmail -v [email protected] -f [email protected] -F "Service Events"
so I assumed once I got that fixed I could just paste that in the command line like :
Code: Select all
# 'notify-host-by-email' command definition
define command{
command_name notify-host-by-email
command_line echo "Subject: Broke Stuff" | sendmail -v [email protected] -f [email protected] -F "Service Events"
}
# 'notify-service-by-email' command definition
define command{
command_name notify-service-by-email
command_line echo "Subject: Broke Stuff" | sendmail -v [email protected] -f [email protected] -F "Service Events"
}
Code: Select all
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 ******
service_notifications_enabled 1
host_notifications_enabled 1
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 10
service_notification_period 24x7
host_notification_period 24x7
}
###############################################################################
###############################################################################
#
# 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
}Let me know which log files you may need, I'll be happy to provide them
Thanks for any help you can give.