forked from Iakim/Zabbix-ScheduledTask
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Template_Tasks_Z6.0.xml
191 lines (191 loc) · 9.81 KB
/
Template_Tasks_Z6.0.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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>6.0</version>
<date>2023-11-28T10:58:13Z</date>
<groups>
<group>
<uuid>7df96b18c230490a9a0a9e2307226338</uuid>
<name>Templates</name>
</group>
</groups>
<templates>
<template>
<uuid>57954842d3fb43c5923be6da6458432f</uuid>
<template>Template Windows Task Scheduled</template>
<name>Template Windows Task Scheduled</name>
<description>Discover and monitor all Task from "Task Scheduler Library" with subfolders indicate in powershell script.</description>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<discovery_rules>
<discovery_rule>
<uuid>2c727e6fbe3f4f26903bd376636f19aa</uuid>
<name>Discovery Task Scheduler</name>
<key>TaskSchedulerMonitoring[{$TASKPATHS},discovertasks]</key>
<delay>2h</delay>
<filter>
<conditions>
<condition>
<macro>{#APPTASKS}</macro>
<value>{$TASKNAME.NOT_MATCHES}</value>
<operator>NOT_MATCHES_REGEX</operator>
<formulaid>A</formulaid>
</condition>
</conditions>
</filter>
<lifetime>0</lifetime>
<description>Discover all Task at "Task Scheduler Library" with Subfolders indicate in powershell script.</description>
<item_prototypes>
<item_prototype>
<uuid>68b168b5266c4f66864a99065c2549c3</uuid>
<name>Task: {#APPTASKS}: Last Result</name>
<key>TaskSchedulerMonitoring[{$TASKPATHS},TaskLastResult,{#APPTASKS}]</key>
<delay>1h</delay>
<description>Last Result of Task, numeric value
in most cases 0 = successful</description>
<valuemap>
<name>Task Scheduled</name>
</valuemap>
<tags>
<tag>
<tag>Application</tag>
<value>Task Scheduled</value>
</tag>
</tags>
<trigger_prototypes>
<trigger_prototype>
<uuid>052e3e90fdff4ac09d18123ce6a506cc</uuid>
<expression>last(/Template Windows Task Scheduled/TaskSchedulerMonitoring[{$TASKPATHS},TaskLastResult,{#APPTASKS}]) <> 0
and last(/Template Windows Task Scheduled/TaskSchedulerMonitoring[{$TASKPATHS},TaskLastResult,{#APPTASKS}]) <> 267009
and last(/Template Windows Task Scheduled/TaskSchedulerMonitoring[{$TASKPATHS},TaskLastResult,{#APPTASKS}]) <> 267010
and last(/Template Windows Task Scheduled/TaskSchedulerMonitoring[{$TASKPATHS},TaskLastResult,{#APPTASKS}]) <> 267011
and last(/Template Windows Task Scheduled/TaskSchedulerMonitoring[{$TASKPATHS},TaskLastResult,{#APPTASKS}]) <> 267012
and last(/Template Windows Task Scheduled/TaskSchedulerMonitoring[{$TASKPATHS},TaskLastResult,{#APPTASKS}]) <> 2147946720</expression>
<recovery_mode>RECOVERY_EXPRESSION</recovery_mode>
<recovery_expression>last(/Template Windows Task Scheduled/TaskSchedulerMonitoring[{$TASKPATHS},TaskLastResult,{#APPTASKS}]) = 0</recovery_expression>
<name>Last run of {#APPTASKS} with error!</name>
<priority>WARNING</priority>
</trigger_prototype>
</trigger_prototypes>
</item_prototype>
<item_prototype>
<uuid>ee287193334d4630a3fb0eceaa924711</uuid>
<name>Task: {#APPTASKS}: Last Run Time</name>
<key>TaskSchedulerMonitoring[{$TASKPATHS},TaskLastRunTime,{#APPTASKS}]</key>
<delay>1h</delay>
<units>unixtime</units>
<description>Last Run Time of Task as an unixtimestamp</description>
<valuemap>
<name>Task Scheduled</name>
</valuemap>
<tags>
<tag>
<tag>Application</tag>
<value>Task Scheduled</value>
</tag>
</tags>
</item_prototype>
<item_prototype>
<uuid>4cb82427c9684d27aada5a12b6ea3cae</uuid>
<name>Task: {#APPTASKS}: Next Run Time</name>
<key>TaskSchedulerMonitoring[{$TASKPATHS},TaskNextRunTime,{#APPTASKS}]</key>
<delay>1h</delay>
<units>unixtime</units>
<description>Next Run Time of Task as an unixtimestamp</description>
<tags>
<tag>
<tag>Application</tag>
<value>Task Scheduled</value>
</tag>
</tags>
</item_prototype>
</item_prototypes>
</discovery_rule>
</discovery_rules>
<macros>
<macro>
<macro>{$TASKNAME.NOT_MATCHES}</macro>
<value>Optimize Start|ShadowCopyVolume|CreateExplorerShellUnelevatedTask|OneDrive Standalone Update Task.*|OneDrive Reporting Task.*</value>
</macro>
<macro>
<macro>{$TASKPATHS}</macro>
<value>/</value>
</macro>
</macros>
<valuemaps>
<valuemap>
<uuid>839b33549ce54b11927857ff95597d20</uuid>
<name>Task Scheduled</name>
<mappings>
<mapping>
<value>0</value>
<newvalue>Success</newvalue>
</mapping>
<mapping>
<value>0x41300</value>
<newvalue>The task is ready to run at the next scheduled time</newvalue>
</mapping>
<mapping>
<value>267009</value>
<newvalue>The task is running</newvalue>
</mapping>
<mapping>
<value>2147946720</value>
<newvalue>The task details temporary not available</newvalue>
</mapping>
<mapping>
<value>267011</value>
<newvalue>The task has not yet finished</newvalue>
</mapping>
<mapping>
<value>267012</value>
<newvalue>There are no scheduled operations for this task</newvalue>
</mapping>
<mapping>
<value>267014</value>
<newvalue>The task is completed</newvalue>
</mapping>
<mapping>
<value>2147943645</value>
<newvalue>The service is not available</newvalue>
</mapping>
<mapping>
<value>2147750671</value>
<newvalue>Corrupt Identifiers</newvalue>
</mapping>
<mapping>
<value>2147750687</value>
<newvalue>An instance of this task is already running</newvalue>
</mapping>
<mapping>
<value>2147942667</value>
<newvalue>The "Start in" directory can not be found</newvalue>
</mapping>
<mapping>
<value>2147942402</value>
<newvalue>One of the files is not available</newvalue>
</mapping>
<mapping>
<value>3228369022</value>
<newvalue>Unknown software exception</newvalue>
</mapping>
<mapping>
<value>1</value>
<newvalue>Incorrect or unknown function called</newvalue>
</mapping>
<mapping>
<value>2</value>
<newvalue>File not found</newvalue>
</mapping>
<mapping>
<value>10</value>
<newvalue>Environment Incorrect</newvalue>
</mapping>
</mappings>
</valuemap>
</valuemaps>
</template>
</templates>
</zabbix_export>