Hey guys and gals, I have setup a couple hostgroups in my nagios config to separate various components. One of these groups (which I have called wes_systems, a type of product we sell) I created and made sure to use the notifications_enabled flag to 0. Here is what I have in my templates.cfg:
name quiet-host ; The name of this host template
notifications_enabled 0 ; Host notifications are NOT enabled but host is still monitored
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!
name wes_system ; The name of this host template
use quiet-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 n ; 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
In the actual hostgroup I have a couple hundred of these, but here is a sample one, with what to monitor, in a separate config file (wes.cfg):
use wes_system ; Inherit default values from a template
host_name P00001 Ocean City NJ ; The name we’re giving to this switch
alias Ocean City NJ ; A longer name associated with the switchq
address 192.168.210.12 ; IP address of the system
hostgroups WesSystems ; Host groups this switch is associated with
hostgroup_name WesSystems ; The name of the hostgroup
alias Wes Systems ; Long name of the group
Everything looks fine in the monitoring page, except I still get all the alarms for down, recovery, warning, etc.
Now these WERE monitored for all the events, and many of these were disabled in the web interface for notifications for being too chatty. Bc I modified some of these in the web UI, is it messing up something in my config?
I figure I can likely remove the notifications by just removing the contact_groups, but this should work, right? What am I missing?
Thanks in advance as always!