forked from AkuLink1/zabbix-template-yum-update-monitoring
-
Notifications
You must be signed in to change notification settings - Fork 0
/
server_template_check_yum_updates_template.xml
174 lines (171 loc) · 7.33 KB
/
server_template_check_yum_updates_template.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
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
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>6.0</version>
<date>2022-05-20T14:21:14Z</date>
<groups>
<group>
<uuid>7df96b18c230490a9a0a9e2307226338</uuid>
<name>Templates</name>
</group>
</groups>
<templates>
<template>
<uuid>22a098ea52554ff2b4a3285dc0417473</uuid>
<template>Template Yum Check-Update Monitor</template>
<name>Template Yum Check-Update Monitor</name>
<description>Uses yum check-update to get the info on which packages require updates in a RHEL / CentOS related system. Tracks name of the package, version number and source repo from which the package will be downloaded.</description>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<items>
<item>
<uuid>b1d1de02fff14758baa066c9197465b5</uuid>
<name>Individual Package to Update</name>
<type>TRAP</type>
<key>yum.individualpackagetoupdate</key>
<delay>0</delay>
<history>1d</history>
<trends>0</trends>
<value_type>TEXT</value_type>
<description>Name, version and source for each package of the yum check-update</description>
<tags>
<tag>
<tag>Application</tag>
<value>YUM Update</value>
</tag>
</tags>
</item>
<item>
<uuid>fa640eba441b4107a4704ca4bea8cf79</uuid>
<name>Individual Package Name</name>
<type>DEPENDENT</type>
<key>yum.individualpackagetoupdate.name</key>
<delay>0</delay>
<history>1d</history>
<trends>0</trends>
<value_type>TEXT</value_type>
<preprocessing>
<step>
<type>REGEX</type>
<parameters>
<parameter>([^\s]+)</parameter>
<parameter>\0</parameter>
</parameters>
</step>
</preprocessing>
<master_item>
<key>yum.individualpackagetoupdate</key>
</master_item>
<tags>
<tag>
<tag>Application</tag>
<value>YUM Update</value>
</tag>
</tags>
</item>
<item>
<uuid>4882453d4c6c4cd585d2e6836e81df83</uuid>
<name>Individual Package Source Repo</name>
<type>DEPENDENT</type>
<key>yum.individualpackagetoupdate.source</key>
<delay>0</delay>
<history>1d</history>
<trends>0</trends>
<value_type>TEXT</value_type>
<preprocessing>
<step>
<type>REGEX</type>
<parameters>
<parameter>\b\S+$</parameter>
<parameter>\0</parameter>
</parameters>
</step>
</preprocessing>
<master_item>
<key>yum.individualpackagetoupdate</key>
</master_item>
<tags>
<tag>
<tag>Application</tag>
<value>YUM Update</value>
</tag>
</tags>
</item>
<item>
<uuid>8b24264a637e4b1ca1817914ee42c660</uuid>
<name>Individual Package Version</name>
<type>DEPENDENT</type>
<key>yum.individualpackagetoupdate.version</key>
<delay>0</delay>
<history>1d</history>
<trends>0</trends>
<value_type>TEXT</value_type>
<preprocessing>
<step>
<type>REGEX</type>
<parameters>
<parameter>\s([^\s]+)\s</parameter>
<parameter>\0</parameter>
</parameters>
</step>
</preprocessing>
<master_item>
<key>yum.individualpackagetoupdate</key>
</master_item>
<tags>
<tag>
<tag>Application</tag>
<value>YUM Update</value>
</tag>
</tags>
</item>
<item>
<uuid>a24f914fedc44aae80697fb0ca89d8b8</uuid>
<name>Total Packages to Update - Sum</name>
<type>TRAP</type>
<key>yum.packagestoupdate.count</key>
<delay>0</delay>
<description>Number of packages ready to be updated</description>
<tags>
<tag>
<tag>Application</tag>
<value>YUM Update</value>
</tag>
</tags>
</item>
<item>
<uuid>89ab564800aa4f94929f9ae86a450c0b</uuid>
<name>Total Packages Full Summary</name>
<type>TRAP</type>
<key>yum.packagestoupdate.description</key>
<delay>0</delay>
<trends>0</trends>
<value_type>TEXT</value_type>
<description>Summary of packages ready to be updated</description>
<tags>
<tag>
<tag>Application</tag>
<value>YUM Update</value>
</tag>
</tags>
</item>
</items>
</template>
</templates>
<triggers>
<trigger>
<uuid>71368d4080da4f909cd1baf4f9d1f4e1</uuid>
<expression>last(/Template Yum Check-Update Monitor/yum.packagestoupdate.count)>0 and
count(/Template Yum Check-Update Monitor/yum.individualpackagetoupdate,10m)>0 and
last(/Template Yum Check-Update Monitor/yum.packagestoupdate.description)<>0</expression>
<recovery_mode>RECOVERY_EXPRESSION</recovery_mode>
<recovery_expression>last(/Template Yum Check-Update Monitor/yum.packagestoupdate.count)=0 and
count(/Template Yum Check-Update Monitor/yum.individualpackagetoupdate,10m)=0</recovery_expression>
<name>{ITEM.LASTVALUE1} Updates available in {HOST.NAME}</name>
<opdata>sudo yum update</opdata>
<priority>WARNING</priority>
</trigger>
</triggers>
</zabbix_export>