Inheritance doesn't seem to be working for config templates
Posted: Fri Aug 10, 2018 2:56 pm
Inheritance doesn't seem to be working for my nagios core configs. I'm migrating from an old host to a new host which i've done before
I try to start nagios and it yells at me thatisn't set
Long story short, Here are some clips from my configs.
from nagios.cfg
cfg_file=/etc/nagios/objects/linux.ctx.cfg
cfg_file=/etc/nagios/objects/hosts.cfg
cfg_dir=/etc/nagios/objects/services
From hosts.cfg
From linux.ctg.cfg
This works great on the old host, nagios 3 but the new nagios 4 host isn't not working. If i add directly to the host and don't use the template it works fine but then makes the configs messy. If i add the template to the same file as the hosts it still doesn't even inherit the values then either.
any ideas? I'm scratching my head on this one.
I try to start nagios and it yells at me that
Code: Select all
max_check_attempts
Long story short, Here are some clips from my configs.
from nagios.cfg
cfg_file=/etc/nagios/objects/linux.ctx.cfg
cfg_file=/etc/nagios/objects/hosts.cfg
cfg_dir=/etc/nagios/objects/services
From hosts.cfg
Code: Select all
define host {
host_name testbox1
use systems-host
notification_interval 1440
contact_groups systems
notification_period critical
}
From linux.ctg.cfg
Code: Select all
define host {
name systems-host
notifications_enabled 1
flap_detection_enabled 1
#failure_prediction_enabled 1
retain_status_information 1
retain_nonstatus_information 1
max_check_attempts 2
check_interval 3
check_period critical
check_command check_local!ping!
register 0
}
This works great on the old host, nagios 3 but the new nagios 4 host isn't not working. If i add
Code: Select all
max_check_attempts 2
any ideas? I'm scratching my head on this one.