Add generic-user template.

Fixes #5236

Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>
This commit is contained in:
Michael Friedrich 2013-11-28 15:17:39 +01:00
parent 4ffc22516a
commit 1dbd689f9c
3 changed files with 24 additions and 17 deletions

View File

@ -22,6 +22,7 @@ configure_file(icinga/icinga-classic-apache.conf.cmake ${CMAKE_CURRENT_BINARY_DI
install_if_not_exists(icinga2/icinga2.conf ${CMAKE_INSTALL_SYSCONFDIR}/icinga2)
install_if_not_exists(icinga2/conf.d/generic-host.conf ${CMAKE_INSTALL_SYSCONFDIR}/icinga2/conf.d)
install_if_not_exists(icinga2/conf.d/generic-service.conf ${CMAKE_INSTALL_SYSCONFDIR}/icinga2/conf.d)
install_if_not_exists(icinga2/conf.d/generic-user.conf ${CMAKE_INSTALL_SYSCONFDIR}/icinga2/conf.d)
install_if_not_exists(icinga2/conf.d/groups.conf ${CMAKE_INSTALL_SYSCONFDIR}/icinga2/conf.d)
install_if_not_exists(icinga2/conf.d/localhost.conf ${CMAKE_INSTALL_SYSCONFDIR}/icinga2/conf.d)
install_if_not_exists(icinga2/conf.d/macros.conf ${CMAKE_INSTALL_SYSCONFDIR}/icinga2/conf.d)

View File

@ -0,0 +1,22 @@
/**
* Provides default settings for users. By convention
* all users should inherit from this template.
*/
template User "generic-user" {
enable_notifications = 1,
notification_period = "24x7",
notification_state_filter = (StateFilterWarning |
StateFilterCritical |
StateFilterUnknown),
notification_type_filter = (NotificationFilterProblem |
NotificationFilterAcknowledgement |
NotificationFilterRecovery |
NotificationFilterCustom |
NotificationFilterFlappingStart |
NotificationFilterFlappingEnd |
NotificationFilterDowntimeStart |
NotificationFilterDowntimeEnd |
NotificationFilterDowntimeRemoved)
}

View File

@ -3,26 +3,10 @@
* group 'icingaadmins'.
*/
object User "icingaadmin" {
object User "icingaadmin" inherits "generic-user" {
display_name = "Icinga 2 Admin",
groups = [ "icingaadmins" ],
enable_notifications = 1,
notification_period = "24x7",
notification_state_filter = (StateFilterWarning |
StateFilterCritical |
StateFilterUnknown),
notification_type_filter = (NotificationFilterProblem |
NotificationFilterAcknowledgement |
NotificationFilterRecovery |
NotificationFilterCustom |
NotificationFilterFlappingStart |
NotificationFilterFlappingEnd |
NotificationFilterDowntimeStart |
NotificationFilterDowntimeEnd |
NotificationFilterDowntimeRemoved),
macros = {
"name" = "Icinga 2 Admin",
"email" = "icinga@localhost",