Skip to content

Commit d37434b

Browse files
authored
Merge pull request #90 from opinkerfi/config_update_http
http template: Update
2 parents d69ac6e + bbed7a7 commit d37434b

2 files changed

Lines changed: 11 additions & 14 deletions

File tree

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11

22
define command {
33
command_name okc-check_http
4-
command_line $USER1$/check_http -I "$HOSTADDRESS$" -H "$_SERVICE_VIRTUAL_HOST$" -p "$_SERVICE_PORT$" -u "$_SERVICE_URI$" -s "$_SERVICE_SEARCH_STRING$" -w "$_SERVICE_RESPONSE_WARNING$" -c "$_SERVICE_RESPONSE_CRITICAL$" -f "$_SERVICE_ON_REDIRECT$"
4+
command_line $USER1$/check_http -I "$HOSTADDRESS$" -H "$_SERVICE_VIRTUAL_HOST$" -p "$_SERVICE_PORT$" -u "$_SERVICE_URI$" -s "$_SERVICE_SEARCH_STRING$" -w "$_SERVICE_RESPONSE_WARNING$" -c "$_SERVICE_RESPONSE_CRITICAL$" -f "$_SERVICE_ON_REDIRECT$" $_SERVICE_EXTRAOPTIONS$
55
}
66

77
define command {
88
command_name okc-check_https
9-
command_line $USER1$/check_http -I "$HOSTADDRESS$" -H "$_SERVICE_VIRTUAL_HOST$" -p "$_SERVICE_PORT$" --ssl -u "$_SERVICE_URI$" -s "$_SERVICE_SEARCH_STRING$" -w "$_SERVICE_RESPONSE_WARNING$" -c "$_SERVICE_RESPONSE_CRITICAL$" -f "$_SERVICE_ON_REDIRECT$"
9+
command_line $USER1$/check_http -I "$HOSTADDRESS$" -H "$_SERVICE_VIRTUAL_HOST$" -p "$_SERVICE_PORT$" --ssl -u "$_SERVICE_URI$" -s "$_SERVICE_SEARCH_STRING$" -w "$_SERVICE_RESPONSE_WARNING$" -c "$_SERVICE_RESPONSE_CRITICAL$" -f "$_SERVICE_ON_REDIRECT$" $_SERVICE_EXTRAOPTIONS$
1010
}
1111

1212
define command {
1313
command_name okc-check_https_certificate
14-
command_line $USER1$/check_http -I "$HOSTADDRESS$" -p "$_SERVICE_PORT$" --ssl -C "$_SERVICE_CERTIFICATE_AGE_WARNING$"
14+
command_line $USER1$/check_http -I "$HOSTADDRESS$" -p "$_SERVICE_PORT$" --ssl -C "$_SERVICE_CERTIFICATE_AGE_WARNING$,$_SERVICE_CERTIFICATE_AGE_CRITICAL$" $_SERVICE_EXTRAOPTIONS$
1515
}
16-
17-
18-

usr/share/okconfig/templates/http/services.cfg

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#
2+
# Okconfig template for http service checks
3+
#
14

25
define service {
36
service_description http check
@@ -11,14 +14,13 @@ define service {
1114
__RESPONSE_CRITICAL 10
1215
__VIRTUAL_HOST localhost
1316
__PORT 80
14-
__ON_REDIRECT follow
17+
__ON_REDIRECT follow
18+
__EXTRAOPTIONS
1519

1620
register 0
1721

1822
}
1923

20-
21-
2224
define service {
2325
service_description HTTPS HOSTNAME
2426
check_command okc-check_https
@@ -31,13 +33,12 @@ define service {
3133
__RESPONSE_CRITICAL 10
3234
__VIRTUAL_HOST localhost
3335
__PORT 443
34-
__ON_REDIRECT follow
36+
__ON_REDIRECT follow
37+
__EXTRAOPTIONS
3538

3639
register 0
3740
}
3841

39-
40-
# Edited by PyNag on Fri Jun 28 14:11:33 2013
4142
define service {
4243
service_description HTTPS SSL Certificate
4344
check_command okc-check_https_certificate
@@ -47,11 +48,10 @@ define service {
4748
__CERTIFICATE_AGE_WARNING 21
4849
__CERTIFICATE_AGE_CRITICAL 2
4950
__PORT 443
51+
__EXTRAOPTIONS
5052

5153
register 0
5254

5355
notes Check a remote https server and alert if https certificate is not valid or about to expire.
5456
notes_url http://github.com/opinkerfi/okconfig/wiki
5557
}
56-
57-

0 commit comments

Comments
 (0)