@nsshunt/stsappframework 3.0.59 → 3.0.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -0
- package/dist/influxdb/influxDBManagerAgent.js +115 -126
- package/dist/influxdb/influxDBManagerAgent.js.map +1 -1
- package/dist/influxdb/influxDBManagerService.js +123 -238
- package/dist/influxdb/influxDBManagerService.js.map +1 -1
- package/package.json +1 -1
- package/src/influxdb/influxDBManagerAgent.ts +116 -127
- package/src/influxdb/influxDBManagerService.ts +123 -257
- package/types/influxdb/influxDBManagerAgent.d.ts +1 -0
- package/types/influxdb/influxDBManagerAgent.d.ts.map +1 -1
- package/types/influxdb/influxDBManagerService.d.ts +1 -0
- package/types/influxdb/influxDBManagerService.d.ts.map +1 -1
|
@@ -1,9 +1,114 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InfluxDBManagerService = void 0;
|
|
4
2
|
/* eslint @typescript-eslint/no-explicit-any: 0, @typescript-eslint/no-unused-vars: 0 */ // --> OFF
|
|
5
3
|
// https://www.influxdata.com/blog/tldr-influxdb-tech-tips-multiple-aggregations-yield-flux/
|
|
6
4
|
// https://www.influxdata.com/blog/top-5-hurdles-for-intermediate-flux-users-and-resources-for-optimizing-flux/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.InfluxDBManagerService = void 0;
|
|
7
|
+
/*
|
|
8
|
+
option task = {
|
|
9
|
+
name: "task-sts-service-stats",
|
|
10
|
+
every: 1s,
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
data =
|
|
14
|
+
from(bucket: "TestBucket01")
|
|
15
|
+
|> range(start: -5s)
|
|
16
|
+
|> last()
|
|
17
|
+
|> filter(fn: (r) => r["_measurement"] == "service" and r["_field"] != "memory")
|
|
18
|
+
|
|
19
|
+
r1 =
|
|
20
|
+
data
|
|
21
|
+
|> filter(
|
|
22
|
+
fn: (r) =>
|
|
23
|
+
r["_field"] == "requestCount" or r["_field"] == "errorCount" or r["_field"]
|
|
24
|
+
==
|
|
25
|
+
"retryCount" or r["_field"] == "authenticationCount" or r["_field"]
|
|
26
|
+
==
|
|
27
|
+
"activeRequestCount" or r["_field"] == "connectionCount" or r["_field"]
|
|
28
|
+
==
|
|
29
|
+
"connectionPoolCount" or r["_field"] == "connectionIdleCount" or r["_field"]
|
|
30
|
+
==
|
|
31
|
+
"connectionWaitingCount" or r["_field"] == "coreCount" or r["_field"] == "cpu"
|
|
32
|
+
or
|
|
33
|
+
r["_field"] == "systemcpu" or r["_field"] == "velocity" or r["_field"]
|
|
34
|
+
==
|
|
35
|
+
"timer",
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
r2 =
|
|
39
|
+
data
|
|
40
|
+
|> filter(
|
|
41
|
+
fn: (r) =>
|
|
42
|
+
float(v: r["_value"]) > 0.0 and (r["_field"] == "duration" or r["_field"]
|
|
43
|
+
==
|
|
44
|
+
"latency"),
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
serviceInstanceProcessSum =
|
|
48
|
+
r1
|
|
49
|
+
|> group(columns: ["serviceId", "serviceInstanceId", "serviceInstanceProcessId", "_field"])
|
|
50
|
+
|> sum()
|
|
51
|
+
|> toFloat()
|
|
52
|
+
|
|
53
|
+
serviceInstanceProcessMean =
|
|
54
|
+
r2
|
|
55
|
+
|> group(columns: ["serviceId", "serviceInstanceId", "serviceInstanceProcessId", "_field"])
|
|
56
|
+
|> mean()
|
|
57
|
+
|> toFloat()
|
|
58
|
+
|
|
59
|
+
union(tables: [serviceInstanceProcessSum, serviceInstanceProcessMean])
|
|
60
|
+
|> map(fn: (r) => ({r with _time: now(), _measurement: "sts-stats-by-serviceinstanceprocess"}))
|
|
61
|
+
|> to(org: "my-org", bucket: "TestBucket01")
|
|
62
|
+
|
|
63
|
+
serviceInstanceSum =
|
|
64
|
+
r1
|
|
65
|
+
|> group(columns: ["serviceId", "serviceInstanceId", "_field"])
|
|
66
|
+
|> sum()
|
|
67
|
+
|> toFloat()
|
|
68
|
+
|
|
69
|
+
serviceInstanceMean =
|
|
70
|
+
r2
|
|
71
|
+
|> group(columns: ["serviceId", "serviceInstanceId", "_field"])
|
|
72
|
+
|> mean()
|
|
73
|
+
|> toFloat()
|
|
74
|
+
|
|
75
|
+
union(tables: [serviceInstanceSum, serviceInstanceMean])
|
|
76
|
+
|> map(fn: (r) => ({r with _time: now(), _measurement: "sts-stats-by-serviceinstance"}))
|
|
77
|
+
|> to(org: "my-org", bucket: "TestBucket01")
|
|
78
|
+
|
|
79
|
+
serviceSum =
|
|
80
|
+
r1
|
|
81
|
+
|> group(columns: ["serviceId", "_field"])
|
|
82
|
+
|> sum()
|
|
83
|
+
|> toFloat()
|
|
84
|
+
|
|
85
|
+
serviceMean =
|
|
86
|
+
r2
|
|
87
|
+
|> group(columns: ["serviceId", "_field"])
|
|
88
|
+
|> mean()
|
|
89
|
+
|> toFloat()
|
|
90
|
+
|
|
91
|
+
union(tables: [serviceSum, serviceMean])
|
|
92
|
+
|> map(fn: (r) => ({r with _time: now(), _measurement: "sts-stats-by-service"}))
|
|
93
|
+
|> to(org: "my-org", bucket: "TestBucket01")
|
|
94
|
+
|
|
95
|
+
globalServiceSum =
|
|
96
|
+
r1
|
|
97
|
+
|> group(columns: ["_field"])
|
|
98
|
+
|> sum()
|
|
99
|
+
|> toFloat()
|
|
100
|
+
|
|
101
|
+
globalServiceMean =
|
|
102
|
+
r2
|
|
103
|
+
|> group(columns: ["_field"])
|
|
104
|
+
|> mean()
|
|
105
|
+
|> toFloat()
|
|
106
|
+
|
|
107
|
+
union(tables: [globalServiceSum, globalServiceMean])
|
|
108
|
+
|> map(fn: (r) => ({r with _time: now(), _measurement: "sts-stats-globalservice"}))
|
|
109
|
+
|> to(org: "my-org", bucket: "TestBucket01")
|
|
110
|
+
|
|
111
|
+
*/
|
|
7
112
|
const influxdb_client_1 = require("@influxdata/influxdb-client");
|
|
8
113
|
const stsinstrumentation_1 = require("@nsshunt/stsinstrumentation");
|
|
9
114
|
const influxDBManagerBase_1 = require("./influxDBManagerBase");
|
|
@@ -41,7 +146,7 @@ data
|
|
|
41
146
|
|> set(key: "agg_type",value: "count_temp")
|
|
42
147
|
|> to(bucket: "downsampled", org: "my-org", tagColumns: ["agg_type"])
|
|
43
148
|
*/
|
|
44
|
-
#GetSTSCountGenericService = async (measurement, filterClause,
|
|
149
|
+
#GetSTSCountGenericService = async (measurement, filterClause, showOutput = false) => {
|
|
45
150
|
try {
|
|
46
151
|
const query = `r1 = from(bucket: "${this.options.bucket}")
|
|
47
152
|
|> range(start: -5s)
|
|
@@ -63,125 +168,11 @@ data
|
|
|
63
168
|
console.error(`${_logPrefix}#GetSTSCountGeneric: Error: [${error}]`.red);
|
|
64
169
|
}
|
|
65
170
|
};
|
|
66
|
-
#GetSTSCountGenericServiceOldV3 = async (filterClause, groupClause, showOutput = false) => {
|
|
67
|
-
try {
|
|
68
|
-
const query = `data = from(bucket: "${this.options.bucket}")
|
|
69
|
-
|> range(start: -5s)
|
|
70
|
-
|> last()
|
|
71
|
-
|> filter(fn: (r) => r["_measurement"] == "service" ${filterClause})
|
|
72
|
-
|
|
73
|
-
r1 = data
|
|
74
|
-
|> filter(fn: (r) => r["_field"] != "memory")
|
|
75
|
-
|> ${groupClause}
|
|
76
|
-
|> sum()
|
|
77
|
-
|
|
78
|
-
r2 = data
|
|
79
|
-
|> filter(fn: (r) => r["_field"] == "memory")
|
|
80
|
-
|
|
81
|
-
union(tables: [r1, r2])`;
|
|
82
|
-
if (showOutput) {
|
|
83
|
-
console.log(query);
|
|
84
|
-
}
|
|
85
|
-
return this.queryApi.collectRows(query);
|
|
86
|
-
}
|
|
87
|
-
catch (error) {
|
|
88
|
-
console.error(`${_logPrefix}#GetSTSCountGeneric: Error: [${error}]`.red);
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
#GetSTSCountGenericServiceOldV2 = async (filterClause, groupClause, showOutput = false) => {
|
|
92
|
-
try {
|
|
93
|
-
const query = `data = from(bucket: "${this.options.bucket}")
|
|
94
|
-
|> range(start: -5s)
|
|
95
|
-
|> filter(fn: (r) => r["_measurement"] == "service" ${filterClause})
|
|
96
|
-
|> last()
|
|
97
|
-
|
|
98
|
-
r1 = data
|
|
99
|
-
|> filter(fn: (r) => r["_field"] == "requestCount"
|
|
100
|
-
or r["_field"] == "errorCount"
|
|
101
|
-
or r["_field"] == "retryCount"
|
|
102
|
-
or r["_field"] == "authenticationCount"
|
|
103
|
-
or r["_field"] == "activeRequestCount"
|
|
104
|
-
or r["_field"] == "connectionCount"
|
|
105
|
-
or r["_field"] == "connectionPoolCount"
|
|
106
|
-
or r["_field"] == "connectionIdleCount"
|
|
107
|
-
or r["_field"] == "connectionWaitingCount"
|
|
108
|
-
or r["_field"] == "coreCount"
|
|
109
|
-
or r["_field"] == "cpu"
|
|
110
|
-
or r["_field"] == "systemcpu"
|
|
111
|
-
or r["_field"] == "velocity"
|
|
112
|
-
or r["_field"] == "timer"
|
|
113
|
-
or r["_field"] == "duration"
|
|
114
|
-
or r["_field"] == "latency")
|
|
115
|
-
|> ${groupClause}
|
|
116
|
-
|> sum()
|
|
117
|
-
|
|
118
|
-
r2 = data
|
|
119
|
-
|> filter(fn: (r) => r["_field"] == "memory")
|
|
120
|
-
|
|
121
|
-
union(tables: [r1, r2])`;
|
|
122
|
-
if (showOutput) {
|
|
123
|
-
console.log(query);
|
|
124
|
-
}
|
|
125
|
-
return this.queryApi.collectRows(query);
|
|
126
|
-
}
|
|
127
|
-
catch (error) {
|
|
128
|
-
console.error(`${_logPrefix}#GetSTSCountGeneric: Error: [${error}]`.red);
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
// Counter metrics
|
|
132
|
-
#GetSTSCountGenericServiceOld = async (filterClause, groupClause, showOutput = false) => {
|
|
133
|
-
try {
|
|
134
|
-
const query = `dostscountex = (q, d) =>
|
|
135
|
-
from(bucket: "${this.options.bucket}")
|
|
136
|
-
|> range(start: d)
|
|
137
|
-
|> filter(fn: (r) => r["_measurement"] == "service" ${filterClause})
|
|
138
|
-
|> filter(fn: (r) => r["_field"] == q)
|
|
139
|
-
|> last()
|
|
140
|
-
|> ${groupClause}
|
|
141
|
-
|> sum()
|
|
142
|
-
|
|
143
|
-
dogetmemory = () =>
|
|
144
|
-
from(bucket: "${this.options.bucket}")
|
|
145
|
-
|> range(start: -5s)
|
|
146
|
-
|> filter(fn: (r) => r["_measurement"] == "service" ${filterClause})
|
|
147
|
-
|> filter(fn: (r) => r["_field"] == "memory")
|
|
148
|
-
|> last()
|
|
149
|
-
|
|
150
|
-
dostscount = (d) =>
|
|
151
|
-
union(tables: [
|
|
152
|
-
dostscountex(q: "requestCount", d: d),
|
|
153
|
-
dostscountex(q: "errorCount", d: d),
|
|
154
|
-
dostscountex(q: "retryCount", d: d),
|
|
155
|
-
dostscountex(q: "authenticationCount", d: d),
|
|
156
|
-
dostscountex(q: "activeRequestCount", d: d),
|
|
157
|
-
dostscountex(q: "connectionCount", d: d),
|
|
158
|
-
dostscountex(q: "connectionPoolCount", d: d),
|
|
159
|
-
dostscountex(q: "connectionIdleCount", d: d),
|
|
160
|
-
dostscountex(q: "connectionWaitingCount", d: d),
|
|
161
|
-
dostscountex(q: "coreCount", d: d),
|
|
162
|
-
dostscountex(q: "cpu", d: d),
|
|
163
|
-
dostscountex(q: "systemcpu", d: d),
|
|
164
|
-
dostscountex(q: "velocity", d: d),
|
|
165
|
-
dostscountex(q: "timer", d: d),
|
|
166
|
-
dostscountex(q: "duration", d: d),
|
|
167
|
-
dostscountex(q: "latency", d: d),
|
|
168
|
-
dogetmemory()
|
|
169
|
-
])
|
|
170
|
-
dostscount(d: -5s)`;
|
|
171
|
-
if (showOutput) {
|
|
172
|
-
console.log(query);
|
|
173
|
-
}
|
|
174
|
-
return this.queryApi.collectRows(query);
|
|
175
|
-
}
|
|
176
|
-
catch (error) {
|
|
177
|
-
console.error(`${_logPrefix}#GetSTSCountGeneric: Error: [${error}]`.red);
|
|
178
|
-
}
|
|
179
|
-
};
|
|
180
171
|
// Histo metrics
|
|
181
|
-
#GetSTSHistoGenericService = async (measurement, filterClause
|
|
172
|
+
#GetSTSHistoGenericService = async (measurement, filterClause) => {
|
|
182
173
|
try {
|
|
183
174
|
const query = `import "math"
|
|
184
|
-
from(bucket: "
|
|
175
|
+
from(bucket: "${this.options.bucket}")
|
|
185
176
|
|> range(start: -10m)
|
|
186
177
|
|> filter(fn: (r) => r["_measurement"] == "${measurement}" and (r["_field"] =="latency" or
|
|
187
178
|
r["_field"] =="duration") ${filterClause})
|
|
@@ -193,50 +184,8 @@ data
|
|
|
193
184
|
console.error(`${_logPrefix}#GetSTSHistoGeneric: Error: [${error}]`.red);
|
|
194
185
|
}
|
|
195
186
|
};
|
|
196
|
-
#GetSTSHistoGenericServiceOldV2 = async (filterClause, groupClause) => {
|
|
197
|
-
try {
|
|
198
|
-
const query = `import "math"
|
|
199
|
-
from(bucket: "TestBucket01")
|
|
200
|
-
|> range(start: -10m)
|
|
201
|
-
|> filter(fn: (r) => r["_measurement"] == "service" and (r["_field"] =="latency" or
|
|
202
|
-
r["_field"] =="duration") ${filterClause})
|
|
203
|
-
|> ${groupClause}
|
|
204
|
-
|> histogram(bins: [0.0, 10.0, 20.0, 50.0, 100.0, 1000.0, 50000.0, math.mInf(sign: 1) ])
|
|
205
|
-
|> difference()`;
|
|
206
|
-
return this.queryApi.collectRows(query);
|
|
207
|
-
}
|
|
208
|
-
catch (error) {
|
|
209
|
-
console.error(`${_logPrefix}#GetSTSHistoGeneric: Error: [${error}]`.red);
|
|
210
|
-
}
|
|
211
|
-
};
|
|
212
|
-
#GetSTSHistoGenericServiceOld = async (filterClause, groupClause) => {
|
|
213
|
-
try {
|
|
214
|
-
const query = `import "math"
|
|
215
|
-
|
|
216
|
-
dostshistoex = (q, d) =>
|
|
217
|
-
from(bucket: "${this.options.bucket}")
|
|
218
|
-
|> range(start: d)
|
|
219
|
-
|> filter(fn: (r) => r["_measurement"] == "service")
|
|
220
|
-
|> filter(fn: (r) => r["_field"] == q ${filterClause})
|
|
221
|
-
|> ${groupClause}
|
|
222
|
-
|> histogram(bins: [0.0, 10.0, 20.0, 50.0, 100.0, 1000.0, 50000.0, math.mInf(sign: 1) ])
|
|
223
|
-
|> difference()
|
|
224
|
-
|
|
225
|
-
dostshisto = (d) =>
|
|
226
|
-
union(tables: [
|
|
227
|
-
dostshistoex(q: "latency", d: d),
|
|
228
|
-
dostshistoex(q: "duration", d: d)
|
|
229
|
-
])
|
|
230
|
-
|
|
231
|
-
dostshisto(d: -10m)`;
|
|
232
|
-
return this.queryApi.collectRows(query);
|
|
233
|
-
}
|
|
234
|
-
catch (error) {
|
|
235
|
-
console.error(`${_logPrefix}#GetSTSHistoGeneric: Error: [${error}]`.red);
|
|
236
|
-
}
|
|
237
|
-
};
|
|
238
187
|
// Quantile metrics
|
|
239
|
-
#GetSTSQuantileGenericService = async (measurement, filterClause
|
|
188
|
+
#GetSTSQuantileGenericService = async (measurement, filterClause) => {
|
|
240
189
|
try {
|
|
241
190
|
const query = `data = from(bucket: "${this.options.bucket}")
|
|
242
191
|
|> range(start: -10m)
|
|
@@ -265,79 +214,15 @@ data
|
|
|
265
214
|
console.error(`${_logPrefix}#GetSTSQuantileGeneric: Error: [${error}]`.red);
|
|
266
215
|
}
|
|
267
216
|
};
|
|
268
|
-
#GetSTSQuantileGenericServiceOldV2 = async (filterClause, groupClause) => {
|
|
269
|
-
try {
|
|
270
|
-
const query = `data = from(bucket: "${this.options.bucket}")
|
|
271
|
-
|> range(start: -10m)
|
|
272
|
-
|> filter(fn: (r) => r["_measurement"] == "service" and (r["_field"] == "latency" or
|
|
273
|
-
r["_field"] == "duration" or
|
|
274
|
-
r["_field"] == "cpu" or
|
|
275
|
-
r["_field"] == "systemcpu") ${filterClause})
|
|
276
|
-
|> ${groupClause}
|
|
277
|
-
|> aggregateWindow(every: 5s, fn: max, createEmpty: false)
|
|
278
|
-
|
|
279
|
-
dostsquantileex = (q) =>
|
|
280
|
-
data
|
|
281
|
-
|> quantile(q: q, method: "estimate_tdigest", compression: 1000.0)
|
|
282
|
-
|> set(key: "quantile", value: string(v:q))
|
|
283
|
-
|> group(columns: ["quantile"])
|
|
284
|
-
|
|
285
|
-
union(tables: [
|
|
286
|
-
dostsquantileex(q: 0.5),
|
|
287
|
-
dostsquantileex(q: 0.8),
|
|
288
|
-
dostsquantileex(q: 0.9),
|
|
289
|
-
dostsquantileex(q: 0.95),
|
|
290
|
-
dostsquantileex(q: 0.99)
|
|
291
|
-
])`;
|
|
292
|
-
return this.queryApi.collectRows(query);
|
|
293
|
-
}
|
|
294
|
-
catch (error) {
|
|
295
|
-
console.error(`${_logPrefix}#GetSTSQuantileGeneric: Error: [${error}]`.red);
|
|
296
|
-
}
|
|
297
|
-
};
|
|
298
|
-
#GetSTSQuantileGenericServiceOld = async (filterClause, groupClause) => {
|
|
299
|
-
try {
|
|
300
|
-
const query = `dostsquantileex = (q, d, i, f) =>
|
|
301
|
-
from(bucket: "${this.options.bucket}")
|
|
302
|
-
|> range(start: d)
|
|
303
|
-
|> filter(fn: (r) => r["_measurement"] == "service")
|
|
304
|
-
|> filter(fn: (r) => r["_field"] == f ${filterClause})
|
|
305
|
-
|> ${groupClause}
|
|
306
|
-
|> aggregateWindow(every: i, fn: max, createEmpty: false)
|
|
307
|
-
|> quantile(q: q, method: "estimate_tdigest", compression: 1000.0)
|
|
308
|
-
|> set(key: "quantile", value: string(v:q))
|
|
309
|
-
|> group(columns: ["LatencyType","quantile"])
|
|
310
|
-
|
|
311
|
-
dostsquantile = (d, i, f) =>
|
|
312
|
-
union(tables: [
|
|
313
|
-
dostsquantileex(q: 0.5, d: d, i: i, f: f),
|
|
314
|
-
dostsquantileex(q: 0.8, d: d, i: i, f: f),
|
|
315
|
-
dostsquantileex(q: 0.9, d: d, i: i, f: f),
|
|
316
|
-
dostsquantileex(q: 0.95, d: d, i: i, f: f),
|
|
317
|
-
dostsquantileex(q: 0.99, d: d, i: i, f: f)
|
|
318
|
-
])
|
|
319
|
-
|
|
320
|
-
union(tables: [
|
|
321
|
-
dostsquantile(d: -10m, i: 5s, f: "latency"),
|
|
322
|
-
dostsquantile(d: -10m, i: 5s, f: "duration")
|
|
323
|
-
dostsquantile(d: -10m, i: 5s, f: "cpu")
|
|
324
|
-
dostsquantile(d: -10m, i: 5s, f: "systemcpu")
|
|
325
|
-
])`;
|
|
326
|
-
return this.queryApi.collectRows(query);
|
|
327
|
-
}
|
|
328
|
-
catch (error) {
|
|
329
|
-
console.error(`${_logPrefix}#GetSTSQuantileGeneric: Error: [${error}]`.red);
|
|
330
|
-
}
|
|
331
|
-
};
|
|
332
217
|
// Metric queries -------------------------------------------------------------------------------------------------
|
|
333
218
|
// Root level metrics
|
|
334
219
|
async GetInfluxDBResultsRootService(subscriptionKey) {
|
|
335
220
|
let retVal = null;
|
|
336
221
|
try {
|
|
337
222
|
retVal = await this.ProcessInfluxDBResults([
|
|
338
|
-
this.#GetSTSCountGenericService(SERVICE_STATS_GLOBAL, ''
|
|
339
|
-
this.#GetSTSQuantileGenericService(SERVICE_STATS_GLOBAL, ''
|
|
340
|
-
this.#GetSTSHistoGenericService(SERVICE_STATS_GLOBAL, ''
|
|
223
|
+
this.#GetSTSCountGenericService(SERVICE_STATS_GLOBAL, ''),
|
|
224
|
+
this.#GetSTSQuantileGenericService(SERVICE_STATS_GLOBAL, ''),
|
|
225
|
+
this.#GetSTSHistoGenericService(SERVICE_STATS_GLOBAL, '')
|
|
341
226
|
], []);
|
|
342
227
|
}
|
|
343
228
|
catch (error) {
|
|
@@ -353,9 +238,9 @@ data
|
|
|
353
238
|
let retVal = null;
|
|
354
239
|
try {
|
|
355
240
|
retVal = await this.ProcessInfluxDBResults([
|
|
356
|
-
this.#GetSTSCountGenericService(SERVICE_STATS_BY_SERVICE, ''
|
|
357
|
-
this.#GetSTSQuantileGenericService(SERVICE_STATS_BY_SERVICE, ''
|
|
358
|
-
this.#GetSTSHistoGenericService(SERVICE_STATS_BY_SERVICE, ''
|
|
241
|
+
this.#GetSTSCountGenericService(SERVICE_STATS_BY_SERVICE, ''),
|
|
242
|
+
this.#GetSTSQuantileGenericService(SERVICE_STATS_BY_SERVICE, ''),
|
|
243
|
+
this.#GetSTSHistoGenericService(SERVICE_STATS_BY_SERVICE, '')
|
|
359
244
|
], ['serviceId']);
|
|
360
245
|
}
|
|
361
246
|
catch (error) {
|
|
@@ -372,9 +257,9 @@ data
|
|
|
372
257
|
try {
|
|
373
258
|
const serviceId = subscriptionKey.key;
|
|
374
259
|
retVal = await this.ProcessInfluxDBResults([
|
|
375
|
-
this.#GetSTSCountGenericService(SERVICE_STATS_BY_SERVICE_INSTANCE, `and r["serviceId"] == "${serviceId}"
|
|
376
|
-
this.#GetSTSQuantileGenericService(SERVICE_STATS_BY_SERVICE_INSTANCE, `and r["serviceId"] == "${serviceId}"
|
|
377
|
-
this.#GetSTSHistoGenericService(SERVICE_STATS_BY_SERVICE_INSTANCE, `and r["serviceId"] == "${serviceId}"
|
|
260
|
+
this.#GetSTSCountGenericService(SERVICE_STATS_BY_SERVICE_INSTANCE, `and r["serviceId"] == "${serviceId}"`),
|
|
261
|
+
this.#GetSTSQuantileGenericService(SERVICE_STATS_BY_SERVICE_INSTANCE, `and r["serviceId"] == "${serviceId}"`),
|
|
262
|
+
this.#GetSTSHistoGenericService(SERVICE_STATS_BY_SERVICE_INSTANCE, `and r["serviceId"] == "${serviceId}"`)
|
|
378
263
|
], ['serviceId', 'serviceInstanceId']);
|
|
379
264
|
}
|
|
380
265
|
catch (error) {
|
|
@@ -391,9 +276,9 @@ data
|
|
|
391
276
|
try {
|
|
392
277
|
const serviceInstanceId = subscriptionKey.key;
|
|
393
278
|
retVal = await this.ProcessInfluxDBResults([
|
|
394
|
-
this.#GetSTSCountGenericService(SERVICE_STATS_BY_SERVICE_INSTANCE_PROCESS, `and r["serviceInstanceId"] == "${serviceInstanceId}"
|
|
395
|
-
this.#GetSTSQuantileGenericService(SERVICE_STATS_BY_SERVICE_INSTANCE_PROCESS, `and r["serviceInstanceId"] == "${serviceInstanceId}"
|
|
396
|
-
this.#GetSTSHistoGenericService(SERVICE_STATS_BY_SERVICE_INSTANCE_PROCESS, `and r["serviceInstanceId"] == "${serviceInstanceId}"
|
|
279
|
+
this.#GetSTSCountGenericService(SERVICE_STATS_BY_SERVICE_INSTANCE_PROCESS, `and r["serviceInstanceId"] == "${serviceInstanceId}"`),
|
|
280
|
+
this.#GetSTSQuantileGenericService(SERVICE_STATS_BY_SERVICE_INSTANCE_PROCESS, `and r["serviceInstanceId"] == "${serviceInstanceId}"`),
|
|
281
|
+
this.#GetSTSHistoGenericService(SERVICE_STATS_BY_SERVICE_INSTANCE_PROCESS, `and r["serviceInstanceId"] == "${serviceInstanceId}"`)
|
|
397
282
|
], ['serviceId', 'serviceInstanceId', 'serviceInstanceProcessId']);
|
|
398
283
|
}
|
|
399
284
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"influxDBManagerService.js","sourceRoot":"","sources":["../../src/influxdb/influxDBManagerService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"influxDBManagerService.js","sourceRoot":"","sources":["../../src/influxdb/influxDBManagerService.ts"],"names":[],"mappings":";AAAA,wFAAwF,CAAE,UAAU;AACpG,4FAA4F;AAC5F,+GAA+G;;;AAE/G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwGE;AAEF,iEAAuE;AAEvE,oEAAuE;AAEvE,+DAA2D;AAK3D,MAAM,UAAU,GAAG,yBAAyB,CAAA;AAE5C;;;;;EAKE;AAEF,MAAM,yCAAyC,GAAG,qCAAqC,CAAC;AACxF,MAAM,iCAAiC,GAAG,8BAA8B,CAAC;AACzE,MAAM,wBAAwB,GAAG,sBAAsB,CAA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