]> granicus.if.org Git - icinga2/blob - itl/command-nscp-local.conf
Fix wrong nscp path w/ command_endpoint runtime macros
[icinga2] / itl / command-nscp-local.conf
1 /******************************************************************************
2  * Icinga 2                                                                   *
3  * Copyright (C) 2012-2015 Icinga Development Team (http://www.icinga.org)    *
4  *                                                                            *
5  * This program is free software; you can redistribute it and/or              *
6  * modify it under the terms of the GNU General Public License                *
7  * as published by the Free Software Foundation; either version 2             *
8  * of the License, or (at your option) any later version.                     *
9  *                                                                            *
10  * This program is distributed in the hope that it will be useful,            *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              *
13  * GNU General Public License for more details.                               *
14  *                                                                            *
15  * You should have received a copy of the GNU General Public License          *
16  * along with this program; if not, write to the Free Software Foundation     *
17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
18  ******************************************************************************/
19
20 if (!globals.contains("NscpPath")) {
21         NscpPath = dirname(msi_get_component_path("{5C45463A-4AE9-4325-96DB-6E239C034F93}"))
22 }
23
24 object CheckCommand "nscp-local" {
25         import  "plugin-check-command"
26
27         command = [ NscpPath + "\\nscp.exe", "client" ]
28
29         arguments = {
30                 "--log" = "$nscp_log_level$"
31                 "--load-all" = { set_if ="$nscp_load_all$" }
32                 "-q" = {
33                         value = "$nscp_query$"
34                         required = true
35                 }
36                 "-b" = {
37                         set_if = "$nscp_boot$"
38                 }
39                 "-a" = "$nscp_arguments$"
40         }
41
42         vars.nscp_log_level = "critical"
43         vars.nscp_load_all = true
44         vars.nscp_boot = true
45 }
46
47 object CheckCommand "nscp-local-cpu" {
48         import  "nscp-local"
49
50         vars.nscp_query = "check_cpu"
51 }
52
53 object CheckCommand "nscp-local-memory" {
54         import  "nscp-local"
55
56         vars.nscp_query = "check_memory"
57 }
58
59 object CheckCommand "nscp-local-os-version" {
60         import  "nscp-local"
61
62         vars.nscp_query = "check_os_version"
63 }
64
65 object CheckCommand "nscp-local-pagefile" {
66         import  "nscp-local"
67
68         vars.nscp_query = "check_pagefile"
69 }
70
71 object CheckCommand "nscp-local-process" {
72         import  "nscp-local"
73
74         vars.nscp_query = "check_process"
75 }
76
77 object CheckCommand "nscp-local-service" {
78         import  "nscp-local"
79
80         vars.nscp_query = "check_service"
81 }
82
83 object CheckCommand "nscp-local-uptime" {
84         import  "nscp-local"
85
86         vars.nscp_query = "check_uptime"
87 }
88
89 object CheckCommand "nscp-local-version" {
90         import  "nscp-local"
91
92         vars.nscp_query = "check_version"
93 }
94
95 object CheckCommand "nscp-local-disk" {
96         import "nscp-local"
97
98         vars.nscp_query = "check_drivesize"
99 }