forked from AkuLink1/zabbix-template-yum-update-monitoring
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver_template_check_yum_updates_template.yaml
135 lines (132 loc) · 4.17 KB
/
server_template_check_yum_updates_template.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
zabbix_export:
version: '6.0'
date: '2022-05-20T14:21:06Z'
groups:
-
uuid: 7df96b18c230490a9a0a9e2307226338
name: Templates
templates:
-
uuid: 22a098ea52554ff2b4a3285dc0417473
template: 'Template Yum Check-Update Monitor'
name: 'Template Yum Check-Update Monitor'
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.'
groups:
-
name: Templates
items:
-
uuid: b1d1de02fff14758baa066c9197465b5
name: 'Individual Package to Update'
type: TRAP
key: yum.individualpackagetoupdate
delay: '0'
history: 1d
trends: '0'
value_type: TEXT
description: 'Name, version and source for each package of the yum check-update'
tags:
-
tag: Application
value: 'YUM Update'
-
uuid: fa640eba441b4107a4704ca4bea8cf79
name: 'Individual Package Name'
type: DEPENDENT
key: yum.individualpackagetoupdate.name
delay: '0'
history: 1d
trends: '0'
value_type: TEXT
preprocessing:
-
type: REGEX
parameters:
- '([^\s]+)'
- \0
master_item:
key: yum.individualpackagetoupdate
tags:
-
tag: Application
value: 'YUM Update'
-
uuid: 4882453d4c6c4cd585d2e6836e81df83
name: 'Individual Package Source Repo'
type: DEPENDENT
key: yum.individualpackagetoupdate.source
delay: '0'
history: 1d
trends: '0'
value_type: TEXT
preprocessing:
-
type: REGEX
parameters:
- \b\S+$
- \0
master_item:
key: yum.individualpackagetoupdate
tags:
-
tag: Application
value: 'YUM Update'
-
uuid: 8b24264a637e4b1ca1817914ee42c660
name: 'Individual Package Version'
type: DEPENDENT
key: yum.individualpackagetoupdate.version
delay: '0'
history: 1d
trends: '0'
value_type: TEXT
preprocessing:
-
type: REGEX
parameters:
- '\s([^\s]+)\s'
- \0
master_item:
key: yum.individualpackagetoupdate
tags:
-
tag: Application
value: 'YUM Update'
-
uuid: a24f914fedc44aae80697fb0ca89d8b8
name: 'Total Packages to Update - Sum'
type: TRAP
key: yum.packagestoupdate.count
delay: '0'
description: 'Number of packages ready to be updated'
tags:
-
tag: Application
value: 'YUM Update'
-
uuid: 89ab564800aa4f94929f9ae86a450c0b
name: 'Total Packages Full Summary'
type: TRAP
key: yum.packagestoupdate.description
delay: '0'
trends: '0'
value_type: TEXT
description: 'Summary of packages ready to be updated'
tags:
-
tag: Application
value: 'YUM Update'
triggers:
-
uuid: 71368d4080da4f909cd1baf4f9d1f4e1
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
recovery_mode: RECOVERY_EXPRESSION
recovery_expression: |
last(/Template Yum Check-Update Monitor/yum.packagestoupdate.count)=0 and
count(/Template Yum Check-Update Monitor/yum.individualpackagetoupdate,10m)=0
name: '{ITEM.LASTVALUE1} Updates available in {HOST.NAME}'
opdata: 'sudo yum update'
priority: WARNING