-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathcheck_services.conf
More file actions
252 lines (242 loc) · 8.69 KB
/
check_services.conf
File metadata and controls
252 lines (242 loc) · 8.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
// Monitor Inventoried Services - Uncomment the apply Service rule below to monitor all inventoried services
//apply Service "WinSvc " for (ServiceName => config in host.vars.inv.windows.service) {
// import "generic-service"
//
// check_command = "check_services"
//
// vars += config
// vars.svc_check = true
// vars.svc_included_svc = vars.ServiceName
// vars.svc_expected_state = vars.CurrentStatus
// vars.svc_single_service = true
//}
// Monitor System Category Services - Uncomment the apply Service rule below to monitor all System services
//apply Service "WinSvcs - System" {
// import "generic-service"
//
// check_command = "check_services"
//
// vars.svc_check = true
// vars.svc_category = [ "System" ]
// assign where host.name == NodeName
//}
// Monitor Managed Category Services - Uncomment the apply Service rule below to monitor all Managed services
//apply Service "WinSvcs - Managed" {
// import "generic-service"
//
// check_command = "check_services"
//
// vars.svc_check = true
// vars.svc_category = [ "Managed" ]
// vars.svc_hide_long_output = false // Change this to true if the output is uselessly long
// assign where host.name == NodeName
//}
// Monitor Role Category Services - Uncomment the apply Service rule below to monitor all Role services
//apply Service "WinSvcs - Role" {
// import "generic-service"
//
// check_command = "check_services"
//
// vars.svc_check = true
// vars.svc_category = [ "Role" ]
// vars.svc_hide_long_output = false // Change this to true if the output is uselessly long
// assign where host.name == NodeName
//}
// Monitor Supporting Category Services - Uncomment the apply Service rule below to monitor all Supporting services.
// This Service is redundant if you also monitor inventoried ThirdParty services.
//apply Service "WinSvcs - Supporting" {
// import "generic-service"
//
// check_command = "check_services"
//
// vars.svc_check = true
// vars.svc_category = [ "Supporting" ]
// vars.svc_warn_on_category = [ "Supporting" ] // If any services are in an incorrect state, the result will be Warning and not Critical. Insert something else here if you want critical from this check.
// vars.svc_hide_long_output = false // Change this to true if the output is uselessly long
// vars.svc_excluded_svc = [ "gupdate" ]
// assign where host.name == NodeName
//}
// Monitor ThirdParty Category Services - Uncomment the apply Service rule below to monitor all ThirdParty services.
// This Service is redundant if you also monitor inventoried ThirdParty services.
//apply Service "WinSvcs - ThirdParty" {
// import "generic-service"
//
// check_command = "check_services"
//
// vars.svc_check = true
// vars.svc_category = [ "ThirdParty" ]
// vars.svc_hide_long_output = false // Change this to true if the output is uselessly long
// vars.svc_excluded_svc = [ "gupdate" ]
// assign where host.name == NodeName
//}
// Monitor System, Managed and Role Category Services - Uncomment the apply Service rule below to monitor these 3 categories
//apply Service "WinSvcs - Core" {
// import "generic-service"
//
// check_command = "check_services"
//
// vars.svc_check = true
// vars.svc_category = [ "System", "Managed", "Role" ]
// vars.svc_hide_long_output = true
// assign where host.name == NodeName
//}
// check_services CommandDefinition, do not touch anything below this comment
object CheckCommand "check_services" {
import "plugin-check-command"
command = [ PluginDir + "/check_services.exe" ]
arguments = {
"--inventory" = {
set_if = "$svc_inventory$"
description = "Provide the inventory"
}
"--check-service" = {
set_if = "$svc_check$"
description = "Check the health status of the local services"
}
"--category" = {
value = "$svc_category$"
description = "Category to check or provide inventory from, default is ThirdParty"
}
"--excluded-svc" = {
value = "$svc_excluded_svc$"
description = "Exclude this service"
}
"--included-svc" = {
value = "$svc_included_svc$"
description = "Explicitly include this service"
}
"--stopped-services" = {
value = "$svc_stopped_svc$"
description = "This service should be stopped"
}
"--running-services$" = {
value = "$svc_running_svc"
description = "Override CSV, this service should be running"
}
"--warn-on-category" = {
value = "$svc_warn_on_category$"
description = "Warn on the specified category. Default is Supporting."
}
"--inv-format" = {
value = "$svc_inventory_format$"
description = "Inventory output format, default is readable, available are csv,readable,i2conf"
}
"--inv-level" = {
value = "$svc_inventory_level$"
description = "Inventory level, normal or ful"
}
"--inv-all-running" = {
set_if = "$svc_inv_all_running$"
description = "Inventory only the running services"
}
"--inv-hide-empty" = {
set_if = "$svc_inv_hide_empty_vars$"
description = "Hide empty vars from inventory output."
}
"--single-service" = {
set_if = "$svc_single_service$"
description = "Specifies that only one Service is to be checked, simplifies output of perfdata and optional perfcounters"
}
"--expected-state" = {
set_if = "$svc_single_service$"
value = "$svc_expected_state$"
description = "Set the expected state for the service, used primarily with --single-service option"
}
"--split-by" = {
value = "$svc_split_by$"
description = "Alternative character to split input options VALUE with. Default is ','."
}
"--check-all-starttypes" = {
set_if = "$svc_check_all_starttypes$"
description = "Check all StartTypes against specified Category, not only 'Automatic'"
}
"--perfcounter" = {
set_if = "$svc_perfcounter$"
description = "Extra performance counters, use with caution"
}
"--delayed-grace" = {
value = "$svc_delayed_grace$"
description = "Set grace time for Automatic (Delayed) services after boot-up before they must be started, default is 60 s"
}
"--hide-long-output" = {
set_if = "$svc_hide_long_output$"
description = "Hide verbose output from the --check-service command, simple output"
}
"--hide-category" = {
set_if = "$svc_hide_category$"
description = "Hide category from the normal output from the --check-service command"
}
"--svc-in-sys-category" = {
value = "$svc_in_sys_category$"
description = "Set category of specified service to System"
}
"--svc-in-man-category" = {
value = "$svc_in_man_category$"
description = "Set category of specified service to Managed"
}
"--svc-in-role-category" = {
value = "$svc_in_role_category$"
description = "Set category of specified service to Role"
}
"--svc-in-3rd-category" = {
value = "$svc_in_3rd_category$"
description = "Set category of specified service to ThirdParty"
}
"--svc-in-sup-category" = {
value = "$svc_in_sup_category$"
description = "Set category of specified service to Supporting"
}
"--svc-in-ign-category" = {
value = "$svc_in_ign_category$"
description = "Set category of specified service to Ignored"
}
"--file-format" = {
set_if = "$svc_override_file$"
value = "$svc_file_format$"
description = "Argument to specify format of the file path given in category-file, assumes CSV if nothing else is specified"
}
"--category-file" = {
set_if = "$svc_override_file$"
value = "$svc_category_file$"
description = "Path to a file which contains an alternative list of Service to Category definitions"
}
"--verbose" = {
set_if = "$svc_verbose$"
description = "Switch to use when trying to figure out why a service is not included, excluded or similarly when the returned output is not as expected"
}
"--allow-empty-result" = {
set_if = "$svc_allow_empty_result$"
description = "Allow an empty result set. Useful when ThirdParty category is specified"
}
}
//vars.svc_inventory = false
//vars.svc_check = false
//vars.svc_excluded_svc = ""
//vars.svc_included_svc = ""
//vars.svc_stopped_svc = ""
//vars.svc_running_svc = ""
//vars.svc_warn_on_category = "Supporting"
//vars.svc_category = "ThirdParty"
//vars.svc_inventory_level = "normal"
//vars.svc_inventory_format = "i2conf"
//vars.svc_inv_all_running = false
//vars.svc_inv_hide_empty_vars = false
//vars.svc_single_service = false
//vars.svc_expected_state = "Running"
//vars.svc_split_by = ","
//vars.svc_check_all_starttypes = false
//vars.svc_perfcounter = false
//vars.svc_delayed_grace = "60"
//vars.svc_hide_long_output = false
//vars.svc_hide_category = false
//vars.svc_in_sys_category = ""
//vars.svc_in_man_category = ""
//vars.svc_in_role_category = ""
//vars.svc_in_sup_category = ""
//vars.svc_in_3rd_category = ""
//vars.svc_in_ign_category = ""
//vars.svc_override_file = false
//vars.svc_file_format = "CSV"
//vars.svc_category_file = ""
//vars.svc_verbose = false
}