-
Notifications
You must be signed in to change notification settings - Fork 128
/
Template App Elasticsearch Cluster by HTTP.xml
2320 lines (2319 loc) · 124 KB
/
Template App Elasticsearch Cluster by HTTP.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
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
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>5.0</version>
<groups>
<group>
<name>Templates/Applications</name>
</group>
</groups>
<templates>
<template>
<template>Template App Elasticsearch Cluster by HTTP</template>
<name>Template App Elasticsearch Cluster by HTTP</name>
<description>The template to monitor Elasticsearch by Zabbix that work without any external scripts.
It works with both standalone and cluster instances.
The metrics are collected in one pass remotely using an HTTP agent.
They are getting values from REST API _cluster/health, _cluster/stats, _nodes/stats requests.
You can set {$ELASTICSEARCH.USERNAME} and {$ELASTICSEARCH.PASSWORD} macros in the template for using on the host level.
If you use an atypical location ES API, don't forget to change the macros {$ELASTICSEARCH.SCHEME},{$ELASTICSEARCH.PORT}.
You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/399473-discussion-thread-for-official-zabbix-template-for-elasticsearch
Template tooling version used: 0.35</description>
<groups>
<group>
<name>Templates/Applications</name>
</group>
</groups>
<applications>
<application>
<name>ES cluster</name>
</application>
<application>
<name>Zabbix raw items</name>
</application>
</applications>
<items>
<item>
<name>ES: Delayed unassigned shards</name>
<type>DEPENDENT</type>
<key>es.cluster.delayed_unassigned_shards</key>
<delay>0</delay>
<history>7d</history>
<description>The number of shards whose allocation has been delayed by the timeout settings.</description>
<applications>
<application>
<name>ES cluster</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.delayed_unassigned_shards</params>
</step>
</preprocessing>
<master_item>
<key>es.cluster.get_health</key>
</master_item>
</item>
<item>
<name>ES: Get cluster health</name>
<type>HTTP_AGENT</type>
<key>es.cluster.get_health</key>
<history>0h</history>
<trends>0</trends>
<value_type>TEXT</value_type>
<authtype>BASIC</authtype>
<username>{$ELASTICSEARCH.USERNAME}</username>
<password>{$ELASTICSEARCH.PASSWORD}</password>
<description>Returns the health status of a cluster.</description>
<applications>
<application>
<name>Zabbix raw items</name>
</application>
</applications>
<timeout>15s</timeout>
<url>{$ELASTICSEARCH.SCHEME}://{HOST.CONN}:{$ELASTICSEARCH.PORT}/_cluster/health?timeout=5s</url>
<status_codes/>
</item>
<item>
<name>ES: Get cluster stats</name>
<type>HTTP_AGENT</type>
<key>es.cluster.get_stats</key>
<history>0h</history>
<trends>0</trends>
<value_type>TEXT</value_type>
<authtype>BASIC</authtype>
<username>{$ELASTICSEARCH.USERNAME}</username>
<password>{$ELASTICSEARCH.PASSWORD}</password>
<description>Returns cluster statistics.</description>
<applications>
<application>
<name>Zabbix raw items</name>
</application>
</applications>
<timeout>15s</timeout>
<url>{$ELASTICSEARCH.SCHEME}://{HOST.CONN}:{$ELASTICSEARCH.PORT}/_cluster/stats</url>
</item>
<item>
<name>ES: Inactive shards percentage</name>
<type>DEPENDENT</type>
<key>es.cluster.inactive_shards_percent_as_number</key>
<delay>0</delay>
<history>7d</history>
<value_type>FLOAT</value_type>
<units>%</units>
<description>The ratio of inactive shards in the cluster expressed as a percentage.</description>
<applications>
<application>
<name>ES cluster</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.active_shards_percent_as_number</params>
</step>
<step>
<type>JAVASCRIPT</type>
<params>return (100 - value)</params>
</step>
</preprocessing>
<master_item>
<key>es.cluster.get_health</key>
</master_item>
</item>
<item>
<name>ES: Number of initializing shards</name>
<type>DEPENDENT</type>
<key>es.cluster.initializing_shards</key>
<delay>0</delay>
<history>7d</history>
<description>The number of shards that are under initialization.</description>
<applications>
<application>
<name>ES cluster</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.initializing_shards</params>
</step>
</preprocessing>
<master_item>
<key>es.cluster.get_health</key>
</master_item>
<triggers>
<trigger>
<expression>{min(10m)}>0</expression>
<name>ES: Cluster has the initializing shards</name>
<priority>AVERAGE</priority>
<description>The cluster has the initializing shards longer than 10 minutes.</description>
</trigger>
</triggers>
</item>
<item>
<name>ES: Number of data nodes</name>
<type>DEPENDENT</type>
<key>es.cluster.number_of_data_nodes</key>
<delay>0</delay>
<history>7d</history>
<description>The number of nodes that are dedicated to data nodes.</description>
<applications>
<application>
<name>ES cluster</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.number_of_data_nodes</params>
</step>
<step>
<type>DISCARD_UNCHANGED_HEARTBEAT</type>
<params>1h</params>
</step>
</preprocessing>
<master_item>
<key>es.cluster.get_health</key>
</master_item>
</item>
<item>
<name>ES: Number of nodes</name>
<type>DEPENDENT</type>
<key>es.cluster.number_of_nodes</key>
<delay>0</delay>
<history>7d</history>
<description>The number of nodes within the cluster.</description>
<applications>
<application>
<name>ES cluster</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.number_of_nodes</params>
</step>
<step>
<type>DISCARD_UNCHANGED_HEARTBEAT</type>
<params>1h</params>
</step>
</preprocessing>
<master_item>
<key>es.cluster.get_health</key>
</master_item>
<triggers>
<trigger>
<expression>{change()}<0</expression>
<name>ES: The number of nodes within the cluster has decreased</name>
<priority>INFO</priority>
<manual_close>YES</manual_close>
</trigger>
<trigger>
<expression>{change()}>0</expression>
<name>ES: The number of nodes within the cluster has increased</name>
<priority>INFO</priority>
<manual_close>YES</manual_close>
</trigger>
</triggers>
</item>
<item>
<name>ES: Number of pending tasks</name>
<type>DEPENDENT</type>
<key>es.cluster.number_of_pending_tasks</key>
<delay>0</delay>
<history>7d</history>
<description>The number of cluster-level changes that have not yet been executed.</description>
<applications>
<application>
<name>ES cluster</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.number_of_pending_tasks</params>
</step>
</preprocessing>
<master_item>
<key>es.cluster.get_health</key>
</master_item>
</item>
<item>
<name>ES: Number of relocating shards</name>
<type>DEPENDENT</type>
<key>es.cluster.relocating_shards</key>
<delay>0</delay>
<history>7d</history>
<description>The number of shards that are under relocation.</description>
<applications>
<application>
<name>ES cluster</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.relocating_shards</params>
</step>
</preprocessing>
<master_item>
<key>es.cluster.get_health</key>
</master_item>
</item>
<item>
<name>ES: Cluster health status</name>
<type>DEPENDENT</type>
<key>es.cluster.status</key>
<delay>0</delay>
<history>7d</history>
<description>Health status of the cluster, based on the state of its primary and replica shards. Statuses are:
green
All shards are assigned.
yellow
All primary shards are assigned, but one or more replica shards are unassigned. If a node in the cluster fails, some data could be unavailable until that node is repaired.
red
One or more primary shards are unassigned, so some data is unavailable. This can occur briefly during cluster startup as primary shards are assigned.</description>
<applications>
<application>
<name>ES cluster</name>
</application>
</applications>
<valuemap>
<name>ES cluster state</name>
</valuemap>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.status</params>
</step>
<step>
<type>JAVASCRIPT</type>
<params>var state = ['green', 'yellow', 'red'];
return state.indexOf(value.trim()) === -1 ? 255 : state.indexOf(value.trim());
</params>
</step>
<step>
<type>DISCARD_UNCHANGED_HEARTBEAT</type>
<params>1h</params>
</step>
</preprocessing>
<master_item>
<key>es.cluster.get_health</key>
</master_item>
<triggers>
<trigger>
<expression>{last()}=2</expression>
<name>ES: Health is RED</name>
<priority>HIGH</priority>
<description>One or more primary shards are unassigned, so some data is unavailable.
This can occur briefly during cluster startup as primary shards are assigned.</description>
</trigger>
<trigger>
<expression>{last()}=255</expression>
<name>ES: Health is UNKNOWN</name>
<priority>HIGH</priority>
<description>The health status of the cluster is unknown or cannot be obtained.</description>
</trigger>
<trigger>
<expression>{last()}=1</expression>
<name>ES: Health is YELLOW</name>
<priority>AVERAGE</priority>
<description>All primary shards are assigned, but one or more replica shards are unassigned.
If a node in the cluster fails, some data could be unavailable until that node is repaired.</description>
</trigger>
</triggers>
</item>
<item>
<name>ES: Task max waiting in queue</name>
<type>DEPENDENT</type>
<key>es.cluster.task_max_waiting_in_queue</key>
<delay>0</delay>
<history>7d</history>
<value_type>FLOAT</value_type>
<units>s</units>
<description>The time expressed in seconds since the earliest initiated task is waiting for being performed.</description>
<applications>
<application>
<name>ES cluster</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.task_max_waiting_in_queue_millis</params>
</step>
<step>
<type>MULTIPLIER</type>
<params>0.001</params>
</step>
</preprocessing>
<master_item>
<key>es.cluster.get_health</key>
</master_item>
</item>
<item>
<name>ES: Number of unassigned shards</name>
<type>DEPENDENT</type>
<key>es.cluster.unassigned_shards</key>
<delay>0</delay>
<history>7d</history>
<description>The number of shards that are not allocated.</description>
<applications>
<application>
<name>ES cluster</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.unassigned_shards</params>
</step>
</preprocessing>
<master_item>
<key>es.cluster.get_health</key>
</master_item>
<triggers>
<trigger>
<expression>{min(10m)}>0</expression>
<name>ES: Cluster has the unassigned shards</name>
<priority>AVERAGE</priority>
<description>The cluster has the unassigned shards longer than 10 minutes.</description>
</trigger>
</triggers>
</item>
<item>
<name>ES: Indices with shards assigned to nodes</name>
<type>DEPENDENT</type>
<key>es.indices.count</key>
<delay>0</delay>
<history>7d</history>
<description>The total number of indices with shards assigned to the selected nodes.</description>
<applications>
<application>
<name>ES cluster</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.indices.count</params>
</step>
<step>
<type>DISCARD_UNCHANGED_HEARTBEAT</type>
<params>1h</params>
</step>
</preprocessing>
<master_item>
<key>es.cluster.get_stats</key>
</master_item>
</item>
<item>
<name>ES: Number of non-deleted documents</name>
<type>DEPENDENT</type>
<key>es.indices.docs.count</key>
<delay>0</delay>
<history>7d</history>
<description>The total number of non-deleted documents across all primary shards assigned to the selected nodes.
This number is based on the documents in Lucene segments and may include the documents from nested fields.</description>
<applications>
<application>
<name>ES cluster</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.indices.docs.count</params>
</step>
<step>
<type>DISCARD_UNCHANGED_HEARTBEAT</type>
<params>1h</params>
</step>
</preprocessing>
<master_item>
<key>es.cluster.get_stats</key>
</master_item>
</item>
<item>
<name>ES: Nodes with the data role</name>
<type>DEPENDENT</type>
<key>es.nodes.count.data</key>
<delay>0</delay>
<history>7d</history>
<description>The number of selected nodes with the data role.</description>
<applications>
<application>
<name>ES cluster</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.nodes.count.data</params>
</step>
<step>
<type>DISCARD_UNCHANGED_HEARTBEAT</type>
<params>1h</params>
</step>
</preprocessing>
<master_item>
<key>es.cluster.get_stats</key>
</master_item>
</item>
<item>
<name>ES: Nodes with the ingest role</name>
<type>DEPENDENT</type>
<key>es.nodes.count.ingest</key>
<delay>0</delay>
<history>7d</history>
<description>The number of selected nodes with the ingest role.</description>
<applications>
<application>
<name>ES cluster</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.nodes.count.ingest</params>
</step>
<step>
<type>DISCARD_UNCHANGED_HEARTBEAT</type>
<params>1h</params>
</step>
</preprocessing>
<master_item>
<key>es.cluster.get_stats</key>
</master_item>
</item>
<item>
<name>ES: Nodes with the master role</name>
<type>DEPENDENT</type>
<key>es.nodes.count.master</key>
<delay>0</delay>
<history>7d</history>
<description>The number of selected nodes with the master role.</description>
<applications>
<application>
<name>ES cluster</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.nodes.count.master</params>
</step>
<step>
<type>DISCARD_UNCHANGED_HEARTBEAT</type>
<params>1h</params>
</step>
</preprocessing>
<master_item>
<key>es.cluster.get_stats</key>
</master_item>
<triggers>
<trigger>
<expression>{last()}=2</expression>
<name>ES: Cluster has only two master nodes</name>
<priority>DISASTER</priority>
<description>The cluster has only two nodes with a master role and will be unavailable if one of them breaks.</description>
</trigger>
</triggers>
</item>
<item>
<name>ES: Total available size to JVM in all file stores</name>
<type>DEPENDENT</type>
<key>es.nodes.fs.available_in_bytes</key>
<delay>0</delay>
<history>7d</history>
<units>B</units>
<description>The total number of bytes available to JVM in the file stores across all selected nodes.
Depending on OS or process-level restrictions, this number may be less than nodes.fs.free_in_byes.
This is the actual amount of free disk space the selected Elasticsearch nodes can use.</description>
<applications>
<application>
<name>ES cluster</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.nodes.fs.available_in_bytes</params>
</step>
<step>
<type>DISCARD_UNCHANGED_HEARTBEAT</type>
<params>1h</params>
</step>
</preprocessing>
<master_item>
<key>es.cluster.get_stats</key>
</master_item>
</item>
<item>
<name>ES: Total size of all file stores</name>
<type>DEPENDENT</type>
<key>es.nodes.fs.total_in_bytes</key>
<delay>0</delay>
<history>7d</history>
<units>B</units>
<description>The total size in bytes of all file stores across all selected nodes.</description>
<applications>
<application>
<name>ES cluster</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.nodes.fs.total_in_bytes</params>
</step>
<step>
<type>DISCARD_UNCHANGED_HEARTBEAT</type>
<params>1h</params>
</step>
</preprocessing>
<master_item>
<key>es.cluster.get_stats</key>
</master_item>
</item>
<item>
<name>ES: Get nodes stats</name>
<type>HTTP_AGENT</type>
<key>es.nodes.get_stats</key>
<history>0h</history>
<trends>0</trends>
<value_type>TEXT</value_type>
<authtype>BASIC</authtype>
<username>{$ELASTICSEARCH.USERNAME}</username>
<password>{$ELASTICSEARCH.PASSWORD}</password>
<description>Returns cluster nodes statistics.</description>
<applications>
<application>
<name>Zabbix raw items</name>
</application>
</applications>
<timeout>30s</timeout>
<url>{$ELASTICSEARCH.SCHEME}://{HOST.CONN}:{$ELASTICSEARCH.PORT}/_nodes/stats</url>
</item>
<item>
<name>ES: Cluster uptime</name>
<type>DEPENDENT</type>
<key>es.nodes.jvm.max_uptime[{#ES.NODE}]</key>
<delay>0</delay>
<history>7d</history>
<value_type>FLOAT</value_type>
<units>s</units>
<description>Uptime duration in seconds since JVM has last started.</description>
<applications>
<application>
<name>ES cluster</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.nodes.jvm.max_uptime_in_millis</params>
</step>
<step>
<type>MULTIPLIER</type>
<params>0.001</params>
</step>
</preprocessing>
<master_item>
<key>es.cluster.get_stats</key>
</master_item>
<triggers>
<trigger>
<expression>{last()}<10m</expression>
<name>ES: Cluster has been restarted (uptime < 10m)</name>
<priority>INFO</priority>
<description>Uptime is less than 10 minutes</description>
<manual_close>YES</manual_close>
</trigger>
</triggers>
</item>
<item>
<name>ES: Service response time</name>
<type>SIMPLE</type>
<key>net.tcp.service.perf["{$ELASTICSEARCH.SCHEME}","{HOST.CONN}","{$ELASTICSEARCH.PORT}"]</key>
<history>7d</history>
<value_type>FLOAT</value_type>
<units>s</units>
<description>Checks performance of the TCP service.</description>
<applications>
<application>
<name>ES cluster</name>
</application>
</applications>
<triggers>
<trigger>
<expression>{min(5m)}>{$ELASTICSEARCH.RESPONSE_TIME.MAX.WARN}</expression>
<name>ES: Service response time is too high (over {$ELASTICSEARCH.RESPONSE_TIME.MAX.WARN} for 5m)</name>
<priority>WARNING</priority>
<description>The performance of the TCP service is very low.</description>
<manual_close>YES</manual_close>
<dependencies>
<dependency>
<name>ES: Service is down</name>
<expression>{Template App Elasticsearch Cluster by HTTP:net.tcp.service["{$ELASTICSEARCH.SCHEME}","{HOST.CONN}","{$ELASTICSEARCH.PORT}"].last()}=0</expression>
</dependency>
</dependencies>
</trigger>
</triggers>
</item>
<item>
<name>ES: Service status</name>
<type>SIMPLE</type>
<key>net.tcp.service["{$ELASTICSEARCH.SCHEME}","{HOST.CONN}","{$ELASTICSEARCH.PORT}"]</key>
<history>7d</history>
<description>Checks if the service is running and accepting TCP connections.</description>
<applications>
<application>
<name>ES cluster</name>
</application>
</applications>
<valuemap>
<name>Service state</name>
</valuemap>
<preprocessing>
<step>
<type>DISCARD_UNCHANGED_HEARTBEAT</type>
<params>10m</params>
</step>
</preprocessing>
<triggers>
<trigger>
<expression>{last()}=0</expression>
<name>ES: Service is down</name>
<priority>AVERAGE</priority>
<description>The service is unavailable or does not accept TCP connections.</description>
<manual_close>YES</manual_close>
</trigger>
</triggers>
</item>
</items>
<discovery_rules>
<discovery_rule>
<name>Cluster nodes discovery</name>
<type>HTTP_AGENT</type>
<key>es.nodes.discovery</key>
<delay>1h</delay>
<authtype>BASIC</authtype>
<username>{$ELASTICSEARCH.USERNAME}</username>
<password>{$ELASTICSEARCH.PASSWORD}</password>
<description>Discovery ES cluster nodes.</description>
<item_prototypes>
<item_prototype>
<name>ES {#ES.NODE}: Total available size</name>
<type>DEPENDENT</type>
<key>es.node.fs.total.available_in_bytes[{#ES.NODE}]</key>
<delay>0</delay>
<history>7d</history>
<units>B</units>
<description>The total number of bytes available to this Java virtual machine on all file stores.
Depending on OS or process level restrictions, this might appear less than fs.total.free_in_bytes.
This is the actual amount of free disk space the Elasticsearch node can utilize.</description>
<application_prototypes>
<application_prototype>
<name>ES {#ES.NODE}</name>
</application_prototype>
</application_prototypes>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$..[?(@.name=='{#ES.NODE}')].fs.total.available_in_bytes.first()</params>
</step>
<step>
<type>DISCARD_UNCHANGED_HEARTBEAT</type>
<params>1h</params>
</step>
</preprocessing>
<master_item>
<key>es.nodes.get_stats</key>
</master_item>
</item_prototype>
<item_prototype>
<name>ES {#ES.NODE}: Total size</name>
<type>DEPENDENT</type>
<key>es.node.fs.total.total_in_bytes[{#ES.NODE}]</key>
<delay>0</delay>
<history>7d</history>
<units>B</units>
<description>Total size (in bytes) of all file stores.</description>
<application_prototypes>
<application_prototype>
<name>ES {#ES.NODE}</name>
</application_prototype>
</application_prototypes>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$..[?(@.name=='{#ES.NODE}')].fs.total.total_in_bytes.first()</params>
</step>
<step>
<type>DISCARD_UNCHANGED_HEARTBEAT</type>
<params>1d</params>
</step>
</preprocessing>
<master_item>
<key>es.nodes.get_stats</key>
</master_item>
</item_prototype>
<item_prototype>
<name>ES {#ES.NODE}: Number of open HTTP connections</name>
<type>DEPENDENT</type>
<key>es.node.http.current_open[{#ES.NODE}]</key>
<delay>0</delay>
<history>7d</history>
<description>The number of currently open HTTP connections for the node.</description>
<application_prototypes>
<application_prototype>
<name>ES {#ES.NODE}</name>
</application_prototype>
</application_prototypes>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$..[?(@.name=='{#ES.NODE}')].http.current_open.first()</params>
</step>
<step>
<type>DISCARD_UNCHANGED_HEARTBEAT</type>
<params>1h</params>
</step>
</preprocessing>
<master_item>
<key>es.nodes.get_stats</key>
</master_item>
</item_prototype>
<item_prototype>
<name>ES {#ES.NODE}: Rate of HTTP connections opened</name>
<type>DEPENDENT</type>
<key>es.node.http.opened.rate[{#ES.NODE}]</key>
<delay>0</delay>
<history>7d</history>
<value_type>FLOAT</value_type>
<units>rps</units>
<description>The number of HTTP connections opened for the node per second.</description>
<application_prototypes>
<application_prototype>
<name>ES {#ES.NODE}</name>
</application_prototype>
</application_prototypes>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$..[?(@.name=='{#ES.NODE}')].http.total_opened.first()</params>
</step>
<step>
<type>CHANGE_PER_SECOND</type>
<params/>
</step>
</preprocessing>
<master_item>
<key>es.nodes.get_stats</key>
</master_item>
</item_prototype>
<item_prototype>
<name>ES {#ES.NODE}: Flush latency</name>
<type>CALCULATED</type>
<key>es.node.indices.flush.latency[{#ES.NODE}]</key>
<history>7d</history>
<value_type>FLOAT</value_type>
<units>ms</units>
<params>last(es.node.indices.flush.total_time_in_millis[{#ES.NODE}]) / ( last(es.node.indices.flush.total[{#ES.NODE}]) + (last(es.node.indices.flush.total[{#ES.NODE}]) = 0) )</params>
<description>The average flush latency calculated from the available flush.total and flush.total_time_in_millis metrics.</description>
<application_prototypes>
<application_prototype>
<name>ES {#ES.NODE}</name>
</application_prototype>
</application_prototypes>
<trigger_prototypes>
<trigger_prototype>
<expression>{min(5m)}>{$ELASTICSEARCH.FLUSH_LATENCY.MAX.WARN}</expression>
<name>ES {#ES.NODE}: Flush latency is too high (over {$ELASTICSEARCH.FLUSH_LATENCY.MAX.WARN}ms for 5m)</name>
<priority>WARNING</priority>
<description>If you see this metric increasing steadily, it may indicate a problem with slow disks; this problem may escalate
and eventually prevent you from being able to add new information to your index.</description>
</trigger_prototype>
</trigger_prototypes>
</item_prototype>
<item_prototype>
<name>ES {#ES.NODE}: Total number of index flushes to disk</name>
<type>DEPENDENT</type>
<key>es.node.indices.flush.total[{#ES.NODE}]</key>
<delay>0</delay>
<history>7d</history>
<description>The total number of flush operations.</description>
<applications>
<application>
<name>Zabbix raw items</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$..[?(@.name=='{#ES.NODE}')].indices.flush.total.first()</params>
</step>
<step>
<type>DISCARD_UNCHANGED_HEARTBEAT</type>
<params>1h</params>
</step>
</preprocessing>
<master_item>
<key>es.nodes.get_stats</key>
</master_item>
</item_prototype>
<item_prototype>
<name>ES {#ES.NODE}: Total time spent on flushing indices to disk</name>
<type>DEPENDENT</type>
<key>es.node.indices.flush.total_time_in_millis[{#ES.NODE}]</key>
<delay>0</delay>
<history>7d</history>
<units>ms</units>
<description>Total time in milliseconds spent performing flush operations.</description>
<applications>
<application>
<name>Zabbix raw items</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$..[?(@.name=='{#ES.NODE}')].indices.flush.total_time_in_millis.first()</params>
</step>
<step>
<type>DISCARD_UNCHANGED_HEARTBEAT</type>
<params>1h</params>
</step>
</preprocessing>
<master_item>
<key>es.nodes.get_stats</key>
</master_item>
</item_prototype>
<item_prototype>
<name>ES {#ES.NODE}: Current indexing operations</name>
<type>DEPENDENT</type>
<key>es.node.indices.indexing.index_current[{#ES.NODE}]</key>
<delay>0</delay>
<history>7d</history>
<description>The number of indexing operations currently running.</description>
<application_prototypes>
<application_prototype>
<name>ES {#ES.NODE}</name>
</application_prototype>
</application_prototypes>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$..[?(@.name=='{#ES.NODE}')].indices.indexing.index_current.first()</params>
</step>
<step>
<type>DISCARD_UNCHANGED_HEARTBEAT</type>
<params>1h</params>
</step>
</preprocessing>
<master_item>
<key>es.nodes.get_stats</key>
</master_item>
</item_prototype>
<item_prototype>
<name>ES {#ES.NODE}: Indexing latency</name>
<type>CALCULATED</type>
<key>es.node.indices.indexing.index_latency[{#ES.NODE}]</key>
<history>7d</history>
<value_type>FLOAT</value_type>
<units>ms</units>
<params>last(es.node.indices.indexing.index_time_in_millis[{#ES.NODE}]) / ( last(es.node.indices.indexing.index_total[{#ES.NODE}]) + (last(es.node.indices.indexing.index_total[{#ES.NODE}]) = 0) )</params>
<description>The average indexing latency calculated from the available index_total and index_time_in_millis metrics.</description>
<application_prototypes>
<application_prototype>
<name>ES {#ES.NODE}</name>
</application_prototype>
</application_prototypes>
<trigger_prototypes>
<trigger_prototype>
<expression>{min(5m)}>{$ELASTICSEARCH.INDEXING_LATENCY.MAX.WARN}</expression>
<name>ES {#ES.NODE}: Indexing latency is too high (over {$ELASTICSEARCH.INDEXING_LATENCY.MAX.WARN}ms for 5m)</name>
<priority>WARNING</priority>
<description>If the latency is increasing, it may indicate that you are indexing too many documents at the same time (Elasticsearch’s documentation
recommends starting with a bulk indexing size of 5 to 15 megabytes and increasing slowly from there).</description>
</trigger_prototype>
</trigger_prototypes>
</item_prototype>
<item_prototype>
<name>ES {#ES.NODE}: Total time spent performing indexing</name>
<type>DEPENDENT</type>
<key>es.node.indices.indexing.index_time_in_millis[{#ES.NODE}]</key>
<delay>0</delay>
<history>7d</history>
<units>ms</units>
<description>Total time in milliseconds spent performing indexing operations.</description>
<applications>
<application>
<name>Zabbix raw items</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$..[?(@.name=='{#ES.NODE}')].indices.indexing.index_time_in_millis.first()</params>
</step>
<step>
<type>DISCARD_UNCHANGED_HEARTBEAT</type>
<params>1h</params>
</step>
</preprocessing>
<master_item>
<key>es.nodes.get_stats</key>
</master_item>
</item_prototype>
<item_prototype>
<name>ES {#ES.NODE}: Total number of indexing</name>
<type>DEPENDENT</type>
<key>es.node.indices.indexing.index_total[{#ES.NODE}]</key>
<delay>0</delay>
<history>7d</history>
<description>The total number of indexing operations.</description>
<applications>
<application>
<name>Zabbix raw items</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$..[?(@.name=='{#ES.NODE}')].indices.indexing.index_total.first()</params>
</step>
<step>
<type>DISCARD_UNCHANGED_HEARTBEAT</type>
<params>1h</params>
</step>
</preprocessing>
<master_item>
<key>es.nodes.get_stats</key>
</master_item>
</item_prototype>