forked from TheFlyingCorpse/check_iis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheck_iis.conf
192 lines (185 loc) · 6.42 KB
/
check_iis.conf
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
// Monitoring Inventoried Sites
//apply Service "IIS Site " for (name => config in host.vars.inv.iis.site) {
// import "generic-service"
//
// check_command = "check_iis"
//
// vars += config
// vars.iis_check_sites = true
// vars.iis_included_sites = vars.Name
// vars.iis_perfcounter_sites = true
// vars.iis_expected_state = vars.State
// vars.iis_split_by = ","
// vars.iis_single_check = true
//}
// Monitoring Sites as a group
//apply Service "IIS Sites"{
// import "generic-service"
//
// check_command = "check_iis"
//
// assign where host.name == NodeName
//
// vars.iis_check_sites = true
// vars.iis_perfcounter_sites = true
// vars.iis_verbose = true
//}
// Monitoring Inventoried AppPools
//apply Service "IIS AppPool " for (name => config in host.vars.inv.iis.apppool) {
// import "generic-service"
//
// check_command = "check_iis"
//
// vars += config
// vars.iis_check_apppools = true
// vars.iis_included_apppools = vars.Name
// vars.iis_perfcounter_apppools = true
// vars.iis_expected_state = vars.State
// vars.iis_split_by = ","
// vars.iis_single_check = true
//}
// Monitoring AppPools as a group
//apply Service "IIS AppPools"{
// import "generic-service"
//
// check_command = "check_iis"
//
// assign where host.name == NodeName
//
// vars.iis_check_apppools = true
// vars.iis_perfcounter_apppools = true
// vars.iis_verbose = true
//}
// Do not touch anything below this comment.
object CheckCommand "check_iis" {
import "plugin-check-command"
command = [ PluginDir + "/check_iis.exe" ]
arguments = {
"--inventory-websites" = {
set_if = "$iis_inventory_sites$"
description = "Switch to use to provide inventory of Sites"
}
"--inventory-apppools" = {
set_if = "$iis_inventory_apppools$"
description = "Switch to use to provide inventory of AppPools"
}
"--check-websites" = {
set_if = "$iis_check_sites$"
description = "Switch to use to check the health status of the local Sites"
}
"--check-apppools" = {
set_if = "$iis_check_apppools$"
description = "Switch to use to check the health status of the local Sites"
}
"--inv-level" = {
value = "$iis_inventory_level$"
description = "Argument to change the level of output. Default is 'normal', available options are 'normal','full'"
}
"--inv-format" = {
value = "$iis_inventory_format$"
description = "Argument to provide output of the inventory in other formats, valid options are 'readable', 'i2conf' and 'json'"
}
"--excluded-sites" = {
value = "$iis_excluded_sites$"
description = "Excludes Sites from checks and inventory"
}
"--included-sites" = {
value = "$iis_included_sites$"
description = "Includes Sites to check while all other Sites are excluded, affects both checks and inventory"
}
"--stopped-sites" = {
value = "$iis_stopped_sites$"
description = "The specified Sites are checked that they are stopped"
}
"--warn-sites" = {
value = "$iis_warn_sites$"
description = "These specified Sites will return Warning if they are not in the expected state"
}
"--perfcounter-sites" = {
set_if = "$iis_perfcounter_sites$"
description = "Switch to use to get perfcounters from Sites"
}
"--excluded-apppools" = {
value = "$iis_excluded_apppools$"
description = "Excludes AppPools from checks and inventory"
}
"--included-apppools" = {
value = "$iis_included_apppools$"
description = "Includes AppPools to check while all other AppPools are excluded, affects both checks and inventory"
}
"--stopped-apppools" = {
value = "$iis_stopped_apppools$"
description = "The specified AppPools are checked that they are stopped"
}
"--warn-apppools" = {
value = "$iis_warn_apppools$"
description = "The specified AppPools will return Warning if they are not in the expected state"
}
"--perfcounter-apppools" = {
set_if = "$iis_perfcounter_apppools$"
description = "Switch to use to get perfcounters from AppPools"
}
"--skip-empty-apppools" = {
set_if = "$iis_skip_empty_apppools$"
description = "Switch which sets do not check or inventory AppPools which are empty"
}
"--hide-long-output" = {
set_if = "$iis_hide_long_output$"
description = "Switch to hide the long service output, only prints the summary output and any Sites or AppPools deviating from 'OK'"
}
"--expected-state" = {
set_if = "$iis_single_check$"
value = "$iis_expected_state$"
description = "Argument to provide the expected State of the AppPool or Site, used together with --single-check"
}
"--icinga2" = {
set_if = "$iis_icinga2$"
description = "Switch used in the Icinga2 CommandDefinition, returns output and perfcounter to the correct class. Do not use via command line"
}
"--single-check" = {
set_if = "$iis_single_check$"
description = "Switch used together with the Icinga2 Auto Apply rules, this is set when there is a single Site or AppPool to check. Do take great care if you use this outside of the auto apply rules"
}
"--split-by" = {
value = "$iis_split_by$"
description = "Argument used to specify what splits all Sites and AppPool arguments. Default is a single space, ' '"
}
"--inv-hide-empty" = {
set_if = "$inv_hide_empty_vars$"
description = "Switch to hide empty vars from inventory output."
}
"--inv-running-only" = {
set_if = "$iis_inv_running_only$"
description = "Switch to only inventory running Sites and/or AppPools, depending on what has been selected for inventory"
}
"--verbose" = {
set_if = "$iis_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"
}
}
vars.iis_inventory_sites = false
vars.iis_inventory_apppools = false
vars.iis_check_sites = false
vars.iis_check_apppools = false
//vars.iis_inventory_level = "normal"
//vars.iis_inventory_format = "i2conf"
//vars.iis_excluded_sites = ""
//vars.iis_included_sites = ""
//vars.iis_stopped_sites = ""
//vars.iis_warn_sites = ""
vars.iis_perfcounter_sites = false
//vars.iis_excluded_apppools = ""
//vars.iis_included_apppools = ""
//vars.iis_stopped_apppools = ""
//vars.iis_warn_apppools = ""
vars.iis_perfcounter_apppools = false
vars.iis_skip_empty_apppools = false
vars.iis_hide_long_output = false
vars.iis_expected_state = "Started"
vars.iis_icinga2 = false
vars.iis_single_check = false
vars.iis_split_by = false
vars.iis_inv_hide_empty_vars = false
vars.iis_inv_running_only = false
vars.iis_verbose = false
}