diff --git a/doc/4.1-configuration-syntax.md b/doc/4.1-configuration-syntax.md index 2c02c9f17..cd96ee8b2 100644 --- a/doc/4.1-configuration-syntax.md +++ b/doc/4.1-configuration-syntax.md @@ -20,7 +20,7 @@ define objects the `object` keyword is used: > **Note** > -> Colons (:) are not permitted in object names. +> Exclamation marks (!) are not permitted in object names. Each object is uniquely identified by its type (`Host`) and name (`host1.example.org`). Objects can contain a comma-separated list of diff --git a/lib/config/config_parser.yy b/lib/config/config_parser.yy index 6d8b9f035..486a80cf6 100644 --- a/lib/config/config_parser.yy +++ b/lib/config/config_parser.yy @@ -352,9 +352,9 @@ object_declaration identifier T_STRING object_inherits_specifier expressionlist item->SetType($3); - if (strchr($4, ':') != NULL) { + if (strchr($4, '!') != NULL) { std::ostringstream msgbuf; - msgbuf << "Name for object '" << $4 << "' of type '" << $3 << "' is invalid: Object names may not contain ':'"; + msgbuf << "Name for object '" << $4 << "' of type '" << $3 << "' is invalid: Object names may not contain '!'"; free($3); BOOST_THROW_EXCEPTION(std::invalid_argument(msgbuf.str())); } diff --git a/lib/icinga/host.cpp b/lib/icinga/host.cpp index 2977e31f6..f38eea9c7 100644 --- a/lib/icinga/host.cpp +++ b/lib/icinga/host.cpp @@ -152,7 +152,7 @@ void Host::UpdateSlaveServices(void) ObjectLock olock(service_descriptions); BOOST_FOREACH(const Dictionary::Pair& kv, service_descriptions) { std::ostringstream namebuf; - namebuf << GetName() << ":" << kv.first; + namebuf << GetName() << "!" << kv.first; String name = namebuf.str(); std::vector path; diff --git a/lib/icinga/service-downtime.cpp b/lib/icinga/service-downtime.cpp index 83b45fc43..9596c56a5 100644 --- a/lib/icinga/service-downtime.cpp +++ b/lib/icinga/service-downtime.cpp @@ -334,7 +334,7 @@ void Service::UpdateSlaveScheduledDowntimes(void) BOOST_FOREACH(const Dictionary::Pair& kv, descs) { std::ostringstream namebuf; - namebuf << GetName() << ":" << kv.first; + namebuf << GetName() << "!" << kv.first; String name = namebuf.str(); std::vector path; diff --git a/lib/icinga/service-notification.cpp b/lib/icinga/service-notification.cpp index c411b9bb0..ac176fa75 100644 --- a/lib/icinga/service-notification.cpp +++ b/lib/icinga/service-notification.cpp @@ -111,7 +111,7 @@ void Service::UpdateSlaveNotifications(void) BOOST_FOREACH(const Dictionary::Pair& kv, descs) { std::ostringstream namebuf; - namebuf << GetName() << ":" << kv.first; + namebuf << GetName() << "!" << kv.first; String name = namebuf.str(); std::vector path;