-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathTemplate SSL check via file.yaml
156 lines (156 loc) · 5.88 KB
/
Template SSL check via file.yaml
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
zabbix_export:
version: '6.2'
date: '2023-03-26T10:25:27Z'
template_groups:
-
uuid: 7df96b18c230490a9a0a9e2307226338
name: Templates
templates:
-
uuid: e1faf7238e294603a72bc9a4d02ea960
template: 'Template SSL check via file'
name: 'Template SSL check via file'
groups:
-
name: Templates
discovery_rules:
-
uuid: f144797ab4904691abd6e9bb2b6f2b48
name: 'URLs discovery via file'
type: EXTERNAL
key: 'list.sh["ssl_check.json"]'
delay: 1h
lifetime: 60d
item_prototypes:
-
uuid: 0819c474f68b4b84b6d8cb654a5259c7
name: 'HTTP response code {#URL}:{#PORT}'
type: HTTP_AGENT
key: 'http.response200[{#URL},{#PORT}]'
delay: 5m
history: 10d
trends: 730d
preprocessing:
-
type: REGEX
parameters:
- 'HTTP.*\s(\d+)\s.*'
- \1
url: 'https://{#URL}'
status_codes: ''
retrieve_mode: HEADERS
tags:
-
tag: Application
value: 'HTTPS Service'
trigger_prototypes:
-
uuid: 0a0ea8d05b2145c6a1a1f1b7ae374f5d
expression: 'last(/Template SSL check via file/http.response200[{#URL},{#PORT}])>302'
name: 'HTTP response not equal 200 on {#URL}:{#PORT}'
url: 'https://{#URL}'
priority: AVERAGE
-
uuid: 1a713989d41a4ca692042ee932c1691a
name: 'HTTPS Service on {#URL}:{#PORT} is running'
type: SIMPLE
key: 'net.tcp.service[https,{#URL},{#PORT}]'
delay: 5m
history: 10d
trends: 730d
valuemap:
name: 'Service state'
tags:
-
tag: Application
value: 'HTTPS Service'
trigger_prototypes:
-
uuid: a0630601c5884c3594ca94ebd0dadf30
expression: 'max(/Template SSL check via file/net.tcp.service[https,{#URL},{#PORT}],#3)=0'
name: 'HTTPS service is down on {#URL}:{#PORT}'
priority: AVERAGE
description: |
Last value: {ITEM.LASTVALUE1}.
HTTPS service is down on {#URL}:{#PORT}
-
uuid: 7276f1a300334b98951efdf94d7dc4e5
name: 'SSL certificate validity {#URL}:{#PORT}'
type: EXTERNAL
key: 'zext_ssl_cert.sh[-d,{#URL},{#PORT}]'
delay: 1h
history: 10d
trends: 730d
value_type: FLOAT
units: day(s)
tags:
-
tag: Application
value: 'SSL Checks'
trigger_prototypes:
-
uuid: 5298aa96bb3c41f8b50cca33058bfc3d
expression: 'nodata(/Template SSL check via file/zext_ssl_cert.sh[-d,{#URL},{#PORT}],210m)=1'
name: 'Falied to establish SSL connectoin on {#URL}:{#PORT} in last 3 hour'
status: DISABLED
priority: HIGH
-
uuid: 493e729cb0934497aacb06eb3ab969d7
expression: 'last(/Template SSL check via file/zext_ssl_cert.sh[-d,{#URL},{#PORT}])<0'
name: 'SSL certificate on {#URL}:{#PORT} expired'
priority: DISASTER
-
uuid: 2ff5ca35a92b4ee49150ef59e1e40625
expression: 'last(/Template SSL check via file/zext_ssl_cert.sh[-d,{#URL},{#PORT}])<7'
name: 'SSL certificate on {#URL}:{#PORT} expires in less than 7 days'
priority: HIGH
description: |
Last value: {ITEM.LASTVALUE1}.
SSL certificate on {#URL}:{#PORT} expires in less than week
dependencies:
-
name: 'SSL certificate on {#URL}:{#PORT} expired'
expression: 'last(/Template SSL check via file/zext_ssl_cert.sh[-d,{#URL},{#PORT}])<0'
-
uuid: e04b106554854514ab7b3d821a9a7b57
expression: 'last(/Template SSL check via file/zext_ssl_cert.sh[-d,{#URL},{#PORT}])<21'
name: 'SSL certificate on {#URL}:{#PORT} expires in less than 21 days'
priority: WARNING
description: |
Last value: {ITEM.LASTVALUE1}.
SSL certificate on {#URL}:{#PORT} expires in less than 3 week
dependencies:
-
name: 'SSL certificate on {#URL}:{#PORT} expires in less than 7 days'
expression: 'last(/Template SSL check via file/zext_ssl_cert.sh[-d,{#URL},{#PORT}])<7'
-
uuid: d2bfd23599b54d8bbe9d5680054b24c2
name: 'SSL certificate issuer {#URL}:{#PORT}'
type: EXTERNAL
key: 'zext_ssl_cert.sh[-i,{#URL},{#PORT}]'
delay: 1h
history: 10d
trends: '0'
value_type: CHAR
tags:
-
tag: Application
value: 'SSL Checks'
lld_macro_paths:
-
lld_macro: '{#PORT}'
path: $.port
-
lld_macro: '{#URL}'
path: $.url
valuemaps:
-
uuid: 983c1ae60c2846b8bf99f04375a701cf
name: 'Service state'
mappings:
-
value: '0'
newvalue: Down
-
value: '1'
newvalue: Up