]> granicus.if.org Git - icinga2/commitdiff
Add ApplicationVersion built-in constant 6206/head
authorMichael Friedrich <michael.friedrich@icinga.com>
Fri, 6 Apr 2018 11:25:48 +0000 (13:25 +0200)
committerMichael Friedrich <michael.friedrich@icinga.com>
Fri, 6 Apr 2018 11:41:22 +0000 (13:41 +0200)
refs #5784

doc/17-language-reference.md
lib/icinga/icingaapplication.cpp

index 7fc067eee8c6ece583e72c6ab084fd97ebafa974..5cd61200125e447ae704bcf6f4a03b6a781fbe11 100644 (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".
 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".
+ApplicationVersion  |**Read-only.** The application version, e.g. "2.9.0".
 MaxConcurrentChecks |**Read-write**. The number of max checks run simultaneously. Defaults to 512.
 
 
index eea8d1825fa5e0e79568690712179fb209f02c22..6817f7f7fae0c9fbba4e1a3fea0b32671b868be0 100644 (file)
@@ -60,6 +60,8 @@ void IcingaApplication::StaticInitialize()
        ScriptGlobal::Set("NodeName", node_name);
 
        ScriptGlobal::Set("ApplicationType", "IcingaApplication");
+
+       ScriptGlobal::Set("ApplicationVersion", Application::GetAppVersion());
 }
 
 REGISTER_STATSFUNCTION(IcingaApplication, &IcingaApplication::StatsFunc);