forked from fernandobrunelli/Zabbix-Templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Template Module Windows services by Zabbix agent active.xml
153 lines (153 loc) · 7.02 KB
/
Template Module Windows services by Zabbix agent active.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
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>5.0</version>
<groups>
<group>
<name>Templates/Modules</name>
</group>
</groups>
<templates>
<template>
<template>Template Module Windows services by Zabbix agent active</template>
<name>Template Module Windows services by Zabbix agent active</name>
<description>Template Services OS Windows
Template tooling version used: 0.37</description>
<groups>
<group>
<name>Templates/Modules</name>
</group>
</groups>
<applications>
<application>
<name>Services</name>
</application>
</applications>
<discovery_rules>
<discovery_rule>
<name>Windows services discovery</name>
<type>ZABBIX_ACTIVE</type>
<key>service.discovery</key>
<delay>1h</delay>
<filter>
<evaltype>AND</evaltype>
<conditions>
<condition>
<macro>{#SERVICE.NAME}</macro>
<value>{$SERVICE.NAME.MATCHES}</value>
<formulaid>A</formulaid>
</condition>
<condition>
<macro>{#SERVICE.NAME}</macro>
<value>{$SERVICE.NAME.NOT_MATCHES}</value>
<operator>NOT_MATCHES_REGEX</operator>
<formulaid>B</formulaid>
</condition>
<condition>
<macro>{#SERVICE.STARTUPNAME}</macro>
<value>{$SERVICE.STARTUPNAME.MATCHES}</value>
<formulaid>C</formulaid>
</condition>
<condition>
<macro>{#SERVICE.STARTUPNAME}</macro>
<value>{$SERVICE.STARTUPNAME.NOT_MATCHES}</value>
<operator>NOT_MATCHES_REGEX</operator>
<formulaid>D</formulaid>
</condition>
</conditions>
</filter>
<description>Discovery of Windows services of different types as defined in template's macros.</description>
<item_prototypes>
<item_prototype>
<name>State of service "{#SERVICE.NAME}" ({#SERVICE.DISPLAYNAME})</name>
<type>ZABBIX_ACTIVE</type>
<key>service.info["{#SERVICE.NAME}",state]</key>
<history>7d</history>
<applications>
<application>
<name>Services</name>
</application>
</applications>
<valuemap>
<name>Windows service state</name>
</valuemap>
<trigger_prototypes>
<trigger_prototype>
<expression>{min(#3)}<>0</expression>
<name>"{#SERVICE.NAME}" ({#SERVICE.DISPLAYNAME}) is not running (startup type {#SERVICE.STARTUPNAME})</name>
<priority>AVERAGE</priority>
<description>The service has a state other than "Running" for the last three times.</description>
</trigger_prototype>
</trigger_prototypes>
</item_prototype>
</item_prototypes>
</discovery_rule>
</discovery_rules>
<macros>
<macro>
<macro>{$SERVICE.NAME.MATCHES}</macro>
<value>^.*$</value>
<description>This macro is used in Service discovery. Can be overridden on the host or linked template level.</description>
</macro>
<macro>
<macro>{$SERVICE.NAME.NOT_MATCHES}</macro>
<value>^RemoteRegistry|MMCSS|gupdate|SysmonLog|clr_optimization_v.+|clr_optimization_v.+|sppsvc|gpsvc|Pml Driver HPZ12|Net Driver HPZ12|MapsBroker|IntelAudioService|Intel\(R\) TPM Provisioning Service|dbupdate|DoSvc$</value>
<description>This macro is used in Service discovery. Can be overridden on the host or linked template level.</description>
</macro>
<macro>
<macro>{$SERVICE.STARTUPNAME.MATCHES}</macro>
<value>^automatic|automatic delayed$</value>
<description>This macro is used in Service discovery. Can be overridden on the host or linked template level.</description>
</macro>
<macro>
<macro>{$SERVICE.STARTUPNAME.NOT_MATCHES}</macro>
<value>^manual|disabled$</value>
<description>This macro is used in Service discovery. Can be overridden on the host or linked template level.</description>
</macro>
</macros>
</template>
</templates>
<value_maps>
<value_map>
<name>Windows service state</name>
<mappings>
<mapping>
<value>0</value>
<newvalue>Running</newvalue>
</mapping>
<mapping>
<value>1</value>
<newvalue>Paused</newvalue>
</mapping>
<mapping>
<value>2</value>
<newvalue>Start pending</newvalue>
</mapping>
<mapping>
<value>3</value>
<newvalue>Pause pending</newvalue>
</mapping>
<mapping>
<value>4</value>
<newvalue>Continue pending</newvalue>
</mapping>
<mapping>
<value>5</value>
<newvalue>Stop pending</newvalue>
</mapping>
<mapping>
<value>6</value>
<newvalue>Stopped</newvalue>
</mapping>
<mapping>
<value>7</value>
<newvalue>Unknown</newvalue>
</mapping>
<mapping>
<value>255</value>
<newvalue>No such service</newvalue>
</mapping>
</mappings>
</value_map>
</value_maps>
</zabbix_export>