mirror of https://github.com/Icinga/icinga2.git
parent
bf44c45aaa
commit
ecb4f9738e
|
@ -45,7 +45,7 @@ void IcingaApplication::StaticInitialize(void)
|
||||||
ScriptVariable::Set("EnableHostChecks", true);
|
ScriptVariable::Set("EnableHostChecks", true);
|
||||||
ScriptVariable::Set("EnableServiceChecks", true);
|
ScriptVariable::Set("EnableServiceChecks", true);
|
||||||
ScriptVariable::Set("EnablePerfdata", true);
|
ScriptVariable::Set("EnablePerfdata", true);
|
||||||
ScriptVariable::Set("NodeName", Utility::GetHostName());
|
ScriptVariable::Set("NodeName", Utility::GetFQDN());
|
||||||
}
|
}
|
||||||
|
|
||||||
REGISTER_STATSFUNCTION(IcingaApplicationStats, &IcingaApplication::StatsFunc);
|
REGISTER_STATSFUNCTION(IcingaApplicationStats, &IcingaApplication::StatsFunc);
|
||||||
|
|
|
@ -33,7 +33,7 @@ REGISTER_SCRIPTFUNCTION(NullCheck, &NullCheckTask::ScriptFunc);
|
||||||
void NullCheckTask::ScriptFunc(const Checkable::Ptr& service, const CheckResult::Ptr& cr)
|
void NullCheckTask::ScriptFunc(const Checkable::Ptr& service, const CheckResult::Ptr& cr)
|
||||||
{
|
{
|
||||||
String output = "Hello from ";
|
String output = "Hello from ";
|
||||||
output += Utility::GetHostName();
|
output += Utility::GetFQDN();
|
||||||
|
|
||||||
Dictionary::Ptr perfdata = make_shared<Dictionary>();
|
Dictionary::Ptr perfdata = make_shared<Dictionary>();
|
||||||
perfdata->Set("time", Convert::ToDouble(Utility::GetTime()));
|
perfdata->Set("time", Convert::ToDouble(Utility::GetTime()));
|
||||||
|
|
|
@ -34,7 +34,7 @@ REGISTER_SCRIPTFUNCTION(RandomCheck, &RandomCheckTask::ScriptFunc);
|
||||||
void RandomCheckTask::ScriptFunc(const Checkable::Ptr& service, const CheckResult::Ptr& cr)
|
void RandomCheckTask::ScriptFunc(const Checkable::Ptr& service, const CheckResult::Ptr& cr)
|
||||||
{
|
{
|
||||||
String output = "Hello from ";
|
String output = "Hello from ";
|
||||||
output += Utility::GetHostName();
|
output += Utility::GetFQDN();
|
||||||
|
|
||||||
Dictionary::Ptr perfdata = make_shared<Dictionary>();
|
Dictionary::Ptr perfdata = make_shared<Dictionary>();
|
||||||
perfdata->Set("time", Convert::ToDouble(Utility::GetTime()));
|
perfdata->Set("time", Convert::ToDouble(Utility::GetTime()));
|
||||||
|
|
Loading…
Reference in New Issue