Use Utility::GetFQDN for the NodeName variable.

Refs #6312
This commit is contained in:
Gunnar Beutner 2014-05-27 12:53:41 +02:00
parent bf44c45aaa
commit ecb4f9738e
3 changed files with 3 additions and 3 deletions

View File

@ -45,7 +45,7 @@ void IcingaApplication::StaticInitialize(void)
ScriptVariable::Set("EnableHostChecks", true);
ScriptVariable::Set("EnableServiceChecks", true);
ScriptVariable::Set("EnablePerfdata", true);
ScriptVariable::Set("NodeName", Utility::GetHostName());
ScriptVariable::Set("NodeName", Utility::GetFQDN());
}
REGISTER_STATSFUNCTION(IcingaApplicationStats, &IcingaApplication::StatsFunc);

View File

@ -33,7 +33,7 @@ REGISTER_SCRIPTFUNCTION(NullCheck, &NullCheckTask::ScriptFunc);
void NullCheckTask::ScriptFunc(const Checkable::Ptr& service, const CheckResult::Ptr& cr)
{
String output = "Hello from ";
output += Utility::GetHostName();
output += Utility::GetFQDN();
Dictionary::Ptr perfdata = make_shared<Dictionary>();
perfdata->Set("time", Convert::ToDouble(Utility::GetTime()));

View File

@ -34,7 +34,7 @@ REGISTER_SCRIPTFUNCTION(RandomCheck, &RandomCheckTask::ScriptFunc);
void RandomCheckTask::ScriptFunc(const Checkable::Ptr& service, const CheckResult::Ptr& cr)
{
String output = "Hello from ";
output += Utility::GetHostName();
output += Utility::GetFQDN();
Dictionary::Ptr perfdata = make_shared<Dictionary>();
perfdata->Set("time", Convert::ToDouble(Utility::GetTime()));