@@ -3,113 +3,9 @@ local prometheusQuery = g.query.prometheus;
3
3
4
4
local variables = import './variables.libsonnet' ;
5
5
6
- {
7
- /*
8
- General overview queries
9
- */
10
-
11
- runningNodes:
12
- prometheusQuery.new(
13
- '$' + variables.datasource.name,
14
- |||
15
- sum(
16
- elasticsearch_cluster_health_number_of_nodes{cluster=~"$cluster"}
17
- )
18
- |||
19
- ),
20
- dataNodes:
21
- prometheusQuery.new(
22
- '$' + variables.datasource.name,
23
- |||
24
- sum(
25
- elasticsearch_cluster_health_number_of_data_nodes{cluster=~"$cluster"}
26
- )
27
- |||
28
- ),
29
-
30
- pendingTasks:
31
- prometheusQuery.new(
32
- '$' + variables.datasource.name,
33
- |||
34
- sum(
35
- elasticsearch_cluster_health_number_of_pending_tasks{cluster=~"$cluster"}
36
- )
37
- |||
38
- ),
39
-
40
- /*
41
- Shard queries
42
- */
43
-
44
- activeShards:
45
- prometheusQuery.new(
46
- '$' + variables.datasource.name,
47
- |||
48
- sum(
49
- elasticsearch_cluster_health_active_shards{cluster=~"$cluster"}
50
- )
51
- |||
52
- ),
53
-
54
- activePrimaryShards:
55
- prometheusQuery.new(
56
- '$' + variables.datasource.name,
57
- |||
58
- sum(
59
- elasticsearch_cluster_health_active_primary_shards{cluster=~"$cluster"}
60
- )
61
- |||
62
- ),
63
-
64
- initializingShards:
65
- prometheusQuery.new(
66
- '$' + variables.datasource.name,
67
- |||
68
- sum(
69
- elasticsearch_cluster_health_initializing_shards{cluster=~"$cluster"}
70
- )
71
- |||
72
- ),
73
-
74
- reloactingShards:
75
- prometheusQuery.new(
76
- '$' + variables.datasource.name,
77
- |||
78
- sum(
79
- elasticsearch_cluster_health_reloacting_shards{cluster=~"$cluster"}
80
- )
81
- |||
82
- ),
83
-
84
- unassignedShards:
85
- prometheusQuery.new(
86
- '$' + variables.datasource.name,
87
- |||
88
- sum(
89
- elasticsearch_cluster_health_unassigned_shards{cluster=~"$cluster"}
90
- )
91
- |||
92
- ),
93
-
94
- delayedUnassignedShards:
95
- prometheusQuery.new(
96
- '$' + variables.datasource.name,
97
- |||
98
- sum(
99
- elasticsearch_cluster_health_delayed_unassigned_shards{cluster=~"$cluster"}
100
- )
101
- |||
102
- ),
103
-
104
- /*
105
- Documents queries
106
- */
107
-
108
- indexedDocuments:
109
- prometheusQuery.new(
110
- '$' + variables.datasource.name,
111
- |||
112
- elasticsearch_indices_docs{cluster=~"$cluster"}
113
- |||
114
- ),
115
- }
6
+ (import './queries/general.libsonnet' ) +
7
+ (import './queries/shard.libsonnet' ) +
8
+ (import './queries/document.libsonnet' ) +
9
+ (import './queries/memory.libsonnet' ) +
10
+ (import './queries/threads.libsonnet' ) +
11
+ (import './queries/network.libsonnet' )
0 commit comments