Skip to content

Commit 7433658

Browse files
kacerrarioch
authored andcommitted
Override default service options in collector.pp. Ref #14209
- it seems to be only please where it works also for exported resources - for service that should not receive use = 'generic-service' tag 'non-generic' has to be added
1 parent f8d7189 commit 7433658

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

manifests/collect.pp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@
66

77
if $::icinga::server and $::icinga::collect_resources {
88
# Set defaults for collected resources.
9-
Nagios_host <<| |>> {
10-
notify => Service[$::icinga::service_server],
11-
}
12-
Nagios_service <<| |>> { notify => Service[$::icinga::service_server] }
9+
Nagios_host <<| |>> { notify => Service[$::icinga::service_server] }
10+
11+
# Add default option use => 'generic-service' to all services that are not tagged with 'non-generic'
12+
# At the moment of adding this (2015-04-08) that means to every service
13+
Nagios_service <<| tag != 'non-generic' |>> { use => 'generic-service', notify => Service[$::icinga::service_server] }
14+
Nagios_service <<| tag == 'non-generic' |>> { notify => Service[$::icinga::service_server] }
15+
1316
Nagios_hostextinfo <<| |>> { notify => Service[$::icinga::service_server] }
1417
Nagios_command <<| |>> { notify => Service[$::icinga::service_server] }
1518
Nagios_contact <<| |>> { notify => Service[$::icinga::service_server] }

0 commit comments

Comments
 (0)