ConfigItemBuilder::Ptr builder = boost::make_shared<ConfigItemBuilder>(di);
builder->SetType("Service");
builder->SetName(name);
- builder->AddExpression("host_name", OperatorSet, GetName());
+ builder->AddExpression("host", OperatorSet, GetName());
builder->AddExpression("display_name", OperatorSet, svcname);
builder->AddExpression("short_name", OperatorSet, svcname);
}
type Service {
- %require "host_name",
- %attribute string "host_name",
+ %require "host",
+ %attribute string "host",
%attribute string "short_name",
%attribute array "host_dependencies" {
%attribute name(Host) "*"
},
- %attribute array "service_dependencies" {
+ %attribute array "service_
+ dependencies" {
%attribute dictionary "*" {
%require "host",
%attribute name(Host) "host",
}
type Notification {
- %require "host_name",
- %attribute name(Host) "host_name",
+ %require "host",
+ %attribute name(Host) "host",
%attribute string "service",
%attribute dictionary "macros" {
bag->Set("times", m_Times);
bag->Set("notification_type_filter", m_NotificationTypeFilter);
bag->Set("notification_state_filter", m_NotificationStateFilter);
- bag->Set("host_name", m_HostName);
+ bag->Set("host", m_HostName);
bag->Set("export_macros", m_ExportMacros);
bag->Set("service", m_Service);
}
m_Times = bag->Get("times");
m_NotificationTypeFilter = bag->Get("notification_type_filter");
m_NotificationStateFilter = bag->Get("notification_state_filter");
- m_HostName = bag->Get("host_name");
+ m_HostName = bag->Get("host");
m_ExportMacros = bag->Get("export_macros");
m_Service = bag->Get("service");
}
ConfigItemBuilder::Ptr builder = boost::make_shared<ConfigItemBuilder>(di);
builder->SetType("Notification");
builder->SetName(name);
- builder->AddExpression("host_name", OperatorSet, GetHost()->GetName());
+ builder->AddExpression("host", OperatorSet, GetHost()->GetName());
builder->AddExpression("service", OperatorSet, GetShortName());
if (!nfcdesc.IsObjectType<Dictionary>())
bag->Set("event_command", m_EventCommand);
bag->Set("volatile", m_Volatile);
bag->Set("short_name", m_ShortName);
- bag->Set("host_name", m_HostName);
+ bag->Set("host", m_HostName);
bag->Set("flapping_threshold", m_FlappingThreshold);
bag->Set("notifications", m_NotificationDescriptions);
}
m_EventCommand = bag->Get("event_command");
m_Volatile = bag->Get("volatile");
m_ShortName = bag->Get("short_name");
- m_HostName = bag->Get("host_name");
+ m_HostName = bag->Get("host");
m_FlappingThreshold = bag->Get("flapping_threshold");
m_NotificationDescriptions = bag->Get("notifications");
}