Add ApplicationVersion built-in constant

refs #5784
This commit is contained in:
Michael Friedrich 2018-04-06 13:25:48 +02:00
parent 24752f3733
commit 2c5e142172
2 changed files with 3 additions and 0 deletions

View File

@ -398,6 +398,7 @@ PlatformKernelVersion|**Read-only.** The version of the operating system kernel,
BuildCompilerName |**Read-only.** The name of the compiler Icinga was built with, e.g. "Clang". BuildCompilerName |**Read-only.** The name of the compiler Icinga was built with, e.g. "Clang".
BuildCompilerVersion|**Read-only.** The version of the compiler Icinga was built with, e.g. "7.3.0.7030031". BuildCompilerVersion|**Read-only.** The version of the compiler Icinga was built with, e.g. "7.3.0.7030031".
BuildHostName |**Read-only.** The name of the host Icinga was built on, e.g. "acheron". BuildHostName |**Read-only.** The name of the host Icinga was built on, e.g. "acheron".
ApplicationVersion |**Read-only.** The application version, e.g. "2.9.0".
MaxConcurrentChecks |**Read-write**. The number of max checks run simultaneously. Defaults to 512. MaxConcurrentChecks |**Read-write**. The number of max checks run simultaneously. Defaults to 512.

View File

@ -60,6 +60,8 @@ void IcingaApplication::StaticInitialize()
ScriptGlobal::Set("NodeName", node_name); ScriptGlobal::Set("NodeName", node_name);
ScriptGlobal::Set("ApplicationType", "IcingaApplication"); ScriptGlobal::Set("ApplicationType", "IcingaApplication");
ScriptGlobal::Set("ApplicationVersion", Application::GetAppVersion());
} }
REGISTER_STATSFUNCTION(IcingaApplication, &IcingaApplication::StatsFunc); REGISTER_STATSFUNCTION(IcingaApplication, &IcingaApplication::StatsFunc);