mirror of https://github.com/Icinga/icinga2.git
parent
32e5ed957f
commit
24ae02386a
|
@ -19,6 +19,8 @@ log(severity, facility, value) | Writes a message to the log. `severity` can be
|
|||
typeof(value) | Returns the type object for a value.
|
||||
get_time() | Returns the current UNIX timestamp.
|
||||
parse_performance_data(pd) | Parses a performance data string and returns an array describing the values.
|
||||
dirname(path) | Returns the directory portion of the specified path.
|
||||
basename(path) | Returns the filename portion of the specified path.
|
||||
exit(integer) | Terminates the application.
|
||||
|
||||
## <a id="object-accessor-functions"></a> Object Accessor Functions
|
||||
|
|
|
@ -1063,7 +1063,8 @@ file:
|
|||
|
||||
const NscpPath = "C:\\Program Files (x86)\\NSClient++"
|
||||
|
||||
By default the check commands assume that NSClient++ is installed in "C:\Program Files\NSClient++".
|
||||
By default Icinga 2 uses the Microsoft Installer API to determine where NSClient++ is installed. It should
|
||||
not be necessary to manually set this constant.
|
||||
|
||||
Note that it is not necessary to run NSClient++ as a Windows service for these commands to work.
|
||||
|
||||
|
|
|
@ -18,13 +18,13 @@
|
|||
******************************************************************************/
|
||||
|
||||
if (!globals.contains("NscpPath")) {
|
||||
NscpPath = msi_get_component_path("{5C45463A-4AE9-4325-96DB-6E239C034F93}")
|
||||
NscpPath = dirname(msi_get_component_path("{5C45463A-4AE9-4325-96DB-6E239C034F93}"))
|
||||
}
|
||||
|
||||
object CheckCommand "nscp-local" {
|
||||
import "plugin-check-command"
|
||||
|
||||
command = [ NscpPath, "client" ]
|
||||
command = [ "$nscp_path$\\nscp.exe", "client" ]
|
||||
|
||||
arguments = {
|
||||
"--log" = "$nscp_log_level$"
|
||||
|
|
|
@ -54,6 +54,8 @@ REGISTER_SAFE_SCRIPTFUNCTION(string, &ScriptUtils::CastString);
|
|||
REGISTER_SAFE_SCRIPTFUNCTION(number, &ScriptUtils::CastNumber);
|
||||
REGISTER_SAFE_SCRIPTFUNCTION(bool, &ScriptUtils::CastBool);
|
||||
REGISTER_SAFE_SCRIPTFUNCTION(get_time, &Utility::GetTime);
|
||||
REGISTER_SAFE_SCRIPTFUNCTION(basename, &Utility::BaseName);
|
||||
REGISTER_SAFE_SCRIPTFUNCTION(dirname, &Utility::DirName);
|
||||
#ifdef _WIN32
|
||||
REGISTER_SAFE_SCRIPTFUNCTION(msi_get_component_path, &ScriptUtils::MsiGetComponentPathShim);
|
||||
#endif /* _WIN32 */
|
||||
|
|
Loading…
Reference in New Issue