mirror of https://github.com/Icinga/icinga2.git
291 lines
7.3 KiB
Plaintext
291 lines
7.3 KiB
Plaintext
/******************************************************************************
|
|
* Icinga 2 *
|
|
* Copyright (C) 2012-2015 Icinga Development Team (http://www.icinga.org) *
|
|
* *
|
|
* This program is free software; you can redistribute it and/or *
|
|
* modify it under the terms of the GNU General Public License *
|
|
* as published by the Free Software Foundation; either version 2 *
|
|
* of the License, or (at your option) any later version. *
|
|
* *
|
|
* This program is distributed in the hope that it will be useful, *
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
* GNU General Public License for more details. *
|
|
* *
|
|
* You should have received a copy of the GNU General Public License *
|
|
* along with this program; if not, write to the Free Software Foundation *
|
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
|
******************************************************************************/
|
|
|
|
%type IcingaApplication {
|
|
}
|
|
|
|
%type IcingaStatusWriter {
|
|
%attribute %string "status_path",
|
|
%attribute %number "update_interval"
|
|
}
|
|
|
|
%type CustomVarObject {
|
|
%validator "ValidateCustomAttributes",
|
|
%attribute %dictionary "vars",
|
|
}
|
|
|
|
%type Checkable %inherits CustomVarObject {
|
|
%validator "ValidateCheckableCheckInterval",
|
|
|
|
%attribute %string "display_name",
|
|
|
|
%require "check_command",
|
|
%attribute %name(CheckCommand) "check_command",
|
|
%attribute %number "max_check_attempts",
|
|
%attribute %name(TimePeriod) "check_period",
|
|
%attribute %number "check_interval",
|
|
%attribute %number "retry_interval",
|
|
|
|
%attribute %number "enable_notifications",
|
|
%attribute %number "enable_active_checks",
|
|
%attribute %number "enable_passive_checks",
|
|
%attribute %number "enable_event_handler",
|
|
|
|
%attribute %name(EventCommand) "event_command",
|
|
|
|
%attribute %number "enable_flapping",
|
|
%attribute %number "flapping_threshold",
|
|
|
|
%attribute %number "enable_perfdata",
|
|
|
|
%attribute %number "volatile",
|
|
|
|
%attribute %string "notes",
|
|
%attribute %string "notes_url",
|
|
%attribute %string "action_url",
|
|
%attribute %string "icon_image",
|
|
%attribute %string "icon_image_alt",
|
|
|
|
%attribute %name(Endpoint) "command_endpoint",
|
|
}
|
|
|
|
%type Host %inherits Checkable {
|
|
%attribute %string "display_name",
|
|
%attribute %array "groups" {
|
|
%attribute %name(HostGroup) "*"
|
|
},
|
|
|
|
%attribute %string "address",
|
|
%attribute %string "address6",
|
|
}
|
|
|
|
%type HostGroup %inherits CustomVarObject {
|
|
%attribute %string "display_name"
|
|
|
|
%attribute %array "groups" {
|
|
%attribute %name(HostGroup) "*"
|
|
},
|
|
|
|
%attribute %string "notes",
|
|
%attribute %string "notes_url",
|
|
%attribute %string "action_url",
|
|
}
|
|
|
|
%type Service %inherits Checkable {
|
|
%require "host_name",
|
|
%attribute %name(Host) "host_name",
|
|
|
|
%attribute %string "name",
|
|
|
|
%attribute %array "groups" {
|
|
%attribute %name(ServiceGroup) "*"
|
|
},
|
|
}
|
|
|
|
%type ServiceGroup %inherits CustomVarObject {
|
|
%attribute %string "display_name"
|
|
|
|
%attribute %array "groups" {
|
|
%attribute %name(ServiceGroup) "*"
|
|
},
|
|
|
|
%attribute %string "notes",
|
|
%attribute %string "notes_url",
|
|
%attribute %string "action_url",
|
|
}
|
|
|
|
%type Notification %inherits CustomVarObject {
|
|
%validator "ValidateNotificationFilters"
|
|
%validator "ValidateNotificationUsers"
|
|
|
|
%require "host_name",
|
|
%attribute %name(Host) "host_name",
|
|
%attribute %string "service_name",
|
|
|
|
%attribute %string "name",
|
|
|
|
%attribute %array "users" {
|
|
%attribute %name(User) "*"
|
|
},
|
|
%attribute %array "user_groups" {
|
|
%attribute %name(UserGroup) "*"
|
|
},
|
|
|
|
%attribute %dictionary "times" {
|
|
%attribute %number "begin",
|
|
%attribute %number "end",
|
|
},
|
|
|
|
%require "command",
|
|
%attribute %name(NotificationCommand) "command",
|
|
|
|
%attribute %number "interval",
|
|
%attribute %name(TimePeriod) "period",
|
|
|
|
%attribute %array "types" {
|
|
%attribute %number "*"
|
|
},
|
|
%attribute %array "states" {
|
|
%attribute %number "*"
|
|
},
|
|
|
|
%attribute %name(Endpoint) "command_endpoint",
|
|
}
|
|
|
|
%type User %inherits CustomVarObject {
|
|
%validator "ValidateUserFilters"
|
|
|
|
%attribute %string "display_name",
|
|
|
|
%attribute %array "groups" {
|
|
%attribute %name(UserGroup) "*"
|
|
},
|
|
|
|
%attribute %number "enable_notifications",
|
|
%attribute %array "types" {
|
|
%attribute %number "*"
|
|
},
|
|
%attribute %array "states" {
|
|
%attribute %number "*"
|
|
},
|
|
%attribute %name(TimePeriod) "period",
|
|
|
|
%attribute %string "email",
|
|
%attribute %string "pager",
|
|
}
|
|
|
|
%type UserGroup %inherits CustomVarObject {
|
|
%attribute %string "display_name",
|
|
|
|
%attribute %array "groups" {
|
|
%attribute %name(UserGroup) "*"
|
|
},
|
|
}
|
|
|
|
%type TimePeriod %inherits CustomVarObject {
|
|
%validator "ValidateTimePeriodRanges",
|
|
|
|
%attribute %string "display_name",
|
|
|
|
%require "update",
|
|
%attribute %function "update",
|
|
|
|
/* %if (methods.update == "LegacyTimePeriod") { */
|
|
// %require "ranges",
|
|
%attribute %dictionary "ranges" {
|
|
%attribute %string "*"
|
|
}
|
|
/* } */
|
|
}
|
|
|
|
%type Command %inherits CustomVarObject {
|
|
%validator "ValidateCommandAttributes",
|
|
%validator "ValidateCommandArguments",
|
|
%validator "ValidateEnvironmentVariables",
|
|
|
|
%require "execute",
|
|
%attribute %function "execute",
|
|
|
|
/* %if (methods.execute == "PluginNotification" || methods.execute == "PluginCheck" || methods.execute == "PluginEvent") { */
|
|
// %require "command",
|
|
%attribute %string "command",
|
|
%attribute %function "command",
|
|
%attribute %array "command" {
|
|
%attribute %string "*"
|
|
%attribute %function "*",
|
|
},
|
|
%attribute %dictionary "arguments" {
|
|
%attribute %string "*",
|
|
%attribute %dictionary "*" {
|
|
%attribute %string "key"
|
|
%attribute %string "value"
|
|
%attribute %function "value"
|
|
%attribute %string "description"
|
|
%attribute %number "required"
|
|
%attribute %number "skip_key"
|
|
%attribute %number "repeat_key"
|
|
%attribute %string "set_if"
|
|
%attribute %function "set_if"
|
|
%attribute %number "order"
|
|
}
|
|
},
|
|
%attribute %dictionary "env" {
|
|
%attribute %string "*"
|
|
%attribute %function "*"
|
|
},
|
|
%attribute %number "timeout"
|
|
/* } */
|
|
}
|
|
|
|
%type CheckCommand %inherits Command {
|
|
|
|
}
|
|
|
|
%type NotificationCommand %inherits Command {
|
|
|
|
}
|
|
|
|
%type EventCommand %inherits Command {
|
|
|
|
}
|
|
|
|
%type ScheduledDowntime %inherits CustomVarObject {
|
|
%require "host_name",
|
|
%attribute %name(Host) "host_name",
|
|
%attribute %string "service_name",
|
|
|
|
%attribute %string "name",
|
|
|
|
%require "author",
|
|
%attribute %string "author",
|
|
|
|
%require "comment",
|
|
%attribute %string "comment",
|
|
|
|
%attribute %number "duration",
|
|
%attribute %number "fixed",
|
|
|
|
%require "ranges",
|
|
%attribute %dictionary "ranges" {
|
|
%attribute %string "*"
|
|
},
|
|
}
|
|
|
|
%type Dependency %inherits CustomVarObject {
|
|
%validator "ValidateDependencyFilters"
|
|
|
|
%require "parent_host_name",
|
|
%attribute %name(Host) "parent_host_name",
|
|
%attribute %string "parent_service_name",
|
|
|
|
%require "child_host_name",
|
|
%attribute %name(Host) "child_host_name",
|
|
%attribute %string "child_service_name",
|
|
|
|
%attribute %string "name",
|
|
|
|
%attribute %name(TimePeriod) "period",
|
|
|
|
%attribute %array "states" {
|
|
%attribute %number "*"
|
|
},
|
|
%attribute %number "disable_checks",
|
|
%attribute %number "disable_notifications"
|
|
}
|