Thanks for the response.
I have read the documentation. It describes the theory of notifications but not how to set them up. Maybe ill include my other configuration files here in case im missing something else.
I had the default like this in the commands.cfg file but it didnt seem to work so i made those changes to it to work with esmtp.
Yes those files are there: /usr/bin/mail and /usr/bin/esmtp
I have installed and tested esmtp and know that it works. I dont know how mail works, if you can give me an example of how to test it I can run a test from the command line and determine if the other configurations are at fault instead.Note: i dont have postfix installed, only esmtp and procmail.
The other config file i have altered to get the email notifications to work is the contatcs.cfg file, here is an extract:
define contact{
contact_name nagiosadmin ; Short name of user
use generic-contact ; Inherit default values from ge$
alias Nagios Admin ; Full name of user
host_notifications_enabled 1
service_notifications_enabled 1
host_notification_period 24x7
service_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,u,r
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
email
myemail@email.com ; <<***** CHANGE THIS TO YOUR EM$
}
Here is an extract from the windows.cfg file. I have not made any further alterations to this file to configure email notifications. When i added lines such as enable_nofifications=1, upon restart i would get errors. Should i also add lines to the windows.cfg file? I have read the documentation and the book but im still confused.
define host{
use windows-pcs ; Inherit default values from a template
host_name invoicepc ; The name we're giving to this host
alias invoicingpc ; A longer name associated with the host
address x.x.x.x ; IP address of the host
}
define hostgroup{
hostgroup_name windows-pcs ; The name of the hostgroup
alias Windows PCs ; Long name of the group
members invoicepc
}
define service{
use generic-service
hostgroup_name windows-pcs
service_description Uptime
check_command check_nt!UPTIME
contact_groups admins
}