-
Notifications
You must be signed in to change notification settings - Fork 3
/
frogg_ssl_check.xml
119 lines (119 loc) · 5.38 KB
/
frogg_ssl_check.xml
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
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>4.4</version>
<date>2020-03-15T17:33:38Z</date>
<groups>
<group>
<name>Templates</name>
</group>
<group>
<name>Templates/Modules</name>
</group>
</groups>
<templates>
<template>
<template>Template Module SSL</template>
<name>Template Module SSL</name>
<description>Check the number of days left on certificate validity</description>
<groups>
<group>
<name>Templates</name>
</group>
<group>
<name>Templates/Modules</name>
</group>
</groups>
<applications>
<application>
<name>SSL</name>
</application>
</applications>
<items>
<item>
<name>SSL certificate exist</name>
<type>EXTERNAL</type>
<key>frogg_ssl_check.sh[-a=exist,-s={$SSL.DNS},-p={$SSL.PORT}]</key>
<delay>2h</delay>
<applications>
<application>
<name>SSL</name>
</application>
</applications>
<triggers>
<trigger>
<expression>{last()}=0</expression>
<name>SLL certificate unavailable for {$SSL.DNS}</name>
<priority>HIGH</priority>
</trigger>
</triggers>
</item>
<item>
<name>SSL expiration</name>
<type>EXTERNAL</type>
<key>frogg_ssl_check.sh[-a=expire,-s={$SSL.DNS},-p={$SSL.PORT}]</key>
<delay>2h</delay>
<history>30d</history>
<units>days</units>
<applications>
<application>
<name>SSL</name>
</application>
</applications>
</item>
</items>
<macros>
<macro>
<macro>{$SSL.AVG}</macro>
<value>10</value>
<description>number of days left before triggering average</description>
</macro>
<macro>
<macro>{$SSL.DNS}</macro>
<description>web server DNS name</description>
</macro>
<macro>
<macro>{$SSL.INFO}</macro>
<value>60</value>
<description>number of days left before triggering information</description>
</macro>
<macro>
<macro>{$SSL.PORT}</macro>
<value>443</value>
<description>server web ssl port</description>
</macro>
<macro>
<macro>{$SSL.WARN}</macro>
<value>30</value>
<description>number of days left before triggering warning</description>
</macro>
</macros>
</template>
</templates>
<triggers>
<trigger>
<expression>{Template Module SSL:frogg_ssl_check.sh[-a=expire,-s={$SSL.DNS},-p={$SSL.PORT}].last()}<={$SSL.AVG} and {Template Module SSL:frogg_ssl_check.sh[-a=expire,-s={$SSL.DNS},-p={$SSL.PORT}].last()}>0 and {Template Module SSL:frogg_ssl_check.sh[-a=exist,-s={$SSL.DNS},-p={$SSL.PORT}].last()}=1</expression>
<name>{$SSL.DNS} expire in {ITEM.LASTVALUE}</name>
<priority>AVERAGE</priority>
</trigger>
<trigger>
<expression>{Template Module SSL:frogg_ssl_check.sh[-a=expire,-s={$SSL.DNS},-p={$SSL.PORT}].last()}<={$SSL.INFO} and {Template Module SSL:frogg_ssl_check.sh[-a=expire,-s={$SSL.DNS},-p={$SSL.PORT}].last()}>{$SSL.WARN} and {Template Module SSL:frogg_ssl_check.sh[-a=exist,-s={$SSL.DNS},-p={$SSL.PORT}].last()}=1</expression>
<name>{$SSL.DNS} expire in {ITEM.LASTVALUE}</name>
<priority>INFO</priority>
</trigger>
<trigger>
<expression>{Template Module SSL:frogg_ssl_check.sh[-a=expire,-s={$SSL.DNS},-p={$SSL.PORT}].last()}<={$SSL.WARN} and {Template Module SSL:frogg_ssl_check.sh[-a=expire,-s={$SSL.DNS},-p={$SSL.PORT}].last()}>{$SSL.AVG} and {Template Module SSL:frogg_ssl_check.sh[-a=exist,-s={$SSL.DNS},-p={$SSL.PORT}].last()}=1</expression>
<name>{$SSL.DNS} expire in {ITEM.LASTVALUE}</name>
<priority>WARNING</priority>
</trigger>
<trigger>
<expression>{Template Module SSL:frogg_ssl_check.sh[-a=exist,-s={$SSL.DNS},-p={$SSL.PORT}].last()}=1 and {Template Module SSL:frogg_ssl_check.sh[-a=expire,-s={$SSL.DNS},-p={$SSL.PORT}].last()}<=0</expression>
<name>{$SSL.DNS} is expired</name>
<priority>HIGH</priority>
</trigger>
<trigger>
<expression>{Template Module SSL:frogg_ssl_check.sh[-a=exist,-s={$SSL.DNS},-p={$SSL.PORT}].last()}=9999999999</expression>
<name>{HOST.NAME} $SSL.DNS macro is missing</name>
<priority>WARNING</priority>
</trigger>
</triggers>
</zabbix_export>