Welcome to mirror list, hosted at ThFree Co, Russian Federation.

template_app_wildfly_domain_jmx.yaml « wildfly_domain_jmx « app « templates - github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ed85e55c9959a7fdc665a645bcec4783c44751fb (plain)
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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
zabbix_export:
  version: '5.4'
  date: '2021-05-09T00:00:00Z'
  groups:
    -
      name: Templates/Applications
  templates:
    -
      template: 'WildFly Domain by JMX'
      name: 'WildFly Domain by JMX'
      description: |
        Official JMX Template for WildFly.
        The metrics are collected by JMX. This template works with Domain Controller.
        You can set {$WILDFLY.USER} and {$WILDFLY.PASSWORD} macros in the template for using on the host level.
        
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback
        
        Template tooling version used: 0.38
      groups:
        -
          name: Templates/Applications
      items:
        -
          name: 'WildFly: Uptime'
          type: JMX
          key: 'jmx["java.lang:type=Runtime","Uptime"]'
          history: 7d
          units: s
          username: '{$WILDFLY.USER}'
          password: '{$WILDFLY.PASSWORD}'
          description: 'WildFly server uptime.'
          preprocessing:
            -
              type: MULTIPLIER
              parameters:
                - '0.001'
          jmx_endpoint: 'service:jmx:{$WILDFLY.JMX.PROTOCOL}://{HOST.CONN}:{HOST.PORT}'
          tags:
            -
              tag: Application
              value: WildFly
          triggers:
            -
              expression: 'last(/WildFly Domain by JMX/jmx["java.lang:type=Runtime","Uptime"])<10m'
              name: 'WildFly: has been restarted (uptime < 10m)'
              priority: INFO
              description: 'Uptime is less than 10 minutes'
              manual_close: 'YES'
        -
          name: 'WildFly: Launch type'
          type: JMX
          key: 'jmx["jboss.as:management-root=server","launchType"]'
          history: 7d
          trends: '0'
          value_type: CHAR
          username: '{$WILDFLY.USER}'
          password: '{$WILDFLY.PASSWORD}'
          description: 'The manner in which the server process was launched. Either "DOMAIN" for a domain mode server launched by a Host Controller, "STANDALONE" for a standalone server launched from the command line, or "EMBEDDED" for a standalone server launched as an embedded part of an application running in the same virtual machine.'
          preprocessing:
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          jmx_endpoint: 'service:jmx:{$WILDFLY.JMX.PROTOCOL}://{HOST.CONN}:{HOST.PORT}'
          tags:
            -
              tag: Application
              value: WildFly
        -
          name: 'WildFly: Name'
          type: JMX
          key: 'jmx["jboss.as:management-root=server","name"]'
          history: 7d
          trends: '0'
          value_type: CHAR
          username: '{$WILDFLY.USER}'
          password: '{$WILDFLY.PASSWORD}'
          description: |
            For standalone mode: The name of this server. If not set, defaults to the runtime value of InetAddress.getLocalHost().getHostName().
            For domain mode: The name given to this domain
          preprocessing:
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          jmx_endpoint: 'service:jmx:{$WILDFLY.JMX.PROTOCOL}://{HOST.CONN}:{HOST.PORT}'
          tags:
            -
              tag: Application
              value: WildFly
        -
          name: 'WildFly: Process type'
          type: JMX
          key: 'jmx["jboss.as:management-root=server","processType"]'
          history: 7d
          trends: '0'
          value_type: CHAR
          username: '{$WILDFLY.USER}'
          password: '{$WILDFLY.PASSWORD}'
          description: 'The type of process represented by this root resource.'
          preprocessing:
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          jmx_endpoint: 'service:jmx:{$WILDFLY.JMX.PROTOCOL}://{HOST.CONN}:{HOST.PORT}'
          tags:
            -
              tag: Application
              value: WildFly
        -
          name: 'WildFly: Version'
          type: JMX
          key: 'jmx["jboss.as:management-root=server","productVersion"]'
          history: 7d
          trends: '0'
          value_type: CHAR
          username: '{$WILDFLY.USER}'
          password: '{$WILDFLY.PASSWORD}'
          description: 'The version of the WildFly Core based product release'
          preprocessing:
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          jmx_endpoint: 'service:jmx:{$WILDFLY.JMX.PROTOCOL}://{HOST.CONN}:{HOST.PORT}'
          tags:
            -
              tag: Application
              value: WildFly
          triggers:
            -
              expression: '(last(/WildFly Domain by JMX/jmx["jboss.as:management-root=server","productVersion"],#1)<>last(/WildFly Domain by JMX/jmx["jboss.as:management-root=server","productVersion"],#2))=1 and length(last(/WildFly Domain by JMX/jmx["jboss.as:management-root=server","productVersion"]))>0'
              name: 'WildFly: Version has changed (new version: {ITEM.VALUE})'
              priority: INFO
              description: 'WildFly version has changed. Ack to close.'
              manual_close: 'YES'
      discovery_rules:
        -
          name: 'Deployments discovery'
          type: JMX
          key: 'jmx.get[beans,"jboss.as.expr:deployment=*,server-group=*"]'
          delay: 1h
          username: '{$WILDFLY.USER}'
          password: '{$WILDFLY.PASSWORD}'
          filter:
            evaltype: AND
            conditions:
              -
                macro: '{#DEPLOYMENT}'
                value: '{$WILDFLY.DEPLOYMENT.MATCHES}'
                formulaid: A
              -
                macro: '{#DEPLOYMENT}'
                value: '{$WILDFLY.DEPLOYMENT.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
                formulaid: B
          description: 'Discovery deployments metrics.'
          item_prototypes:
            -
              name: 'WildFly deployment [{#DEPLOYMENT}]: Enabled'
              type: JMX
              key: 'jmx["{#JMXOBJ}",enabled]'
              history: 7d
              username: '{$WILDFLY.USER}'
              password: '{$WILDFLY.PASSWORD}'
              description: 'Boolean indicating whether the deployment content is currently deployed in the runtime (or should be deployed in the runtime the next time the server starts.)'
              valuemap:
                name: 'WildFly flag'
              preprocessing:
                -
                  type: BOOL_TO_DECIMAL
                  parameters:
                    - ''
                -
                  type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 3h
              jmx_endpoint: 'service:jmx:{$WILDFLY.JMX.PROTOCOL}://{HOST.CONN}:{HOST.PORT}'
              tags:
                -
                  tag: Application
                  value: 'WildFly deployment [{#DEPLOYMENT}]'
            -
              name: 'WildFly deployment [{#DEPLOYMENT}]: Managed'
              type: JMX
              key: 'jmx["{#JMXOBJ}",managed]'
              history: 7d
              username: '{$WILDFLY.USER}'
              password: '{$WILDFLY.PASSWORD}'
              description: 'Indicates if the deployment is managed (aka uses the ContentRepository).'
              valuemap:
                name: 'WildFly flag'
              preprocessing:
                -
                  type: BOOL_TO_DECIMAL
                  parameters:
                    - ''
                -
                  type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 3h
              jmx_endpoint: 'service:jmx:{$WILDFLY.JMX.PROTOCOL}://{HOST.CONN}:{HOST.PORT}'
              tags:
                -
                  tag: Application
                  value: 'WildFly deployment [{#DEPLOYMENT}]'
          jmx_endpoint: 'service:jmx:{$WILDFLY.JMX.PROTOCOL}://{HOST.CONN}:{HOST.PORT}'
          lld_macro_paths:
            -
              lld_macro: '{#DEPLOYMENT}'
              path: $.properties.deployment
            -
              lld_macro: '{#JMXOBJ}'
              path: $.object
            -
              lld_macro: '{#SERVER_GROUP}'
              path: '$.properties.["server-group"]'
        -
          name: 'Servers discovery'
          type: JMX
          key: 'jmx.get[beans,"jboss.as:host=master,server-config=*"]'
          delay: 1h
          username: '{$WILDFLY.USER}'
          password: '{$WILDFLY.PASSWORD}'
          filter:
            evaltype: AND
            conditions:
              -
                macro: '{#SERVER}'
                value: '{$WILDFLY.SERVER.MATCHES}'
                formulaid: A
              -
                macro: '{#SERVER}'
                value: '{$WILDFLY.SERVER.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
                formulaid: B
          description: 'Discovery instances in domain.'
          item_prototypes:
            -
              name: 'WildFly domain: Server {#SERVER}: Autostart'
              type: JMX
              key: 'jmx["{#JMXOBJ}",autoStart]'
              history: 7d
              username: '{$WILDFLY.USER}'
              password: '{$WILDFLY.PASSWORD}'
              description: 'Whether or not this server should be started when the Host Controller starts.'
              valuemap:
                name: 'WildFly flag'
              preprocessing:
                -
                  type: BOOL_TO_DECIMAL
                  parameters:
                    - ''
                -
                  type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 3h
              jmx_endpoint: 'service:jmx:{$WILDFLY.JMX.PROTOCOL}://{HOST.CONN}:{HOST.PORT}'
              tags:
                -
                  tag: Application
                  value: 'WildFly domain: Server [{#SERVER}]'
            -
              name: 'WildFly domain: Server {#SERVER}: Server group'
              type: JMX
              key: 'jmx["{#JMXOBJ}",group]'
              history: 7d
              trends: '0'
              value_type: CHAR
              username: '{$WILDFLY.USER}'
              password: '{$WILDFLY.PASSWORD}'
              description: 'The name of a server group from the domain model.'
              preprocessing:
                -
                  type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 3h
              jmx_endpoint: 'service:jmx:{$WILDFLY.JMX.PROTOCOL}://{HOST.CONN}:{HOST.PORT}'
              tags:
                -
                  tag: Application
                  value: 'WildFly domain: Server [{#SERVER}]'
              trigger_prototypes:
                -
                  expression: '(last(/WildFly Domain by JMX/jmx["{#JMXOBJ}",group],#1)<>last(/WildFly Domain by JMX/jmx["{#JMXOBJ}",group],#2))=1 and length(last(/WildFly Domain by JMX/jmx["{#JMXOBJ}",group]))>0'
                  name: 'WildFly domain: Server {#SERVER}: Server group has changed (new group: {ITEM.VALUE})'
                  priority: INFO
                  description: 'Server group has changed. Ack to close.'
                  manual_close: 'YES'
            -
              name: 'WildFly domain: Server {#SERVER}: Status'
              type: JMX
              key: 'jmx["{#JMXOBJ}",status]'
              history: 7d
              trends: '0'
              value_type: CHAR
              username: '{$WILDFLY.USER}'
              password: '{$WILDFLY.PASSWORD}'
              description: 'The current status of the server.'
              preprocessing:
                -
                  type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 3h
              jmx_endpoint: 'service:jmx:{$WILDFLY.JMX.PROTOCOL}://{HOST.CONN}:{HOST.PORT}'
              tags:
                -
                  tag: Application
                  value: 'WildFly domain: Server [{#SERVER}]'
              trigger_prototypes:
                -
                  expression: '(last(/WildFly Domain by JMX/jmx["{#JMXOBJ}",status],#1)<>last(/WildFly Domain by JMX/jmx["{#JMXOBJ}",status],#2))=1 and length(last(/WildFly Domain by JMX/jmx["{#JMXOBJ}",status]))>0'
                  name: 'WildFly domain: Server {#SERVER}: Server status has changed (new status: {ITEM.VALUE})'
                  priority: WARNING
                  description: 'Server status has changed. Ack to close.'
                  manual_close: 'YES'
          jmx_endpoint: 'service:jmx:{$WILDFLY.JMX.PROTOCOL}://{HOST.CONN}:{HOST.PORT}'
          lld_macro_paths:
            -
              lld_macro: '{#JMXOBJ}'
              path: $.object
            -
              lld_macro: '{#SERVER}'
              path: '$.properties.["server-config"]'
      macros:
        -
          macro: '{$WILDFLY.DEPLOYMENT.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable deployments'
        -
          macro: '{$WILDFLY.DEPLOYMENT.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered deployments'
        -
          macro: '{$WILDFLY.JMX.PROTOCOL}'
          value: remote+http
        -
          macro: '{$WILDFLY.PASSWORD}'
          value: zabbix
        -
          macro: '{$WILDFLY.SERVER.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable servers'
        -
          macro: '{$WILDFLY.SERVER.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered servers'
        -
          macro: '{$WILDFLY.USER}'
          value: zabbix
      valuemaps:
        -
          name: 'WildFly flag'
          mappings:
            -
              value: '0'
              newvalue: 'False'
            -
              value: '1'
              newvalue: 'True'