@dx-do/client 7.8.0 → 7.10.0
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/dist/index.cjs.js +1190 -92
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1148 -93
- package/dist/index.esm.js.map +1 -1
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/lib/model/config/DXDoConfiguration.d.ts +8 -0
- package/dist/src/lib/model/config/DXDoConfiguration.d.ts.map +1 -1
- package/dist/src/lib/model/datastore/tas/store.d.ts +114 -129
- package/dist/src/lib/model/datastore/tas/store.d.ts.map +1 -1
- package/dist/src/lib/model/log/ingest.d.ts +13 -0
- package/dist/src/lib/model/log/ingest.d.ts.map +1 -1
- package/dist/src/lib/model/nass/NASS.d.ts +4 -2
- package/dist/src/lib/model/nass/NASS.d.ts.map +1 -1
- package/dist/src/lib/model/oi/services.create.d.ts +19 -0
- package/dist/src/lib/model/oi/services.create.d.ts.map +1 -1
- package/dist/src/lib/model/oi/services.transform.d.ts +20 -1
- package/dist/src/lib/model/oi/services.transform.d.ts.map +1 -1
- package/dist/src/lib/model/service/service-overview.d.ts +2 -0
- package/dist/src/lib/model/service/service-overview.d.ts.map +1 -1
- package/dist/src/lib/model/situations/clustering-policy.d.ts +492 -0
- package/dist/src/lib/model/situations/clustering-policy.d.ts.map +1 -0
- package/dist/src/lib/model/tas/TASGraph.d.ts +7 -3
- package/dist/src/lib/model/tas/TASGraph.d.ts.map +1 -1
- package/dist/src/lib/services/alarm.service.d.ts +11 -1
- package/dist/src/lib/services/alarm.service.d.ts.map +1 -1
- package/dist/src/lib/services/clustering-policy.service.d.ts +159 -0
- package/dist/src/lib/services/clustering-policy.service.d.ts.map +1 -0
- package/dist/src/lib/services/datastore/datastore-metrics-metadata.service.d.ts +6 -3
- package/dist/src/lib/services/datastore/datastore-metrics-metadata.service.d.ts.map +1 -1
- package/dist/src/lib/services/datastore/datastore-nass.service.d.ts +6 -2
- package/dist/src/lib/services/datastore/datastore-nass.service.d.ts.map +1 -1
- package/dist/src/lib/services/datastore/datastore-tas.service.d.ts +8 -5
- package/dist/src/lib/services/datastore/datastore-tas.service.d.ts.map +1 -1
- package/dist/src/lib/services/dx-saas.service.d.ts +16 -7
- package/dist/src/lib/services/dx-saas.service.d.ts.map +1 -1
- package/dist/src/lib/services/event.service.d.ts +10 -1
- package/dist/src/lib/services/event.service.d.ts.map +1 -1
- package/dist/src/lib/services/logs.service.d.ts +40 -0
- package/dist/src/lib/services/logs.service.d.ts.map +1 -1
- package/dist/src/lib/services/service-monolith.d.ts +2 -0
- package/dist/src/lib/services/service-monolith.d.ts.map +1 -1
- package/dist/src/lib/services/service.service.d.ts +24 -2
- package/dist/src/lib/services/service.service.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -39939,7 +39939,7 @@ var EXP_LIMIT = 9e15, // 0 to 9e15
|
|
|
39939
39939
|
isOctal = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,
|
|
39940
39940
|
isDecimal = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,
|
|
39941
39941
|
|
|
39942
|
-
BASE = 1e7,
|
|
39942
|
+
BASE$1 = 1e7,
|
|
39943
39943
|
LOG_BASE = 7,
|
|
39944
39944
|
MAX_SAFE_INTEGER$2 = 9007199254740991,
|
|
39945
39945
|
|
|
@@ -41210,9 +41210,9 @@ P$2.minus = P$2.sub = function (y) {
|
|
|
41210
41210
|
for (i = yd.length; i > k;) {
|
|
41211
41211
|
|
|
41212
41212
|
if (xd[--i] < yd[i]) {
|
|
41213
|
-
for (j = i; j && xd[--j] === 0;) xd[j] = BASE - 1;
|
|
41213
|
+
for (j = i; j && xd[--j] === 0;) xd[j] = BASE$1 - 1;
|
|
41214
41214
|
--xd[j];
|
|
41215
|
-
xd[i] += BASE;
|
|
41215
|
+
xd[i] += BASE$1;
|
|
41216
41216
|
}
|
|
41217
41217
|
|
|
41218
41218
|
xd[i] -= yd[i];
|
|
@@ -41441,8 +41441,8 @@ P$2.plus = P$2.add = function (y) {
|
|
|
41441
41441
|
|
|
41442
41442
|
// Only start adding at yd.length - 1 as the further digits of xd can be left as they are.
|
|
41443
41443
|
for (carry = 0; i;) {
|
|
41444
|
-
carry = (xd[--i] = xd[i] + yd[i] + carry) / BASE | 0;
|
|
41445
|
-
xd[i] %= BASE;
|
|
41444
|
+
carry = (xd[--i] = xd[i] + yd[i] + carry) / BASE$1 | 0;
|
|
41445
|
+
xd[i] %= BASE$1;
|
|
41446
41446
|
}
|
|
41447
41447
|
|
|
41448
41448
|
if (carry) {
|
|
@@ -41740,11 +41740,11 @@ P$2.times = P$2.mul = function (y) {
|
|
|
41740
41740
|
carry = 0;
|
|
41741
41741
|
for (k = xdL + i; k > i;) {
|
|
41742
41742
|
t = r[k] + yd[i] * xd[k - i - 1] + carry;
|
|
41743
|
-
r[k--] = t % BASE | 0;
|
|
41744
|
-
carry = t / BASE | 0;
|
|
41743
|
+
r[k--] = t % BASE$1 | 0;
|
|
41744
|
+
carry = t / BASE$1 | 0;
|
|
41745
41745
|
}
|
|
41746
41746
|
|
|
41747
|
-
r[k] = (r[k] + carry) % BASE | 0;
|
|
41747
|
+
r[k] = (r[k] + carry) % BASE$1 | 0;
|
|
41748
41748
|
}
|
|
41749
41749
|
|
|
41750
41750
|
// Remove trailing zeros.
|
|
@@ -42570,7 +42570,7 @@ var divide$1 = (function () {
|
|
|
42570
42570
|
logBase = 1;
|
|
42571
42571
|
e = x.e - y.e;
|
|
42572
42572
|
} else {
|
|
42573
|
-
base = BASE;
|
|
42573
|
+
base = BASE$1;
|
|
42574
42574
|
logBase = LOG_BASE;
|
|
42575
42575
|
e = mathfloor(x.e / logBase) - mathfloor(y.e / logBase);
|
|
42576
42576
|
}
|
|
@@ -42893,13 +42893,13 @@ var divide$1 = (function () {
|
|
|
42893
42893
|
// if i != k the length has increased.
|
|
42894
42894
|
if (i != k) {
|
|
42895
42895
|
x.e++;
|
|
42896
|
-
if (xd[0] == BASE) xd[0] = 1;
|
|
42896
|
+
if (xd[0] == BASE$1) xd[0] = 1;
|
|
42897
42897
|
}
|
|
42898
42898
|
|
|
42899
42899
|
break;
|
|
42900
42900
|
} else {
|
|
42901
42901
|
xd[xdi] += k;
|
|
42902
|
-
if (xd[xdi] != BASE) break;
|
|
42902
|
+
if (xd[xdi] != BASE$1) break;
|
|
42903
42903
|
xd[xdi--] = 0;
|
|
42904
42904
|
k = 1;
|
|
42905
42905
|
}
|
|
@@ -43475,7 +43475,7 @@ function parseOther(x, str) {
|
|
|
43475
43475
|
divisor = intPow(Ctor, new Ctor(base), i, i * 2);
|
|
43476
43476
|
}
|
|
43477
43477
|
|
|
43478
|
-
xd = convertBase(str, base, BASE);
|
|
43478
|
+
xd = convertBase(str, base, BASE$1);
|
|
43479
43479
|
xe = xd.length - 1;
|
|
43480
43480
|
|
|
43481
43481
|
// Remove trailing zeros.
|
|
@@ -49397,29 +49397,114 @@ const TasGraphSchema = v4.z.looseObject({
|
|
|
49397
49397
|
totalEdges: v4.z.number().optional(),
|
|
49398
49398
|
});
|
|
49399
49399
|
|
|
49400
|
+
/**
|
|
49401
|
+
* Attribute value the TAS write interface accepts: a string or a list of
|
|
49402
|
+
* strings (`docs/data-store-doc/tas-rest.html`, "Write Interface").
|
|
49403
|
+
*/
|
|
49404
|
+
const TasStoreAttributeValueSchema = v4.z
|
|
49405
|
+
.union([v4.z.string(), v4.z.array(v4.z.string())])
|
|
49406
|
+
.describe('Attribute value: a string or an array of strings');
|
|
49407
|
+
/**
|
|
49408
|
+
* Request-side vertex for `POST /tas/graph/store`.
|
|
49409
|
+
*
|
|
49410
|
+
* Ingestion identifies a vertex by `externalId` only — a vertex being created
|
|
49411
|
+
* has no numeric id yet (`docs/data-store-doc/tas-index.html` §2.2, "ingestion
|
|
49412
|
+
* tasks should use external ID only") — so this deliberately differs from the
|
|
49413
|
+
* response-side `TasVertexSchema`, which requires `id`.
|
|
49414
|
+
*/
|
|
49415
|
+
const TasStoreVertexSchema = v4.z.looseObject({
|
|
49416
|
+
externalId: TasExternalIdSchema.describe('Ingestion identity of the vertex (`<LAYER>:<TYPE>:…`); the only id a producer supplies'),
|
|
49417
|
+
id: v4.z
|
|
49418
|
+
.number()
|
|
49419
|
+
.optional()
|
|
49420
|
+
.describe('Numeric id; only meaningful when updating a vertex the platform already holds'),
|
|
49421
|
+
startTime: v4.z.number().optional().describe('Epoch milliseconds'),
|
|
49422
|
+
endTime: v4.z.number().optional().describe('Epoch milliseconds'),
|
|
49423
|
+
attributes: v4.z
|
|
49424
|
+
.object({
|
|
49425
|
+
name: v4.z.string().describe('Display name — required by the platform'),
|
|
49426
|
+
type: v4.z
|
|
49427
|
+
.string()
|
|
49428
|
+
.describe('Vertex type, e.g. AGENT or ACTIVEMQ_DESTINATION — required by the platform'),
|
|
49429
|
+
})
|
|
49430
|
+
.catchall(TasStoreAttributeValueSchema)
|
|
49431
|
+
.describe('Complete attribute set. A GATHERED store replaces the previous attribute set wholesale, so always send every attribute'),
|
|
49432
|
+
attributesType: v4.z
|
|
49433
|
+
.record(v4.z.string(), TasAttributeTypeSchema)
|
|
49434
|
+
.optional()
|
|
49435
|
+
.describe('Per-attribute store type override (GATHERED, CUSTOM, DECORATED, HIDDEN)'),
|
|
49436
|
+
});
|
|
49437
|
+
/**
|
|
49438
|
+
* Request-side edge for `POST /tas/graph/store`: endpoints are named by
|
|
49439
|
+
* `externalId`; numeric ids are optional and only apply to edges between
|
|
49440
|
+
* vertices the platform already holds. The platform silently drops an edge
|
|
49441
|
+
* whose endpoint vertex does not exist.
|
|
49442
|
+
*/
|
|
49443
|
+
const TasStoreEdgeSchema = v4.z.looseObject({
|
|
49444
|
+
sourceExternalId: TasExternalIdSchema.describe('externalId of the source (parent) vertex'),
|
|
49445
|
+
targetExternalId: TasExternalIdSchema.describe('externalId of the target (child) vertex'),
|
|
49446
|
+
flowExternalId: TasExternalIdSchema.optional().describe('externalId of the flow vertex, when the edge belongs to a flow'),
|
|
49447
|
+
wireExternalId: TasExternalIdSchema.optional().describe('externalId of the wire vertex, when the edge belongs to a wire'),
|
|
49448
|
+
sourceId: v4.z.number().optional().describe('Numeric id of the source vertex (existing vertices only)'),
|
|
49449
|
+
targetId: v4.z.number().optional().describe('Numeric id of the target vertex (existing vertices only)'),
|
|
49450
|
+
flowId: v4.z.number().optional().describe('Numeric id of the flow vertex'),
|
|
49451
|
+
wireId: v4.z.number().optional().describe('Numeric id of the wire vertex'),
|
|
49452
|
+
startTime: v4.z.number().optional().describe('Epoch milliseconds'),
|
|
49453
|
+
endTime: v4.z.number().optional().describe('Epoch milliseconds'),
|
|
49454
|
+
attributes: v4.z
|
|
49455
|
+
.record(v4.z.string(), TasStoreAttributeValueSchema)
|
|
49456
|
+
.optional()
|
|
49457
|
+
.describe('Edge attributes (e.g. `semantic`)'),
|
|
49458
|
+
attributesType: v4.z
|
|
49459
|
+
.record(v4.z.string(), TasAttributeTypeSchema)
|
|
49460
|
+
.optional()
|
|
49461
|
+
.describe('Per-attribute store type override'),
|
|
49462
|
+
});
|
|
49463
|
+
/** The graph body of a store request: externalId-keyed vertices and edges. */
|
|
49464
|
+
const TasStoreGraphSchema = v4.z.looseObject({
|
|
49465
|
+
vertices: v4.z.array(TasStoreVertexSchema).optional().describe('Vertices to create or update'),
|
|
49466
|
+
edges: v4.z.array(TasStoreEdgeSchema).optional().describe('Edges to create or update'),
|
|
49467
|
+
});
|
|
49400
49468
|
const TasStoreGraphInputSchema = v4.z.looseObject({
|
|
49401
|
-
includeSuccessResult: v4.z
|
|
49402
|
-
|
|
49403
|
-
|
|
49404
|
-
|
|
49405
|
-
|
|
49469
|
+
includeSuccessResult: v4.z
|
|
49470
|
+
.boolean()
|
|
49471
|
+
.optional()
|
|
49472
|
+
.describe('Echo the stored graph back in the response'),
|
|
49473
|
+
ttl: v4.z
|
|
49474
|
+
.number()
|
|
49475
|
+
.optional()
|
|
49476
|
+
.describe('Time to live in milliseconds for every vertex in this request; omitted = the platform default (24 h). One ttl per request'),
|
|
49477
|
+
endTimeAllowedThreshold: v4.z.number().optional().describe('Platform option; see tas-rest.html'),
|
|
49478
|
+
storeType: TasAttributeTypeSchema.optional().describe('Attribute store type for the whole request (default GATHERED)'),
|
|
49479
|
+
graph: TasStoreGraphSchema,
|
|
49406
49480
|
});
|
|
49407
49481
|
const TasStoreChangeSchema = v4.z.looseObject({
|
|
49408
49482
|
changeType: v4.z.string().optional(),
|
|
49409
49483
|
id: v4.z.unknown().optional(),
|
|
49410
49484
|
});
|
|
49485
|
+
/**
|
|
49486
|
+
* A vertex or edge the platform refused, echoed back as it was sent (so it
|
|
49487
|
+
* carries the request-side externalId shape, not a numeric id).
|
|
49488
|
+
*/
|
|
49489
|
+
const TasStoreFailedObjectSchema = v4.z.looseObject({
|
|
49490
|
+
externalId: TasExternalIdSchema.optional(),
|
|
49491
|
+
sourceExternalId: TasExternalIdSchema.optional(),
|
|
49492
|
+
targetExternalId: TasExternalIdSchema.optional(),
|
|
49493
|
+
id: v4.z.number().optional(),
|
|
49494
|
+
attributes: v4.z.record(v4.z.string(), v4.z.unknown()).optional(),
|
|
49495
|
+
});
|
|
49411
49496
|
const TasStoreGraphResponseSchema = v4.z.looseObject({
|
|
49412
49497
|
graph: TasGraphSchema.optional(),
|
|
49413
49498
|
failedVertices: v4.z
|
|
49414
49499
|
.array(v4.z.looseObject({
|
|
49415
|
-
object:
|
|
49500
|
+
object: TasStoreFailedObjectSchema,
|
|
49416
49501
|
code: v4.z.string().optional(),
|
|
49417
49502
|
message: v4.z.string().optional(),
|
|
49418
49503
|
}))
|
|
49419
49504
|
.optional(),
|
|
49420
49505
|
failedEdges: v4.z
|
|
49421
49506
|
.array(v4.z.looseObject({
|
|
49422
|
-
object:
|
|
49507
|
+
object: TasStoreFailedObjectSchema,
|
|
49423
49508
|
code: v4.z.string().optional(),
|
|
49424
49509
|
message: v4.z.string().optional(),
|
|
49425
49510
|
}))
|
|
@@ -60106,6 +60191,24 @@ exports.LogIngest = void 0;
|
|
|
60106
60191
|
return LogIngest.RESERVED_ADDITIONAL_FIELDS.includes(name.toLowerCase());
|
|
60107
60192
|
}
|
|
60108
60193
|
LogIngest.isReservedLogField = isReservedLogField;
|
|
60194
|
+
/**
|
|
60195
|
+
* Thrown by `DxSaasService.resolveLogIngestionURL` when no log gateway can
|
|
60196
|
+
* be determined. `definitive` is true when the profile itself rules an
|
|
60197
|
+
* endpoint out (unparseable or on-premise gateway, Log Analytics absent or
|
|
60198
|
+
* not provisioned) and false when only the products lookup failed — a
|
|
60199
|
+
* producer keeps shipping off for the process in the first case and retries
|
|
60200
|
+
* later in the second. The message names the reason and how to set
|
|
60201
|
+
* `dxLogIngestionURL`.
|
|
60202
|
+
*/
|
|
60203
|
+
class LogIngestionEndpointError extends Error {
|
|
60204
|
+
definitive;
|
|
60205
|
+
constructor(message, definitive) {
|
|
60206
|
+
super(message);
|
|
60207
|
+
this.definitive = definitive;
|
|
60208
|
+
this.name = 'LogIngestionEndpointError';
|
|
60209
|
+
}
|
|
60210
|
+
}
|
|
60211
|
+
LogIngest.LogIngestionEndpointError = LogIngestionEndpointError;
|
|
60109
60212
|
LogIngest.LogIngestOptionsSchema = v4.z.looseObject({
|
|
60110
60213
|
logtype: v4.z
|
|
60111
60214
|
.string()
|
|
@@ -60140,7 +60243,7 @@ exports.LogIngest = void 0;
|
|
|
60140
60243
|
file: v4.z
|
|
60141
60244
|
.string()
|
|
60142
60245
|
.optional()
|
|
60143
|
-
.describe('Source file label (default: `"dx-do.cli"`)'),
|
|
60246
|
+
.describe('Source file label, typically a logger name (default: `"dx-do.cli"`). A value without a dot gets `.log` appended: the platform only parses a dotted source file, and an undotted one corrupts the stored `message`, `file` and `tags` (#620).'),
|
|
60144
60247
|
ip: v4.z
|
|
60145
60248
|
.string()
|
|
60146
60249
|
.optional()
|
|
@@ -60620,6 +60723,12 @@ exports.OIAlarm = void 0;
|
|
|
60620
60723
|
};
|
|
60621
60724
|
})(exports.OIAlarm || (exports.OIAlarm = {}));
|
|
60622
60725
|
|
|
60726
|
+
exports.CreateServices = void 0;
|
|
60727
|
+
(function (CreateServices) {
|
|
60728
|
+
/** The service kinds the platform recognises, in wire casing (`servicerepo/filters` catalog). */
|
|
60729
|
+
CreateServices.SERVICE_TYPES = ['Service', 'Application', 'Group'];
|
|
60730
|
+
})(exports.CreateServices || (exports.CreateServices = {}));
|
|
60731
|
+
|
|
60623
60732
|
/**
|
|
60624
60733
|
* The `service export` / `service export-hierarchy` file format and the
|
|
60625
60734
|
* `service import` boundary validator.
|
|
@@ -60700,6 +60809,7 @@ exports.ServiceTransform = void 0;
|
|
|
60700
60809
|
attributes: {
|
|
60701
60810
|
type: 'saService',
|
|
60702
60811
|
name: a.name,
|
|
60812
|
+
serviceType: normalizeServiceType(a.serviceType),
|
|
60703
60813
|
state: 'ACTIVE',
|
|
60704
60814
|
maintenance: a.maintenance ?? false,
|
|
60705
60815
|
situationsIncludeChildServices: a.situationsIncludeChildServices ?? false,
|
|
@@ -60715,6 +60825,80 @@ exports.ServiceTransform = void 0;
|
|
|
60715
60825
|
};
|
|
60716
60826
|
}
|
|
60717
60827
|
ServiceTransform.retrievedToServiceVertex = retrievedToServiceVertex;
|
|
60828
|
+
const SERVICE_TYPE_BY_LOWER = Object.fromEntries(exports.CreateServices.SERVICE_TYPES.map((t) => [t.toLowerCase(), t]));
|
|
60829
|
+
/**
|
|
60830
|
+
* Canonicalise a read-back `serviceType` (any casing). Missing or unknown
|
|
60831
|
+
* values map to `Service`, the server's default for records that predate
|
|
60832
|
+
* the field.
|
|
60833
|
+
*/
|
|
60834
|
+
function normalizeServiceType(value) {
|
|
60835
|
+
if (typeof value !== 'string')
|
|
60836
|
+
return 'Service';
|
|
60837
|
+
return SERVICE_TYPE_BY_LOWER[value.toLowerCase()] ?? 'Service';
|
|
60838
|
+
}
|
|
60839
|
+
ServiceTransform.normalizeServiceType = normalizeServiceType;
|
|
60840
|
+
/** Parse a user-supplied service type (`service|application|group`, any casing); throws on anything else. */
|
|
60841
|
+
function parseServiceType(input) {
|
|
60842
|
+
const t = SERVICE_TYPE_BY_LOWER[input.trim().toLowerCase()];
|
|
60843
|
+
if (!t) {
|
|
60844
|
+
throw new Error(`Unknown service type '${input}' — expected one of ${exports.CreateServices.SERVICE_TYPES.map((x) => x.toLowerCase()).join(', ')}`);
|
|
60845
|
+
}
|
|
60846
|
+
return t;
|
|
60847
|
+
}
|
|
60848
|
+
ServiceTransform.parseServiceType = parseServiceType;
|
|
60849
|
+
function list(xs) {
|
|
60850
|
+
return `[${xs.join(', ')}]`;
|
|
60851
|
+
}
|
|
60852
|
+
function sameSet(a, b) {
|
|
60853
|
+
const sa = [...a].sort();
|
|
60854
|
+
const sb = [...b].sort();
|
|
60855
|
+
return sa.length === sb.length && sa.every((x, i) => x === sb[i]);
|
|
60856
|
+
}
|
|
60857
|
+
function propPairs(ps) {
|
|
60858
|
+
return ps.map((p) => `${p.name}=${p.value}`);
|
|
60859
|
+
}
|
|
60860
|
+
/**
|
|
60861
|
+
* Apply an attribute patch to ONE vertex of a store body (in place) and return
|
|
60862
|
+
* human-readable change lines; an empty result means nothing differs. Fields
|
|
60863
|
+
* omitted from the patch keep their values; `tags` / `customProperties` are
|
|
60864
|
+
* replaced wholesale (what the UI editor sends), not merged. The name and the
|
|
60865
|
+
* `serviceType` are never touched — both are fixed at creation (the server
|
|
60866
|
+
* does not allow renames and ignores a type change on a re-save).
|
|
60867
|
+
*
|
|
60868
|
+
* @throws Error if `serviceName` is not among `body.vertices`.
|
|
60869
|
+
*/
|
|
60870
|
+
function applyServiceUpdate(body, serviceName, patch) {
|
|
60871
|
+
const target = body.vertices.find((v) => v.attributes.name === serviceName);
|
|
60872
|
+
if (!target) {
|
|
60873
|
+
throw new Error(`No service with name '${serviceName}' found`);
|
|
60874
|
+
}
|
|
60875
|
+
const a = target.attributes;
|
|
60876
|
+
const changes = [];
|
|
60877
|
+
if (patch.description !== undefined && patch.description !== a.description) {
|
|
60878
|
+
changes.push(`description: '${a.description}' -> '${patch.description}'`);
|
|
60879
|
+
a.description = patch.description;
|
|
60880
|
+
}
|
|
60881
|
+
if (patch.location !== undefined && patch.location !== a.location) {
|
|
60882
|
+
changes.push(`location: '${a.location}' -> '${patch.location}'`);
|
|
60883
|
+
a.location = patch.location;
|
|
60884
|
+
}
|
|
60885
|
+
if (patch.tags !== undefined && !sameSet(patch.tags, a.tags)) {
|
|
60886
|
+
changes.push(`tags: ${list(a.tags)} -> ${list(patch.tags)}`);
|
|
60887
|
+
a.tags = [...patch.tags];
|
|
60888
|
+
}
|
|
60889
|
+
if (patch.customProperties !== undefined &&
|
|
60890
|
+
!sameSet(propPairs(patch.customProperties), propPairs(a.customProperties))) {
|
|
60891
|
+
changes.push(`properties: ${list(propPairs(a.customProperties))} -> ${list(propPairs(patch.customProperties))}`);
|
|
60892
|
+
a.customProperties = patch.customProperties.map((p) => ({ ...p }));
|
|
60893
|
+
}
|
|
60894
|
+
if (patch.situationsIncludeChildServices !== undefined &&
|
|
60895
|
+
patch.situationsIncludeChildServices !== a.situationsIncludeChildServices) {
|
|
60896
|
+
changes.push(`includeChildServices: ${a.situationsIncludeChildServices} -> ${patch.situationsIncludeChildServices}`);
|
|
60897
|
+
a.situationsIncludeChildServices = patch.situationsIncludeChildServices;
|
|
60898
|
+
}
|
|
60899
|
+
return changes;
|
|
60900
|
+
}
|
|
60901
|
+
ServiceTransform.applyServiceUpdate = applyServiceUpdate;
|
|
60718
60902
|
/**
|
|
60719
60903
|
* Build NAME-keyed store edges from a topology graph, preserving weights +
|
|
60720
60904
|
* semantic. Endpoints are mapped from `SA:<uuid>` to service name via the
|
|
@@ -63248,6 +63432,506 @@ exports.Situations = void 0;
|
|
|
63248
63432
|
(function (Situations) {
|
|
63249
63433
|
})(exports.Situations || (exports.Situations = {}));
|
|
63250
63434
|
|
|
63435
|
+
/**
|
|
63436
|
+
* Custom situation policies — the product calls them "custom situation
|
|
63437
|
+
* definitions"; the API calls them clustering policies (`clusteringpolicy`).
|
|
63438
|
+
*
|
|
63439
|
+
* Situations are alarm clusters. A policy controls how and when a cluster
|
|
63440
|
+
* forms, in three independent parts over one alarm stream:
|
|
63441
|
+
*
|
|
63442
|
+
* 1. `filterCriteria` — which raw alarms the policy may cluster at all.
|
|
63443
|
+
* 2. `rcFilterCriteria` — which of those are root-cause candidates (nullable).
|
|
63444
|
+
* 3. `clusteringCriteria` — the ranked fields the grouping keys on, each with
|
|
63445
|
+
* a match weight and optional per-field properties.
|
|
63446
|
+
*
|
|
63447
|
+
* Shapes measured from HARs of the lab tenant's UI
|
|
63448
|
+
* (`docs/internal/custom-situation.har`, `custom-situation-preview.har`,
|
|
63449
|
+
* 2026-09-20) plus a live preview probe against seeded alarms.
|
|
63450
|
+
*/
|
|
63451
|
+
// ---------------------------------------------------------------------------
|
|
63452
|
+
// Vocabularies
|
|
63453
|
+
// ---------------------------------------------------------------------------
|
|
63454
|
+
/**
|
|
63455
|
+
* Conditions accepted in criteria atoms. `equals`, `contains` and `not_empty`
|
|
63456
|
+
* are observed in UI-authored policies; the rest come from the platform's
|
|
63457
|
+
* shared alarm-filter component, which the policy editor reuses.
|
|
63458
|
+
*/
|
|
63459
|
+
const CLUSTERING_POLICY_CONDITIONS = [
|
|
63460
|
+
'equals',
|
|
63461
|
+
'not_equals',
|
|
63462
|
+
'contains',
|
|
63463
|
+
'not_contains',
|
|
63464
|
+
'starts_with',
|
|
63465
|
+
'ends_with',
|
|
63466
|
+
'not_empty',
|
|
63467
|
+
'exists',
|
|
63468
|
+
'does_not_exists',
|
|
63469
|
+
'greater_than',
|
|
63470
|
+
'less_than',
|
|
63471
|
+
];
|
|
63472
|
+
/** `not_empty` / `exists` / `does_not_exists` are presence tests; the UI sends `*` as their value. */
|
|
63473
|
+
const CLUSTERING_POLICY_PRESENCE_CONDITIONS = [
|
|
63474
|
+
'not_empty',
|
|
63475
|
+
'exists',
|
|
63476
|
+
'does_not_exists',
|
|
63477
|
+
];
|
|
63478
|
+
const CLUSTERING_POLICY_STATUSES = ['ACTIVE', 'INACTIVE'];
|
|
63479
|
+
/**
|
|
63480
|
+
* The preview windows the UI offers, in seconds. `time=` on the preview call
|
|
63481
|
+
* accepts any integer; these are the labelled choices.
|
|
63482
|
+
*/
|
|
63483
|
+
const CLUSTERING_POLICY_PREVIEW_RANGES = {
|
|
63484
|
+
'1h': 3600,
|
|
63485
|
+
'4h': 14400,
|
|
63486
|
+
'8h': 28800,
|
|
63487
|
+
'24h': 86400,
|
|
63488
|
+
'3d': 259200,
|
|
63489
|
+
'1w': 604800,
|
|
63490
|
+
};
|
|
63491
|
+
/** `updatedBy` values the platform stamps on its own seeded policies. */
|
|
63492
|
+
const CLUSTERING_POLICY_BUILTIN_AUTHORS = ['DefaultPolicy', 'DefaultSpectrum'];
|
|
63493
|
+
// ---------------------------------------------------------------------------
|
|
63494
|
+
// Criteria
|
|
63495
|
+
// ---------------------------------------------------------------------------
|
|
63496
|
+
/**
|
|
63497
|
+
* Per-field clustering options. `hierarchy` makes a service match walk the
|
|
63498
|
+
* service hierarchy; `leftElementTrim` drops N leading dot-separated elements
|
|
63499
|
+
* of the value before comparing (e.g. trimming a host's subdomain).
|
|
63500
|
+
*/
|
|
63501
|
+
const ClusteringCriterionPropertiesSchema = v4.z.looseObject({
|
|
63502
|
+
hierarchy: v4.z.boolean().optional().describe('Match up the service hierarchy rather than on the exact service'),
|
|
63503
|
+
leftElementTrim: v4.z
|
|
63504
|
+
.number()
|
|
63505
|
+
.int()
|
|
63506
|
+
.optional()
|
|
63507
|
+
.describe('Drop this many leading dot-separated elements of the value before matching'),
|
|
63508
|
+
});
|
|
63509
|
+
/** One ranked clustering field and how strongly its values must match. */
|
|
63510
|
+
const ClusteringCriterionSchema = v4.z.looseObject({
|
|
63511
|
+
field: v4.z
|
|
63512
|
+
.string()
|
|
63513
|
+
.min(1)
|
|
63514
|
+
.describe('Clustering field name from `policyfields.clusteringFields` (host, message, product, services_impacted, severity)'),
|
|
63515
|
+
value: v4.z
|
|
63516
|
+
.number()
|
|
63517
|
+
.min(0)
|
|
63518
|
+
.max(100)
|
|
63519
|
+
.describe('Match weight as a percentage; the field catalog gives the allowed [min, max] per field'),
|
|
63520
|
+
rank: v4.z.number().int().min(1).describe('Evaluation order, 1-based; lower ranks are applied first'),
|
|
63521
|
+
properties: ClusteringCriterionPropertiesSchema.optional().describe('Optional per-field matching options'),
|
|
63522
|
+
});
|
|
63523
|
+
/**
|
|
63524
|
+
* Criteria are the platform's shared AND-of-OR-groups filter tree — the same
|
|
63525
|
+
* shape as a notification policy's `filterExpressionV1`, so the atom and
|
|
63526
|
+
* expression schemas are shared. The UI emits one OR-group per field.
|
|
63527
|
+
*/
|
|
63528
|
+
const ClusteringPolicyCriteriaSchema = PolicyFilterExpressionSchema;
|
|
63529
|
+
/**
|
|
63530
|
+
* An unset criteria tree. The server does not store `null` — it normalizes an
|
|
63531
|
+
* omitted or null `rcFilterCriteria` to an empty object and returns `{}`,
|
|
63532
|
+
* which is not a valid atom / and / or node. Measured on the lab tenant.
|
|
63533
|
+
*/
|
|
63534
|
+
const EmptyCriteriaSchema = v4.z.strictObject({});
|
|
63535
|
+
/** A criteria tree as the server may return it: a real tree, `{}`, or null. */
|
|
63536
|
+
const StoredCriteriaSchema = v4.z.union([ClusteringPolicyCriteriaSchema, EmptyCriteriaSchema]);
|
|
63537
|
+
/** True for the server's `{}` representation of "no criteria", and for null/undefined. */
|
|
63538
|
+
function isEmptyCriteria(criteria) {
|
|
63539
|
+
if (criteria === null || criteria === undefined) {
|
|
63540
|
+
return true;
|
|
63541
|
+
}
|
|
63542
|
+
return typeof criteria === 'object' && Object.keys(criteria).length === 0;
|
|
63543
|
+
}
|
|
63544
|
+
// ---------------------------------------------------------------------------
|
|
63545
|
+
// The policy record
|
|
63546
|
+
// ---------------------------------------------------------------------------
|
|
63547
|
+
/**
|
|
63548
|
+
* A policy as the server returns it. `filterSearchFields`,
|
|
63549
|
+
* `rcFilterSearchFields` and `clusteringSearchFields` are derived by the
|
|
63550
|
+
* server from the criteria — never send them.
|
|
63551
|
+
*/
|
|
63552
|
+
const ClusteringPolicySchema = v4.z.looseObject({
|
|
63553
|
+
policy_id: v4.z
|
|
63554
|
+
.string()
|
|
63555
|
+
.describe('Policy id. NOTE: an update can mint a NEW id (it does for a policy created ACTIVE); the name is the stable handle'),
|
|
63556
|
+
tenant_id: v4.z.string().optional().describe('Owning tenant, uppercase-hyphenated'),
|
|
63557
|
+
name: v4.z.string().describe('Policy name as shown in the UI'),
|
|
63558
|
+
situation_custom_name: v4.z
|
|
63559
|
+
.string()
|
|
63560
|
+
.optional()
|
|
63561
|
+
.describe('Naming template for situations this policy creates, e.g. "{rootcausealarm(product)}"'),
|
|
63562
|
+
priority: v4.z
|
|
63563
|
+
.number()
|
|
63564
|
+
.describe('Evaluation order, ascending; the UI seeds new policies with a creation timestamp so they evaluate last'),
|
|
63565
|
+
version: v4.z.number().optional().describe('Increments on every update'),
|
|
63566
|
+
created: v4.z.number().optional().describe('Creation time, epoch milliseconds'),
|
|
63567
|
+
lastUpdated: v4.z.number().optional().describe('Last update time, epoch milliseconds'),
|
|
63568
|
+
updatedBy: v4.z.string().optional().describe('User or platform component that last wrote the policy'),
|
|
63569
|
+
stableWindow: v4.z
|
|
63570
|
+
.number()
|
|
63571
|
+
.describe('Minutes a cluster stays open with no new alarms before it is considered stable'),
|
|
63572
|
+
extensionWindow: v4.z
|
|
63573
|
+
.number()
|
|
63574
|
+
.optional()
|
|
63575
|
+
.describe('Minutes a stable cluster may still absorb a late alarm; 0 disables extension'),
|
|
63576
|
+
maxStableWindow: v4.z
|
|
63577
|
+
.number()
|
|
63578
|
+
.optional()
|
|
63579
|
+
.describe('Hard ceiling in minutes on how long a cluster may stay open; 0 means no ceiling'),
|
|
63580
|
+
status: v4.z.string().describe('ACTIVE (the policy runs) or INACTIVE (it is saved but not applied)'),
|
|
63581
|
+
filterCriteria: StoredCriteriaSchema.describe('Which raw alarms this policy may cluster'),
|
|
63582
|
+
rcFilterCriteria: StoredCriteriaSchema.nullable()
|
|
63583
|
+
.optional()
|
|
63584
|
+
.describe('Which matched alarms count as root-cause candidates; the server returns {} when unset'),
|
|
63585
|
+
clusteringCriteria: v4.z
|
|
63586
|
+
.array(ClusteringCriterionSchema)
|
|
63587
|
+
.describe('Ranked fields the clustering groups on'),
|
|
63588
|
+
filterSearchFields: v4.z.array(v4.z.string()).optional().describe('Server-derived: fields used in filterCriteria'),
|
|
63589
|
+
rcFilterSearchFields: v4.z.array(v4.z.string()).optional().describe('Server-derived: fields used in rcFilterCriteria'),
|
|
63590
|
+
clusteringSearchFields: v4.z.array(v4.z.string()).optional().describe('Server-derived: fields used in clusteringCriteria'),
|
|
63591
|
+
});
|
|
63592
|
+
/**
|
|
63593
|
+
* The envelope of `POST clusteringpolicy/search` — and of
|
|
63594
|
+
* `GET clusteringpolicy/{id}`, which returns the same shape with one result.
|
|
63595
|
+
*/
|
|
63596
|
+
const ClusteringPolicySearchResponseSchema = v4.z.looseObject({
|
|
63597
|
+
searchPolicyResults: v4.z.array(ClusteringPolicySchema).describe('The matching policies'),
|
|
63598
|
+
displayCount: v4.z.number().describe('Total number of policies matching the search'),
|
|
63599
|
+
});
|
|
63600
|
+
const ClusteringPolicySearchRequestSchema = v4.z.looseObject({
|
|
63601
|
+
recordFrom: v4.z.number().int().min(0).describe('Zero-based index of the first record'),
|
|
63602
|
+
recordTo: v4.z.number().int().min(1).describe('Exclusive upper bound of the record window'),
|
|
63603
|
+
sortCol: v4.z.string().describe('Sort spec, e.g. "priority:asc"'),
|
|
63604
|
+
});
|
|
63605
|
+
/**
|
|
63606
|
+
* The body of `PUT clusteringpolicy`. There is no POST: the presence of
|
|
63607
|
+
* `policy_id` is the only thing that distinguishes an update from a create.
|
|
63608
|
+
*/
|
|
63609
|
+
const ClusteringPolicyWriteBodySchema = v4.z.looseObject({
|
|
63610
|
+
policy_id: v4.z.string().optional().describe('Present on update, absent on create'),
|
|
63611
|
+
name: v4.z.string().min(1).describe('Policy name'),
|
|
63612
|
+
situation_custom_name: v4.z.string().describe('Naming template; empty string when unset'),
|
|
63613
|
+
stableWindow: v4.z.number().int().describe('Minutes before a cluster is stable'),
|
|
63614
|
+
maxStableWindow: v4.z.number().int().describe('Ceiling in minutes on cluster lifetime; 0 for none'),
|
|
63615
|
+
extensionWindow: v4.z.number().int().describe('Minutes a stable cluster may still absorb alarms; 0 for none'),
|
|
63616
|
+
status: v4.z.enum(CLUSTERING_POLICY_STATUSES).describe('ACTIVE or INACTIVE'),
|
|
63617
|
+
filterCriteria: ClusteringPolicyCriteriaSchema.describe('Which raw alarms this policy may cluster'),
|
|
63618
|
+
rcFilterCriteria: StoredCriteriaSchema.nullable()
|
|
63619
|
+
.optional()
|
|
63620
|
+
.describe('Root-cause candidates; null when unset'),
|
|
63621
|
+
clusteringCriteria: v4.z.array(ClusteringCriterionSchema).describe('Ranked clustering fields'),
|
|
63622
|
+
priority: v4.z.number().describe('Evaluation order, ascending'),
|
|
63623
|
+
version: v4.z.number().optional().describe('Update only: echoed from the fetched policy'),
|
|
63624
|
+
created: v4.z.number().optional().describe('Update only: echoed from the fetched policy'),
|
|
63625
|
+
lastUpdated: v4.z.number().optional().describe('Update only: echoed from the fetched policy'),
|
|
63626
|
+
updatedBy: v4.z.string().optional().describe('Update only: echoed from the fetched policy'),
|
|
63627
|
+
});
|
|
63628
|
+
// ---------------------------------------------------------------------------
|
|
63629
|
+
// Preview
|
|
63630
|
+
// ---------------------------------------------------------------------------
|
|
63631
|
+
/** For one clustering field: every value seen, and those that actually matched. */
|
|
63632
|
+
const ClusteringCriteriaValuesSchema = v4.z.record(v4.z.string(), v4.z.looseObject({
|
|
63633
|
+
allValues: v4.z.array(v4.z.string()).describe('Every value of this field across the previewed alarms'),
|
|
63634
|
+
matchingValues: v4.z.array(v4.z.string()).describe('The values that met the field weight'),
|
|
63635
|
+
}));
|
|
63636
|
+
/**
|
|
63637
|
+
* One alarm template inside a previewed cluster. `alarms` carries the full raw
|
|
63638
|
+
* alarm documents, so a preview response grows quickly with `size` — render a
|
|
63639
|
+
* summary, never the whole thing.
|
|
63640
|
+
*/
|
|
63641
|
+
const ClusteringPreviewTemplateSchema = v4.z.looseObject({
|
|
63642
|
+
templateId: v4.z.number().describe('Template id within the preview'),
|
|
63643
|
+
clusterId: v4.z.number().describe('Id of the cluster this template belongs to'),
|
|
63644
|
+
message: v4.z.string().optional().describe('Normalized template message (variable parts removed)'),
|
|
63645
|
+
earliestAlarmMessage: v4.z.string().optional().describe('Verbatim message of the earliest alarm'),
|
|
63646
|
+
host: v4.z.string().optional().describe('Host of the template'),
|
|
63647
|
+
product: v4.z.string().optional().describe('Source product of the template'),
|
|
63648
|
+
severity: v4.z.string().optional().describe('Highest severity in the template'),
|
|
63649
|
+
lastAlarmsCount: v4.z.number().optional().describe('Alarms in the template'),
|
|
63650
|
+
highestSeverityAlarmCount: v4.z.number().optional().describe('Alarms at the highest severity'),
|
|
63651
|
+
highestSeverityEarliestAlarmTime: v4.z.number().optional().describe('Epoch ms of the earliest highest-severity alarm'),
|
|
63652
|
+
alarms: v4.z.array(v4.z.unknown()).optional().describe('Full raw alarm documents — large; summarize before output'),
|
|
63653
|
+
totalAlarmIds: v4.z.array(v4.z.string()).optional().describe('alarm_unique_id of every alarm in the template'),
|
|
63654
|
+
closedAlarmIds: v4.z.array(v4.z.string()).optional().describe('Subset of totalAlarmIds already closed'),
|
|
63655
|
+
servicesImpacted: v4.z.array(v4.z.unknown()).optional().describe('Services the alarms in this template impact'),
|
|
63656
|
+
earliestSourceAlarmURL: v4.z.string().optional().describe('Deep link to the earliest alarm in its source product'),
|
|
63657
|
+
customAttributeMap: v4.z.record(v4.z.string(), v4.z.unknown()).optional().describe('Custom alarm attributes carried through'),
|
|
63658
|
+
templateMetaDataMap: v4.z
|
|
63659
|
+
.record(v4.z.string(), v4.z.looseObject({
|
|
63660
|
+
alarmCount: v4.z.number().describe('Alarms at this severity'),
|
|
63661
|
+
earliestAlarmTime: v4.z.number().describe('Epoch ms of the earliest alarm at this severity'),
|
|
63662
|
+
earliestAlarmMessage: v4.z.string().optional().describe('Message of that earliest alarm'),
|
|
63663
|
+
}))
|
|
63664
|
+
.optional()
|
|
63665
|
+
.describe('Per-severity rollup for the template'),
|
|
63666
|
+
});
|
|
63667
|
+
/** One cluster the policy would have produced over the previewed window. */
|
|
63668
|
+
const ClusteringPreviewClusterSchema = v4.z.looseObject({
|
|
63669
|
+
clusterId: v4.z.number().describe('Id of the cluster within this preview'),
|
|
63670
|
+
clusterName: v4.z.string().optional().describe('Name the policy would give the situation'),
|
|
63671
|
+
templates: v4.z.array(ClusteringPreviewTemplateSchema).describe('Alarm templates grouped into this cluster'),
|
|
63672
|
+
totalTemplates: v4.z.number().optional().describe('Templates in the cluster'),
|
|
63673
|
+
totalAlarms: v4.z.number().optional().describe('Alarms in the cluster'),
|
|
63674
|
+
severity: v4.z.string().optional().describe('Highest severity in the cluster'),
|
|
63675
|
+
product: v4.z.array(v4.z.string()).optional().describe('Distinct source products in the cluster'),
|
|
63676
|
+
mostImpacted_alarmId: v4.z.string().optional().describe('alarm_unique_id of the most impacted alarm'),
|
|
63677
|
+
clusteringCriteriaValues: ClusteringCriteriaValuesSchema.optional().describe('Per clustering field: the values seen and the values that matched'),
|
|
63678
|
+
});
|
|
63679
|
+
/** Response of `PUT clusteringpolicy/preview?size=&time=`. */
|
|
63680
|
+
const ClusteringPolicyPreviewResponseSchema = v4.z.looseObject({
|
|
63681
|
+
tenantId: v4.z.string().optional().describe('Tenant the preview ran against'),
|
|
63682
|
+
clusteringList: v4.z.array(ClusteringPreviewClusterSchema).describe('Clusters the policy would have produced'),
|
|
63683
|
+
totalAlarms: v4.z.number().describe('Raw alarms matched by filterCriteria in the window'),
|
|
63684
|
+
totalClusters: v4.z.number().describe('Situations the policy would have created'),
|
|
63685
|
+
totalTemplates: v4.z.number().describe('Distinct alarm templates across all clusters'),
|
|
63686
|
+
noiseReductionPercent: v4.z
|
|
63687
|
+
.number()
|
|
63688
|
+
.describe('Percentage fewer items an operator would see: 100 * (1 - totalClusters / totalAlarms)'),
|
|
63689
|
+
});
|
|
63690
|
+
// ---------------------------------------------------------------------------
|
|
63691
|
+
// Catalogs
|
|
63692
|
+
// ---------------------------------------------------------------------------
|
|
63693
|
+
/**
|
|
63694
|
+
* A catalog entry. `values` is NOT a closed vocabulary: for the window fields
|
|
63695
|
+
* it is `[min, max, default]` and for clustering fields `[min, max]`. Only
|
|
63696
|
+
* filtering fields use it as a value suggestion list.
|
|
63697
|
+
*/
|
|
63698
|
+
const PolicyFieldSchema = v4.z.looseObject({
|
|
63699
|
+
field: v4.z.string().describe('Field name to use in criteria'),
|
|
63700
|
+
fieldDescription: v4.z.string().describe('Human label the UI shows'),
|
|
63701
|
+
values: v4.z.array(v4.z.string()).optional().describe('Bounds or suggested values — see the schema note'),
|
|
63702
|
+
hideMoreOptions: v4.z.boolean().optional().describe('UI hint; no CLI meaning'),
|
|
63703
|
+
});
|
|
63704
|
+
/** One custom-naming operation usable inside `situation_custom_name`. */
|
|
63705
|
+
const PolicyNamingOperationSchema = v4.z.looseObject({
|
|
63706
|
+
opName: v4.z.string().describe('Operation name as written in the template, e.g. "rootcausealarm"'),
|
|
63707
|
+
displayName: v4.z.string().optional().describe('Human label'),
|
|
63708
|
+
parameters: v4.z
|
|
63709
|
+
.array(v4.z.looseObject({
|
|
63710
|
+
paramNumber: v4.z.number().describe('1-based parameter position'),
|
|
63711
|
+
isMandatory: v4.z.boolean().describe('Whether the parameter must be supplied'),
|
|
63712
|
+
type: v4.z.string().describe('String or Integer'),
|
|
63713
|
+
defaultValue: v4.z.string().optional().describe('Value used when the parameter is omitted'),
|
|
63714
|
+
}))
|
|
63715
|
+
.optional()
|
|
63716
|
+
.describe('Positional parameters the operation accepts'),
|
|
63717
|
+
supportedFields: v4.z
|
|
63718
|
+
.array(v4.z.looseObject({ field: v4.z.string(), fieldDescription: v4.z.string().optional() }))
|
|
63719
|
+
.optional()
|
|
63720
|
+
.describe('Alarm fields this operation may be applied to'),
|
|
63721
|
+
});
|
|
63722
|
+
/** Response of `GET policyfields` — everything the policy editor needs. */
|
|
63723
|
+
const PolicyFieldsResponseSchema = v4.z.looseObject({
|
|
63724
|
+
filteringFields: v4.z.array(PolicyFieldSchema).describe('Alarm fields usable in filterCriteria / rcFilterCriteria'),
|
|
63725
|
+
clusteringFields: v4.z.array(PolicyFieldSchema).describe('Fields usable in clusteringCriteria; values are [min, max] weights'),
|
|
63726
|
+
operationsDefinition: v4.z.array(PolicyNamingOperationSchema).describe('Operations usable in situation_custom_name'),
|
|
63727
|
+
stableWindow: PolicyFieldSchema.describe('Bounds for stableWindow: values are [min, max, default] minutes'),
|
|
63728
|
+
maxStableWindow: PolicyFieldSchema.describe('Bounds for maxStableWindow: values are [min, max, default] minutes'),
|
|
63729
|
+
extensionWindow: PolicyFieldSchema.describe('Bounds for extensionWindow: values are [min, max, default] minutes'),
|
|
63730
|
+
});
|
|
63731
|
+
/** Response of `GET tenantConfigAttributes` — tenant-wide clustering knobs. */
|
|
63732
|
+
const TenantConfigAttributeSchema = v4.z.looseObject({
|
|
63733
|
+
key: v4.z
|
|
63734
|
+
.string()
|
|
63735
|
+
.describe('Clustering engine attribute name. Internal tuning surface, not a documented API: only ' +
|
|
63736
|
+
'enable_algorithm_cluster has verified semantics — treat every other key as unverified'),
|
|
63737
|
+
value: v4.z
|
|
63738
|
+
.unknown()
|
|
63739
|
+
.describe('Attribute value; shape given by `type`. The server accepts out-of-range and nonsensical ' +
|
|
63740
|
+
'values without error, so a bad write fails silently and shows up later as broken clustering'),
|
|
63741
|
+
type: v4.z.string().describe('double, boolean, integer or list — a wrong type corrupts that attribute'),
|
|
63742
|
+
});
|
|
63743
|
+
const TenantConfigAttributesResponseSchema = v4.z.looseObject({
|
|
63744
|
+
tenantId: v4.z.string().optional().describe('Tenant the attributes belong to'),
|
|
63745
|
+
configAttrList: v4.z.array(TenantConfigAttributeSchema).describe('The tenant clustering configuration'),
|
|
63746
|
+
});
|
|
63747
|
+
/**
|
|
63748
|
+
* The body of `PUT tenantConfigAttributes`. A **partial** update: send only the
|
|
63749
|
+
* attributes to change, not the whole list. Measured on the lab tenant.
|
|
63750
|
+
*
|
|
63751
|
+
* **These attributes are the clustering engine's internal tuning surface, not a
|
|
63752
|
+
* documented public API.** Of the ~three dozen keys a tenant exposes, only
|
|
63753
|
+
* {@link ALGORITHMIC_SITUATIONS_KEY} has semantics established here; the rest
|
|
63754
|
+
* are unverified, the server accepts nonsensical values without complaint, the
|
|
63755
|
+
* effect is tenant-wide and continuous, and there is no reset-to-defaults. Read
|
|
63756
|
+
* the hazards in full on `ClusteringPolicyService.setTenantConfigAttributes`
|
|
63757
|
+
* before writing anything else.
|
|
63758
|
+
*/
|
|
63759
|
+
const TenantConfigAttributesWriteBodySchema = v4.z.looseObject({
|
|
63760
|
+
tenantId: v4.z.string().min(1).describe('Tenant to write to, as returned by the GET'),
|
|
63761
|
+
configAttrList: v4.z
|
|
63762
|
+
.array(TenantConfigAttributeSchema)
|
|
63763
|
+
.min(1)
|
|
63764
|
+
.describe('Only the attributes being changed; omitted keys keep their value. Send the narrowest set ' +
|
|
63765
|
+
'that does the job — this is a tenant-wide write with no reset-to-defaults'),
|
|
63766
|
+
});
|
|
63767
|
+
/** Response of `PUT tenantConfigAttributes`. */
|
|
63768
|
+
const TenantConfigAttributesWriteResponseSchema = v4.z.looseObject({
|
|
63769
|
+
Status: v4.z.string().describe('"Success" when the attributes were written'),
|
|
63770
|
+
});
|
|
63771
|
+
/**
|
|
63772
|
+
* The tenant attribute behind the UI's "Enable Algorithmic Situations" toggle.
|
|
63773
|
+
*
|
|
63774
|
+
* When it is on, the platform clusters alarms with its own algorithm and custom
|
|
63775
|
+
* situation policies are ignored or behave unpredictably — the single most
|
|
63776
|
+
* common reason a correct-looking policy produces nothing.
|
|
63777
|
+
*/
|
|
63778
|
+
const ALGORITHMIC_SITUATIONS_KEY = 'enable_algorithm_cluster';
|
|
63779
|
+
/** Reads one attribute out of a `tenantConfigAttributes` response. */
|
|
63780
|
+
function tenantConfigAttribute(config, key) {
|
|
63781
|
+
return (config.configAttrList ?? []).find((attribute) => attribute.key === key);
|
|
63782
|
+
}
|
|
63783
|
+
/**
|
|
63784
|
+
* Whether algorithmic situations are on for the tenant. `undefined` when the
|
|
63785
|
+
* attribute is absent, which is not the same as "off" — say so rather than
|
|
63786
|
+
* guessing.
|
|
63787
|
+
*/
|
|
63788
|
+
function algorithmicSituationsEnabled(config) {
|
|
63789
|
+
const attribute = tenantConfigAttribute(config, ALGORITHMIC_SITUATIONS_KEY);
|
|
63790
|
+
return attribute === undefined ? undefined : attribute.value === true;
|
|
63791
|
+
}
|
|
63792
|
+
// ---------------------------------------------------------------------------
|
|
63793
|
+
// Helpers
|
|
63794
|
+
// ---------------------------------------------------------------------------
|
|
63795
|
+
/** Platform-seeded policies, which a tenant user should not be editing casually. */
|
|
63796
|
+
function isBuiltInClusteringPolicy(policy) {
|
|
63797
|
+
return CLUSTERING_POLICY_BUILTIN_AUTHORS.includes(policy.updatedBy ?? '');
|
|
63798
|
+
}
|
|
63799
|
+
/** `[min, max]` from a catalog entry's `values`, when it carries bounds. */
|
|
63800
|
+
function policyFieldBounds(entry) {
|
|
63801
|
+
const values = entry?.values;
|
|
63802
|
+
if (!values || values.length < 2) {
|
|
63803
|
+
return undefined;
|
|
63804
|
+
}
|
|
63805
|
+
const min = Number(values[0]);
|
|
63806
|
+
const max = Number(values[1]);
|
|
63807
|
+
return Number.isFinite(min) && Number.isFinite(max) ? { min, max } : undefined;
|
|
63808
|
+
}
|
|
63809
|
+
/**
|
|
63810
|
+
* The create body with the UI's defaults filled in. `priority` defaults to
|
|
63811
|
+
* the current epoch-ms the way the UI seeds it, which sorts a new policy
|
|
63812
|
+
* after every platform-seeded one.
|
|
63813
|
+
*/
|
|
63814
|
+
function toClusteringPolicyWriteBody(input) {
|
|
63815
|
+
return {
|
|
63816
|
+
name: input.name,
|
|
63817
|
+
situation_custom_name: input.situationName ?? '',
|
|
63818
|
+
stableWindow: input.stableWindow ?? 30,
|
|
63819
|
+
maxStableWindow: input.maxStableWindow ?? 0,
|
|
63820
|
+
extensionWindow: input.extensionWindow ?? 0,
|
|
63821
|
+
status: input.status ?? 'ACTIVE',
|
|
63822
|
+
filterCriteria: input.filterCriteria,
|
|
63823
|
+
rcFilterCriteria: input.rcFilterCriteria ?? null,
|
|
63824
|
+
clusteringCriteria: input.clusteringCriteria,
|
|
63825
|
+
priority: input.priority ?? Date.now(),
|
|
63826
|
+
};
|
|
63827
|
+
}
|
|
63828
|
+
/** Renders `clusteringCriteria` as a short, comparable string for change lines. */
|
|
63829
|
+
function describeClusteringCriteria(criteria) {
|
|
63830
|
+
if (criteria.length === 0) {
|
|
63831
|
+
return '(none)';
|
|
63832
|
+
}
|
|
63833
|
+
return criteria
|
|
63834
|
+
.map((criterion) => {
|
|
63835
|
+
const properties = criterion.properties ?? {};
|
|
63836
|
+
const extras = Object.entries(properties)
|
|
63837
|
+
.filter(([, value]) => value !== undefined)
|
|
63838
|
+
.map(([key, value]) => `${key}=${String(value)}`);
|
|
63839
|
+
return `${criterion.field}@${criterion.value}${extras.length > 0 ? ` (${extras.join(', ')})` : ''}`;
|
|
63840
|
+
})
|
|
63841
|
+
.join(', ');
|
|
63842
|
+
}
|
|
63843
|
+
/**
|
|
63844
|
+
* The update body for an existing policy with only the patched fields changed;
|
|
63845
|
+
* everything else is echoed back verbatim, including the envelope fields the
|
|
63846
|
+
* server needs (`version`, `created`, `lastUpdated`, `updatedBy`).
|
|
63847
|
+
*
|
|
63848
|
+
* Returns human-readable `changes`; an empty list means nothing to save.
|
|
63849
|
+
*/
|
|
63850
|
+
function buildClusteringPolicyUpdateBody(existing, patch) {
|
|
63851
|
+
const changes = [];
|
|
63852
|
+
const scalar = (label, current, next) => {
|
|
63853
|
+
if (next === undefined || next === current) {
|
|
63854
|
+
return current;
|
|
63855
|
+
}
|
|
63856
|
+
changes.push(`${label}: ${String(current)} -> ${String(next)}`);
|
|
63857
|
+
return next;
|
|
63858
|
+
};
|
|
63859
|
+
const name = scalar('name', existing.name, patch.name);
|
|
63860
|
+
const situationName = scalar('situationName', existing.situation_custom_name ?? '', patch.situationName);
|
|
63861
|
+
const stableWindow = scalar('stableWindow', existing.stableWindow, patch.stableWindow);
|
|
63862
|
+
const maxStableWindow = scalar('maxStableWindow', existing.maxStableWindow ?? 0, patch.maxStableWindow);
|
|
63863
|
+
const extensionWindow = scalar('extensionWindow', existing.extensionWindow ?? 0, patch.extensionWindow);
|
|
63864
|
+
const status = scalar('status', existing.status, patch.status);
|
|
63865
|
+
const priority = scalar('priority', existing.priority, patch.priority);
|
|
63866
|
+
let filterCriteria = existing.filterCriteria;
|
|
63867
|
+
if (patch.filterCriteria !== undefined) {
|
|
63868
|
+
changes.push('filter: replaced');
|
|
63869
|
+
filterCriteria = patch.filterCriteria;
|
|
63870
|
+
}
|
|
63871
|
+
// The server returns `{}` for an unset root-cause filter; normalize it back
|
|
63872
|
+
// to null so an untouched policy does not echo an invalid criteria tree.
|
|
63873
|
+
let rcFilterCriteria = isEmptyCriteria(existing.rcFilterCriteria)
|
|
63874
|
+
? null
|
|
63875
|
+
: existing.rcFilterCriteria;
|
|
63876
|
+
if (patch.rcFilterCriteria !== undefined) {
|
|
63877
|
+
const cleared = patch.rcFilterCriteria === null;
|
|
63878
|
+
if (!cleared || rcFilterCriteria !== null) {
|
|
63879
|
+
changes.push(cleared ? 'rcFilter: cleared' : 'rcFilter: replaced');
|
|
63880
|
+
}
|
|
63881
|
+
rcFilterCriteria = patch.rcFilterCriteria;
|
|
63882
|
+
}
|
|
63883
|
+
let clusteringCriteria = existing.clusteringCriteria;
|
|
63884
|
+
if (patch.clusteringCriteria !== undefined) {
|
|
63885
|
+
const before = describeClusteringCriteria(existing.clusteringCriteria);
|
|
63886
|
+
const after = describeClusteringCriteria(patch.clusteringCriteria);
|
|
63887
|
+
if (before !== after) {
|
|
63888
|
+
changes.push(`clustering: ${before} -> ${after}`);
|
|
63889
|
+
clusteringCriteria = patch.clusteringCriteria;
|
|
63890
|
+
}
|
|
63891
|
+
}
|
|
63892
|
+
const body = {
|
|
63893
|
+
policy_id: existing.policy_id,
|
|
63894
|
+
name,
|
|
63895
|
+
situation_custom_name: situationName,
|
|
63896
|
+
stableWindow,
|
|
63897
|
+
maxStableWindow,
|
|
63898
|
+
extensionWindow,
|
|
63899
|
+
status,
|
|
63900
|
+
filterCriteria,
|
|
63901
|
+
rcFilterCriteria,
|
|
63902
|
+
clusteringCriteria,
|
|
63903
|
+
priority,
|
|
63904
|
+
};
|
|
63905
|
+
if (existing.version !== undefined) {
|
|
63906
|
+
body.version = existing.version;
|
|
63907
|
+
}
|
|
63908
|
+
if (existing.created !== undefined) {
|
|
63909
|
+
body.created = existing.created;
|
|
63910
|
+
}
|
|
63911
|
+
if (existing.lastUpdated !== undefined) {
|
|
63912
|
+
body.lastUpdated = existing.lastUpdated;
|
|
63913
|
+
}
|
|
63914
|
+
if (existing.updatedBy !== undefined) {
|
|
63915
|
+
body.updatedBy = existing.updatedBy;
|
|
63916
|
+
}
|
|
63917
|
+
return { body, changes };
|
|
63918
|
+
}
|
|
63919
|
+
/**
|
|
63920
|
+
* The seven-key subset `PUT clusteringpolicy/preview` accepts. Sending the
|
|
63921
|
+
* full write body is rejected, so the pick is deliberate.
|
|
63922
|
+
*/
|
|
63923
|
+
function toClusteringPolicyPreviewBody(body) {
|
|
63924
|
+
return {
|
|
63925
|
+
clusteringCriteria: body.clusteringCriteria,
|
|
63926
|
+
filterCriteria: body.filterCriteria,
|
|
63927
|
+
rcFilterCriteria: body.rcFilterCriteria ?? null,
|
|
63928
|
+
stableWindow: body.stableWindow,
|
|
63929
|
+
status: body.status,
|
|
63930
|
+
name: body.name,
|
|
63931
|
+
situation_custom_name: body.situation_custom_name,
|
|
63932
|
+
};
|
|
63933
|
+
}
|
|
63934
|
+
|
|
63251
63935
|
/**
|
|
63252
63936
|
* One row of an SLI group's match criteria. SLI groups select the metrics they
|
|
63253
63937
|
* watch by a list of these AND-ed filters (e.g. "Source contains bd605" AND
|
|
@@ -67144,6 +67828,46 @@ class AlarmService {
|
|
|
67144
67828
|
alarmId: alarmId,
|
|
67145
67829
|
});
|
|
67146
67830
|
}
|
|
67831
|
+
/**
|
|
67832
|
+
* Finds one alarm, open or closed, by its ID (for an ingested alarm, the
|
|
67833
|
+
* `alarm_unique_id` it was sent with) among alarms from the last
|
|
67834
|
+
* `lookbackMs`, through the alarm search.
|
|
67835
|
+
*
|
|
67836
|
+
* @remarks Resolves `undefined` when there is no such alarm. {@link getAlarm}
|
|
67837
|
+
* cannot tell that apart from a failure: its endpoint answers HTTP 500 for an
|
|
67838
|
+
* unknown ID.
|
|
67839
|
+
*/
|
|
67840
|
+
async findAlarm(alarmId, lookbackMs, requestOverrides = {}) {
|
|
67841
|
+
const now = Date.now();
|
|
67842
|
+
const body = {
|
|
67843
|
+
...DEFAULT_ALARMS_REQUEST_BODY$1,
|
|
67844
|
+
timeFrom: now - lookbackMs,
|
|
67845
|
+
timeTo: now,
|
|
67846
|
+
pageNumber: 0,
|
|
67847
|
+
pageSize: 10,
|
|
67848
|
+
includeClosedAlarms: true,
|
|
67849
|
+
customFilter: {
|
|
67850
|
+
and: {
|
|
67851
|
+
expressions: [
|
|
67852
|
+
{
|
|
67853
|
+
or: {
|
|
67854
|
+
expressions: [
|
|
67855
|
+
{
|
|
67856
|
+
fieldDescription: 'Alarm Id',
|
|
67857
|
+
field: 'alarmId',
|
|
67858
|
+
value: alarmId,
|
|
67859
|
+
condition: 'equals',
|
|
67860
|
+
},
|
|
67861
|
+
],
|
|
67862
|
+
},
|
|
67863
|
+
},
|
|
67864
|
+
],
|
|
67865
|
+
},
|
|
67866
|
+
},
|
|
67867
|
+
};
|
|
67868
|
+
const response = await this.dxSaaSService.oiPost('oi/v2/api/alarms/_search', body, undefined, undefined, requestOverrides);
|
|
67869
|
+
return (response.alarms ?? []).find((alarm) => alarm.alarmId === alarmId);
|
|
67870
|
+
}
|
|
67147
67871
|
/** Returns the overview (first alarm in a custom-filter search) for an alarm ID. */
|
|
67148
67872
|
async getAlarmOverview(alarmId) {
|
|
67149
67873
|
const singleAlarmQuery = await this.dxSaaSService.oiPost('oi/v2/api/alarms/_search', {
|
|
@@ -70387,6 +71111,232 @@ class ChannelService {
|
|
|
70387
71111
|
}
|
|
70388
71112
|
}
|
|
70389
71113
|
|
|
71114
|
+
var NullSimpleLog$6 = Logging.NullSimpleLog;
|
|
71115
|
+
const BASE = 'oi/v2/api/clusteralarms';
|
|
71116
|
+
const POLICY = `${BASE}/clusteringpolicy`;
|
|
71117
|
+
/**
|
|
71118
|
+
* Custom situation policies (the product's "custom situation definitions";
|
|
71119
|
+
* the API's clustering policies). Backs the `situation *-custom-situation-policy`
|
|
71120
|
+
* CLI commands.
|
|
71121
|
+
*
|
|
71122
|
+
* Uses `oiPost`/`oiGet`/`oiPut`/`oiDelete` (OI namespace). Requests are
|
|
71123
|
+
* validated with `parse` (throws); responses with `safeParse` (warn + return
|
|
71124
|
+
* raw on mismatch).
|
|
71125
|
+
*/
|
|
71126
|
+
class ClusteringPolicyService {
|
|
71127
|
+
dxSaasService;
|
|
71128
|
+
log;
|
|
71129
|
+
constructor(dxSaasService, log = new NullSimpleLog$6()) {
|
|
71130
|
+
this.dxSaasService = dxSaasService;
|
|
71131
|
+
this.log = log;
|
|
71132
|
+
}
|
|
71133
|
+
/**
|
|
71134
|
+
* Lists policies, lowest `priority` first.
|
|
71135
|
+
*
|
|
71136
|
+
* `POST oi/v2/api/clusteralarms/clusteringpolicy/search`
|
|
71137
|
+
*
|
|
71138
|
+
* @remarks The response is validated, not thrown on.
|
|
71139
|
+
* @throws ZodError when the request window is malformed.
|
|
71140
|
+
*/
|
|
71141
|
+
async listPolicies(request = {}) {
|
|
71142
|
+
const body = {
|
|
71143
|
+
recordFrom: 0,
|
|
71144
|
+
recordTo: 1000,
|
|
71145
|
+
sortCol: 'priority:asc',
|
|
71146
|
+
...request,
|
|
71147
|
+
};
|
|
71148
|
+
ClusteringPolicySearchRequestSchema.parse(body);
|
|
71149
|
+
const raw = await this.dxSaasService.oiPost(`${POLICY}/search`, body);
|
|
71150
|
+
const result = ClusteringPolicySearchResponseSchema.safeParse(raw);
|
|
71151
|
+
if (!result.success) {
|
|
71152
|
+
this.log.warn('ClusteringPolicySearchResponse validation warning:', result.error.message);
|
|
71153
|
+
}
|
|
71154
|
+
return raw;
|
|
71155
|
+
}
|
|
71156
|
+
/**
|
|
71157
|
+
* One policy by id.
|
|
71158
|
+
*
|
|
71159
|
+
* `GET oi/v2/api/clusteralarms/clusteringpolicy/{policyId}`
|
|
71160
|
+
*
|
|
71161
|
+
* @remarks The server returns the same `{searchPolicyResults, displayCount}`
|
|
71162
|
+
* envelope as the search, with one result; this unwraps it.
|
|
71163
|
+
* @throws Error when no policy has that id.
|
|
71164
|
+
*/
|
|
71165
|
+
async getPolicy(policyId) {
|
|
71166
|
+
const raw = await this.dxSaasService.oiGet(`${POLICY}/${encodeURIComponent(policyId)}`);
|
|
71167
|
+
const result = ClusteringPolicySearchResponseSchema.safeParse(raw);
|
|
71168
|
+
if (!result.success) {
|
|
71169
|
+
this.log.warn('ClusteringPolicy detail validation warning:', result.error.message);
|
|
71170
|
+
}
|
|
71171
|
+
const policy = raw.searchPolicyResults?.[0];
|
|
71172
|
+
if (!policy) {
|
|
71173
|
+
throw new Error(`No custom situation policy with policyId '${policyId}' was found.`);
|
|
71174
|
+
}
|
|
71175
|
+
return policy;
|
|
71176
|
+
}
|
|
71177
|
+
/**
|
|
71178
|
+
* Creates or updates a policy. There is no POST — the presence of
|
|
71179
|
+
* `policy_id` in the body is what makes this an update.
|
|
71180
|
+
*
|
|
71181
|
+
* `PUT oi/v2/api/clusteralarms/clusteringpolicy`
|
|
71182
|
+
*
|
|
71183
|
+
* @remarks An update can return a policy with a **new** `policy_id` and an
|
|
71184
|
+
* incremented `version`, after which the id that was sent stops resolving.
|
|
71185
|
+
* Measured on the lab tenant: it does for a policy created ACTIVE, and does
|
|
71186
|
+
* not for one created INACTIVE (even after switching that one to ACTIVE).
|
|
71187
|
+
* Callers must read the id back off the response rather than reusing theirs.
|
|
71188
|
+
* @throws ZodError when the body is malformed.
|
|
71189
|
+
*/
|
|
71190
|
+
async savePolicy(body) {
|
|
71191
|
+
ClusteringPolicyWriteBodySchema.parse(body);
|
|
71192
|
+
const raw = await this.dxSaasService.oiPut(POLICY, body);
|
|
71193
|
+
const result = ClusteringPolicySchema.safeParse(raw);
|
|
71194
|
+
if (!result.success) {
|
|
71195
|
+
this.log.warn('ClusteringPolicy save response validation warning:', result.error.message);
|
|
71196
|
+
}
|
|
71197
|
+
return raw;
|
|
71198
|
+
}
|
|
71199
|
+
/**
|
|
71200
|
+
* Permanently deletes a policy.
|
|
71201
|
+
*
|
|
71202
|
+
* `DELETE oi/v2/api/clusteralarms/clusteringpolicy/{policyId}`
|
|
71203
|
+
*
|
|
71204
|
+
* @remarks The server answers with an empty body; callers should verify by
|
|
71205
|
+
* re-listing rather than trusting the response.
|
|
71206
|
+
*/
|
|
71207
|
+
async deletePolicy(policyId) {
|
|
71208
|
+
await this.dxSaasService.oiDelete(`${POLICY}/${encodeURIComponent(policyId)}`);
|
|
71209
|
+
}
|
|
71210
|
+
/**
|
|
71211
|
+
* Replays a candidate policy over recent alarms without saving it: how many
|
|
71212
|
+
* raw alarms it would match, how many situations it would create, and the
|
|
71213
|
+
* resulting noise reduction.
|
|
71214
|
+
*
|
|
71215
|
+
* `PUT oi/v2/api/clusteralarms/clusteringpolicy/preview?size=&time=`
|
|
71216
|
+
*
|
|
71217
|
+
* @param body - The policy to preview; only the seven keys the endpoint
|
|
71218
|
+
* accepts are sent (see `toClusteringPolicyPreviewBody`).
|
|
71219
|
+
* @param timeSeconds - Look-back window in seconds, e.g. 86400 for a day.
|
|
71220
|
+
* @param size - Maximum raw alarms to scan (the UI sends 1000).
|
|
71221
|
+
* @remarks `clusteringList[].templates[].alarms` carries whole raw alarm
|
|
71222
|
+
* documents, so the response grows quickly with `size` — summarize it.
|
|
71223
|
+
* @example
|
|
71224
|
+
* ```ts
|
|
71225
|
+
* const preview = await service.previewPolicy(body, 86400);
|
|
71226
|
+
* console.log(preview.totalAlarms, preview.totalClusters, preview.noiseReductionPercent);
|
|
71227
|
+
* ```
|
|
71228
|
+
*/
|
|
71229
|
+
async previewPolicy(body, timeSeconds, size = 1000) {
|
|
71230
|
+
const raw = await this.dxSaasService.oiPut(`${POLICY}/preview`, toClusteringPolicyPreviewBody(body), { size, time: timeSeconds });
|
|
71231
|
+
const result = ClusteringPolicyPreviewResponseSchema.safeParse(raw);
|
|
71232
|
+
if (!result.success) {
|
|
71233
|
+
this.log.warn('ClusteringPolicyPreviewResponse validation warning:', result.error.message);
|
|
71234
|
+
}
|
|
71235
|
+
return raw;
|
|
71236
|
+
}
|
|
71237
|
+
/**
|
|
71238
|
+
* The policy editor's catalogs: filterable alarm fields, clustering fields
|
|
71239
|
+
* with their weight bounds, the custom-naming operations, and the window
|
|
71240
|
+
* bounds.
|
|
71241
|
+
*
|
|
71242
|
+
* `GET oi/v2/api/clusteralarms/policyfields`
|
|
71243
|
+
*
|
|
71244
|
+
* @remarks A catalog entry's `values` is not a closed vocabulary — for the
|
|
71245
|
+
* window fields it is `[min, max, default]` and for clustering fields
|
|
71246
|
+
* `[min, max]`.
|
|
71247
|
+
*/
|
|
71248
|
+
async listPolicyFields() {
|
|
71249
|
+
const raw = await this.dxSaasService.oiGet(`${BASE}/policyfields`);
|
|
71250
|
+
const result = PolicyFieldsResponseSchema.safeParse(raw);
|
|
71251
|
+
if (!result.success) {
|
|
71252
|
+
this.log.warn('PolicyFieldsResponse validation warning:', result.error.message);
|
|
71253
|
+
}
|
|
71254
|
+
return raw;
|
|
71255
|
+
}
|
|
71256
|
+
/**
|
|
71257
|
+
* Tenant-wide clustering configuration — the weights, thresholds and
|
|
71258
|
+
* feature flags that govern clustering for every policy.
|
|
71259
|
+
*
|
|
71260
|
+
* `GET oi/v2/api/clusteralarms/tenantConfigAttributes`
|
|
71261
|
+
*/
|
|
71262
|
+
async getTenantConfigAttributes() {
|
|
71263
|
+
const raw = await this.dxSaasService.oiGet(`${BASE}/tenantConfigAttributes`);
|
|
71264
|
+
const result = TenantConfigAttributesResponseSchema.safeParse(raw);
|
|
71265
|
+
if (!result.success) {
|
|
71266
|
+
this.log.warn('TenantConfigAttributesResponse validation warning:', result.error.message);
|
|
71267
|
+
}
|
|
71268
|
+
return raw;
|
|
71269
|
+
}
|
|
71270
|
+
/**
|
|
71271
|
+
* **RAW, UNGUARDED WRITE TO TENANT-WIDE CLUSTERING INTERNALS — read this
|
|
71272
|
+
* before calling it with anything but {@link ALGORITHMIC_SITUATIONS_KEY}.**
|
|
71273
|
+
*
|
|
71274
|
+
* `PUT oi/v2/api/clusteralarms/tenantConfigAttributes`
|
|
71275
|
+
*
|
|
71276
|
+
* This writes whatever key you hand it into the tenant's clustering engine
|
|
71277
|
+
* configuration. It is the platform's own internal tuning surface — roughly
|
|
71278
|
+
* three dozen attributes governing scoring weights, thresholds, HDBSCAN
|
|
71279
|
+
* parameters, stop words, retention and feature flags — and it is **not a
|
|
71280
|
+
* documented public API**.
|
|
71281
|
+
*
|
|
71282
|
+
* What we actually know, and what we do not:
|
|
71283
|
+
*
|
|
71284
|
+
* - **Only one key's semantics are established here.**
|
|
71285
|
+
* {@link ALGORITHMIC_SITUATIONS_KEY} was verified end to end against a lab
|
|
71286
|
+
* tenant. Every other key's meaning, valid range, interactions and blast
|
|
71287
|
+
* radius are **unverified** — the names are suggestive, not authoritative.
|
|
71288
|
+
* - **The server validates almost nothing.** Every write observed returned
|
|
71289
|
+
* `{"Status":"Success"}`, including ones the UI would never produce. A
|
|
71290
|
+
* nonsensical value is accepted, not rejected, and the damage shows up
|
|
71291
|
+
* later as situations that silently stop forming or form wrongly.
|
|
71292
|
+
* - **Tenant-wide, and it affects data you cannot re-derive.** Clustering is
|
|
71293
|
+
* continuous. A bad value corrupts the situations produced while it is set;
|
|
71294
|
+
* restoring the attribute does not reconstruct them.
|
|
71295
|
+
* - **There is no reset-to-defaults.** Nothing returns the platform's
|
|
71296
|
+
* shipped values, so an overwritten attribute is only recoverable if the
|
|
71297
|
+
* caller captured the previous value first.
|
|
71298
|
+
* - **The update is partial**, which cuts both ways: omitted keys are safe,
|
|
71299
|
+
* but a wrong `type` on a key you *do* send corrupts just that one quietly.
|
|
71300
|
+
*
|
|
71301
|
+
* Because of all that, no CLI command exposes this generically. The only
|
|
71302
|
+
* callers in this repo are `situation enable-algorithmic-situations` and
|
|
71303
|
+
* `situation disable-algorithmic-situations`, which touch exactly one boolean
|
|
71304
|
+
* and verify it by re-reading.
|
|
71305
|
+
*
|
|
71306
|
+
* If you are adding a caller for another attribute, the bar is: establish the
|
|
71307
|
+
* semantics empirically against a lab tenant first (never a customer tenant),
|
|
71308
|
+
* read and record the current value, make the change reversible, and verify
|
|
71309
|
+
* by re-reading. Prefer {@link getTenantConfigAttributes} — reading is free.
|
|
71310
|
+
*
|
|
71311
|
+
* @param tenantId - Tenant to write to; use the id {@link getTenantConfigAttributes}
|
|
71312
|
+
* returned rather than composing one, since the write expects that exact form.
|
|
71313
|
+
* @param attributes - Only the attributes to change. The update is partial:
|
|
71314
|
+
* keys that are not sent keep their current value. Send the narrowest set
|
|
71315
|
+
* that does the job.
|
|
71316
|
+
* @throws ZodError when the body is malformed. Note this validates the
|
|
71317
|
+
* *envelope* only — it cannot tell you whether a key or value is sane.
|
|
71318
|
+
* @example
|
|
71319
|
+
* ```ts
|
|
71320
|
+
* // The one supported use: flip algorithmic situations, having read it first.
|
|
71321
|
+
* const config = await service.getTenantConfigAttributes();
|
|
71322
|
+
* const before = algorithmicSituationsEnabled(config);
|
|
71323
|
+
* await service.setTenantConfigAttributes(config.tenantId, [
|
|
71324
|
+
* { key: ALGORITHMIC_SITUATIONS_KEY, value: false, type: 'boolean' },
|
|
71325
|
+
* ]);
|
|
71326
|
+
* ```
|
|
71327
|
+
*/
|
|
71328
|
+
async setTenantConfigAttributes(tenantId, attributes) {
|
|
71329
|
+
const body = { tenantId, configAttrList: attributes };
|
|
71330
|
+
TenantConfigAttributesWriteBodySchema.parse(body);
|
|
71331
|
+
const raw = await this.dxSaasService.oiPut(`${BASE}/tenantConfigAttributes`, body);
|
|
71332
|
+
const result = TenantConfigAttributesWriteResponseSchema.safeParse(raw);
|
|
71333
|
+
if (!result.success) {
|
|
71334
|
+
this.log.warn('TenantConfigAttributesWriteResponse validation warning:', result.error.message);
|
|
71335
|
+
}
|
|
71336
|
+
return raw;
|
|
71337
|
+
}
|
|
71338
|
+
}
|
|
71339
|
+
|
|
70390
71340
|
var PermissionType = exports.DashboardPermissionsUpdateRequest.PermissionType;
|
|
70391
71341
|
/**
|
|
70392
71342
|
* Service for Grafana-style dashboard API: themes, API keys, dashboards,
|
|
@@ -75647,6 +76597,12 @@ class DxSaasService {
|
|
|
75647
76597
|
this.simplifiedCohortId = this.dxdoConfiguration.dxConfiguration.cohortId
|
|
75648
76598
|
.replace(/-/g, '')
|
|
75649
76599
|
.toLowerCase();
|
|
76600
|
+
// Opt-in only: without it axios keeps its default of no timeout, which the
|
|
76601
|
+
// CLI's streaming and long-running query paths rely on.
|
|
76602
|
+
const requestTimeoutMs = this.dxdoConfiguration.requestTimeoutMs;
|
|
76603
|
+
if (requestTimeoutMs !== undefined && requestTimeoutMs > 0) {
|
|
76604
|
+
this._httpClient.defaults.timeout = requestTimeoutMs;
|
|
76605
|
+
}
|
|
75650
76606
|
this.initializeProxyIfNecessary();
|
|
75651
76607
|
// Strip auth tokens from any error this client surfaces, so nothing downstream
|
|
75652
76608
|
// (handleAxiosError, re-throws, top-level catches) can log the Authorization header.
|
|
@@ -75931,9 +76887,7 @@ class DxSaasService {
|
|
|
75931
76887
|
* @param body - Request body (JSON-serializable). Defaults to `{}`.
|
|
75932
76888
|
* @param params - Query-string parameters.
|
|
75933
76889
|
* @param headers - Additional request headers merged over the auth header.
|
|
75934
|
-
* @param requestOverrides - Per-call axios settings
|
|
75935
|
-
* the shared client has no default timeout, so a caller that must not
|
|
75936
|
-
* hang — the at-exit command audit — bounds itself here.
|
|
76890
|
+
* @param requestOverrides - Per-call axios settings, see {@link RequestOverrides}.
|
|
75937
76891
|
*/
|
|
75938
76892
|
async tenantPost(path, body, params, headers = {}, requestOverrides = {}) {
|
|
75939
76893
|
const url = `${this.dxdoConfiguration.dxConfiguration.dxGatewayHost}${this.getCohortIDForURL()}/${path}`;
|
|
@@ -76126,10 +77080,14 @@ class DxSaasService {
|
|
|
76126
77080
|
* @param body - Request body.
|
|
76127
77081
|
* @param params - Query-string parameters.
|
|
76128
77082
|
* @param extraHeaders - Additional request headers.
|
|
77083
|
+
* @param requestOverrides - Per-call axios settings, see {@link RequestOverrides}.
|
|
76129
77084
|
*/
|
|
76130
|
-
async oiPost(path, body, params, extraHeaders) {
|
|
77085
|
+
async oiPost(path, body, params, extraHeaders, requestOverrides = {}) {
|
|
76131
77086
|
const url = `${this.dxdoConfiguration.dxConfiguration.dxGatewayHost}${this.getCohortIDForURL()}/${path}`;
|
|
76132
|
-
const config =
|
|
77087
|
+
const config = {
|
|
77088
|
+
...this.createUserAuthorizedRequestConfig(params ?? {}),
|
|
77089
|
+
...requestOverrides,
|
|
77090
|
+
};
|
|
76133
77091
|
if (extraHeaders) {
|
|
76134
77092
|
if (config.headers) {
|
|
76135
77093
|
config.headers = { ...config.headers, ...extraHeaders };
|
|
@@ -76278,7 +77236,10 @@ class DxSaasService {
|
|
|
76278
77236
|
}
|
|
76279
77237
|
const profile = this.dxdoConfiguration.configurationFilePath ?? '~/.dxdo/<profile>.dxo2.config.json';
|
|
76280
77238
|
const host = config.dxGatewayHost;
|
|
76281
|
-
|
|
77239
|
+
// `definitive` tells a long-running producer whether to give up on log
|
|
77240
|
+
// shipping for the process (the profile itself rules it out) or to retry
|
|
77241
|
+
// later (only the products lookup failed, e.g. a maintenance window).
|
|
77242
|
+
const cannot = (reason, definitive = true) => new exports.LogIngest.LogIngestionEndpointError(`Cannot determine the log ingestion endpoint: ${reason}`, definitive);
|
|
76282
77243
|
let gateway;
|
|
76283
77244
|
try {
|
|
76284
77245
|
gateway = parseSaasGateway(host);
|
|
@@ -76301,7 +77262,7 @@ class DxSaasService {
|
|
|
76301
77262
|
catch (error) {
|
|
76302
77263
|
const message = error instanceof Error ? error.message : String(error);
|
|
76303
77264
|
throw cannot(`the tenant products lookup (GET spp/v5/products on ${gateway.hostname}) failed: ${message}. ` +
|
|
76304
|
-
`Set "dxLogIngestionURL" (e.g. "${derived}") in ${profile} to bypass the lookup
|
|
77265
|
+
`Set "dxLogIngestionURL" (e.g. "${derived}") in ${profile} to bypass the lookup.`, false);
|
|
76305
77266
|
}
|
|
76306
77267
|
const tenant = products.displayName ?? '?';
|
|
76307
77268
|
const la = findProduct(products, LOG_ANALYTICS_PRODUCT);
|
|
@@ -76325,14 +77286,19 @@ class DxSaasService {
|
|
|
76325
77286
|
* `dxLogIngestionURL`, or the SaaS logs-gateway derived from the region and
|
|
76326
77287
|
* Log Analytics provisioning. Auth uses the same `Bearer {userToken}` as
|
|
76327
77288
|
* other tenant methods.
|
|
76328
|
-
* @
|
|
77289
|
+
* @param requestOverrides - Per-call axios settings, see {@link RequestOverrides}.
|
|
77290
|
+
* @throws {@link LogIngest.LogIngestionEndpointError} from
|
|
77291
|
+
* {@link resolveLogIngestionURL} when no endpoint can be determined.
|
|
76329
77292
|
*/
|
|
76330
|
-
async logPost(path, body) {
|
|
77293
|
+
async logPost(path, body, requestOverrides = {}) {
|
|
76331
77294
|
const logBase = await this.resolveLogIngestionURL();
|
|
76332
77295
|
const url = `${logBase}/${path}`;
|
|
76333
77296
|
this.log.debug(`log posting to: ${url}`);
|
|
76334
77297
|
return this._httpClient
|
|
76335
|
-
.post(url, body ?? {},
|
|
77298
|
+
.post(url, body ?? {}, {
|
|
77299
|
+
...this.createSimpleUserAuthorizedRequestConfig(undefined),
|
|
77300
|
+
...requestOverrides,
|
|
77301
|
+
})
|
|
76336
77302
|
.then((response) => response.data)
|
|
76337
77303
|
.catch((reason) => {
|
|
76338
77304
|
if (reason.response || reason.request) {
|
|
@@ -76973,6 +77939,17 @@ class EventService {
|
|
|
76973
77939
|
}
|
|
76974
77940
|
/** Ingests a custom alarm event via the Jarvis ingestion API. */
|
|
76975
77941
|
createAlarm(alarmEvent) {
|
|
77942
|
+
return this.createAlarms([alarmEvent]);
|
|
77943
|
+
}
|
|
77944
|
+
/**
|
|
77945
|
+
* Ingests several custom alarm documents in one Jarvis ingestion request.
|
|
77946
|
+
*
|
|
77947
|
+
* @remarks Each document's `alarm_unique_id` is its alarm's id: a second
|
|
77948
|
+
* document with the same id updates that alarm in place, a closed alarm
|
|
77949
|
+
* ignores every later document, and a CLOSED document for an id that was
|
|
77950
|
+
* never opened creates a closed alarm.
|
|
77951
|
+
*/
|
|
77952
|
+
createAlarms(alarmEvents, requestOverrides = {}) {
|
|
76976
77953
|
const ingestionBody = {
|
|
76977
77954
|
documents: [
|
|
76978
77955
|
{
|
|
@@ -76983,14 +77960,14 @@ class EventService {
|
|
|
76983
77960
|
product_id: 'ao',
|
|
76984
77961
|
unique_id: "$['alarm_unique_id']",
|
|
76985
77962
|
},
|
|
76986
|
-
body: [
|
|
77963
|
+
body: [...alarmEvents],
|
|
76987
77964
|
},
|
|
76988
77965
|
],
|
|
76989
77966
|
};
|
|
76990
|
-
this.log.debug('
|
|
77967
|
+
this.log.debug('createAlarms', JSON.stringify(ingestionBody, null, 2));
|
|
76991
77968
|
return this.dxSaaSService.oiPost('jarvis/v2/ingestion', ingestionBody, {}, {
|
|
76992
77969
|
index_name: 'ao_itoa_alarms_custom_1',
|
|
76993
|
-
});
|
|
77970
|
+
}, requestOverrides);
|
|
76994
77971
|
}
|
|
76995
77972
|
/** Ingests a custom event (non-change) via the Jarvis ingestion API. */
|
|
76996
77973
|
createEvent(changeEvent) {
|
|
@@ -81213,8 +82190,93 @@ function detectIPv4() {
|
|
|
81213
82190
|
function orDefault(value, fallback) {
|
|
81214
82191
|
return value ? value : fallback;
|
|
81215
82192
|
}
|
|
81216
|
-
/**
|
|
82193
|
+
/**
|
|
82194
|
+
* A source file slot the platform can actually parse.
|
|
82195
|
+
*
|
|
82196
|
+
* The Kafka consumer's pattern for slot 8 matches only a dotted token. When it does not match, the
|
|
82197
|
+
* parse slides and the record is stored wrong: `tags` swallows the middle, `file` takes the
|
|
82198
|
+
* second-to-last word of the message, and `message` keeps only the last word. Measured on a lab
|
|
82199
|
+
* tenant (2026-09-16, issue #620): `orig.file` parsed, while `orig-file`, `orig_file` and `origfile`
|
|
82200
|
+
* each corrupted the record. Producers that pass a Java logger name never saw it, because those are
|
|
82201
|
+
* dotted; `broker-events` or a bare integration name did.
|
|
82202
|
+
*
|
|
82203
|
+
* Appending `.log` makes the slot parseable and leaves a value that already has a dot untouched.
|
|
82204
|
+
*/
|
|
82205
|
+
function dottedFileSlot(value) {
|
|
82206
|
+
return value.includes('.') ? value : `${value}.log`;
|
|
82207
|
+
}
|
|
82208
|
+
/**
|
|
82209
|
+
* Ingestion path on the log gateway — the uim_logs pipeline shared with the
|
|
82210
|
+
* on-prem log collector. POSTed under the log gateway base (no cohort
|
|
82211
|
+
* segment) via {@link DxSaasService.logPost}.
|
|
82212
|
+
*/
|
|
81217
82213
|
const UIM_LOGS_INGESTION_PATH = 'mdo/v2/aoanalytics/ingestion/uim_logs';
|
|
82214
|
+
/**
|
|
82215
|
+
* Builds the uim_logs document for one log entry — the pure form of
|
|
82216
|
+
* {@link LogsService.buildLogPayload}, for producers that own their own
|
|
82217
|
+
* transport (a monitoring loop's log shipper) but must stay byte-compatible
|
|
82218
|
+
* with what `dx-do log ingest` sends.
|
|
82219
|
+
*
|
|
82220
|
+
* @param cohortId - The tenant's cohort id as it appears in the profile; it is
|
|
82221
|
+
* upper-cased into `tenant_id` and the first `temp_fields` slot.
|
|
82222
|
+
* @param options - Known log entry fields (`message` required; the rest
|
|
82223
|
+
* optional with sensible defaults). Validated against
|
|
82224
|
+
* {@link LogIngest.LogIngestOptionsSchema}.
|
|
82225
|
+
* @param additionalFields - Arbitrary extra fields to include in the indexed
|
|
82226
|
+
* document. `severity` and `logseverity` (any letter case) are refused:
|
|
82227
|
+
* severity travels through `options.severity` and is emitted as `logseverity`.
|
|
82228
|
+
* @remarks `options.file` is passed through {@link dottedFileSlot}: a source file
|
|
82229
|
+
* without a dot gets `.log` appended, because the platform's positional parse
|
|
82230
|
+
* only matches a dotted source file and corrupts the record otherwise (#620).
|
|
82231
|
+
* @throws ZodError if `options` fails schema validation.
|
|
82232
|
+
* @throws Error if `additionalFields` names a reserved field.
|
|
82233
|
+
*/
|
|
82234
|
+
function buildUimLogPayload(cohortId, options, additionalFields) {
|
|
82235
|
+
exports.LogIngest.LogIngestOptionsSchema.parse(options);
|
|
82236
|
+
for (const key of Object.keys(additionalFields ?? {})) {
|
|
82237
|
+
if (exports.LogIngest.isReservedLogField(key)) {
|
|
82238
|
+
throw new Error(`additional field '${key}' is reserved: pass severity through the 'severity' option — it is sent as 'logseverity'`);
|
|
82239
|
+
}
|
|
82240
|
+
}
|
|
82241
|
+
const tenantIdUpper = cohortId.toUpperCase();
|
|
82242
|
+
// `orDefault` (not `??`) so an explicit empty string is treated as omitted —
|
|
82243
|
+
// a blank value in any temp_fields component shifts every downstream
|
|
82244
|
+
// positional field. See the temp_fields comment below.
|
|
82245
|
+
const logtype = orDefault(options.logtype, 'generic');
|
|
82246
|
+
const host = orDefault(options.host, require$$0$3.hostname());
|
|
82247
|
+
const ip = orDefault(options.ip, detectIPv4());
|
|
82248
|
+
const agentInstance = orDefault(options.agentInstance, 'dx-do');
|
|
82249
|
+
const agentName = orDefault(options.agentName, 'Logs Collector');
|
|
82250
|
+
const containerId = orDefault(options.containerId, host);
|
|
82251
|
+
const containerName = orDefault(options.containerName, agentInstance);
|
|
82252
|
+
// A source file without a dot corrupts the whole record; see dottedFileSlot.
|
|
82253
|
+
const file = dottedFileSlot(orDefault(options.file, 'dx-do.cli'));
|
|
82254
|
+
const tag = `${logtype} logs`;
|
|
82255
|
+
// temp_fields must have exactly 9 space-separated components before the message
|
|
82256
|
+
// is appended by the SaaS filter (agentbase_msg = temp_fields + " " + message).
|
|
82257
|
+
// The Kafka consumer parses positionally: [0]=tenant [1]=logtype [2]=host
|
|
82258
|
+
// [3]=container_id [4]=container_name [5]=ip [6-7]=tags [8]=source_file [9+]=message.
|
|
82259
|
+
const temp_fields = `${tenantIdUpper} ${logtype} ${host} ${containerId} ${containerName} ${ip} ${tag} ${file}`;
|
|
82260
|
+
return {
|
|
82261
|
+
'@timestamp': options.timestamp ?? new Date().toISOString(),
|
|
82262
|
+
// logtype must be top-level: the SaaS filter does `update => ["type", "%{logtype}"]`
|
|
82263
|
+
// which drives Kafka consumer index routing — without it type stays as "ingestionapi"
|
|
82264
|
+
logtype,
|
|
82265
|
+
// The platform indexes severity as `logseverity`; a bare `severity` is
|
|
82266
|
+
// silently dropped, which is why both are reserved as custom fields.
|
|
82267
|
+
logseverity: options.severity ?? exports.LogIngest.DEFAULT_LOG_SEVERITY,
|
|
82268
|
+
message: options.message,
|
|
82269
|
+
host: { name: host, hostname: host },
|
|
82270
|
+
tenant_id: tenantIdUpper,
|
|
82271
|
+
temp_fields,
|
|
82272
|
+
tags: [tag],
|
|
82273
|
+
__agent_name: agentName,
|
|
82274
|
+
__agent_instance: agentInstance,
|
|
82275
|
+
container_id: containerId,
|
|
82276
|
+
container_name: containerName,
|
|
82277
|
+
...additionalFields,
|
|
82278
|
+
};
|
|
82279
|
+
}
|
|
81218
82280
|
/**
|
|
81219
82281
|
* Service for querying and ingesting log analytics data.
|
|
81220
82282
|
*/
|
|
@@ -81255,50 +82317,7 @@ class LogsService {
|
|
|
81255
82317
|
* @throws Error if `additionalFields` names a reserved field.
|
|
81256
82318
|
*/
|
|
81257
82319
|
buildLogPayload(options, additionalFields) {
|
|
81258
|
-
|
|
81259
|
-
for (const key of Object.keys(additionalFields ?? {})) {
|
|
81260
|
-
if (exports.LogIngest.isReservedLogField(key)) {
|
|
81261
|
-
throw new Error(`additional field '${key}' is reserved: pass severity through the 'severity' option — it is sent as 'logseverity'`);
|
|
81262
|
-
}
|
|
81263
|
-
}
|
|
81264
|
-
const cohortId = this.dxSaasService.dxdoConfiguration.dxConfiguration.cohortId;
|
|
81265
|
-
const tenantIdUpper = cohortId.toUpperCase();
|
|
81266
|
-
// `orDefault` (not `??`) so an explicit empty string is treated as omitted —
|
|
81267
|
-
// a blank value in any temp_fields component shifts every downstream
|
|
81268
|
-
// positional field. See the temp_fields comment below.
|
|
81269
|
-
const logtype = orDefault(options.logtype, 'generic');
|
|
81270
|
-
const host = orDefault(options.host, require$$0$3.hostname());
|
|
81271
|
-
const ip = orDefault(options.ip, detectIPv4());
|
|
81272
|
-
const agentInstance = orDefault(options.agentInstance, 'dx-do');
|
|
81273
|
-
const agentName = orDefault(options.agentName, 'Logs Collector');
|
|
81274
|
-
const containerId = orDefault(options.containerId, host);
|
|
81275
|
-
const containerName = orDefault(options.containerName, agentInstance);
|
|
81276
|
-
const file = orDefault(options.file, 'dx-do.cli');
|
|
81277
|
-
const tag = `${logtype} logs`;
|
|
81278
|
-
// temp_fields must have exactly 9 space-separated components before the message
|
|
81279
|
-
// is appended by the SaaS filter (agentbase_msg = temp_fields + " " + message).
|
|
81280
|
-
// The Kafka consumer parses positionally: [0]=tenant [1]=logtype [2]=host
|
|
81281
|
-
// [3]=container_id [4]=container_name [5]=ip [6-7]=tags [8]=source_file [9+]=message.
|
|
81282
|
-
const temp_fields = `${tenantIdUpper} ${logtype} ${host} ${containerId} ${containerName} ${ip} ${tag} ${file}`;
|
|
81283
|
-
return {
|
|
81284
|
-
'@timestamp': options.timestamp ?? new Date().toISOString(),
|
|
81285
|
-
// logtype must be top-level: the SaaS filter does `update => ["type", "%{logtype}"]`
|
|
81286
|
-
// which drives Kafka consumer index routing — without it type stays as "ingestionapi"
|
|
81287
|
-
logtype,
|
|
81288
|
-
// The platform indexes severity as `logseverity`; a bare `severity` is
|
|
81289
|
-
// silently dropped, which is why both are reserved as custom fields.
|
|
81290
|
-
logseverity: options.severity ?? exports.LogIngest.DEFAULT_LOG_SEVERITY,
|
|
81291
|
-
message: options.message,
|
|
81292
|
-
host: { name: host, hostname: host },
|
|
81293
|
-
tenant_id: tenantIdUpper,
|
|
81294
|
-
temp_fields,
|
|
81295
|
-
tags: [tag],
|
|
81296
|
-
__agent_name: agentName,
|
|
81297
|
-
__agent_instance: agentInstance,
|
|
81298
|
-
container_id: containerId,
|
|
81299
|
-
container_name: containerName,
|
|
81300
|
-
...additionalFields,
|
|
81301
|
-
};
|
|
82320
|
+
return buildUimLogPayload(this.dxSaasService.dxdoConfiguration.dxConfiguration.cohortId, options, additionalFields);
|
|
81302
82321
|
}
|
|
81303
82322
|
/**
|
|
81304
82323
|
* Ingests a single log entry into the log gateway.
|
|
@@ -83314,6 +84333,27 @@ class ServiceService {
|
|
|
83314
84333
|
const { body } = await this.buildServiceContentBody(serviceName, newContent, mode);
|
|
83315
84334
|
return this.createService(body, { replace: true });
|
|
83316
84335
|
}
|
|
84336
|
+
/**
|
|
84337
|
+
* Builds the store body for changing a service's own attributes (description,
|
|
84338
|
+
* location, tags, custom properties, includeChildServices) WITHOUT saving.
|
|
84339
|
+
* Re-saves the full subtree (via {@link buildHierarchyBody}) so the children
|
|
84340
|
+
* edges survive `replace=true`; only the target vertex changes. The name and
|
|
84341
|
+
* the service type are never patched — both are fixed at creation (the server
|
|
84342
|
+
* does not allow renames and ignores a `serviceType` change on a re-save).
|
|
84343
|
+
*
|
|
84344
|
+
* @returns the store body plus human-readable change lines (empty = no-op).
|
|
84345
|
+
* @throws Error if the service does not exist.
|
|
84346
|
+
*/
|
|
84347
|
+
async buildServiceUpdateBody(serviceName, patch) {
|
|
84348
|
+
const body = await this.buildHierarchyBody(serviceName);
|
|
84349
|
+
const changes = exports.ServiceTransform.applyServiceUpdate(body, serviceName, patch);
|
|
84350
|
+
return { body, changes };
|
|
84351
|
+
}
|
|
84352
|
+
/** Updates a service's attributes and saves it. See {@link buildServiceUpdateBody}. */
|
|
84353
|
+
async updateService(serviceName, patch) {
|
|
84354
|
+
const { body } = await this.buildServiceUpdateBody(serviceName, patch);
|
|
84355
|
+
return this.createService(body, { replace: true });
|
|
84356
|
+
}
|
|
83317
84357
|
/** Deletes a service by name; optionally deletes child services recursively. */
|
|
83318
84358
|
async deleteService(serviceName, recursive = false) {
|
|
83319
84359
|
return this.dxSaaSService.tenantPost('/oi/v2/sa/service/status', { name: serviceName, action: 'delete' }, { recursive });
|
|
@@ -83333,19 +84373,23 @@ class ServiceService {
|
|
|
83333
84373
|
},
|
|
83334
84374
|
};
|
|
83335
84375
|
}
|
|
83336
|
-
/**
|
|
83337
|
-
|
|
84376
|
+
/**
|
|
84377
|
+
* Builds an empty (no-content) service vertex payload ready to be populated.
|
|
84378
|
+
* @param serviceType - `Service` (default) | `Application` | `Group`.
|
|
84379
|
+
*/
|
|
84380
|
+
generateEmptyServiceVertex(serviceName, serviceDescription, situationsIncludeChildServices, tags = [], customProperties = [], serviceType = 'Service', location = '') {
|
|
83338
84381
|
return {
|
|
83339
84382
|
attributes: {
|
|
83340
84383
|
type: 'saService',
|
|
83341
84384
|
name: serviceName,
|
|
84385
|
+
serviceType,
|
|
83342
84386
|
state: 'ACTIVE',
|
|
83343
84387
|
maintenance: false,
|
|
83344
84388
|
situationsIncludeChildServices,
|
|
83345
84389
|
serviceContent: [],
|
|
83346
84390
|
root_service: null,
|
|
83347
84391
|
tags,
|
|
83348
|
-
location
|
|
84392
|
+
location,
|
|
83349
84393
|
description: serviceDescription,
|
|
83350
84394
|
customProperties,
|
|
83351
84395
|
customMetrics: [],
|
|
@@ -84187,17 +85231,20 @@ class DataStoreMetricsMetadataService {
|
|
|
84187
85231
|
* schema validation, a warning is logged but the raw API response is
|
|
84188
85232
|
* still returned.
|
|
84189
85233
|
*
|
|
85234
|
+
* @param requestOverrides - Per-call `timeout` / `signal`; registration is
|
|
85235
|
+
* an idempotent upsert, so a caller may safely retry after a timeout.
|
|
85236
|
+
*
|
|
84190
85237
|
* @throws ZodError if the request fails schema validation — including the
|
|
84191
85238
|
* tag-registration restrictions ("@tags" non-empty, every listed tag
|
|
84192
85239
|
* present with a non-empty string value, TYPE_TAGS never set without tags).
|
|
84193
85240
|
*/
|
|
84194
|
-
async registerMetrics(metrics, sync) {
|
|
85241
|
+
async registerMetrics(metrics, sync, requestOverrides = {}) {
|
|
84195
85242
|
const body = {
|
|
84196
85243
|
metrics: metrics.map((m) => ensureTypeTagsFlag(m)),
|
|
84197
85244
|
...(sync !== undefined ? { sync } : {}),
|
|
84198
85245
|
};
|
|
84199
85246
|
MetricRegisterRequestSchema.parse(body);
|
|
84200
|
-
const raw = await this.dxSaasService.tenantPost('metadata/registerMetric', body);
|
|
85247
|
+
const raw = await this.dxSaasService.tenantPost('metadata/registerMetric', body, undefined, {}, requestOverrides);
|
|
84201
85248
|
const result = MetricRegisterResponseSchema.safeParse(raw);
|
|
84202
85249
|
if (!result.success) {
|
|
84203
85250
|
this.log.warn('MetricRegisterResponse validation warning:', result.error.message);
|
|
@@ -84205,8 +85252,8 @@ class DataStoreMetricsMetadataService {
|
|
|
84205
85252
|
return raw;
|
|
84206
85253
|
}
|
|
84207
85254
|
/** Registers a single metric. Convenience wrapper around {@link registerMetrics}. */
|
|
84208
|
-
async registerMetric(metric, sync) {
|
|
84209
|
-
return this.registerMetrics([metric], sync);
|
|
85255
|
+
async registerMetric(metric, sync, requestOverrides = {}) {
|
|
85256
|
+
return this.registerMetrics([metric], sync, requestOverrides);
|
|
84210
85257
|
}
|
|
84211
85258
|
/**
|
|
84212
85259
|
* POSTs a metadata query to `/metadata/queryMetric` and returns the matching
|
|
@@ -84463,15 +85510,18 @@ class DataStoreTASService {
|
|
|
84463
85510
|
* POSTs a graph to `/tas/graph/store` and returns the store result including
|
|
84464
85511
|
* any failed vertices or edges.
|
|
84465
85512
|
*
|
|
84466
|
-
* @remarks The request is validated against {@link TasStoreGraphInputSchema}
|
|
84467
|
-
*
|
|
84468
|
-
*
|
|
85513
|
+
* @remarks The request is validated against {@link TasStoreGraphInputSchema}
|
|
85514
|
+
* (externalId-keyed vertices and edges — the ingestion contract; numeric
|
|
85515
|
+
* ids are optional). If the response fails schema validation, a warning is
|
|
85516
|
+
* logged but the raw API response is still returned.
|
|
85517
|
+
* @param requestOverrides - Per-call `timeout` / `signal`; the store is
|
|
85518
|
+
* idempotent, so a caller may safely retry after a timeout.
|
|
84469
85519
|
*
|
|
84470
85520
|
* @throws ZodError if the request fails schema validation.
|
|
84471
85521
|
*/
|
|
84472
|
-
async storeGraph(input) {
|
|
85522
|
+
async storeGraph(input, requestOverrides = {}) {
|
|
84473
85523
|
TasStoreGraphInputSchema.parse(input);
|
|
84474
|
-
const raw = await this.dxSaasService.tenantPost('tas/graph/store', input);
|
|
85524
|
+
const raw = await this.dxSaasService.tenantPost('tas/graph/store', input, undefined, {}, requestOverrides);
|
|
84475
85525
|
const result = TasStoreGraphResponseSchema.safeParse(raw);
|
|
84476
85526
|
if (!result.success) {
|
|
84477
85527
|
this.log.warn('TasStoreGraphResponse validation warning:', result.error.message);
|
|
@@ -84899,13 +85949,17 @@ class DataStoreNASSService {
|
|
|
84899
85949
|
* @remarks The request is validated against {@link NassStoreRequestSchema}.
|
|
84900
85950
|
* If the response fails schema validation, a warning is logged but the raw
|
|
84901
85951
|
* API response is still returned.
|
|
85952
|
+
* @param requestOverrides - Per-call `timeout` / `signal`. A store is NOT
|
|
85953
|
+
* idempotent: a second write to the same `(metricId, timestamp)` merges
|
|
85954
|
+
* with the first, so only retry when the request provably never reached
|
|
85955
|
+
* the server.
|
|
84902
85956
|
*
|
|
84903
85957
|
* @throws ZodError if any datapoint fails schema validation.
|
|
84904
85958
|
*/
|
|
84905
|
-
async storeMetricValues(values) {
|
|
85959
|
+
async storeMetricValues(values, requestOverrides = {}) {
|
|
84906
85960
|
const body = { values };
|
|
84907
85961
|
NassStoreRequestSchema.parse(body);
|
|
84908
|
-
const raw = await this.dxSaasService.tenantPost('nass/metricValue/store', body);
|
|
85962
|
+
const raw = await this.dxSaasService.tenantPost('nass/metricValue/store', body, undefined, {}, requestOverrides);
|
|
84909
85963
|
const result = NassStoreResponseSchema.safeParse(raw);
|
|
84910
85964
|
if (!result.success) {
|
|
84911
85965
|
this.log.warn('NassStoreResponse validation warning:', result.error.message);
|
|
@@ -85325,6 +86379,7 @@ function createServiceMonolith(dxDoConfiguration, log = new NullSimpleLog()) {
|
|
|
85325
86379
|
dxBlobService: new BlobService(dxSaaSService, log),
|
|
85326
86380
|
dxBlobStorageService: new DataStoreBlobStorageService(dxSaaSService, log),
|
|
85327
86381
|
dxChannelService: new ChannelService(dxSaaSService, log),
|
|
86382
|
+
dxClusteringPolicyService: new ClusteringPolicyService(dxSaaSService, log),
|
|
85328
86383
|
dxDashboardService: new DashboardService(dxSaaSService),
|
|
85329
86384
|
dxDataStoreMetricsMetadataService: new DataStoreMetricsMetadataService(dxSaaSService, log),
|
|
85330
86385
|
dxDataStoreNASSService: new DataStoreNASSService(dxSaaSService, log),
|
|
@@ -85381,6 +86436,7 @@ exports.ALARM_QUEUE_FILTER_SETTING_KEYS = ALARM_QUEUE_FILTER_SETTING_KEYS;
|
|
|
85381
86436
|
exports.ALARM_VIEW_CATEGORIES = ALARM_VIEW_CATEGORIES;
|
|
85382
86437
|
exports.ALARM_VIEW_FIELD_PATHS = ALARM_VIEW_FIELD_PATHS;
|
|
85383
86438
|
exports.ALARM_VIEW_SEARCH_PATHS = ALARM_VIEW_SEARCH_PATHS;
|
|
86439
|
+
exports.ALGORITHMIC_SITUATIONS_KEY = ALGORITHMIC_SITUATIONS_KEY;
|
|
85384
86440
|
exports.AccService = AccService;
|
|
85385
86441
|
exports.AgentService = AgentService;
|
|
85386
86442
|
exports.AlarmCategorySchema = AlarmCategorySchema;
|
|
@@ -85468,6 +86524,11 @@ exports.BlobSchemaListResponseSchema = BlobSchemaListResponseSchema;
|
|
|
85468
86524
|
exports.BlobService = BlobService;
|
|
85469
86525
|
exports.BlobStoreParamsSchema = BlobStoreParamsSchema;
|
|
85470
86526
|
exports.BlobStoreResponseSchema = BlobStoreResponseSchema;
|
|
86527
|
+
exports.CLUSTERING_POLICY_BUILTIN_AUTHORS = CLUSTERING_POLICY_BUILTIN_AUTHORS;
|
|
86528
|
+
exports.CLUSTERING_POLICY_CONDITIONS = CLUSTERING_POLICY_CONDITIONS;
|
|
86529
|
+
exports.CLUSTERING_POLICY_PRESENCE_CONDITIONS = CLUSTERING_POLICY_PRESENCE_CONDITIONS;
|
|
86530
|
+
exports.CLUSTERING_POLICY_PREVIEW_RANGES = CLUSTERING_POLICY_PREVIEW_RANGES;
|
|
86531
|
+
exports.CLUSTERING_POLICY_STATUSES = CLUSTERING_POLICY_STATUSES;
|
|
85471
86532
|
exports.CURL_COHORT_VAR = CURL_COHORT_VAR;
|
|
85472
86533
|
exports.CURL_HOST_VAR = CURL_HOST_VAR;
|
|
85473
86534
|
exports.CURL_TOKEN_VAR = CURL_TOKEN_VAR;
|
|
@@ -85482,6 +86543,18 @@ exports.ChannelService = ChannelService;
|
|
|
85482
86543
|
exports.ChannelTemplateRefSchema = ChannelTemplateRefSchema;
|
|
85483
86544
|
exports.ChannelWriteBodySchema = ChannelWriteBodySchema;
|
|
85484
86545
|
exports.ChannelWriteResponseSchema = ChannelWriteResponseSchema;
|
|
86546
|
+
exports.ClusteringCriteriaValuesSchema = ClusteringCriteriaValuesSchema;
|
|
86547
|
+
exports.ClusteringCriterionPropertiesSchema = ClusteringCriterionPropertiesSchema;
|
|
86548
|
+
exports.ClusteringCriterionSchema = ClusteringCriterionSchema;
|
|
86549
|
+
exports.ClusteringPolicyCriteriaSchema = ClusteringPolicyCriteriaSchema;
|
|
86550
|
+
exports.ClusteringPolicyPreviewResponseSchema = ClusteringPolicyPreviewResponseSchema;
|
|
86551
|
+
exports.ClusteringPolicySchema = ClusteringPolicySchema;
|
|
86552
|
+
exports.ClusteringPolicySearchRequestSchema = ClusteringPolicySearchRequestSchema;
|
|
86553
|
+
exports.ClusteringPolicySearchResponseSchema = ClusteringPolicySearchResponseSchema;
|
|
86554
|
+
exports.ClusteringPolicyService = ClusteringPolicyService;
|
|
86555
|
+
exports.ClusteringPolicyWriteBodySchema = ClusteringPolicyWriteBodySchema;
|
|
86556
|
+
exports.ClusteringPreviewClusterSchema = ClusteringPreviewClusterSchema;
|
|
86557
|
+
exports.ClusteringPreviewTemplateSchema = ClusteringPreviewTemplateSchema;
|
|
85485
86558
|
exports.CreateAgentTokenRequestSchema = CreateAgentTokenRequestSchema;
|
|
85486
86559
|
exports.CreateInternalTokenRequestSchema = CreateInternalTokenRequestSchema;
|
|
85487
86560
|
exports.CreateTenantTokenRequestSchema = CreateTenantTokenRequestSchema;
|
|
@@ -85516,6 +86589,7 @@ exports.ENRICHMENT_PREVIEW_WINDOWS = ENRICHMENT_PREVIEW_WINDOWS;
|
|
|
85516
86589
|
exports.ENRICHMENT_SOURCES = ENRICHMENT_SOURCES;
|
|
85517
86590
|
exports.EXPORT_INCLUDE_TOKEN_ENV = EXPORT_INCLUDE_TOKEN_ENV;
|
|
85518
86591
|
exports.EdgeNumericIdSchema = EdgeNumericIdSchema;
|
|
86592
|
+
exports.EmptyCriteriaSchema = EmptyCriteriaSchema;
|
|
85519
86593
|
exports.EnrichmentCustomFieldSchema = EnrichmentCustomFieldSchema;
|
|
85520
86594
|
exports.EnrichmentCustomFieldsResponseSchema = EnrichmentCustomFieldsResponseSchema;
|
|
85521
86595
|
exports.EnrichmentMappingSchema = EnrichmentMappingSchema;
|
|
@@ -85656,9 +86730,12 @@ exports.PlatformAlertService = PlatformAlertService;
|
|
|
85656
86730
|
exports.PlatformManagementModuleService = PlatformManagementModuleService;
|
|
85657
86731
|
exports.PlatformMetricGroupingService = PlatformMetricGroupingService;
|
|
85658
86732
|
exports.PolicyDeleteResponseSchema = PolicyDeleteResponseSchema;
|
|
86733
|
+
exports.PolicyFieldSchema = PolicyFieldSchema;
|
|
86734
|
+
exports.PolicyFieldsResponseSchema = PolicyFieldsResponseSchema;
|
|
85659
86735
|
exports.PolicyFilterAtomSchema = PolicyFilterAtomSchema;
|
|
85660
86736
|
exports.PolicyFilterExpressionSchema = PolicyFilterExpressionSchema;
|
|
85661
86737
|
exports.PolicyLinkedEntitySchema = PolicyLinkedEntitySchema;
|
|
86738
|
+
exports.PolicyNamingOperationSchema = PolicyNamingOperationSchema;
|
|
85662
86739
|
exports.PolicyWriteBodySchema = PolicyWriteBodySchema;
|
|
85663
86740
|
exports.PolicyWriteResponseSchema = PolicyWriteResponseSchema;
|
|
85664
86741
|
exports.PublicKeyJsonResponseSchema = PublicKeyJsonResponseSchema;
|
|
@@ -85761,6 +86838,7 @@ exports.SourceNameRegExSpecifierSchema = SourceNameRegExSpecifierSchema;
|
|
|
85761
86838
|
exports.SourceNameSpecifierSchema = SourceNameSpecifierSchema;
|
|
85762
86839
|
exports.StatusPageComponentSchema = StatusPageComponentSchema;
|
|
85763
86840
|
exports.StatusPageComponentsSchema = StatusPageComponentsSchema;
|
|
86841
|
+
exports.StoredCriteriaSchema = StoredCriteriaSchema;
|
|
85764
86842
|
exports.TAGS_ATTRIBUTE_KEY = TAGS_ATTRIBUTE_KEY;
|
|
85765
86843
|
exports.TASService = TASService;
|
|
85766
86844
|
exports.TC_METRIC_CAP = TC_METRIC_CAP;
|
|
@@ -85817,9 +86895,13 @@ exports.TasProjectionFilterSchema = TasProjectionFilterSchema;
|
|
|
85817
86895
|
exports.TasQuerySchema = TasQuerySchema;
|
|
85818
86896
|
exports.TasServiceFilterSchema = TasServiceFilterSchema;
|
|
85819
86897
|
exports.TasStatusFilterSchema = TasStatusFilterSchema;
|
|
86898
|
+
exports.TasStoreAttributeValueSchema = TasStoreAttributeValueSchema;
|
|
85820
86899
|
exports.TasStoreChangeSchema = TasStoreChangeSchema;
|
|
86900
|
+
exports.TasStoreEdgeSchema = TasStoreEdgeSchema;
|
|
85821
86901
|
exports.TasStoreGraphInputSchema = TasStoreGraphInputSchema;
|
|
85822
86902
|
exports.TasStoreGraphResponseSchema = TasStoreGraphResponseSchema;
|
|
86903
|
+
exports.TasStoreGraphSchema = TasStoreGraphSchema;
|
|
86904
|
+
exports.TasStoreVertexSchema = TasStoreVertexSchema;
|
|
85823
86905
|
exports.TasTakeEdgesFilterSchema = TasTakeEdgesFilterSchema;
|
|
85824
86906
|
exports.TasTakeFlowsFilterSchema = TasTakeFlowsFilterSchema;
|
|
85825
86907
|
exports.TasTakeVerticesFilterSchema = TasTakeVerticesFilterSchema;
|
|
@@ -85832,6 +86914,10 @@ exports.TasViewSchema = TasViewSchema;
|
|
|
85832
86914
|
exports.TemplateDeleteResponseSchema = TemplateDeleteResponseSchema;
|
|
85833
86915
|
exports.TemplateWriteBodySchema = TemplateWriteBodySchema;
|
|
85834
86916
|
exports.TemplateWriteResponseSchema = TemplateWriteResponseSchema;
|
|
86917
|
+
exports.TenantConfigAttributeSchema = TenantConfigAttributeSchema;
|
|
86918
|
+
exports.TenantConfigAttributesResponseSchema = TenantConfigAttributesResponseSchema;
|
|
86919
|
+
exports.TenantConfigAttributesWriteBodySchema = TenantConfigAttributesWriteBodySchema;
|
|
86920
|
+
exports.TenantConfigAttributesWriteResponseSchema = TenantConfigAttributesWriteResponseSchema;
|
|
85835
86921
|
exports.TenantProductSchema = TenantProductSchema;
|
|
85836
86922
|
exports.TenantProductsResponseSchema = TenantProductsResponseSchema;
|
|
85837
86923
|
exports.TenantRoleSchema = TenantRoleSchema;
|
|
@@ -85856,6 +86942,7 @@ exports.TraversalVertexFilterSchema = TraversalVertexFilterSchema;
|
|
|
85856
86942
|
exports.TraverseCollectSchema = TraverseCollectSchema;
|
|
85857
86943
|
exports.TraverseDirectionSchema = TraverseDirectionSchema;
|
|
85858
86944
|
exports.TraverseSchema = TraverseSchema;
|
|
86945
|
+
exports.UIM_LOGS_INGESTION_PATH = UIM_LOGS_INGESTION_PATH;
|
|
85859
86946
|
exports.UpdateAgentTokenRequestSchema = UpdateAgentTokenRequestSchema;
|
|
85860
86947
|
exports.UpdateTenantTokenRequestSchema = UpdateTenantTokenRequestSchema;
|
|
85861
86948
|
exports.UpdateUserTokenRequestSchema = UpdateUserTokenRequestSchema;
|
|
@@ -85923,6 +87010,7 @@ exports.ags = ags;
|
|
|
85923
87010
|
exports.agsresponse = agsresponse;
|
|
85924
87011
|
exports.alarmFilterDisplayColumnsFor = alarmFilterDisplayColumnsFor;
|
|
85925
87012
|
exports.alertsForSliIndex = alertsForSliIndex;
|
|
87013
|
+
exports.algorithmicSituationsEnabled = algorithmicSituationsEnabled;
|
|
85926
87014
|
exports.allAlarmQueues = allAlarmQueues;
|
|
85927
87015
|
exports.apiTokenCreate = apiTokenCreate;
|
|
85928
87016
|
exports.apiTokenDelete = apiTokenDelete;
|
|
@@ -85936,6 +87024,7 @@ exports.buildAlarmFilterUpdateBody = buildAlarmFilterUpdateBody;
|
|
|
85936
87024
|
exports.buildAlarmQueueFilterExpression = buildAlarmQueueFilterExpression;
|
|
85937
87025
|
exports.buildAlarmQueueUpdateBody = buildAlarmQueueUpdateBody;
|
|
85938
87026
|
exports.buildAlertEntry = buildAlertEntry;
|
|
87027
|
+
exports.buildClusteringPolicyUpdateBody = buildClusteringPolicyUpdateBody;
|
|
85939
87028
|
exports.buildEnrichmentRuleUpdateBody = buildEnrichmentRuleUpdateBody;
|
|
85940
87029
|
exports.buildInventoryCustomFilter = buildInventoryCustomFilter;
|
|
85941
87030
|
exports.buildInventoryQueueUpdateBody = buildInventoryQueueUpdateBody;
|
|
@@ -85943,6 +87032,7 @@ exports.buildPolicyFilterExpression = buildPolicyFilterExpression;
|
|
|
85943
87032
|
exports.buildSliFunction = buildSliFunction;
|
|
85944
87033
|
exports.buildSloTriplet = buildSloTriplet;
|
|
85945
87034
|
exports.buildTemplateRefs = buildTemplateRefs;
|
|
87035
|
+
exports.buildUimLogPayload = buildUimLogPayload;
|
|
85946
87036
|
exports.capVertexDetail = capVertexDetail;
|
|
85947
87037
|
exports.checkGet = checkGet;
|
|
85948
87038
|
exports.composeMetricTypeBits = composeMetricTypeBits;
|
|
@@ -85968,7 +87058,9 @@ exports.defaultItsmPropertyList = defaultItsmPropertyList;
|
|
|
85968
87058
|
exports.defaultRuleName = defaultRuleName;
|
|
85969
87059
|
exports.deriveSliAs = deriveSliAs;
|
|
85970
87060
|
exports.deriveVertexName = deriveVertexName;
|
|
87061
|
+
exports.describeClusteringCriteria = describeClusteringCriteria;
|
|
85971
87062
|
exports.displayColumnsFor = displayColumnsFor;
|
|
87063
|
+
exports.dottedFileSlot = dottedFileSlot;
|
|
85972
87064
|
exports.draftKey = draftKey;
|
|
85973
87065
|
exports.encodeItsmSecret = encodeItsmSecret;
|
|
85974
87066
|
exports.ensureParallelAlerts = ensureParallelAlerts;
|
|
@@ -86011,9 +87103,11 @@ exports.isAlarmFilter = isAlarmFilter;
|
|
|
86011
87103
|
exports.isAlarmQueue = isAlarmQueue;
|
|
86012
87104
|
exports.isAlarmQueueNotFound = isAlarmQueueNotFound;
|
|
86013
87105
|
exports.isAuthorizationHeader = isAuthorizationHeader;
|
|
87106
|
+
exports.isBuiltInClusteringPolicy = isBuiltInClusteringPolicy;
|
|
86014
87107
|
exports.isBuiltInPolicy = isBuiltInPolicy;
|
|
86015
87108
|
exports.isBuiltInTemplate = isBuiltInTemplate;
|
|
86016
87109
|
exports.isDataStoreSchemaType = isDataStoreSchemaType;
|
|
87110
|
+
exports.isEmptyCriteria = isEmptyCriteria;
|
|
86017
87111
|
exports.isInventoryQueueNotFound = isInventoryQueueNotFound;
|
|
86018
87112
|
exports.isPersonalQueue = isPersonalQueue;
|
|
86019
87113
|
exports.isProductProvisioned = isProductProvisioned;
|
|
@@ -86082,6 +87176,7 @@ exports.parseSaasGateway = parseSaasGateway;
|
|
|
86082
87176
|
exports.parseServiceNowUrl = parseServiceNowUrl;
|
|
86083
87177
|
exports.planEnrichmentReorder = planEnrichmentReorder;
|
|
86084
87178
|
exports.policyCategoryGuard = policyCategoryGuard;
|
|
87179
|
+
exports.policyFieldBounds = policyFieldBounds;
|
|
86085
87180
|
exports.policyFilterAtoms = policyFilterAtoms;
|
|
86086
87181
|
exports.producedMetricName = producedMetricName;
|
|
86087
87182
|
exports.projectCustomAttributes = projectCustomAttributes;
|
|
@@ -86125,10 +87220,13 @@ exports.tagsGetAll = tagsGetAll;
|
|
|
86125
87220
|
exports.tcSourceNameMatches = tcSourceNameMatches;
|
|
86126
87221
|
exports.tcSourceNameToMmPattern = tcSourceNameToMmPattern;
|
|
86127
87222
|
exports.templateUsage = templateUsage;
|
|
87223
|
+
exports.tenantConfigAttribute = tenantConfigAttribute;
|
|
86128
87224
|
exports.timezonesList = timezonesList;
|
|
86129
87225
|
exports.toAlarmFilterWriteBody = toAlarmFilterWriteBody;
|
|
86130
87226
|
exports.toAlarmQueueWriteBody = toAlarmQueueWriteBody;
|
|
86131
87227
|
exports.toChannelWriteBody = toChannelWriteBody;
|
|
87228
|
+
exports.toClusteringPolicyPreviewBody = toClusteringPolicyPreviewBody;
|
|
87229
|
+
exports.toClusteringPolicyWriteBody = toClusteringPolicyWriteBody;
|
|
86132
87230
|
exports.toEnrichmentRuleCreateBody = toEnrichmentRuleCreateBody;
|
|
86133
87231
|
exports.toGroupMetricsRequest = toGroupMetricsRequest;
|
|
86134
87232
|
exports.toInventoryQueueWriteBody = toInventoryQueueWriteBody;
|