Subject: | Attributes nested via a use where use has multiple values |
If an attribute value is set via a use, and the use has multiple values,the value is not returned. See the code below.
If querying host longadm01a, attribute notifications_enabled is not returned, but is returned for the higher objects that have a single value for use.
$i1 = $cfg1->all_objects_for_type("Nagios::".$obj);
foreach $k1 (@$i1) {
$k1->$a
$VAR1 = 'define host {
comment DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
event_handler_enabled 1
failure_prediction_enabled 1
flap_detection_enabled 1
name generic-host
notification_period 24x7
notifications_enabled 1
process_perf_data 1
retain_nonstatus_information 1
retain_status_information 1
}
$VAR1 = 'define host {
check_command check-host-alive
check_interval 5
check_period 24x7
comment DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
contact_groups linux_admins
max_check_attempts 5
name gta-linux-ooh
notification_interval 30
notification_options d,u,r
notification_period 24x7
retry_interval 1
use generic-host
}
$VAR1 = 'define host {
_contact_group call frontend
address 10.200.31.128
alias longadm01a
host_name longadm01a
hostgroups cacti-longadm01a,generic-admin-no-tov,cpu-goswell
use gta-linux-ooh,host-pnp
}