mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-29 08:34:20 +02:00
parent
7ee1278118
commit
54063f0b9f
@ -17,5 +17,5 @@
|
|||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
type CheckerComponent {
|
%type CheckerComponent {
|
||||||
}
|
}
|
||||||
|
@ -17,22 +17,22 @@
|
|||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
type ClusterListener {
|
%type ClusterListener {
|
||||||
%attribute string "cert_path",
|
%attribute %string "cert_path",
|
||||||
%require "cert_path",
|
%require "cert_path",
|
||||||
|
|
||||||
%attribute string "key_path",
|
%attribute %string "key_path",
|
||||||
%require "key_path",
|
%require "key_path",
|
||||||
|
|
||||||
%attribute string "ca_path",
|
%attribute %string "ca_path",
|
||||||
%require "ca_path",
|
%require "ca_path",
|
||||||
|
|
||||||
%attribute string "crl_path",
|
%attribute %string "crl_path",
|
||||||
|
|
||||||
%attribute string "bind_host",
|
%attribute %string "bind_host",
|
||||||
%attribute string "bind_port",
|
%attribute %string "bind_port",
|
||||||
|
|
||||||
%attribute array "peers" {
|
%attribute %array "peers" {
|
||||||
%attribute name(Endpoint) "*"
|
%attribute name(Endpoint) "*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,23 +17,23 @@
|
|||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
type StatusDataWriter {
|
%type StatusDataWriter {
|
||||||
%attribute string "status_path",
|
%attribute %string "status_path",
|
||||||
%attribute string "objects_path",
|
%attribute %string "objects_path",
|
||||||
%attribute number "update_interval"
|
%attribute %number "update_interval"
|
||||||
}
|
}
|
||||||
|
|
||||||
type ExternalCommandListener {
|
%type ExternalCommandListener {
|
||||||
%attribute string "command_path"
|
%attribute %string "command_path"
|
||||||
}
|
}
|
||||||
|
|
||||||
type CompatLogger {
|
%type CompatLogger {
|
||||||
%validator "ValidateRotationMethod",
|
%validator "ValidateRotationMethod",
|
||||||
|
|
||||||
%attribute string "log_dir",
|
%attribute %string "log_dir",
|
||||||
%attribute string "rotation_method"
|
%attribute %string "rotation_method"
|
||||||
}
|
}
|
||||||
|
|
||||||
type CheckResultReader {
|
%type CheckResultReader {
|
||||||
%attribute string "spool_dir"
|
%attribute %string "spool_dir"
|
||||||
}
|
}
|
||||||
|
@ -17,15 +17,15 @@
|
|||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
type IdoMysqlConnection inherits DbConnection {
|
%type IdoMysqlConnection %inherits DbConnection {
|
||||||
%attribute string "host",
|
%attribute %string "host",
|
||||||
%attribute number "port",
|
%attribute %number "port",
|
||||||
|
|
||||||
%attribute string "user",
|
%attribute %string "user",
|
||||||
%attribute string "password",
|
%attribute %string "password",
|
||||||
|
|
||||||
%attribute string "database",
|
%attribute %string "database",
|
||||||
|
|
||||||
%attribute string "instance_name",
|
%attribute %string "instance_name",
|
||||||
%attribute string "instance_description"
|
%attribute %string "instance_description"
|
||||||
}
|
}
|
||||||
|
@ -17,15 +17,15 @@
|
|||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
type IdoPgsqlConnection inherits DbConnection {
|
%type IdoPgsqlConnection %inherits DbConnection {
|
||||||
%attribute string "host",
|
%attribute %string "host",
|
||||||
%attribute number "port",
|
%attribute %number "port",
|
||||||
|
|
||||||
%attribute string "user",
|
%attribute %string "user",
|
||||||
%attribute string "password",
|
%attribute %string "password",
|
||||||
|
|
||||||
%attribute string "database",
|
%attribute %string "database",
|
||||||
|
|
||||||
%attribute string "instance_name",
|
%attribute %string "instance_name",
|
||||||
%attribute string "instance_description"
|
%attribute %string "instance_description"
|
||||||
}
|
}
|
||||||
|
@ -17,5 +17,5 @@
|
|||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
type Demo {
|
%type Demo {
|
||||||
}
|
}
|
||||||
|
@ -17,14 +17,14 @@
|
|||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
type LivestatusListener {
|
%type LivestatusListener {
|
||||||
%validator "ValidateSocketType",
|
%validator "ValidateSocketType",
|
||||||
|
|
||||||
%attribute string "socket_type",
|
%attribute %string "socket_type",
|
||||||
|
|
||||||
%attribute string "socket_path",
|
%attribute %string "socket_path",
|
||||||
%attribute string "bind_host",
|
%attribute %string "bind_host",
|
||||||
%attribute string "bind_port",
|
%attribute %string "bind_port",
|
||||||
|
|
||||||
%attribute string "compat_log_path",
|
%attribute %string "compat_log_path",
|
||||||
}
|
}
|
||||||
|
@ -17,5 +17,5 @@
|
|||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
type NotificationComponent {
|
%type NotificationComponent {
|
||||||
}
|
}
|
||||||
|
@ -17,13 +17,13 @@
|
|||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
type PerfdataWriter {
|
%type PerfdataWriter {
|
||||||
%attribute string "perfdata_path",
|
%attribute %string "perfdata_path",
|
||||||
%attribute string "format_template",
|
%attribute %string "format_template",
|
||||||
%attribute number "rotation_interval"
|
%attribute %number "rotation_interval"
|
||||||
}
|
}
|
||||||
|
|
||||||
type GraphiteWriter {
|
%type GraphiteWriter {
|
||||||
%attribute string "host",
|
%attribute %string "host",
|
||||||
%attribute string "port",
|
%attribute %string "port",
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,8 @@ namespace icinga
|
|||||||
|
|
||||||
abstract class DynamicObject
|
abstract class DynamicObject
|
||||||
{
|
{
|
||||||
[config] String __name (Name);
|
[config] String name (Name);
|
||||||
[config, get_protected] String __type (TypeName);
|
[config, get_protected] String type (TypeName);
|
||||||
[config] Dictionary::Ptr methods;
|
[config] Dictionary::Ptr methods;
|
||||||
[config] Dictionary::Ptr custom;
|
[config] Dictionary::Ptr custom;
|
||||||
[config] Array::Ptr domains;
|
[config] Array::Ptr domains;
|
||||||
|
@ -113,7 +113,7 @@ static Object::Ptr SerializeObject(const Object::Ptr& input, int attributeTypes)
|
|||||||
fields->Set(field.Name, Serialize(input->GetField(i), attributeTypes));
|
fields->Set(field.Name, Serialize(input->GetField(i), attributeTypes));
|
||||||
}
|
}
|
||||||
|
|
||||||
fields->Set("__type", type->GetName());
|
fields->Set("type", type->GetName());
|
||||||
|
|
||||||
return fields;
|
return fields;
|
||||||
}
|
}
|
||||||
@ -151,7 +151,7 @@ static Object::Ptr DeserializeObject(const Object::Ptr& object, const Dictionary
|
|||||||
if (object)
|
if (object)
|
||||||
type = object->GetReflectionType();
|
type = object->GetReflectionType();
|
||||||
else
|
else
|
||||||
type = Type::GetByName(input->Get("__type"));
|
type = Type::GetByName(input->Get("type"));
|
||||||
|
|
||||||
if (!type)
|
if (!type)
|
||||||
return object;
|
return object;
|
||||||
@ -230,7 +230,7 @@ Value icinga::Deserialize(const Object::Ptr& object, const Value& value, bool sa
|
|||||||
|
|
||||||
ASSERT(dict != NULL);
|
ASSERT(dict != NULL);
|
||||||
|
|
||||||
if (!dict->Contains("__type"))
|
if (!dict->Contains("type"))
|
||||||
return DeserializeDictionary(dict, safe_mode, attributeTypes);
|
return DeserializeDictionary(dict, safe_mode, attributeTypes);
|
||||||
|
|
||||||
return DeserializeObject(object, dict, safe_mode, attributeTypes);
|
return DeserializeObject(object, dict, safe_mode, attributeTypes);
|
||||||
|
@ -17,40 +17,40 @@
|
|||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
type DynamicObject {
|
%type DynamicObject {
|
||||||
%require "__name",
|
%require "name",
|
||||||
%attribute string "__name",
|
%attribute %string "name",
|
||||||
|
|
||||||
%require "__type",
|
%require "type",
|
||||||
%attribute string "__type",
|
%attribute %string "type",
|
||||||
|
|
||||||
%attribute dictionary "methods",
|
%attribute %dictionary "methods",
|
||||||
|
|
||||||
%attribute dictionary "custom" {
|
%attribute %dictionary "custom" {
|
||||||
%attribute string "*"
|
%attribute %string "*"
|
||||||
},
|
},
|
||||||
|
|
||||||
%attribute array "domains" {
|
%attribute %array "domains" {
|
||||||
%attribute string "*"
|
%attribute %string "*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type Logger {
|
%type Logger {
|
||||||
%attribute string "severity"
|
%attribute %string "severity"
|
||||||
}
|
}
|
||||||
|
|
||||||
type FileLogger inherits Logger {
|
%type FileLogger %inherits Logger {
|
||||||
%require "path",
|
%require "path",
|
||||||
%attribute string "path"
|
%attribute %string "path"
|
||||||
}
|
}
|
||||||
|
|
||||||
type SyslogLogger inherits Logger {
|
%type SyslogLogger %inherits Logger {
|
||||||
}
|
}
|
||||||
|
|
||||||
type Script {
|
%type Script {
|
||||||
%require "language",
|
%require "language",
|
||||||
%attribute string "language",
|
%attribute %string "language",
|
||||||
|
|
||||||
%require "code",
|
%require "code",
|
||||||
%attribute string "code"
|
%attribute %string "code"
|
||||||
}
|
}
|
||||||
|
@ -197,23 +197,23 @@ static char *lb_steal(lex_buf *lb)
|
|||||||
[ \t\r\n] /* ignore whitespace */
|
[ \t\r\n] /* ignore whitespace */
|
||||||
|
|
||||||
<INITIAL>{
|
<INITIAL>{
|
||||||
type return T_TYPE;
|
%type return T_TYPE;
|
||||||
dictionary { yylval->type = TypeDictionary; return T_TYPE_DICTIONARY; }
|
%dictionary { yylval->type = TypeDictionary; return T_TYPE_DICTIONARY; }
|
||||||
array { yylval->type = TypeArray; return T_TYPE_ARRAY; }
|
%array { yylval->type = TypeArray; return T_TYPE_ARRAY; }
|
||||||
number { yylval->type = TypeNumber; return T_TYPE_NUMBER; }
|
%number { yylval->type = TypeNumber; return T_TYPE_NUMBER; }
|
||||||
string { yylval->type = TypeString; return T_TYPE_STRING; }
|
%string { yylval->type = TypeString; return T_TYPE_STRING; }
|
||||||
scalar { yylval->type = TypeScalar; return T_TYPE_SCALAR; }
|
%scalar { yylval->type = TypeScalar; return T_TYPE_SCALAR; }
|
||||||
any { yylval->type = TypeAny; return T_TYPE_ANY; }
|
%any { yylval->type = TypeAny; return T_TYPE_ANY; }
|
||||||
name { yylval->type = TypeName; return T_TYPE_NAME; }
|
%name { yylval->type = TypeName; return T_TYPE_NAME; }
|
||||||
%validator { return T_VALIDATOR; }
|
%validator { return T_VALIDATOR; }
|
||||||
%require { return T_REQUIRE; }
|
%require { return T_REQUIRE; }
|
||||||
%attribute { return T_ATTRIBUTE; }
|
%attribute { return T_ATTRIBUTE; }
|
||||||
|
%inherits return T_INHERITS;
|
||||||
object return T_OBJECT;
|
object return T_OBJECT;
|
||||||
template return T_TEMPLATE;
|
template return T_TEMPLATE;
|
||||||
include return T_INCLUDE;
|
include return T_INCLUDE;
|
||||||
include_recursive return T_INCLUDE_RECURSIVE;
|
include_recursive return T_INCLUDE_RECURSIVE;
|
||||||
library return T_LIBRARY;
|
library return T_LIBRARY;
|
||||||
inherits return T_INHERITS;
|
|
||||||
null return T_NULL;
|
null return T_NULL;
|
||||||
partial return T_PARTIAL;
|
partial return T_PARTIAL;
|
||||||
true { yylval->num = 1; return T_NUMBER; }
|
true { yylval->num = 1; return T_NUMBER; }
|
||||||
|
@ -549,7 +549,7 @@ lterm: identifier lbinary_op rterm
|
|||||||
}
|
}
|
||||||
| T_IMPORT rterm
|
| T_IMPORT rterm
|
||||||
{
|
{
|
||||||
AExpression::Ptr avar = make_shared<AExpression>(&AExpression::OpVariable, "__type", DebugInfoRange(@1, @2));
|
AExpression::Ptr avar = make_shared<AExpression>(&AExpression::OpVariable, "type", DebugInfoRange(@1, @2));
|
||||||
AExpression::Ptr aexpr = static_cast<AExpression::Ptr>(*$2);
|
AExpression::Ptr aexpr = static_cast<AExpression::Ptr>(*$2);
|
||||||
delete $2;
|
delete $2;
|
||||||
$$ = new Value(make_shared<AExpression>(&AExpression::OpImport, avar, aexpr, DebugInfoRange(@1, @2)));
|
$$ = new Value(make_shared<AExpression>(&AExpression::OpImport, avar, aexpr, DebugInfoRange(@1, @2)));
|
||||||
|
@ -120,7 +120,7 @@ Dictionary::Ptr ConfigItem::GetProperties(void)
|
|||||||
GetExpressionList()->Evaluate(m_Properties);
|
GetExpressionList()->Evaluate(m_Properties);
|
||||||
m_Properties->Remove("__parent");
|
m_Properties->Remove("__parent");
|
||||||
|
|
||||||
VERIFY(m_Properties->Get("__type") == GetType() && m_Properties->Get("__name") == GetName());
|
VERIFY(m_Properties->Get("type") == GetType() && m_Properties->Get("name") == GetName());
|
||||||
}
|
}
|
||||||
|
|
||||||
return m_Properties;
|
return m_Properties;
|
||||||
|
@ -86,9 +86,9 @@ ConfigItem::Ptr ConfigItemBuilder::Compile(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Array::Ptr exprs = make_shared<Array>();
|
Array::Ptr exprs = make_shared<Array>();
|
||||||
exprs->Add(make_shared<AExpression>(&AExpression::OpSet, "__type", make_shared<AExpression>(&AExpression::OpLiteral, m_Type, m_DebugInfo), m_DebugInfo));
|
exprs->Add(make_shared<AExpression>(&AExpression::OpSet, "type", make_shared<AExpression>(&AExpression::OpLiteral, m_Type, m_DebugInfo), m_DebugInfo));
|
||||||
exprs->Add(make_shared<AExpression>(&AExpression::OpDict, m_Expressions, true, m_DebugInfo));
|
exprs->Add(make_shared<AExpression>(&AExpression::OpDict, m_Expressions, true, m_DebugInfo));
|
||||||
exprs->Add(make_shared<AExpression>(&AExpression::OpSet, "__name", make_shared<AExpression>(&AExpression::OpLiteral, m_Name, m_DebugInfo), m_DebugInfo));
|
exprs->Add(make_shared<AExpression>(&AExpression::OpSet, "name", make_shared<AExpression>(&AExpression::OpLiteral, m_Name, m_DebugInfo), m_DebugInfo));
|
||||||
|
|
||||||
AExpression::Ptr exprl = make_shared<AExpression>(&AExpression::OpDict, exprs, true, m_DebugInfo);
|
AExpression::Ptr exprl = make_shared<AExpression>(&AExpression::OpDict, exprs, true, m_DebugInfo);
|
||||||
|
|
||||||
|
@ -17,26 +17,26 @@
|
|||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
type DbConnection {
|
%type DbConnection {
|
||||||
%attribute string "table_prefix",
|
%attribute %string "table_prefix",
|
||||||
|
|
||||||
%attribute dictionary "cleanup" {
|
%attribute %dictionary "cleanup" {
|
||||||
%attribute number "acknowledgements_age",
|
%attribute %number "acknowledgements_age",
|
||||||
%attribute number "commenthistory_age",
|
%attribute %number "commenthistory_age",
|
||||||
%attribute number "contactnotifications_age",
|
%attribute %number "contactnotifications_age",
|
||||||
%attribute number "contactnotificationmethods_age",
|
%attribute %number "contactnotificationmethods_age",
|
||||||
%attribute number "downtimehistory_age",
|
%attribute %number "downtimehistory_age",
|
||||||
%attribute number "eventhandlers_age",
|
%attribute %number "eventhandlers_age",
|
||||||
%attribute number "externalcommands_age",
|
%attribute %number "externalcommands_age",
|
||||||
%attribute number "flappinghistory_age",
|
%attribute %number "flappinghistory_age",
|
||||||
%attribute number "hostchecks_age",
|
%attribute %number "hostchecks_age",
|
||||||
%attribute number "logentries_age",
|
%attribute %number "logentries_age",
|
||||||
%attribute number "notifications_age",
|
%attribute %number "notifications_age",
|
||||||
%attribute number "processevents_age",
|
%attribute %number "processevents_age",
|
||||||
%attribute number "statehistory_age",
|
%attribute %number "statehistory_age",
|
||||||
%attribute number "servicechecks_age",
|
%attribute %number "servicechecks_age",
|
||||||
%attribute number "systemcommands_age",
|
%attribute %number "systemcommands_age",
|
||||||
},
|
},
|
||||||
|
|
||||||
%attribute number "categories"
|
%attribute %number "categories"
|
||||||
}
|
}
|
||||||
|
@ -17,5 +17,5 @@
|
|||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
type Hello {
|
%type Hello {
|
||||||
}
|
}
|
||||||
|
@ -17,228 +17,228 @@
|
|||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
type Host {
|
%type Host {
|
||||||
%attribute string "display_name",
|
%attribute %string "display_name",
|
||||||
%attribute string "check",
|
%attribute %string "check",
|
||||||
%attribute array "groups" {
|
%attribute %array "groups" {
|
||||||
%attribute name(HostGroup) "*"
|
%attribute %name(HostGroup) "*"
|
||||||
},
|
},
|
||||||
|
|
||||||
%attribute dictionary "macros" {
|
%attribute %dictionary "macros" {
|
||||||
%attribute string "*"
|
%attribute %string "*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type HostGroup {
|
%type HostGroup {
|
||||||
%attribute string "display_name"
|
%attribute %string "display_name"
|
||||||
}
|
}
|
||||||
|
|
||||||
type IcingaApplication {
|
%type IcingaApplication {
|
||||||
}
|
}
|
||||||
|
|
||||||
type IcingaStatusWriter {
|
%type IcingaStatusWriter {
|
||||||
%attribute string "status_path",
|
%attribute %string "status_path",
|
||||||
%attribute number "update_interval"
|
%attribute %number "update_interval"
|
||||||
}
|
}
|
||||||
|
|
||||||
type Service {
|
%type Service {
|
||||||
%require "host",
|
%require "host",
|
||||||
%attribute name(Host) "host",
|
%attribute %name(Host) "host",
|
||||||
|
|
||||||
%attribute string "short_name",
|
%attribute %string "short_name",
|
||||||
|
|
||||||
%attribute string "display_name",
|
%attribute %string "display_name",
|
||||||
|
|
||||||
%attribute dictionary "macros" {
|
%attribute %dictionary "macros" {
|
||||||
%attribute string "*"
|
%attribute %string "*"
|
||||||
},
|
},
|
||||||
|
|
||||||
%require "check_command",
|
%require "check_command",
|
||||||
%attribute name(CheckCommand) "check_command",
|
%attribute %name(CheckCommand) "check_command",
|
||||||
%attribute number "max_check_attempts",
|
%attribute %number "max_check_attempts",
|
||||||
%attribute name(TimePeriod) "check_period",
|
%attribute %name(TimePeriod) "check_period",
|
||||||
%attribute number "check_interval",
|
%attribute %number "check_interval",
|
||||||
%attribute number "retry_interval",
|
%attribute %number "retry_interval",
|
||||||
|
|
||||||
%attribute number "enable_notifications",
|
%attribute %number "enable_notifications",
|
||||||
%attribute number "enable_active_checks",
|
%attribute %number "enable_active_checks",
|
||||||
%attribute number "enable_passive_checks",
|
%attribute %number "enable_passive_checks",
|
||||||
%attribute number "enable_event_handler",
|
%attribute %number "enable_event_handler",
|
||||||
|
|
||||||
%attribute name(EventCommand) "event_command",
|
%attribute %name(EventCommand) "event_command",
|
||||||
|
|
||||||
%attribute number "enable_flapping",
|
%attribute %number "enable_flapping",
|
||||||
%attribute number "flapping_threshold",
|
%attribute %number "flapping_threshold",
|
||||||
|
|
||||||
%attribute number "enable_perfdata",
|
%attribute %number "enable_perfdata",
|
||||||
|
|
||||||
%attribute number "volatile",
|
%attribute %number "volatile",
|
||||||
|
|
||||||
%attribute array "groups" {
|
%attribute %array "groups" {
|
||||||
%attribute name(ServiceGroup) "*"
|
%attribute %name(ServiceGroup) "*"
|
||||||
},
|
},
|
||||||
|
|
||||||
%attribute array "authorities" {
|
%attribute %array "authorities" {
|
||||||
%attribute name(Endpoint) "*"
|
%attribute %name(Endpoint) "*"
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
type ServiceGroup {
|
%type ServiceGroup {
|
||||||
%attribute string "display_name"
|
%attribute %string "display_name"
|
||||||
}
|
}
|
||||||
|
|
||||||
type Notification {
|
%type Notification {
|
||||||
%require "host",
|
%require "host",
|
||||||
%attribute name(Host) "host",
|
%attribute %name(Host) "host",
|
||||||
|
|
||||||
%require "service",
|
%require "service",
|
||||||
%attribute string "service",
|
%attribute %string "service",
|
||||||
|
|
||||||
%attribute dictionary "macros" {
|
%attribute %dictionary "macros" {
|
||||||
%attribute string "*"
|
%attribute %string "*"
|
||||||
},
|
},
|
||||||
|
|
||||||
%attribute array "users" {
|
%attribute %array "users" {
|
||||||
%attribute name(User) "*"
|
%attribute %name(User) "*"
|
||||||
},
|
},
|
||||||
%attribute array "user_groups" {
|
%attribute %array "user_groups" {
|
||||||
%attribute name(UserGroup) "*"
|
%attribute %name(UserGroup) "*"
|
||||||
},
|
},
|
||||||
|
|
||||||
%attribute dictionary "times" {
|
%attribute %dictionary "times" {
|
||||||
%attribute number "begin",
|
%attribute %number "begin",
|
||||||
%attribute number "end",
|
%attribute %number "end",
|
||||||
},
|
},
|
||||||
|
|
||||||
%require "notification_command",
|
%require "notification_command",
|
||||||
%attribute name(NotificationCommand) "notification_command",
|
%attribute %name(NotificationCommand) "notification_command",
|
||||||
|
|
||||||
%attribute number "notification_interval",
|
%attribute %number "notification_interval",
|
||||||
%attribute name(TimePeriod) "notification_period",
|
%attribute %name(TimePeriod) "notification_period",
|
||||||
|
|
||||||
%attribute number "notification_type_filter",
|
%attribute %number "notification_%type_filter",
|
||||||
%attribute number "notification_state_filter",
|
%attribute %number "notification_state_filter",
|
||||||
|
|
||||||
%attribute array "authorities" {
|
%attribute %array "authorities" {
|
||||||
%attribute name(Endpoint) "*"
|
%attribute %name(Endpoint) "*"
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
type User {
|
%type User {
|
||||||
%attribute string "display_name",
|
%attribute %string "display_name",
|
||||||
|
|
||||||
%attribute dictionary "macros" {
|
%attribute %dictionary "macros" {
|
||||||
%attribute string "*"
|
%attribute %string "*"
|
||||||
},
|
},
|
||||||
|
|
||||||
%attribute array "groups" {
|
%attribute %array "groups" {
|
||||||
%attribute name(UserGroup) "*"
|
%attribute %name(UserGroup) "*"
|
||||||
},
|
},
|
||||||
|
|
||||||
%attribute number "enable_notifications",
|
%attribute %number "enable_notifications",
|
||||||
%attribute number "notification_type_filter",
|
%attribute %number "notification_%type_filter",
|
||||||
%attribute number "notification_state_filter",
|
%attribute %number "notification_state_filter",
|
||||||
%attribute name(TimePeriod) "notification_period"
|
%attribute %name(TimePeriod) "notification_period"
|
||||||
}
|
}
|
||||||
|
|
||||||
type UserGroup {
|
%type UserGroup {
|
||||||
%attribute string "display_name"
|
%attribute %string "display_name"
|
||||||
}
|
}
|
||||||
|
|
||||||
type TimePeriod {
|
%type TimePeriod {
|
||||||
%attribute string "display_name",
|
%attribute %string "display_name",
|
||||||
|
|
||||||
%require "methods",
|
%require "methods",
|
||||||
%attribute dictionary "methods" {
|
%attribute %dictionary "methods" {
|
||||||
%require "update",
|
%require "update",
|
||||||
%attribute string "update"
|
%attribute %string "update"
|
||||||
},
|
},
|
||||||
|
|
||||||
/* %if (methods.update == "LegacyTimePeriod") { */
|
/* %if (methods.update == "LegacyTimePeriod") { */
|
||||||
// %require "ranges",
|
// %require "ranges",
|
||||||
%attribute dictionary "ranges" {
|
%attribute %dictionary "ranges" {
|
||||||
%attribute string "*"
|
%attribute %string "*"
|
||||||
}
|
}
|
||||||
/* } */
|
/* } */
|
||||||
}
|
}
|
||||||
|
|
||||||
type Command {
|
%type Command {
|
||||||
%require "methods",
|
%require "methods",
|
||||||
%attribute dictionary "methods" {
|
%attribute %dictionary "methods" {
|
||||||
%require "execute",
|
%require "execute",
|
||||||
%attribute string "execute"
|
%attribute %string "execute"
|
||||||
},
|
},
|
||||||
|
|
||||||
/* %if (methods.execute == "PluginNotification" || methods.execute == "PluginCheck" || methods.execute == "PluginEvent") { */
|
/* %if (methods.execute == "PluginNotification" || methods.execute == "PluginCheck" || methods.execute == "PluginEvent") { */
|
||||||
// %require "command",
|
// %require "command",
|
||||||
%attribute string "command",
|
%attribute %string "command",
|
||||||
%attribute array "command" {
|
%attribute %array "command" {
|
||||||
%attribute string "*"
|
%attribute %string "*"
|
||||||
},
|
},
|
||||||
%attribute array "export_macros" {
|
%attribute %array "export_macros" {
|
||||||
%attribute string "*"
|
%attribute %string "*"
|
||||||
},
|
},
|
||||||
%attribute array "escape_macros" {
|
%attribute %array "escape_macros" {
|
||||||
%attribute string "*"
|
%attribute %string "*"
|
||||||
},
|
},
|
||||||
%attribute dictionary "macros" {
|
%attribute %dictionary "macros" {
|
||||||
%attribute string "*"
|
%attribute %string "*"
|
||||||
},
|
},
|
||||||
%attribute number "timeout"
|
%attribute %number "timeout"
|
||||||
/* } */
|
/* } */
|
||||||
}
|
}
|
||||||
|
|
||||||
type CheckCommand inherits Command {
|
%type CheckCommand %inherits Command {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type NotificationCommand inherits Command {
|
%type NotificationCommand %inherits Command {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type EventCommand inherits Command {
|
%type EventCommand %inherits Command {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type Domain {
|
%type Domain {
|
||||||
%attribute dictionary "acl" {
|
%attribute %dictionary "acl" {
|
||||||
%attribute number "*"
|
%attribute %number "*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type ScheduledDowntime {
|
%type ScheduledDowntime {
|
||||||
%require "host",
|
%require "host",
|
||||||
%attribute name(Host) "host",
|
%attribute %name(Host) "host",
|
||||||
%require "service",
|
%require "service",
|
||||||
%attribute string "service",
|
%attribute %string "service",
|
||||||
|
|
||||||
%require "author",
|
%require "author",
|
||||||
%attribute string "author",
|
%attribute %string "author",
|
||||||
|
|
||||||
%require "comment",
|
%require "comment",
|
||||||
%attribute string "comment",
|
%attribute %string "comment",
|
||||||
|
|
||||||
%attribute number "duration",
|
%attribute %number "duration",
|
||||||
%attribute number "fixed",
|
%attribute %number "fixed",
|
||||||
|
|
||||||
%require "ranges",
|
%require "ranges",
|
||||||
%attribute dictionary "ranges" {
|
%attribute %dictionary "ranges" {
|
||||||
%attribute string "*"
|
%attribute %string "*"
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
type Dependency {
|
%type Dependency {
|
||||||
%require "parent_host",
|
%require "parent_host",
|
||||||
%attribute name(Host) "parent_host",
|
%attribute %name(Host) "parent_host",
|
||||||
%attribute string "parent_service",
|
%attribute %string "parent_service",
|
||||||
|
|
||||||
%require "child_host",
|
%require "child_host",
|
||||||
%attribute name(Host) "child_host",
|
%attribute %name(Host) "child_host",
|
||||||
%attribute string "child_service",
|
%attribute %string "child_service",
|
||||||
|
|
||||||
%attribute name(TimePeriod) "period",
|
%attribute %name(TimePeriod) "period",
|
||||||
|
|
||||||
%attribute number "state_filter",
|
%attribute %number "state_filter",
|
||||||
%attribute number "disable_checks",
|
%attribute %number "disable_checks",
|
||||||
%attribute number "disable_notifications"
|
%attribute %number "disable_notifications"
|
||||||
}
|
}
|
||||||
|
@ -17,26 +17,26 @@
|
|||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
type Endpoint {
|
%type Endpoint {
|
||||||
%require "host",
|
%require "host",
|
||||||
%attribute string "host",
|
%attribute %string "host",
|
||||||
|
|
||||||
%require "port",
|
%require "port",
|
||||||
%attribute string "port",
|
%attribute %string "port",
|
||||||
|
|
||||||
%attribute array "config_files" {
|
%attribute %array "config_files" {
|
||||||
%attribute string "*"
|
%attribute %string "*"
|
||||||
},
|
},
|
||||||
|
|
||||||
%attribute array "config_files_recursive" {
|
%attribute %array "config_files_recursive" {
|
||||||
%attribute string "*",
|
%attribute %string "*",
|
||||||
%attribute dictionary "*" {
|
%attribute %dictionary "*" {
|
||||||
%attribute string "path",
|
%attribute %string "path",
|
||||||
%attribute string "pattern"
|
%attribute %string "pattern"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
%attribute array "accept_config" {
|
%attribute %array "accept_config" {
|
||||||
%attribute name(Endpoint) "*"
|
%attribute %name(Endpoint) "*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user