From 2c5e142172e8c5def7f335b8b717fcf07bc7ec6b Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Fri, 6 Apr 2018 13:25:48 +0200 Subject: [PATCH] Add ApplicationVersion built-in constant refs #5784 --- doc/17-language-reference.md | 1 + lib/icinga/icingaapplication.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/doc/17-language-reference.md b/doc/17-language-reference.md index 7fc067eee..5cd612001 100644 --- a/doc/17-language-reference.md +++ b/doc/17-language-reference.md @@ -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. diff --git a/lib/icinga/icingaapplication.cpp b/lib/icinga/icingaapplication.cpp index eea8d1825..6817f7f7f 100644 --- a/lib/icinga/icingaapplication.cpp +++ b/lib/icinga/icingaapplication.cpp @@ -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); -- 2.40.0