@dx-do/cli 6.0.4 → 6.1.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-node/main.js
CHANGED
|
@@ -104476,7 +104476,7 @@ var require_pino = __commonJS((exports, module) => {
|
|
|
104476
104476
|
} = symbols;
|
|
104477
104477
|
var { epochTime, nullTime } = time3;
|
|
104478
104478
|
var { pid } = process;
|
|
104479
|
-
var
|
|
104479
|
+
var hostname4 = os8.hostname();
|
|
104480
104480
|
var defaultErrorSerializer = stdSerializers.err;
|
|
104481
104481
|
var defaultOptions3 = {
|
|
104482
104482
|
level: "info",
|
|
@@ -104486,7 +104486,7 @@ var require_pino = __commonJS((exports, module) => {
|
|
|
104486
104486
|
errorKey: "err",
|
|
104487
104487
|
nestedKey: null,
|
|
104488
104488
|
enabled: true,
|
|
104489
|
-
base: { pid, hostname:
|
|
104489
|
+
base: { pid, hostname: hostname4 },
|
|
104490
104490
|
serializers: Object.assign(Object.create(null), {
|
|
104491
104491
|
err: defaultErrorSerializer
|
|
104492
104492
|
}),
|
|
@@ -135471,7 +135471,7 @@ import require$$0$62 from "net";
|
|
|
135471
135471
|
import require$$1$32 from "tls";
|
|
135472
135472
|
import require$$33 from "assert";
|
|
135473
135473
|
import require$$1$22 from "tty";
|
|
135474
|
-
import require$$0$42 from "os";
|
|
135474
|
+
import require$$0$42, { hostname as hostname4, networkInterfaces as networkInterfaces2 } from "os";
|
|
135475
135475
|
import require$$0$52, { EventEmitter as EventEmitter$12 } from "events";
|
|
135476
135476
|
import http22 from "http2";
|
|
135477
135477
|
import zlib2 from "zlib";
|
|
@@ -138228,15 +138228,15 @@ function parseUrl$12(urlString) {
|
|
|
138228
138228
|
function getProxyForUrl2(url3) {
|
|
138229
138229
|
var parsedUrl = (typeof url3 === "string" ? parseUrl$12(url3) : url3) || {};
|
|
138230
138230
|
var proto3 = parsedUrl.protocol;
|
|
138231
|
-
var
|
|
138231
|
+
var hostname5 = parsedUrl.host;
|
|
138232
138232
|
var port = parsedUrl.port;
|
|
138233
|
-
if (typeof
|
|
138233
|
+
if (typeof hostname5 !== "string" || !hostname5 || typeof proto3 !== "string") {
|
|
138234
138234
|
return "";
|
|
138235
138235
|
}
|
|
138236
138236
|
proto3 = proto3.split(":", 1)[0];
|
|
138237
|
-
|
|
138237
|
+
hostname5 = hostname5.replace(/:\d*$/, "");
|
|
138238
138238
|
port = parseInt(port) || DEFAULT_PORTS$12[proto3] || 0;
|
|
138239
|
-
if (!shouldProxy2(
|
|
138239
|
+
if (!shouldProxy2(hostname5, port)) {
|
|
138240
138240
|
return "";
|
|
138241
138241
|
}
|
|
138242
138242
|
var proxy = getEnv2(proto3 + "_proxy") || getEnv2("all_proxy");
|
|
@@ -138245,7 +138245,7 @@ function getProxyForUrl2(url3) {
|
|
|
138245
138245
|
}
|
|
138246
138246
|
return proxy;
|
|
138247
138247
|
}
|
|
138248
|
-
function shouldProxy2(
|
|
138248
|
+
function shouldProxy2(hostname5, port) {
|
|
138249
138249
|
var NO_PROXY = getEnv2("no_proxy").toLowerCase();
|
|
138250
138250
|
if (!NO_PROXY) {
|
|
138251
138251
|
return true;
|
|
@@ -138264,12 +138264,12 @@ function shouldProxy2(hostname3, port) {
|
|
|
138264
138264
|
return true;
|
|
138265
138265
|
}
|
|
138266
138266
|
if (!/^[.*]/.test(parsedProxyHostname)) {
|
|
138267
|
-
return
|
|
138267
|
+
return hostname5 !== parsedProxyHostname;
|
|
138268
138268
|
}
|
|
138269
138269
|
if (parsedProxyHostname.charAt(0) === "*") {
|
|
138270
138270
|
parsedProxyHostname = parsedProxyHostname.slice(1);
|
|
138271
138271
|
}
|
|
138272
|
-
return !
|
|
138272
|
+
return !hostname5.endsWith(parsedProxyHostname);
|
|
138273
138273
|
});
|
|
138274
138274
|
}
|
|
138275
138275
|
function getEnv2(key) {
|
|
@@ -139454,7 +139454,7 @@ function shouldBypassProxy2(location) {
|
|
|
139454
139454
|
return true;
|
|
139455
139455
|
}
|
|
139456
139456
|
const port = Number.parseInt(parsed.port, 10) || DEFAULT_PORTS2[parsed.protocol.split(":", 1)[0]] || 0;
|
|
139457
|
-
const
|
|
139457
|
+
const hostname5 = normalizeNoProxyHost2(parsed.hostname.toLowerCase());
|
|
139458
139458
|
return noProxy.split(/[\s,]+/).some((entry) => {
|
|
139459
139459
|
if (!entry) {
|
|
139460
139460
|
return false;
|
|
@@ -139471,9 +139471,9 @@ function shouldBypassProxy2(location) {
|
|
|
139471
139471
|
entryHost = entryHost.slice(1);
|
|
139472
139472
|
}
|
|
139473
139473
|
if (entryHost.charAt(0) === ".") {
|
|
139474
|
-
return
|
|
139474
|
+
return hostname5.endsWith(entryHost);
|
|
139475
139475
|
}
|
|
139476
|
-
return
|
|
139476
|
+
return hostname5 === entryHost || isLoopback2(hostname5) && isLoopback2(entryHost);
|
|
139477
139477
|
});
|
|
139478
139478
|
}
|
|
139479
139479
|
function speedometer2(samplesCount, min4) {
|
|
@@ -145261,11 +145261,11 @@ class AgentService2 {
|
|
|
145261
145261
|
});
|
|
145262
145262
|
const helperInfrastructureAgentHostMap = new ListMap3;
|
|
145263
145263
|
const indieInfrastructureAgentHostMap = new ListMap3;
|
|
145264
|
-
function hostHasAppAgent(
|
|
145265
|
-
return javaAgentHostMap.getMap().has(
|
|
145264
|
+
function hostHasAppAgent(hostname5) {
|
|
145265
|
+
return javaAgentHostMap.getMap().has(hostname5) || nodeAgentHostMap.getMap().has(hostname5) || dotNETAgentHostMap.getMap().has(hostname5) || pythonAgentHostMap.getMap().has(hostname5);
|
|
145266
145266
|
}
|
|
145267
|
-
function hostAlreadyHasInfra(
|
|
145268
|
-
return helperInfrastructureAgentHostMap.getMap().has(
|
|
145267
|
+
function hostAlreadyHasInfra(hostname5) {
|
|
145268
|
+
return helperInfrastructureAgentHostMap.getMap().has(hostname5) || indieInfrastructureAgentHostMap.getMap().has(hostname5);
|
|
145269
145269
|
}
|
|
145270
145270
|
agentDescriptors.forEach((agentDescriptor) => {
|
|
145271
145271
|
if (this.isInfrastructureAgent(agentDescriptor)) {
|
|
@@ -145339,6 +145339,13 @@ class AgentService2 {
|
|
|
145339
145339
|
};
|
|
145340
145340
|
return this.dxSaaSService.tenantPost("/apm/atc/api/private/trace/summary", traceSummaryRequestBody);
|
|
145341
145341
|
}
|
|
145342
|
+
injectTrace(trace) {
|
|
145343
|
+
return this.injectTraces([trace]);
|
|
145344
|
+
}
|
|
145345
|
+
injectTraces(traces) {
|
|
145346
|
+
const body = { values: traces };
|
|
145347
|
+
return this.dxSaaSService.tenantPost("/tracestore/process", body);
|
|
145348
|
+
}
|
|
145342
145349
|
startAgentTrace(agents, minTXDuration, sessionDuration, parameterName, operationType, parameterNotSign, parameterValue, errorFilterValue) {
|
|
145343
145350
|
let body = {
|
|
145344
145351
|
agentList: agents,
|
|
@@ -148441,6 +148448,19 @@ class JsExtensionService2 {
|
|
|
148441
148448
|
return this.dxSaaSService.tenantRequest("POST", "/apm/atc/api/private/em/extensions", formData, undefined, formData.getHeaders());
|
|
148442
148449
|
}
|
|
148443
148450
|
}
|
|
148451
|
+
function detectIPv42() {
|
|
148452
|
+
const nets = networkInterfaces2();
|
|
148453
|
+
for (const iface of Object.values(nets)) {
|
|
148454
|
+
if (!iface)
|
|
148455
|
+
continue;
|
|
148456
|
+
for (const net2 of iface) {
|
|
148457
|
+
if (net2.family === "IPv4" && !net2.internal) {
|
|
148458
|
+
return net2.address;
|
|
148459
|
+
}
|
|
148460
|
+
}
|
|
148461
|
+
}
|
|
148462
|
+
return "127.0.0.1";
|
|
148463
|
+
}
|
|
148444
148464
|
|
|
148445
148465
|
class LogsService2 {
|
|
148446
148466
|
dxSaasService;
|
|
@@ -148450,6 +148470,54 @@ class LogsService2 {
|
|
|
148450
148470
|
queryLogs(logQueryBody) {
|
|
148451
148471
|
return this.dxSaasService.oiPost("oi/loganalytics/v1/api/logs/filter", logQueryBody);
|
|
148452
148472
|
}
|
|
148473
|
+
ingestLog(entry) {
|
|
148474
|
+
return this.ingestLogs([entry]);
|
|
148475
|
+
}
|
|
148476
|
+
buildLogPayload(entries) {
|
|
148477
|
+
const cohortId = this.dxSaasService.dxdoConfiguration.dxConfiguration.cohortId;
|
|
148478
|
+
const tenantIdUpper = cohortId.toUpperCase();
|
|
148479
|
+
const now5 = new Date().toISOString();
|
|
148480
|
+
return entries.map((e) => {
|
|
148481
|
+
const host = e.host ?? hostname4();
|
|
148482
|
+
const logtype = e.logtype;
|
|
148483
|
+
const ip = e.ip ?? detectIPv42();
|
|
148484
|
+
const agentInstance = e.agentInstance ?? "dx-do";
|
|
148485
|
+
const agentName = e.agentName ?? "Logs Collector";
|
|
148486
|
+
const containerId = e.containerId ?? host;
|
|
148487
|
+
const containerName = e.containerName ?? agentInstance;
|
|
148488
|
+
const file2 = e.file ?? "dx-do.cli";
|
|
148489
|
+
const tag5 = `${logtype} logs`;
|
|
148490
|
+
const temp_fields = `${tenantIdUpper} ${logtype} ${host} ${containerId} ${containerName} ${ip} ${tag5} ${file2}`;
|
|
148491
|
+
return {
|
|
148492
|
+
"@timestamp": now5,
|
|
148493
|
+
logtype,
|
|
148494
|
+
message: e.message ?? "",
|
|
148495
|
+
host: { name: host, hostname: host },
|
|
148496
|
+
tenant_id: tenantIdUpper,
|
|
148497
|
+
temp_fields,
|
|
148498
|
+
tags: [tag5],
|
|
148499
|
+
__agent_name: agentName,
|
|
148500
|
+
__agent_instance: agentInstance,
|
|
148501
|
+
container_id: containerId,
|
|
148502
|
+
container_name: containerName,
|
|
148503
|
+
...Object.fromEntries(Object.entries(e).filter(([k2]) => ![
|
|
148504
|
+
"logtype",
|
|
148505
|
+
"message",
|
|
148506
|
+
"host",
|
|
148507
|
+
"timestamp",
|
|
148508
|
+
"ip",
|
|
148509
|
+
"agentInstance",
|
|
148510
|
+
"agentName",
|
|
148511
|
+
"containerId",
|
|
148512
|
+
"containerName",
|
|
148513
|
+
"file"
|
|
148514
|
+
].includes(k2)))
|
|
148515
|
+
};
|
|
148516
|
+
});
|
|
148517
|
+
}
|
|
148518
|
+
ingestLogs(entries) {
|
|
148519
|
+
return this.dxSaasService.logPost("mdo/v2/aoanalytics/ingestion/uim_logs", this.buildLogPayload(entries));
|
|
148520
|
+
}
|
|
148453
148521
|
}
|
|
148454
148522
|
|
|
148455
148523
|
class ManagementModuleService2 {
|
|
@@ -149899,6 +149967,22 @@ class DataStoreMetricsMetadataService2 {
|
|
|
149899
149967
|
this.dxSaasService = dxSaasService;
|
|
149900
149968
|
this.log = log4;
|
|
149901
149969
|
}
|
|
149970
|
+
async registerMetrics(metrics, sync) {
|
|
149971
|
+
const body = {
|
|
149972
|
+
metrics,
|
|
149973
|
+
...sync !== undefined ? { sync } : {}
|
|
149974
|
+
};
|
|
149975
|
+
MetricRegisterRequestSchema2.parse(body);
|
|
149976
|
+
const raw = await this.dxSaasService.tenantPost("metadata/registerMetric", body);
|
|
149977
|
+
const result = MetricRegisterResponseSchema2.safeParse(raw);
|
|
149978
|
+
if (!result.success) {
|
|
149979
|
+
this.log.warn("MetricRegisterResponse validation warning:", result.error.message);
|
|
149980
|
+
}
|
|
149981
|
+
return raw;
|
|
149982
|
+
}
|
|
149983
|
+
async registerMetric(metric, sync) {
|
|
149984
|
+
return this.registerMetrics([metric], sync);
|
|
149985
|
+
}
|
|
149902
149986
|
async queryMetric(query) {
|
|
149903
149987
|
MetadataMetricQuerySchema2.parse(query);
|
|
149904
149988
|
const raw = await this.dxSaasService.tenantPost("metadata/queryMetric", query);
|
|
@@ -149993,6 +150077,15 @@ class DataStoreTASService2 {
|
|
|
149993
150077
|
this.dxSaasService = dxSaasService;
|
|
149994
150078
|
this.log = log4;
|
|
149995
150079
|
}
|
|
150080
|
+
async storeGraph(input) {
|
|
150081
|
+
TasStoreGraphInputSchema2.parse(input);
|
|
150082
|
+
const raw = await this.dxSaasService.tenantPost("tas/graph/store", input);
|
|
150083
|
+
const result = TasStoreGraphResponseSchema2.safeParse(raw);
|
|
150084
|
+
if (!result.success) {
|
|
150085
|
+
this.log.warn("TasStoreGraphResponse validation warning:", result.error.message);
|
|
150086
|
+
}
|
|
150087
|
+
return raw;
|
|
150088
|
+
}
|
|
149996
150089
|
async executeQuery(query) {
|
|
149997
150090
|
TasQuerySchema2.parse(query);
|
|
149998
150091
|
const raw = await this.dxSaasService.tenantPost("tas/graph/query", query);
|
|
@@ -150223,6 +150316,19 @@ class DataStoreTokensService2 {
|
|
|
150223
150316
|
return this.dxSaasService.tenantPost("tenants/token/import", request);
|
|
150224
150317
|
}
|
|
150225
150318
|
}
|
|
150319
|
+
|
|
150320
|
+
class DataStoreNASSService2 {
|
|
150321
|
+
dxSaasService;
|
|
150322
|
+
log;
|
|
150323
|
+
constructor(dxSaasService, log4) {
|
|
150324
|
+
this.dxSaasService = dxSaasService;
|
|
150325
|
+
this.log = log4;
|
|
150326
|
+
}
|
|
150327
|
+
async storeMetricValues(values3) {
|
|
150328
|
+
const body = { values: values3 };
|
|
150329
|
+
return this.dxSaasService.tenantPost("nass/metricValue/store", body);
|
|
150330
|
+
}
|
|
150331
|
+
}
|
|
150226
150332
|
function createServiceMonolith2(dxDoConfiguration, log4 = new NullSimpleLog2) {
|
|
150227
150333
|
const dxSaaSService = new DxSaasService2(dxDoConfiguration, log4);
|
|
150228
150334
|
const dxTASService = new TASService2(dxSaaSService, log4);
|
|
@@ -150245,6 +150351,7 @@ function createServiceMonolith2(dxDoConfiguration, log4 = new NullSimpleLog2) {
|
|
|
150245
150351
|
dxChannelService: new ChannelService2(dxSaaSService),
|
|
150246
150352
|
dxDashboardService: new DashboardService2(dxSaaSService),
|
|
150247
150353
|
dxDataStoreMetricsMetadataService: new DataStoreMetricsMetadataService2(dxSaaSService, log4),
|
|
150354
|
+
dxDataStoreNASSService: new DataStoreNASSService2(dxSaaSService, log4),
|
|
150248
150355
|
dxDataStoreNASSQLService: new DataStoreNASSQLService2(dxSaaSService, log4),
|
|
150249
150356
|
dxDataStoreTASService: new DataStoreTASService2(dxSaaSService, log4),
|
|
150250
150357
|
dxEventService: new EventService2(dxSaaSService, log4),
|
|
@@ -155625,14 +155732,14 @@ var import_fastify, import_cors, import__static, CONFIG_SUFFIX = ".dxo2.config.j
|
|
|
155625
155732
|
return `${high >> 8}.${high & 255}.${low >> 8}.${low & 255}`;
|
|
155626
155733
|
}
|
|
155627
155734
|
return host;
|
|
155628
|
-
}, normalizeNoProxyHost2 = (
|
|
155629
|
-
if (!
|
|
155630
|
-
return
|
|
155735
|
+
}, normalizeNoProxyHost2 = (hostname5) => {
|
|
155736
|
+
if (!hostname5) {
|
|
155737
|
+
return hostname5;
|
|
155631
155738
|
}
|
|
155632
|
-
if (
|
|
155633
|
-
|
|
155739
|
+
if (hostname5.charAt(0) === "[" && hostname5.charAt(hostname5.length - 1) === "]") {
|
|
155740
|
+
hostname5 = hostname5.slice(1, -1);
|
|
155634
155741
|
}
|
|
155635
|
-
return unmapIPv4MappedIPv62(
|
|
155742
|
+
return unmapIPv4MappedIPv62(hostname5.replace(/\.+$/, ""));
|
|
155636
155743
|
}, progressEventReducer2 = (listener, isDownloadStream, freq = 3) => {
|
|
155637
155744
|
let bytesNotified = 0;
|
|
155638
155745
|
const _speedometer = speedometer2(50, 250);
|
|
@@ -156906,7 +157013,7 @@ var import_fastify, import_cors, import__static, CONFIG_SUFFIX = ".dxo2.config.j
|
|
|
156906
157013
|
url: "/folders",
|
|
156907
157014
|
...options
|
|
156908
157015
|
});
|
|
156909
|
-
}, MServe2, DashboardPermissionsUpdateRequest2, DashboardSearch2, VertexStateFilterLazy2, VertexStateAllFilterSchema2, VertexStateAndFilterSchema2, VertexStateOrFilterSchema2, VertexStateAlertFilterSchema2, VertexStateMetricFilterSchema2, VertexStateStateFilterSchema2, VertexStateVertexIdFilterSchema2, VertexStateNamespaceFilterSchema2, VertexStateManagementModuleFilterSchema2, VertexStateEmptyFilterSchema2, VertexGroupSchema2, VertexStateCollectVertexGroupStatusFilterSchema2, VertexStateFilterSchema2, AttributeExpressionOperatorSchema2, AttributeExpressionComparatorSchema2, AttributeExpressionSchema2, AttributeValueAsFieldSchema2, TraversalVertexFilterSchema2, TraversalEdgeFilterSchema2, TraverseDirectionSchema2, TraverseCollectSchema2, TraverseSchema2, TasGroupingItemSchema2, TasAttributeFilterModeSchema2, TasFollowPathTypeSchema2, TasFollowPathFlowFilterSchema2, TasJoinTypeSchema2, TasCollectCardInfoTierSchema2, TasCollectExperienceSelectorSchema2, TasFilterLazy2, TasAllFilterSchema2, TasEmptyFilterSchema2, TasAndFilterSchema2, TasOrFilterSchema2, TasNotFilterSchema2, TasAttributeFilterSchema2, TasTraverseFilterSchema2, TasVertexIdFilterSchema2, TasServiceFilterSchema2, TasLuceneFilterSchema2, TasLayerFilterSchema2, TasJoinFilterSchema2, TasFollowPathFilterSchema2, TasCoverageFilterSchema2, TasStatusFilterSchema2, TasVariableFilterSchema2, TasLegacyFilterSchema2, TasAddFlowsFilterSchema2, TasAddWiresFilterSchema2, TasAddWireContextFilterSchema2, TasAddTransitioningEdgesFilterSchema2, TasTakeVerticesFilterSchema2, TasTakeEdgesFilterSchema2, TasTakeFlowsFilterSchema2, TasCollectAttributesFilterSchema2, TasCollectAttributeNamesFilterSchema2, TasCollectCountsFilterSchema2, TasCollectVertexIdFilterSchema2, TasCollectGroupingInfoFilterSchema2, TasCollectCardInfoFilterSchema2, TasCollectExperienceAttributesFilterSchema2, TasFilterSchema2, TasVariableSchema2, TasProjectionFilterSchema2, TasViewSchema2, TasOrderSchema2, TasQuerySchema2, TasExternalIdSchema2, TasAttributeTypeSchema2, TasVertexSchema2, EdgeNumericIdSchema2, TasEdgeSchema2, VertexStateExternalIdSchema2, VertexStateNumericIdSchema2, VertexStateSchema2, TasAnalyticBaseSchema2, TasAttributeAlertStatisticsSchema2, TasCollectAttributeResultSchema2, TasAttributeNameSchema2, TasCollectAttributeNamesResultSchema2, TasCollectCountsResultSchema2, TasGroupingAlertStatisticsSchema2, TasGroupingInfoSchema2, TasCollectGroupingInfoResultSchema2, TasCollectCardInfoResultSchema2, TasAnalyticResultSchema2, TasGraphSchema2, OperatorSchema2, SourceNameAllSpecifierSchema2, SourceNameNoneSpecifierSchema2, SourceNameAndSpecifierSchema2, SourceNameOrSpecifierSchema2, SourceNameNotSpecifierSchema2, SourceNameExactSpecifierSchema2, SourceNameRegExSpecifierSchema2, SourceNamePartOperatorSpecifierSchema2, SourceNameSpecifierSchema2, FolderNameAllSpecifierSchema2, FolderNameNoneSpecifierSchema2, FolderNameAndSpecifierSchema2, FolderNameOrSpecifierSchema2, FolderNameNotSpecifierSchema2, FolderNameExactSpecifierSchema2, FolderNameRegExSpecifierSchema2, FolderNameChildrenSpecifierSchema2, FolderNameSpecifierSchema2, QueryAttributeExpressionSchema2, AttributeNameAllSpecifierSchema2, AttributeNameNoneSpecifierSchema2, AttributeNameAndSpecifierSchema2, AttributeNameOrSpecifierSchema2, AttributeNameNotSpecifierSchema2, AttributeNameExactSpecifierSchema2, AttributeNameRegExSpecifierSchema2, AttributeNameFolderSpecifierSchema2, AttributeNameChildrenSpecifierSchema2, AttributeNameTypeSpecifierSchema2, AttributeNameOperatorSpecifierSchema2, AttributeNameAnyNumericSpecifierSchema2, AttributeNameAttributeSpecifierSchema2, AttributeNameSpecifierSchema2, ManagementModuleIdSchema2, QueryAllSpecifierSchema2, QueryNoneSpecifierSchema2, QueryAndSpecifierSchema2, QueryOrSpecifierSchema2, QueryNotSpecifierSchema2, QuerySpecSpecifierSchema2, QueryIdSpecifierSchema2, QueryAttributeSpecifierSchema2, QueryMetricGroupSpecifierSchema2, ServiceFilterSpecifierSchema2, QuerySpecifierSchema2, QueryHintForceRangeSchema2, QueryHintSchema2, MetadataMetricQuerySchema2, MetricAttributeSchema2, MetricFolderSchema2, MetadataMetricQueryResponseV2Schema2, METRIC_TYPE_ENUM2, METRIC_TYPE_ENUM_NAMES2, NumericOperatorSchema2, QueryFilterAndSpecSchema2, QueryFilterOrSpecSchema2, QueryFilterNotSpecSchema2, QueryFilterExprSpecSchema2, QueryFilterInSpecSchema2, QueryFilterRegexSpecSchema2, QueryFilterNumericSpecSchema2, QueryFilterPredicateSpecSchema2, QueryRangeSpecSchema2, QueryMetricIdSchema2, JoinTypeSchema2, FillModeSchema2, AlignmentSchema2, CalendarIntervalSchema2, QuantileMethodSchema2, NassValueTypeSchema2, QueryColumnTypeSpecSchema2, aggregationFields2, OrderItemSchema2, QueryFromSpecSchema2, QueryFromTableSpecSchema2, QueryShowTablesSpecSchema2, QueryWindowSpecSchema2, QueryCalendarWindowSpecSchema2, QueryGroupSpecSchema2, QueryOrderSpecSchema2, QueryKeepSpecSchema2, QueryCountSpecSchema2, QuerySumSpecSchema2, QueryMinSpecSchema2, QueryMaxSpecSchema2, QueryMeanSpecSchema2, QueryMultiAggregationSpecSchema2, QueryNassAggregationSpecSchema2, QueryDerivativeSpecSchema2, QueryDifferenceSpecSchema2, QueryFirstSpecSchema2, QueryLastSpecSchema2, QueryQuantileSpecSchema2, QueryDistinctSpecSchema2, QueryDescribeSpecSchema2, QueryTopSpecSchema2, QueryBottomSpecSchema2, QueryMapSpecSchema2, QueryMapStringSpecSchema2, QueryNassMapSpecSchema2, QueryFilterSpecSchema2, QueryFilterExprFnSpecSchema2, QueryJoinDataSpecSchema2, QueryFromMetadataSpecSchema2, QueryFromTopologySpecSchema2, QueryFromDataSpecSchema2, QueryJoinMetadataSpecSchema2, QueryJoinTopologySpecSchema2, QueryFormatTimeSpecSchema2, QueryFormatSpecSchema2, QueryLogSpecSchema2, QueryScriptSpecSchema2, QueryFunctionSpecSchema2, QueryRequestSchema2, QueryResultSchema2, DXChannel2, DEFAULT_EXPERIENCE_REQUEST_BODY2, PlatformFilters2, GraphResponse2, LuxonError$13, InvalidDateTimeError$1, InvalidIntervalError$1, InvalidDurationError$1, ConflictingSpecificationError$1, InvalidUnitError$1, InvalidArgumentError$1, ZoneIsAbstractError$13, n$1 = "numeric", s$1 = "short", l$1 = "long", DATE_SHORT$1, DATE_MED$1, DATE_MED_WITH_WEEKDAY$1, DATE_FULL$1, DATE_HUGE$1, TIME_SIMPLE$1, TIME_WITH_SECONDS$1, TIME_WITH_SHORT_OFFSET$1, TIME_WITH_LONG_OFFSET$1, TIME_24_SIMPLE$1, TIME_24_WITH_SECONDS$1, TIME_24_WITH_SHORT_OFFSET$1, TIME_24_WITH_LONG_OFFSET$1, DATETIME_SHORT$1, DATETIME_SHORT_WITH_SECONDS$1, DATETIME_MED$1, DATETIME_MED_WITH_SECONDS$1, DATETIME_MED_WITH_WEEKDAY$1, DATETIME_FULL$1, DATETIME_FULL_WITH_SECONDS$1, DATETIME_HUGE$1, DATETIME_HUGE_WITH_SECONDS$1, Zone$13 = class Zone7 {
|
|
157016
|
+
}, MServe2, DashboardPermissionsUpdateRequest2, DashboardSearch2, VertexStateFilterLazy2, VertexStateAllFilterSchema2, VertexStateAndFilterSchema2, VertexStateOrFilterSchema2, VertexStateAlertFilterSchema2, VertexStateMetricFilterSchema2, VertexStateStateFilterSchema2, VertexStateVertexIdFilterSchema2, VertexStateNamespaceFilterSchema2, VertexStateManagementModuleFilterSchema2, VertexStateEmptyFilterSchema2, VertexGroupSchema2, VertexStateCollectVertexGroupStatusFilterSchema2, VertexStateFilterSchema2, AttributeExpressionOperatorSchema2, AttributeExpressionComparatorSchema2, AttributeExpressionSchema2, AttributeValueAsFieldSchema2, TraversalVertexFilterSchema2, TraversalEdgeFilterSchema2, TraverseDirectionSchema2, TraverseCollectSchema2, TraverseSchema2, TasGroupingItemSchema2, TasAttributeFilterModeSchema2, TasFollowPathTypeSchema2, TasFollowPathFlowFilterSchema2, TasJoinTypeSchema2, TasCollectCardInfoTierSchema2, TasCollectExperienceSelectorSchema2, TasFilterLazy2, TasAllFilterSchema2, TasEmptyFilterSchema2, TasAndFilterSchema2, TasOrFilterSchema2, TasNotFilterSchema2, TasAttributeFilterSchema2, TasTraverseFilterSchema2, TasVertexIdFilterSchema2, TasServiceFilterSchema2, TasLuceneFilterSchema2, TasLayerFilterSchema2, TasJoinFilterSchema2, TasFollowPathFilterSchema2, TasCoverageFilterSchema2, TasStatusFilterSchema2, TasVariableFilterSchema2, TasLegacyFilterSchema2, TasAddFlowsFilterSchema2, TasAddWiresFilterSchema2, TasAddWireContextFilterSchema2, TasAddTransitioningEdgesFilterSchema2, TasTakeVerticesFilterSchema2, TasTakeEdgesFilterSchema2, TasTakeFlowsFilterSchema2, TasCollectAttributesFilterSchema2, TasCollectAttributeNamesFilterSchema2, TasCollectCountsFilterSchema2, TasCollectVertexIdFilterSchema2, TasCollectGroupingInfoFilterSchema2, TasCollectCardInfoFilterSchema2, TasCollectExperienceAttributesFilterSchema2, TasFilterSchema2, TasVariableSchema2, TasProjectionFilterSchema2, TasViewSchema2, TasOrderSchema2, TasQuerySchema2, TasExternalIdSchema2, TasAttributeTypeSchema2, TasVertexSchema2, EdgeNumericIdSchema2, TasEdgeSchema2, VertexStateExternalIdSchema2, VertexStateNumericIdSchema2, VertexStateSchema2, TasAnalyticBaseSchema2, TasAttributeAlertStatisticsSchema2, TasCollectAttributeResultSchema2, TasAttributeNameSchema2, TasCollectAttributeNamesResultSchema2, TasCollectCountsResultSchema2, TasGroupingAlertStatisticsSchema2, TasGroupingInfoSchema2, TasCollectGroupingInfoResultSchema2, TasCollectCardInfoResultSchema2, TasAnalyticResultSchema2, TasGraphSchema2, TasStoreGraphInputSchema2, TasStoreChangeSchema2, TasStoreGraphResponseSchema2, OperatorSchema2, SourceNameAllSpecifierSchema2, SourceNameNoneSpecifierSchema2, SourceNameAndSpecifierSchema2, SourceNameOrSpecifierSchema2, SourceNameNotSpecifierSchema2, SourceNameExactSpecifierSchema2, SourceNameRegExSpecifierSchema2, SourceNamePartOperatorSpecifierSchema2, SourceNameSpecifierSchema2, FolderNameAllSpecifierSchema2, FolderNameNoneSpecifierSchema2, FolderNameAndSpecifierSchema2, FolderNameOrSpecifierSchema2, FolderNameNotSpecifierSchema2, FolderNameExactSpecifierSchema2, FolderNameRegExSpecifierSchema2, FolderNameChildrenSpecifierSchema2, FolderNameSpecifierSchema2, QueryAttributeExpressionSchema2, AttributeNameAllSpecifierSchema2, AttributeNameNoneSpecifierSchema2, AttributeNameAndSpecifierSchema2, AttributeNameOrSpecifierSchema2, AttributeNameNotSpecifierSchema2, AttributeNameExactSpecifierSchema2, AttributeNameRegExSpecifierSchema2, AttributeNameFolderSpecifierSchema2, AttributeNameChildrenSpecifierSchema2, AttributeNameTypeSpecifierSchema2, AttributeNameOperatorSpecifierSchema2, AttributeNameAnyNumericSpecifierSchema2, AttributeNameAttributeSpecifierSchema2, AttributeNameSpecifierSchema2, ManagementModuleIdSchema2, QueryAllSpecifierSchema2, QueryNoneSpecifierSchema2, QueryAndSpecifierSchema2, QueryOrSpecifierSchema2, QueryNotSpecifierSchema2, QuerySpecSpecifierSchema2, QueryIdSpecifierSchema2, QueryAttributeSpecifierSchema2, QueryMetricGroupSpecifierSchema2, ServiceFilterSpecifierSchema2, QuerySpecifierSchema2, QueryHintForceRangeSchema2, QueryHintSchema2, MetadataMetricQuerySchema2, MetricRegisterSchema2, MetricRegisterRequestSchema2, MetricRegisterSourceSchema2, MetricRegisterResponseSchema2, MetricAttributeSchema2, MetricFolderSchema2, MetadataMetricQueryResponseV2Schema2, METRIC_TYPE_ENUM2, METRIC_TYPE_ENUM_NAMES2, NumericOperatorSchema2, QueryFilterAndSpecSchema2, QueryFilterOrSpecSchema2, QueryFilterNotSpecSchema2, QueryFilterExprSpecSchema2, QueryFilterInSpecSchema2, QueryFilterRegexSpecSchema2, QueryFilterNumericSpecSchema2, QueryFilterPredicateSpecSchema2, QueryRangeSpecSchema2, QueryMetricIdSchema2, JoinTypeSchema2, FillModeSchema2, AlignmentSchema2, CalendarIntervalSchema2, QuantileMethodSchema2, NassValueTypeSchema2, QueryColumnTypeSpecSchema2, aggregationFields2, OrderItemSchema2, QueryFromSpecSchema2, QueryFromTableSpecSchema2, QueryShowTablesSpecSchema2, QueryWindowSpecSchema2, QueryCalendarWindowSpecSchema2, QueryGroupSpecSchema2, QueryOrderSpecSchema2, QueryKeepSpecSchema2, QueryCountSpecSchema2, QuerySumSpecSchema2, QueryMinSpecSchema2, QueryMaxSpecSchema2, QueryMeanSpecSchema2, QueryMultiAggregationSpecSchema2, QueryNassAggregationSpecSchema2, QueryDerivativeSpecSchema2, QueryDifferenceSpecSchema2, QueryFirstSpecSchema2, QueryLastSpecSchema2, QueryQuantileSpecSchema2, QueryDistinctSpecSchema2, QueryDescribeSpecSchema2, QueryTopSpecSchema2, QueryBottomSpecSchema2, QueryMapSpecSchema2, QueryMapStringSpecSchema2, QueryNassMapSpecSchema2, QueryFilterSpecSchema2, QueryFilterExprFnSpecSchema2, QueryJoinDataSpecSchema2, QueryFromMetadataSpecSchema2, QueryFromTopologySpecSchema2, QueryFromDataSpecSchema2, QueryJoinMetadataSpecSchema2, QueryJoinTopologySpecSchema2, QueryFormatTimeSpecSchema2, QueryFormatSpecSchema2, QueryLogSpecSchema2, QueryScriptSpecSchema2, QueryFunctionSpecSchema2, QueryRequestSchema2, QueryResultSchema2, DXChannel2, DEFAULT_EXPERIENCE_REQUEST_BODY2, PlatformFilters2, GraphResponse2, LuxonError$13, InvalidDateTimeError$1, InvalidIntervalError$1, InvalidDurationError$1, ConflictingSpecificationError$1, InvalidUnitError$1, InvalidArgumentError$1, ZoneIsAbstractError$13, n$1 = "numeric", s$1 = "short", l$1 = "long", DATE_SHORT$1, DATE_MED$1, DATE_MED_WITH_WEEKDAY$1, DATE_FULL$1, DATE_HUGE$1, TIME_SIMPLE$1, TIME_WITH_SECONDS$1, TIME_WITH_SHORT_OFFSET$1, TIME_WITH_LONG_OFFSET$1, TIME_24_SIMPLE$1, TIME_24_WITH_SECONDS$1, TIME_24_WITH_SHORT_OFFSET$1, TIME_24_WITH_LONG_OFFSET$1, DATETIME_SHORT$1, DATETIME_SHORT_WITH_SECONDS$1, DATETIME_MED$1, DATETIME_MED_WITH_SECONDS$1, DATETIME_MED_WITH_WEEKDAY$1, DATETIME_FULL$1, DATETIME_FULL_WITH_SECONDS$1, DATETIME_HUGE$1, DATETIME_HUGE_WITH_SECONDS$1, Zone$13 = class Zone7 {
|
|
156910
157017
|
get type() {
|
|
156911
157018
|
throw new ZoneIsAbstractError$13;
|
|
156912
157019
|
}
|
|
@@ -175138,8 +175245,8 @@ var init_index_esm3 = __esm(() => {
|
|
|
175138
175245
|
socket = net_12.default.connect(proxy);
|
|
175139
175246
|
}
|
|
175140
175247
|
const headers = Object.assign({}, proxy.headers);
|
|
175141
|
-
const
|
|
175142
|
-
let payload = `CONNECT ${
|
|
175248
|
+
const hostname5 = `${opts.host}:${opts.port}`;
|
|
175249
|
+
let payload = `CONNECT ${hostname5} HTTP/1.1\r
|
|
175143
175250
|
`;
|
|
175144
175251
|
if (proxy.auth) {
|
|
175145
175252
|
headers["Proxy-Authorization"] = `Basic ${Buffer.from(proxy.auth).toString("base64")}`;
|
|
@@ -175729,8 +175836,8 @@ var init_index_esm3 = __esm(() => {
|
|
|
175729
175836
|
const isHttp2 = httpVersion === 2;
|
|
175730
175837
|
if (lookup) {
|
|
175731
175838
|
const _lookup = callbackify2(lookup, (value2) => utils$32.isArray(value2) ? value2 : [value2]);
|
|
175732
|
-
lookup = (
|
|
175733
|
-
_lookup(
|
|
175839
|
+
lookup = (hostname5, opt, cb) => {
|
|
175840
|
+
_lookup(hostname5, opt, (err, arg0, arg1) => {
|
|
175734
175841
|
if (err) {
|
|
175735
175842
|
return cb(err);
|
|
175736
175843
|
}
|
|
@@ -177249,6 +177356,32 @@ var init_index_esm3 = __esm(() => {
|
|
|
177249
177356
|
totalVertices: number5().optional(),
|
|
177250
177357
|
totalEdges: number5().optional()
|
|
177251
177358
|
});
|
|
177359
|
+
TasStoreGraphInputSchema2 = looseObject2({
|
|
177360
|
+
includeSuccessResult: boolean$2().optional(),
|
|
177361
|
+
ttl: number5().optional(),
|
|
177362
|
+
endTimeAllowedThreshold: number5().optional(),
|
|
177363
|
+
storeType: TasAttributeTypeSchema2.optional(),
|
|
177364
|
+
graph: TasGraphSchema2
|
|
177365
|
+
});
|
|
177366
|
+
TasStoreChangeSchema2 = looseObject2({
|
|
177367
|
+
changeType: string5().optional(),
|
|
177368
|
+
id: unknown2().optional()
|
|
177369
|
+
});
|
|
177370
|
+
TasStoreGraphResponseSchema2 = looseObject2({
|
|
177371
|
+
graph: TasGraphSchema2.optional(),
|
|
177372
|
+
failedVertices: array2(looseObject2({
|
|
177373
|
+
object: TasVertexSchema2,
|
|
177374
|
+
code: string5().optional(),
|
|
177375
|
+
message: string5().optional()
|
|
177376
|
+
})).optional(),
|
|
177377
|
+
failedEdges: array2(looseObject2({
|
|
177378
|
+
object: TasEdgeSchema2,
|
|
177379
|
+
code: string5().optional(),
|
|
177380
|
+
message: string5().optional()
|
|
177381
|
+
})).optional(),
|
|
177382
|
+
edgeChanges: array2(TasStoreChangeSchema2).optional(),
|
|
177383
|
+
vertexChanges: array2(TasStoreChangeSchema2).optional()
|
|
177384
|
+
});
|
|
177252
177385
|
OperatorSchema2 = _enum4(["EQ", "GE", "GT", "LE", "LT", "NE"]).describe("Comparison operator for numeric/lexical PART comparisons");
|
|
177253
177386
|
SourceNameAllSpecifierSchema2 = looseObject2({
|
|
177254
177387
|
op: literal2("ALL")
|
|
@@ -177492,6 +177625,28 @@ var init_index_esm3 = __esm(() => {
|
|
|
177492
177625
|
profileLevel: string5().optional().describe("Granularity of profiling when `includeProfile=true`"),
|
|
177493
177626
|
queryHints: array2(QueryHintSchema2).optional().describe("Optional server hints; currently supports `ForceRange`")
|
|
177494
177627
|
});
|
|
177628
|
+
MetricRegisterSchema2 = looseObject2({
|
|
177629
|
+
id: string5().optional(),
|
|
177630
|
+
sourceName: string5(),
|
|
177631
|
+
attributeName: string5(),
|
|
177632
|
+
type: number5().optional(),
|
|
177633
|
+
typeEnum: array2(string5()).optional(),
|
|
177634
|
+
attributes: record2(string5(), unknown2()).optional(),
|
|
177635
|
+
firstSeen: number5().optional(),
|
|
177636
|
+
lastSeen: number5().optional()
|
|
177637
|
+
});
|
|
177638
|
+
MetricRegisterRequestSchema2 = looseObject2({
|
|
177639
|
+
sync: boolean$2().optional(),
|
|
177640
|
+
metrics: array2(MetricRegisterSchema2)
|
|
177641
|
+
});
|
|
177642
|
+
MetricRegisterSourceSchema2 = looseObject2({
|
|
177643
|
+
sourceId: string5().optional(),
|
|
177644
|
+
name: string5().optional()
|
|
177645
|
+
});
|
|
177646
|
+
MetricRegisterResponseSchema2 = looseObject2({
|
|
177647
|
+
metrics: array2(MetricRegisterSchema2).optional(),
|
|
177648
|
+
sources: array2(MetricRegisterSourceSchema2).optional()
|
|
177649
|
+
});
|
|
177495
177650
|
MetricAttributeSchema2 = looseObject2({
|
|
177496
177651
|
id: string5().optional(),
|
|
177497
177652
|
sourceName: string5().optional(),
|
|
@@ -185949,36 +186104,33 @@ var init_index_esm3 = __esm(() => {
|
|
|
185949
186104
|
};
|
|
185950
186105
|
}
|
|
185951
186106
|
LogQuery3.createOr = createOr;
|
|
185952
|
-
function createLogQueryRequestBody(range2, ors, severities = [
|
|
186107
|
+
function createLogQueryRequestBody(range2, ors, severities = [], includes = [
|
|
185953
186108
|
"_id",
|
|
185954
186109
|
"host",
|
|
185955
186110
|
"logseverity",
|
|
185956
|
-
"
|
|
186111
|
+
"logtype",
|
|
185957
186112
|
"timestamp",
|
|
185958
186113
|
"file",
|
|
185959
186114
|
"message"
|
|
185960
186115
|
], size2 = 1000, sort2 = [{ sortKey: "timestamp", sortOrder: "Asc" }]) {
|
|
186116
|
+
const nonEmptySeverities = severities.filter((s5) => s5.length > 0);
|
|
186117
|
+
const severityClause = nonEmptySeverities.length > 0 ? [
|
|
186118
|
+
{
|
|
186119
|
+
or: {
|
|
186120
|
+
expressions: nonEmptySeverities.map((severity) => ({
|
|
186121
|
+
fieldDescription: "Log Severity",
|
|
186122
|
+
field: "logseverity",
|
|
186123
|
+
value: severity,
|
|
186124
|
+
condition: "equals"
|
|
186125
|
+
}))
|
|
186126
|
+
}
|
|
186127
|
+
}
|
|
186128
|
+
] : [];
|
|
185961
186129
|
return {
|
|
185962
186130
|
size: size2,
|
|
185963
186131
|
query: {
|
|
185964
186132
|
and: {
|
|
185965
|
-
expressions: [
|
|
185966
|
-
{
|
|
185967
|
-
or: {
|
|
185968
|
-
expressions: [
|
|
185969
|
-
...severities.map((severity) => {
|
|
185970
|
-
return {
|
|
185971
|
-
fieldDescription: "Log Severity",
|
|
185972
|
-
field: "logseverity",
|
|
185973
|
-
value: severity,
|
|
185974
|
-
condition: "equals"
|
|
185975
|
-
};
|
|
185976
|
-
})
|
|
185977
|
-
]
|
|
185978
|
-
}
|
|
185979
|
-
},
|
|
185980
|
-
...ors
|
|
185981
|
-
]
|
|
186133
|
+
expressions: [...severityClause, ...ors]
|
|
185982
186134
|
}
|
|
185983
186135
|
},
|
|
185984
186136
|
includes,
|
|
@@ -190794,6 +190946,21 @@ var init_index_esm3 = __esm(() => {
|
|
|
190794
190946
|
}
|
|
190795
190947
|
});
|
|
190796
190948
|
}
|
|
190949
|
+
async logPost(path6, body) {
|
|
190950
|
+
const logBase = this.dxdoConfiguration.dxConfiguration.dxLogIngestionURL;
|
|
190951
|
+
if (!logBase) {
|
|
190952
|
+
throw new Error('dxLogIngestionURL is not set in config — add it to your .dxo2.config.json (e.g. "https://logs-gateway.dxi-na1.saas.broadcom.com")');
|
|
190953
|
+
}
|
|
190954
|
+
const url4 = `${logBase}/${path6}`;
|
|
190955
|
+
this.log.debug(`log posting to: ${url4}`);
|
|
190956
|
+
return this._httpClient.post(url4, body ?? {}, this.createSimpleUserAuthorizedRequestConfig(undefined)).then((response) => response.data).catch((reason) => {
|
|
190957
|
+
if (reason.response || reason.request) {
|
|
190958
|
+
throw DxSaasService2.handleAxiosError(reason);
|
|
190959
|
+
} else {
|
|
190960
|
+
throw new Error(reason);
|
|
190961
|
+
}
|
|
190962
|
+
});
|
|
190963
|
+
}
|
|
190797
190964
|
async accStream(path6, params, extraHeaders) {
|
|
190798
190965
|
const url4 = `${this.dxdoConfiguration.dxConfiguration.dxGatewayHost}${this.getCohortIDForURL()}/acc/${path6}`;
|
|
190799
190966
|
const aheaders = this.createUserAuthorizedRequestConfig(params);
|
|
@@ -206942,15 +207109,15 @@ function parseUrl$13(urlString) {
|
|
|
206942
207109
|
function getProxyForUrl3(url4) {
|
|
206943
207110
|
var parsedUrl = (typeof url4 === "string" ? parseUrl$13(url4) : url4) || {};
|
|
206944
207111
|
var proto3 = parsedUrl.protocol;
|
|
206945
|
-
var
|
|
207112
|
+
var hostname5 = parsedUrl.host;
|
|
206946
207113
|
var port = parsedUrl.port;
|
|
206947
|
-
if (typeof
|
|
207114
|
+
if (typeof hostname5 !== "string" || !hostname5 || typeof proto3 !== "string") {
|
|
206948
207115
|
return "";
|
|
206949
207116
|
}
|
|
206950
207117
|
proto3 = proto3.split(":", 1)[0];
|
|
206951
|
-
|
|
207118
|
+
hostname5 = hostname5.replace(/:\d*$/, "");
|
|
206952
207119
|
port = parseInt(port) || DEFAULT_PORTS$13[proto3] || 0;
|
|
206953
|
-
if (!shouldProxy3(
|
|
207120
|
+
if (!shouldProxy3(hostname5, port)) {
|
|
206954
207121
|
return "";
|
|
206955
207122
|
}
|
|
206956
207123
|
var proxy = getEnv3(proto3 + "_proxy") || getEnv3("all_proxy");
|
|
@@ -206959,7 +207126,7 @@ function getProxyForUrl3(url4) {
|
|
|
206959
207126
|
}
|
|
206960
207127
|
return proxy;
|
|
206961
207128
|
}
|
|
206962
|
-
function shouldProxy3(
|
|
207129
|
+
function shouldProxy3(hostname5, port) {
|
|
206963
207130
|
var NO_PROXY = getEnv3("no_proxy").toLowerCase();
|
|
206964
207131
|
if (!NO_PROXY) {
|
|
206965
207132
|
return true;
|
|
@@ -206978,12 +207145,12 @@ function shouldProxy3(hostname3, port) {
|
|
|
206978
207145
|
return true;
|
|
206979
207146
|
}
|
|
206980
207147
|
if (!/^[.*]/.test(parsedProxyHostname)) {
|
|
206981
|
-
return
|
|
207148
|
+
return hostname5 !== parsedProxyHostname;
|
|
206982
207149
|
}
|
|
206983
207150
|
if (parsedProxyHostname.charAt(0) === "*") {
|
|
206984
207151
|
parsedProxyHostname = parsedProxyHostname.slice(1);
|
|
206985
207152
|
}
|
|
206986
|
-
return !
|
|
207153
|
+
return !hostname5.endsWith(parsedProxyHostname);
|
|
206987
207154
|
});
|
|
206988
207155
|
}
|
|
206989
207156
|
function getEnv3(key) {
|
|
@@ -208168,7 +208335,7 @@ function shouldBypassProxy3(location) {
|
|
|
208168
208335
|
return true;
|
|
208169
208336
|
}
|
|
208170
208337
|
const port = Number.parseInt(parsed.port, 10) || DEFAULT_PORTS3[parsed.protocol.split(":", 1)[0]] || 0;
|
|
208171
|
-
const
|
|
208338
|
+
const hostname5 = normalizeNoProxyHost3(parsed.hostname.toLowerCase());
|
|
208172
208339
|
return noProxy.split(/[\s,]+/).some((entry) => {
|
|
208173
208340
|
if (!entry) {
|
|
208174
208341
|
return false;
|
|
@@ -208185,9 +208352,9 @@ function shouldBypassProxy3(location) {
|
|
|
208185
208352
|
entryHost = entryHost.slice(1);
|
|
208186
208353
|
}
|
|
208187
208354
|
if (entryHost.charAt(0) === ".") {
|
|
208188
|
-
return
|
|
208355
|
+
return hostname5.endsWith(entryHost);
|
|
208189
208356
|
}
|
|
208190
|
-
return
|
|
208357
|
+
return hostname5 === entryHost || isLoopback3(hostname5) && isLoopback3(entryHost);
|
|
208191
208358
|
});
|
|
208192
208359
|
}
|
|
208193
208360
|
function speedometer3(samplesCount, min5) {
|
|
@@ -216631,14 +216798,14 @@ var DEFAULT_MODULES, MODULE_IDS, AgentTrace3, AlarmEnrichmentFilter3, AlarmEnric
|
|
|
216631
216798
|
return `${high >> 8}.${high & 255}.${low >> 8}.${low & 255}`;
|
|
216632
216799
|
}
|
|
216633
216800
|
return host;
|
|
216634
|
-
}, normalizeNoProxyHost3 = (
|
|
216635
|
-
if (!
|
|
216636
|
-
return
|
|
216801
|
+
}, normalizeNoProxyHost3 = (hostname5) => {
|
|
216802
|
+
if (!hostname5) {
|
|
216803
|
+
return hostname5;
|
|
216637
216804
|
}
|
|
216638
|
-
if (
|
|
216639
|
-
|
|
216805
|
+
if (hostname5.charAt(0) === "[" && hostname5.charAt(hostname5.length - 1) === "]") {
|
|
216806
|
+
hostname5 = hostname5.slice(1, -1);
|
|
216640
216807
|
}
|
|
216641
|
-
return unmapIPv4MappedIPv63(
|
|
216808
|
+
return unmapIPv4MappedIPv63(hostname5.replace(/\.+$/, ""));
|
|
216642
216809
|
}, progressEventReducer3 = (listener, isDownloadStream, freq = 3) => {
|
|
216643
216810
|
let bytesNotified = 0;
|
|
216644
216811
|
const _speedometer = speedometer3(50, 250);
|
|
@@ -217884,7 +218051,7 @@ var DEFAULT_MODULES, MODULE_IDS, AgentTrace3, AlarmEnrichmentFilter3, AlarmEnric
|
|
|
217884
218051
|
},
|
|
217885
218052
|
trace: makeMethodFn("TRACE")
|
|
217886
218053
|
};
|
|
217887
|
-
}, MServe3, DashboardPermissionsUpdateRequest3, DashboardSearch3, VertexStateFilterLazy3, VertexStateAllFilterSchema3, VertexStateAndFilterSchema3, VertexStateOrFilterSchema3, VertexStateAlertFilterSchema3, VertexStateMetricFilterSchema3, VertexStateStateFilterSchema3, VertexStateVertexIdFilterSchema3, VertexStateNamespaceFilterSchema3, VertexStateManagementModuleFilterSchema3, VertexStateEmptyFilterSchema3, VertexGroupSchema3, VertexStateCollectVertexGroupStatusFilterSchema3, VertexStateFilterSchema3, AttributeExpressionOperatorSchema3, AttributeExpressionComparatorSchema3, AttributeExpressionSchema3, AttributeValueAsFieldSchema3, TraversalVertexFilterSchema3, TraversalEdgeFilterSchema3, TraverseDirectionSchema3, TraverseCollectSchema3, TraverseSchema3, TasGroupingItemSchema3, TasAttributeFilterModeSchema3, TasFollowPathTypeSchema3, TasFollowPathFlowFilterSchema3, TasJoinTypeSchema3, TasCollectCardInfoTierSchema3, TasCollectExperienceSelectorSchema3, TasFilterLazy3, TasAllFilterSchema3, TasEmptyFilterSchema3, TasAndFilterSchema3, TasOrFilterSchema3, TasNotFilterSchema3, TasAttributeFilterSchema3, TasTraverseFilterSchema3, TasVertexIdFilterSchema3, TasServiceFilterSchema3, TasLuceneFilterSchema3, TasLayerFilterSchema3, TasJoinFilterSchema3, TasFollowPathFilterSchema3, TasCoverageFilterSchema3, TasStatusFilterSchema3, TasVariableFilterSchema3, TasLegacyFilterSchema3, TasAddFlowsFilterSchema3, TasAddWiresFilterSchema3, TasAddWireContextFilterSchema3, TasAddTransitioningEdgesFilterSchema3, TasTakeVerticesFilterSchema3, TasTakeEdgesFilterSchema3, TasTakeFlowsFilterSchema3, TasCollectAttributesFilterSchema3, TasCollectAttributeNamesFilterSchema3, TasCollectCountsFilterSchema3, TasCollectVertexIdFilterSchema3, TasCollectGroupingInfoFilterSchema3, TasCollectCardInfoFilterSchema3, TasCollectExperienceAttributesFilterSchema3, TasFilterSchema3, TasVariableSchema3, TasProjectionFilterSchema3, TasViewSchema3, TasOrderSchema3, TasQuerySchema3, TasExternalIdSchema3, TasAttributeTypeSchema3, TasVertexSchema3, EdgeNumericIdSchema3, TasEdgeSchema3, VertexStateExternalIdSchema3, VertexStateNumericIdSchema3, VertexStateSchema3, TasAnalyticBaseSchema3, TasAttributeAlertStatisticsSchema3, TasCollectAttributeResultSchema3, TasAttributeNameSchema3, TasCollectAttributeNamesResultSchema3, TasCollectCountsResultSchema3, TasGroupingAlertStatisticsSchema3, TasGroupingInfoSchema3, TasCollectGroupingInfoResultSchema3, TasCollectCardInfoResultSchema3, TasAnalyticResultSchema3, OperatorSchema3, SourceNameAllSpecifierSchema3, SourceNameNoneSpecifierSchema3, SourceNameAndSpecifierSchema3, SourceNameOrSpecifierSchema3, SourceNameNotSpecifierSchema3, SourceNameExactSpecifierSchema3, SourceNameRegExSpecifierSchema3, SourceNamePartOperatorSpecifierSchema3, SourceNameSpecifierSchema3, FolderNameAllSpecifierSchema3, FolderNameNoneSpecifierSchema3, FolderNameAndSpecifierSchema3, FolderNameOrSpecifierSchema3, FolderNameNotSpecifierSchema3, FolderNameExactSpecifierSchema3, FolderNameRegExSpecifierSchema3, FolderNameChildrenSpecifierSchema3, FolderNameSpecifierSchema3, QueryAttributeExpressionSchema3, AttributeNameAllSpecifierSchema3, AttributeNameNoneSpecifierSchema3, AttributeNameAndSpecifierSchema3, AttributeNameOrSpecifierSchema3, AttributeNameNotSpecifierSchema3, AttributeNameExactSpecifierSchema3, AttributeNameRegExSpecifierSchema3, AttributeNameFolderSpecifierSchema3, AttributeNameChildrenSpecifierSchema3, AttributeNameTypeSpecifierSchema3, AttributeNameOperatorSpecifierSchema3, AttributeNameAnyNumericSpecifierSchema3, AttributeNameAttributeSpecifierSchema3, AttributeNameSpecifierSchema3, ManagementModuleIdSchema3, QueryAllSpecifierSchema3, QueryNoneSpecifierSchema3, QueryAndSpecifierSchema3, QueryOrSpecifierSchema3, QueryNotSpecifierSchema3, QuerySpecSpecifierSchema3, QueryIdSpecifierSchema3, QueryAttributeSpecifierSchema3, QueryMetricGroupSpecifierSchema3, ServiceFilterSpecifierSchema3, QuerySpecifierSchema3, QueryHintForceRangeSchema3, QueryHintSchema3, MetadataMetricQuerySchema3, MetricAttributeSchema3, MetricFolderSchema3, METRIC_TYPE_ENUM3, METRIC_TYPE_ENUM_NAMES3, NumericOperatorSchema3, QueryFilterAndSpecSchema3, QueryFilterOrSpecSchema3, QueryFilterNotSpecSchema3, QueryFilterExprSpecSchema3, QueryFilterInSpecSchema3, QueryFilterRegexSpecSchema3, QueryFilterNumericSpecSchema3, QueryFilterPredicateSpecSchema3, QueryRangeSpecSchema3, QueryMetricIdSchema3, JoinTypeSchema3, FillModeSchema3, AlignmentSchema3, CalendarIntervalSchema3, QuantileMethodSchema3, NassValueTypeSchema3, QueryColumnTypeSpecSchema3, aggregationFields3, OrderItemSchema3, QueryFromSpecSchema3, QueryFromTableSpecSchema3, QueryShowTablesSpecSchema3, QueryWindowSpecSchema3, QueryCalendarWindowSpecSchema3, QueryGroupSpecSchema3, QueryOrderSpecSchema3, QueryKeepSpecSchema3, QueryCountSpecSchema3, QuerySumSpecSchema3, QueryMinSpecSchema3, QueryMaxSpecSchema3, QueryMeanSpecSchema3, QueryMultiAggregationSpecSchema3, QueryNassAggregationSpecSchema3, QueryDerivativeSpecSchema3, QueryDifferenceSpecSchema3, QueryFirstSpecSchema3, QueryLastSpecSchema3, QueryQuantileSpecSchema3, QueryDistinctSpecSchema3, QueryDescribeSpecSchema3, QueryTopSpecSchema3, QueryBottomSpecSchema3, QueryMapSpecSchema3, QueryMapStringSpecSchema3, QueryNassMapSpecSchema3, QueryFilterSpecSchema3, QueryFilterExprFnSpecSchema3, QueryJoinDataSpecSchema3, QueryFromMetadataSpecSchema3, QueryFromTopologySpecSchema3, QueryFromDataSpecSchema3, QueryJoinMetadataSpecSchema3, QueryJoinTopologySpecSchema3, QueryFormatTimeSpecSchema3, QueryFormatSpecSchema3, QueryLogSpecSchema3, QueryScriptSpecSchema3, QueryFunctionSpecSchema3, QueryRequestSchema3, DATASTORE_SCHEMA_TYPES2, DXChannel3, PlatformFilters3, GraphResponse3, LuxonError$14, InvalidDateTimeError7, InvalidIntervalError7, InvalidDurationError7, ConflictingSpecificationError7, InvalidUnitError7, InvalidArgumentError7, ZoneIsAbstractError$14, n6 = "numeric", s6 = "short", l6 = "long", DATE_SHORT6, DATE_MED6, DATE_MED_WITH_WEEKDAY6, DATE_FULL6, DATE_HUGE6, TIME_SIMPLE6, TIME_WITH_SECONDS6, TIME_WITH_SHORT_OFFSET6, TIME_WITH_LONG_OFFSET6, TIME_24_SIMPLE6, TIME_24_WITH_SECONDS6, TIME_24_WITH_SHORT_OFFSET6, TIME_24_WITH_LONG_OFFSET6, DATETIME_SHORT6, DATETIME_SHORT_WITH_SECONDS6, DATETIME_MED6, DATETIME_MED_WITH_SECONDS6, DATETIME_MED_WITH_WEEKDAY6, DATETIME_FULL6, DATETIME_FULL_WITH_SECONDS6, DATETIME_HUGE6, DATETIME_HUGE_WITH_SECONDS6, Zone$14 = class Zone10 {
|
|
218054
|
+
}, MServe3, DashboardPermissionsUpdateRequest3, DashboardSearch3, VertexStateFilterLazy3, VertexStateAllFilterSchema3, VertexStateAndFilterSchema3, VertexStateOrFilterSchema3, VertexStateAlertFilterSchema3, VertexStateMetricFilterSchema3, VertexStateStateFilterSchema3, VertexStateVertexIdFilterSchema3, VertexStateNamespaceFilterSchema3, VertexStateManagementModuleFilterSchema3, VertexStateEmptyFilterSchema3, VertexGroupSchema3, VertexStateCollectVertexGroupStatusFilterSchema3, VertexStateFilterSchema3, AttributeExpressionOperatorSchema3, AttributeExpressionComparatorSchema3, AttributeExpressionSchema3, AttributeValueAsFieldSchema3, TraversalVertexFilterSchema3, TraversalEdgeFilterSchema3, TraverseDirectionSchema3, TraverseCollectSchema3, TraverseSchema3, TasGroupingItemSchema3, TasAttributeFilterModeSchema3, TasFollowPathTypeSchema3, TasFollowPathFlowFilterSchema3, TasJoinTypeSchema3, TasCollectCardInfoTierSchema3, TasCollectExperienceSelectorSchema3, TasFilterLazy3, TasAllFilterSchema3, TasEmptyFilterSchema3, TasAndFilterSchema3, TasOrFilterSchema3, TasNotFilterSchema3, TasAttributeFilterSchema3, TasTraverseFilterSchema3, TasVertexIdFilterSchema3, TasServiceFilterSchema3, TasLuceneFilterSchema3, TasLayerFilterSchema3, TasJoinFilterSchema3, TasFollowPathFilterSchema3, TasCoverageFilterSchema3, TasStatusFilterSchema3, TasVariableFilterSchema3, TasLegacyFilterSchema3, TasAddFlowsFilterSchema3, TasAddWiresFilterSchema3, TasAddWireContextFilterSchema3, TasAddTransitioningEdgesFilterSchema3, TasTakeVerticesFilterSchema3, TasTakeEdgesFilterSchema3, TasTakeFlowsFilterSchema3, TasCollectAttributesFilterSchema3, TasCollectAttributeNamesFilterSchema3, TasCollectCountsFilterSchema3, TasCollectVertexIdFilterSchema3, TasCollectGroupingInfoFilterSchema3, TasCollectCardInfoFilterSchema3, TasCollectExperienceAttributesFilterSchema3, TasFilterSchema3, TasVariableSchema3, TasProjectionFilterSchema3, TasViewSchema3, TasOrderSchema3, TasQuerySchema3, TasExternalIdSchema3, TasAttributeTypeSchema3, TasVertexSchema3, EdgeNumericIdSchema3, TasEdgeSchema3, VertexStateExternalIdSchema3, VertexStateNumericIdSchema3, VertexStateSchema3, TasAnalyticBaseSchema3, TasAttributeAlertStatisticsSchema3, TasCollectAttributeResultSchema3, TasAttributeNameSchema3, TasCollectAttributeNamesResultSchema3, TasCollectCountsResultSchema3, TasGroupingAlertStatisticsSchema3, TasGroupingInfoSchema3, TasCollectGroupingInfoResultSchema3, TasCollectCardInfoResultSchema3, TasAnalyticResultSchema3, TasGraphSchema3, TasStoreChangeSchema3, OperatorSchema3, SourceNameAllSpecifierSchema3, SourceNameNoneSpecifierSchema3, SourceNameAndSpecifierSchema3, SourceNameOrSpecifierSchema3, SourceNameNotSpecifierSchema3, SourceNameExactSpecifierSchema3, SourceNameRegExSpecifierSchema3, SourceNamePartOperatorSpecifierSchema3, SourceNameSpecifierSchema3, FolderNameAllSpecifierSchema3, FolderNameNoneSpecifierSchema3, FolderNameAndSpecifierSchema3, FolderNameOrSpecifierSchema3, FolderNameNotSpecifierSchema3, FolderNameExactSpecifierSchema3, FolderNameRegExSpecifierSchema3, FolderNameChildrenSpecifierSchema3, FolderNameSpecifierSchema3, QueryAttributeExpressionSchema3, AttributeNameAllSpecifierSchema3, AttributeNameNoneSpecifierSchema3, AttributeNameAndSpecifierSchema3, AttributeNameOrSpecifierSchema3, AttributeNameNotSpecifierSchema3, AttributeNameExactSpecifierSchema3, AttributeNameRegExSpecifierSchema3, AttributeNameFolderSpecifierSchema3, AttributeNameChildrenSpecifierSchema3, AttributeNameTypeSpecifierSchema3, AttributeNameOperatorSpecifierSchema3, AttributeNameAnyNumericSpecifierSchema3, AttributeNameAttributeSpecifierSchema3, AttributeNameSpecifierSchema3, ManagementModuleIdSchema3, QueryAllSpecifierSchema3, QueryNoneSpecifierSchema3, QueryAndSpecifierSchema3, QueryOrSpecifierSchema3, QueryNotSpecifierSchema3, QuerySpecSpecifierSchema3, QueryIdSpecifierSchema3, QueryAttributeSpecifierSchema3, QueryMetricGroupSpecifierSchema3, ServiceFilterSpecifierSchema3, QuerySpecifierSchema3, QueryHintForceRangeSchema3, QueryHintSchema3, MetadataMetricQuerySchema3, MetricRegisterSchema3, MetricRegisterSourceSchema3, MetricAttributeSchema3, MetricFolderSchema3, METRIC_TYPE_ENUM3, METRIC_TYPE_ENUM_NAMES3, NumericOperatorSchema3, QueryFilterAndSpecSchema3, QueryFilterOrSpecSchema3, QueryFilterNotSpecSchema3, QueryFilterExprSpecSchema3, QueryFilterInSpecSchema3, QueryFilterRegexSpecSchema3, QueryFilterNumericSpecSchema3, QueryFilterPredicateSpecSchema3, QueryRangeSpecSchema3, QueryMetricIdSchema3, JoinTypeSchema3, FillModeSchema3, AlignmentSchema3, CalendarIntervalSchema3, QuantileMethodSchema3, NassValueTypeSchema3, QueryColumnTypeSpecSchema3, aggregationFields3, OrderItemSchema3, QueryFromSpecSchema3, QueryFromTableSpecSchema3, QueryShowTablesSpecSchema3, QueryWindowSpecSchema3, QueryCalendarWindowSpecSchema3, QueryGroupSpecSchema3, QueryOrderSpecSchema3, QueryKeepSpecSchema3, QueryCountSpecSchema3, QuerySumSpecSchema3, QueryMinSpecSchema3, QueryMaxSpecSchema3, QueryMeanSpecSchema3, QueryMultiAggregationSpecSchema3, QueryNassAggregationSpecSchema3, QueryDerivativeSpecSchema3, QueryDifferenceSpecSchema3, QueryFirstSpecSchema3, QueryLastSpecSchema3, QueryQuantileSpecSchema3, QueryDistinctSpecSchema3, QueryDescribeSpecSchema3, QueryTopSpecSchema3, QueryBottomSpecSchema3, QueryMapSpecSchema3, QueryMapStringSpecSchema3, QueryNassMapSpecSchema3, QueryFilterSpecSchema3, QueryFilterExprFnSpecSchema3, QueryJoinDataSpecSchema3, QueryFromMetadataSpecSchema3, QueryFromTopologySpecSchema3, QueryFromDataSpecSchema3, QueryJoinMetadataSpecSchema3, QueryJoinTopologySpecSchema3, QueryFormatTimeSpecSchema3, QueryFormatSpecSchema3, QueryLogSpecSchema3, QueryScriptSpecSchema3, QueryFunctionSpecSchema3, QueryRequestSchema3, DATASTORE_SCHEMA_TYPES2, DXChannel3, PlatformFilters3, GraphResponse3, LuxonError$14, InvalidDateTimeError7, InvalidIntervalError7, InvalidDurationError7, ConflictingSpecificationError7, InvalidUnitError7, InvalidArgumentError7, ZoneIsAbstractError$14, n6 = "numeric", s6 = "short", l6 = "long", DATE_SHORT6, DATE_MED6, DATE_MED_WITH_WEEKDAY6, DATE_FULL6, DATE_HUGE6, TIME_SIMPLE6, TIME_WITH_SECONDS6, TIME_WITH_SHORT_OFFSET6, TIME_WITH_LONG_OFFSET6, TIME_24_SIMPLE6, TIME_24_WITH_SECONDS6, TIME_24_WITH_SHORT_OFFSET6, TIME_24_WITH_LONG_OFFSET6, DATETIME_SHORT6, DATETIME_SHORT_WITH_SECONDS6, DATETIME_MED6, DATETIME_MED_WITH_SECONDS6, DATETIME_MED_WITH_WEEKDAY6, DATETIME_FULL6, DATETIME_FULL_WITH_SECONDS6, DATETIME_HUGE6, DATETIME_HUGE_WITH_SECONDS6, Zone$14 = class Zone10 {
|
|
217888
218055
|
get type() {
|
|
217889
218056
|
throw new ZoneIsAbstractError$14;
|
|
217890
218057
|
}
|
|
@@ -232652,8 +232819,8 @@ var init_index_esm4 = __esm(() => {
|
|
|
232652
232819
|
socket = net_13.default.connect(proxy);
|
|
232653
232820
|
}
|
|
232654
232821
|
const headers = Object.assign({}, proxy.headers);
|
|
232655
|
-
const
|
|
232656
|
-
let payload = `CONNECT ${
|
|
232822
|
+
const hostname5 = `${opts.host}:${opts.port}`;
|
|
232823
|
+
let payload = `CONNECT ${hostname5} HTTP/1.1\r
|
|
232657
232824
|
`;
|
|
232658
232825
|
if (proxy.auth) {
|
|
232659
232826
|
headers["Proxy-Authorization"] = `Basic ${Buffer.from(proxy.auth).toString("base64")}`;
|
|
@@ -233243,8 +233410,8 @@ var init_index_esm4 = __esm(() => {
|
|
|
233243
233410
|
const isHttp2 = httpVersion === 2;
|
|
233244
233411
|
if (lookup) {
|
|
233245
233412
|
const _lookup = callbackify3(lookup, (value2) => utils$33.isArray(value2) ? value2 : [value2]);
|
|
233246
|
-
lookup = (
|
|
233247
|
-
_lookup(
|
|
233413
|
+
lookup = (hostname5, opt, cb) => {
|
|
233414
|
+
_lookup(hostname5, opt, (err, arg0, arg1) => {
|
|
233248
233415
|
if (err) {
|
|
233249
233416
|
return cb(err);
|
|
233250
233417
|
}
|
|
@@ -234750,7 +234917,7 @@ var init_index_esm4 = __esm(() => {
|
|
|
234750
234917
|
TasCollectCardInfoResultSchema3,
|
|
234751
234918
|
TasAnalyticBaseSchema3
|
|
234752
234919
|
]);
|
|
234753
|
-
exports_external.looseObject({
|
|
234920
|
+
TasGraphSchema3 = exports_external.looseObject({
|
|
234754
234921
|
vertices: exports_external.array(TasVertexSchema3).optional(),
|
|
234755
234922
|
edges: exports_external.array(TasEdgeSchema3).optional(),
|
|
234756
234923
|
states: exports_external.array(VertexStateSchema3).optional(),
|
|
@@ -234763,6 +234930,32 @@ var init_index_esm4 = __esm(() => {
|
|
|
234763
234930
|
totalVertices: exports_external.number().optional(),
|
|
234764
234931
|
totalEdges: exports_external.number().optional()
|
|
234765
234932
|
});
|
|
234933
|
+
exports_external.looseObject({
|
|
234934
|
+
includeSuccessResult: exports_external.boolean().optional(),
|
|
234935
|
+
ttl: exports_external.number().optional(),
|
|
234936
|
+
endTimeAllowedThreshold: exports_external.number().optional(),
|
|
234937
|
+
storeType: TasAttributeTypeSchema3.optional(),
|
|
234938
|
+
graph: TasGraphSchema3
|
|
234939
|
+
});
|
|
234940
|
+
TasStoreChangeSchema3 = exports_external.looseObject({
|
|
234941
|
+
changeType: exports_external.string().optional(),
|
|
234942
|
+
id: exports_external.unknown().optional()
|
|
234943
|
+
});
|
|
234944
|
+
exports_external.looseObject({
|
|
234945
|
+
graph: TasGraphSchema3.optional(),
|
|
234946
|
+
failedVertices: exports_external.array(exports_external.looseObject({
|
|
234947
|
+
object: TasVertexSchema3,
|
|
234948
|
+
code: exports_external.string().optional(),
|
|
234949
|
+
message: exports_external.string().optional()
|
|
234950
|
+
})).optional(),
|
|
234951
|
+
failedEdges: exports_external.array(exports_external.looseObject({
|
|
234952
|
+
object: TasEdgeSchema3,
|
|
234953
|
+
code: exports_external.string().optional(),
|
|
234954
|
+
message: exports_external.string().optional()
|
|
234955
|
+
})).optional(),
|
|
234956
|
+
edgeChanges: exports_external.array(TasStoreChangeSchema3).optional(),
|
|
234957
|
+
vertexChanges: exports_external.array(TasStoreChangeSchema3).optional()
|
|
234958
|
+
});
|
|
234766
234959
|
OperatorSchema3 = exports_external.enum(["EQ", "GE", "GT", "LE", "LT", "NE"]).describe("Comparison operator for numeric/lexical PART comparisons");
|
|
234767
234960
|
SourceNameAllSpecifierSchema3 = exports_external.looseObject({
|
|
234768
234961
|
op: exports_external.literal("ALL")
|
|
@@ -235006,6 +235199,28 @@ var init_index_esm4 = __esm(() => {
|
|
|
235006
235199
|
profileLevel: exports_external.string().optional().describe("Granularity of profiling when `includeProfile=true`"),
|
|
235007
235200
|
queryHints: exports_external.array(QueryHintSchema3).optional().describe("Optional server hints; currently supports `ForceRange`")
|
|
235008
235201
|
});
|
|
235202
|
+
MetricRegisterSchema3 = exports_external.looseObject({
|
|
235203
|
+
id: exports_external.string().optional(),
|
|
235204
|
+
sourceName: exports_external.string(),
|
|
235205
|
+
attributeName: exports_external.string(),
|
|
235206
|
+
type: exports_external.number().optional(),
|
|
235207
|
+
typeEnum: exports_external.array(exports_external.string()).optional(),
|
|
235208
|
+
attributes: exports_external.record(exports_external.string(), exports_external.unknown()).optional(),
|
|
235209
|
+
firstSeen: exports_external.number().optional(),
|
|
235210
|
+
lastSeen: exports_external.number().optional()
|
|
235211
|
+
});
|
|
235212
|
+
exports_external.looseObject({
|
|
235213
|
+
sync: exports_external.boolean().optional(),
|
|
235214
|
+
metrics: exports_external.array(MetricRegisterSchema3)
|
|
235215
|
+
});
|
|
235216
|
+
MetricRegisterSourceSchema3 = exports_external.looseObject({
|
|
235217
|
+
sourceId: exports_external.string().optional(),
|
|
235218
|
+
name: exports_external.string().optional()
|
|
235219
|
+
});
|
|
235220
|
+
exports_external.looseObject({
|
|
235221
|
+
metrics: exports_external.array(MetricRegisterSchema3).optional(),
|
|
235222
|
+
sources: exports_external.array(MetricRegisterSourceSchema3).optional()
|
|
235223
|
+
});
|
|
235009
235224
|
MetricAttributeSchema3 = exports_external.looseObject({
|
|
235010
235225
|
id: exports_external.string().optional(),
|
|
235011
235226
|
sourceName: exports_external.string().optional(),
|
|
@@ -243455,36 +243670,33 @@ var init_index_esm4 = __esm(() => {
|
|
|
243455
243670
|
};
|
|
243456
243671
|
}
|
|
243457
243672
|
LogQuery4.createOr = createOr;
|
|
243458
|
-
function createLogQueryRequestBody(range3, ors, severities = [
|
|
243673
|
+
function createLogQueryRequestBody(range3, ors, severities = [], includes = [
|
|
243459
243674
|
"_id",
|
|
243460
243675
|
"host",
|
|
243461
243676
|
"logseverity",
|
|
243462
|
-
"
|
|
243677
|
+
"logtype",
|
|
243463
243678
|
"timestamp",
|
|
243464
243679
|
"file",
|
|
243465
243680
|
"message"
|
|
243466
243681
|
], size2 = 1000, sort3 = [{ sortKey: "timestamp", sortOrder: "Asc" }]) {
|
|
243682
|
+
const nonEmptySeverities = severities.filter((s7) => s7.length > 0);
|
|
243683
|
+
const severityClause = nonEmptySeverities.length > 0 ? [
|
|
243684
|
+
{
|
|
243685
|
+
or: {
|
|
243686
|
+
expressions: nonEmptySeverities.map((severity) => ({
|
|
243687
|
+
fieldDescription: "Log Severity",
|
|
243688
|
+
field: "logseverity",
|
|
243689
|
+
value: severity,
|
|
243690
|
+
condition: "equals"
|
|
243691
|
+
}))
|
|
243692
|
+
}
|
|
243693
|
+
}
|
|
243694
|
+
] : [];
|
|
243467
243695
|
return {
|
|
243468
243696
|
size: size2,
|
|
243469
243697
|
query: {
|
|
243470
243698
|
and: {
|
|
243471
|
-
expressions: [
|
|
243472
|
-
{
|
|
243473
|
-
or: {
|
|
243474
|
-
expressions: [
|
|
243475
|
-
...severities.map((severity) => {
|
|
243476
|
-
return {
|
|
243477
|
-
fieldDescription: "Log Severity",
|
|
243478
|
-
field: "logseverity",
|
|
243479
|
-
value: severity,
|
|
243480
|
-
condition: "equals"
|
|
243481
|
-
};
|
|
243482
|
-
})
|
|
243483
|
-
]
|
|
243484
|
-
}
|
|
243485
|
-
},
|
|
243486
|
-
...ors
|
|
243487
|
-
]
|
|
243699
|
+
expressions: [...severityClause, ...ors]
|
|
243488
243700
|
}
|
|
243489
243701
|
},
|
|
243490
243702
|
includes,
|
|
@@ -248058,6 +248270,21 @@ var init_index_esm4 = __esm(() => {
|
|
|
248058
248270
|
}
|
|
248059
248271
|
});
|
|
248060
248272
|
}
|
|
248273
|
+
async logPost(path7, body) {
|
|
248274
|
+
const logBase = this.dxdoConfiguration.dxConfiguration.dxLogIngestionURL;
|
|
248275
|
+
if (!logBase) {
|
|
248276
|
+
throw new Error('dxLogIngestionURL is not set in config — add it to your .dxo2.config.json (e.g. "https://logs-gateway.dxi-na1.saas.broadcom.com")');
|
|
248277
|
+
}
|
|
248278
|
+
const url5 = `${logBase}/${path7}`;
|
|
248279
|
+
this.log.debug(`log posting to: ${url5}`);
|
|
248280
|
+
return this._httpClient.post(url5, body ?? {}, this.createSimpleUserAuthorizedRequestConfig(undefined)).then((response) => response.data).catch((reason) => {
|
|
248281
|
+
if (reason.response || reason.request) {
|
|
248282
|
+
throw DxSaasService3.handleAxiosError(reason);
|
|
248283
|
+
} else {
|
|
248284
|
+
throw new Error(reason);
|
|
248285
|
+
}
|
|
248286
|
+
});
|
|
248287
|
+
}
|
|
248061
248288
|
async accStream(path7, params, extraHeaders) {
|
|
248062
248289
|
const url5 = `${this.dxdoConfiguration.dxConfiguration.dxGatewayHost}${this.getCohortIDForURL()}/acc/${path7}`;
|
|
248063
248290
|
const aheaders = this.createUserAuthorizedRequestConfig(params);
|
|
@@ -281371,11 +281598,11 @@ __p += '`;
|
|
|
281371
281598
|
|
|
281372
281599
|
// ../../node_modules/is-docker/index.js
|
|
281373
281600
|
var require_is_docker = __commonJS((exports, module) => {
|
|
281374
|
-
var
|
|
281601
|
+
var fs51 = __require("fs");
|
|
281375
281602
|
var isDocker;
|
|
281376
281603
|
function hasDockerEnv() {
|
|
281377
281604
|
try {
|
|
281378
|
-
|
|
281605
|
+
fs51.statSync("/.dockerenv");
|
|
281379
281606
|
return true;
|
|
281380
281607
|
} catch (_2) {
|
|
281381
281608
|
return false;
|
|
@@ -281383,7 +281610,7 @@ var require_is_docker = __commonJS((exports, module) => {
|
|
|
281383
281610
|
}
|
|
281384
281611
|
function hasDockerCGroup() {
|
|
281385
281612
|
try {
|
|
281386
|
-
return
|
|
281613
|
+
return fs51.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
|
|
281387
281614
|
} catch (_2) {
|
|
281388
281615
|
return false;
|
|
281389
281616
|
}
|
|
@@ -281399,7 +281626,7 @@ var require_is_docker = __commonJS((exports, module) => {
|
|
|
281399
281626
|
// ../../node_modules/is-wsl/index.js
|
|
281400
281627
|
var require_is_wsl = __commonJS((exports, module) => {
|
|
281401
281628
|
var os13 = __require("os");
|
|
281402
|
-
var
|
|
281629
|
+
var fs51 = __require("fs");
|
|
281403
281630
|
var isDocker = require_is_docker();
|
|
281404
281631
|
var isWsl = () => {
|
|
281405
281632
|
if (process.platform !== "linux") {
|
|
@@ -281412,7 +281639,7 @@ var require_is_wsl = __commonJS((exports, module) => {
|
|
|
281412
281639
|
return true;
|
|
281413
281640
|
}
|
|
281414
281641
|
try {
|
|
281415
|
-
return
|
|
281642
|
+
return fs51.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isDocker() : false;
|
|
281416
281643
|
} catch (_2) {
|
|
281417
281644
|
return false;
|
|
281418
281645
|
}
|
|
@@ -281449,7 +281676,7 @@ var require_open = __commonJS((exports, module) => {
|
|
|
281449
281676
|
var __dirname = "/home/runner/work/dx-do-mono/dx-do-mono/node_modules/open";
|
|
281450
281677
|
var path10 = __require("path");
|
|
281451
281678
|
var childProcess = __require("child_process");
|
|
281452
|
-
var { promises:
|
|
281679
|
+
var { promises: fs51, constants: fsConstants } = __require("fs");
|
|
281453
281680
|
var isWsl = require_is_wsl();
|
|
281454
281681
|
var isDocker = require_is_docker();
|
|
281455
281682
|
var defineLazyProperty = require_define_lazy_prop();
|
|
@@ -281457,7 +281684,7 @@ var require_open = __commonJS((exports, module) => {
|
|
|
281457
281684
|
var { platform: platform5, arch } = process;
|
|
281458
281685
|
var hasContainerEnv = () => {
|
|
281459
281686
|
try {
|
|
281460
|
-
|
|
281687
|
+
fs51.statSync("/run/.containerenv");
|
|
281461
281688
|
return true;
|
|
281462
281689
|
} catch {
|
|
281463
281690
|
return false;
|
|
@@ -281480,13 +281707,13 @@ var require_open = __commonJS((exports, module) => {
|
|
|
281480
281707
|
const configFilePath = "/etc/wsl.conf";
|
|
281481
281708
|
let isConfigFileExists = false;
|
|
281482
281709
|
try {
|
|
281483
|
-
await
|
|
281710
|
+
await fs51.access(configFilePath, fsConstants.F_OK);
|
|
281484
281711
|
isConfigFileExists = true;
|
|
281485
281712
|
} catch {}
|
|
281486
281713
|
if (!isConfigFileExists) {
|
|
281487
281714
|
return defaultMountPoint;
|
|
281488
281715
|
}
|
|
281489
|
-
const configContent = await
|
|
281716
|
+
const configContent = await fs51.readFile(configFilePath, { encoding: "utf8" });
|
|
281490
281717
|
const configMountPoint = /(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(configContent);
|
|
281491
281718
|
if (!configMountPoint) {
|
|
281492
281719
|
return defaultMountPoint;
|
|
@@ -281580,7 +281807,7 @@ var require_open = __commonJS((exports, module) => {
|
|
|
281580
281807
|
const isBundled = !__dirname || __dirname === "/";
|
|
281581
281808
|
let exeLocalXdgOpen = false;
|
|
281582
281809
|
try {
|
|
281583
|
-
await
|
|
281810
|
+
await fs51.access(localXdgOpenPath, fsConstants.X_OK);
|
|
281584
281811
|
exeLocalXdgOpen = true;
|
|
281585
281812
|
} catch {}
|
|
281586
281813
|
const useSystemXdgOpen = process.versions.electron || platform5 === "android" || isBundled || !exeLocalXdgOpen;
|
|
@@ -281755,7 +281982,7 @@ import require$$0$6 from "net";
|
|
|
281755
281982
|
import require$$1$3 from "tls";
|
|
281756
281983
|
import require$$3 from "assert";
|
|
281757
281984
|
import require$$1$2 from "tty";
|
|
281758
|
-
import require$$0$4 from "os";
|
|
281985
|
+
import require$$0$4, { hostname as hostname3, networkInterfaces } from "os";
|
|
281759
281986
|
import require$$0$5, { EventEmitter as EventEmitter$1 } from "events";
|
|
281760
281987
|
import http2 from "http2";
|
|
281761
281988
|
import zlib from "zlib";
|
|
@@ -295819,15 +296046,15 @@ function parseUrl$1(urlString) {
|
|
|
295819
296046
|
function getProxyForUrl(url2) {
|
|
295820
296047
|
var parsedUrl = (typeof url2 === "string" ? parseUrl$1(url2) : url2) || {};
|
|
295821
296048
|
var proto = parsedUrl.protocol;
|
|
295822
|
-
var
|
|
296049
|
+
var hostname4 = parsedUrl.host;
|
|
295823
296050
|
var port = parsedUrl.port;
|
|
295824
|
-
if (typeof
|
|
296051
|
+
if (typeof hostname4 !== "string" || !hostname4 || typeof proto !== "string") {
|
|
295825
296052
|
return "";
|
|
295826
296053
|
}
|
|
295827
296054
|
proto = proto.split(":", 1)[0];
|
|
295828
|
-
|
|
296055
|
+
hostname4 = hostname4.replace(/:\d*$/, "");
|
|
295829
296056
|
port = parseInt(port) || DEFAULT_PORTS$1[proto] || 0;
|
|
295830
|
-
if (!shouldProxy(
|
|
296057
|
+
if (!shouldProxy(hostname4, port)) {
|
|
295831
296058
|
return "";
|
|
295832
296059
|
}
|
|
295833
296060
|
var proxy = getEnv(proto + "_proxy") || getEnv("all_proxy");
|
|
@@ -295836,7 +296063,7 @@ function getProxyForUrl(url2) {
|
|
|
295836
296063
|
}
|
|
295837
296064
|
return proxy;
|
|
295838
296065
|
}
|
|
295839
|
-
function shouldProxy(
|
|
296066
|
+
function shouldProxy(hostname4, port) {
|
|
295840
296067
|
var NO_PROXY = getEnv("no_proxy").toLowerCase();
|
|
295841
296068
|
if (!NO_PROXY) {
|
|
295842
296069
|
return true;
|
|
@@ -295855,12 +296082,12 @@ function shouldProxy(hostname3, port) {
|
|
|
295855
296082
|
return true;
|
|
295856
296083
|
}
|
|
295857
296084
|
if (!/^[.*]/.test(parsedProxyHostname)) {
|
|
295858
|
-
return
|
|
296085
|
+
return hostname4 !== parsedProxyHostname;
|
|
295859
296086
|
}
|
|
295860
296087
|
if (parsedProxyHostname.charAt(0) === "*") {
|
|
295861
296088
|
parsedProxyHostname = parsedProxyHostname.slice(1);
|
|
295862
296089
|
}
|
|
295863
|
-
return !
|
|
296090
|
+
return !hostname4.endsWith(parsedProxyHostname);
|
|
295864
296091
|
});
|
|
295865
296092
|
}
|
|
295866
296093
|
function getEnv(key) {
|
|
@@ -296960,8 +297187,8 @@ var HttpsProxyAgent$3 = class HttpsProxyAgent extends agent_base_1.Agent {
|
|
|
296960
297187
|
socket = net_1.default.connect(proxy);
|
|
296961
297188
|
}
|
|
296962
297189
|
const headers = Object.assign({}, proxy.headers);
|
|
296963
|
-
const
|
|
296964
|
-
let payload = `CONNECT ${
|
|
297190
|
+
const hostname4 = `${opts.host}:${opts.port}`;
|
|
297191
|
+
let payload = `CONNECT ${hostname4} HTTP/1.1\r
|
|
296965
297192
|
`;
|
|
296966
297193
|
if (proxy.auth) {
|
|
296967
297194
|
headers["Proxy-Authorization"] = `Basic ${Buffer.from(proxy.auth).toString("base64")}`;
|
|
@@ -297962,14 +298189,14 @@ var unmapIPv4MappedIPv6 = (host) => {
|
|
|
297962
298189
|
}
|
|
297963
298190
|
return host;
|
|
297964
298191
|
};
|
|
297965
|
-
var normalizeNoProxyHost = (
|
|
297966
|
-
if (!
|
|
297967
|
-
return
|
|
298192
|
+
var normalizeNoProxyHost = (hostname4) => {
|
|
298193
|
+
if (!hostname4) {
|
|
298194
|
+
return hostname4;
|
|
297968
298195
|
}
|
|
297969
|
-
if (
|
|
297970
|
-
|
|
298196
|
+
if (hostname4.charAt(0) === "[" && hostname4.charAt(hostname4.length - 1) === "]") {
|
|
298197
|
+
hostname4 = hostname4.slice(1, -1);
|
|
297971
298198
|
}
|
|
297972
|
-
return unmapIPv4MappedIPv6(
|
|
298199
|
+
return unmapIPv4MappedIPv6(hostname4.replace(/\.+$/, ""));
|
|
297973
298200
|
};
|
|
297974
298201
|
function shouldBypassProxy(location) {
|
|
297975
298202
|
let parsed;
|
|
@@ -297986,7 +298213,7 @@ function shouldBypassProxy(location) {
|
|
|
297986
298213
|
return true;
|
|
297987
298214
|
}
|
|
297988
298215
|
const port = Number.parseInt(parsed.port, 10) || DEFAULT_PORTS[parsed.protocol.split(":", 1)[0]] || 0;
|
|
297989
|
-
const
|
|
298216
|
+
const hostname4 = normalizeNoProxyHost(parsed.hostname.toLowerCase());
|
|
297990
298217
|
return noProxy.split(/[\s,]+/).some((entry) => {
|
|
297991
298218
|
if (!entry) {
|
|
297992
298219
|
return false;
|
|
@@ -298003,9 +298230,9 @@ function shouldBypassProxy(location) {
|
|
|
298003
298230
|
entryHost = entryHost.slice(1);
|
|
298004
298231
|
}
|
|
298005
298232
|
if (entryHost.charAt(0) === ".") {
|
|
298006
|
-
return
|
|
298233
|
+
return hostname4.endsWith(entryHost);
|
|
298007
298234
|
}
|
|
298008
|
-
return
|
|
298235
|
+
return hostname4 === entryHost || isLoopback(hostname4) && isLoopback(entryHost);
|
|
298009
298236
|
});
|
|
298010
298237
|
}
|
|
298011
298238
|
function speedometer(samplesCount, min) {
|
|
@@ -298448,8 +298675,8 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter2(config2) {
|
|
|
298448
298675
|
const isHttp2 = httpVersion === 2;
|
|
298449
298676
|
if (lookup) {
|
|
298450
298677
|
const _lookup = callbackify(lookup, (value2) => utils$3.isArray(value2) ? value2 : [value2]);
|
|
298451
|
-
lookup = (
|
|
298452
|
-
_lookup(
|
|
298678
|
+
lookup = (hostname4, opt, cb) => {
|
|
298679
|
+
_lookup(hostname4, opt, (err, arg0, arg1) => {
|
|
298453
298680
|
if (err) {
|
|
298454
298681
|
return cb(err);
|
|
298455
298682
|
}
|
|
@@ -301471,6 +301698,32 @@ var TasGraphSchema = exports_external.looseObject({
|
|
|
301471
301698
|
totalVertices: exports_external.number().optional(),
|
|
301472
301699
|
totalEdges: exports_external.number().optional()
|
|
301473
301700
|
});
|
|
301701
|
+
var TasStoreGraphInputSchema = exports_external.looseObject({
|
|
301702
|
+
includeSuccessResult: exports_external.boolean().optional(),
|
|
301703
|
+
ttl: exports_external.number().optional(),
|
|
301704
|
+
endTimeAllowedThreshold: exports_external.number().optional(),
|
|
301705
|
+
storeType: TasAttributeTypeSchema.optional(),
|
|
301706
|
+
graph: TasGraphSchema
|
|
301707
|
+
});
|
|
301708
|
+
var TasStoreChangeSchema = exports_external.looseObject({
|
|
301709
|
+
changeType: exports_external.string().optional(),
|
|
301710
|
+
id: exports_external.unknown().optional()
|
|
301711
|
+
});
|
|
301712
|
+
var TasStoreGraphResponseSchema = exports_external.looseObject({
|
|
301713
|
+
graph: TasGraphSchema.optional(),
|
|
301714
|
+
failedVertices: exports_external.array(exports_external.looseObject({
|
|
301715
|
+
object: TasVertexSchema,
|
|
301716
|
+
code: exports_external.string().optional(),
|
|
301717
|
+
message: exports_external.string().optional()
|
|
301718
|
+
})).optional(),
|
|
301719
|
+
failedEdges: exports_external.array(exports_external.looseObject({
|
|
301720
|
+
object: TasEdgeSchema,
|
|
301721
|
+
code: exports_external.string().optional(),
|
|
301722
|
+
message: exports_external.string().optional()
|
|
301723
|
+
})).optional(),
|
|
301724
|
+
edgeChanges: exports_external.array(TasStoreChangeSchema).optional(),
|
|
301725
|
+
vertexChanges: exports_external.array(TasStoreChangeSchema).optional()
|
|
301726
|
+
});
|
|
301474
301727
|
var OperatorSchema = exports_external.enum(["EQ", "GE", "GT", "LE", "LT", "NE"]).describe("Comparison operator for numeric/lexical PART comparisons");
|
|
301475
301728
|
var SourceNameAllSpecifierSchema = exports_external.looseObject({
|
|
301476
301729
|
op: exports_external.literal("ALL")
|
|
@@ -301714,6 +301967,28 @@ var MetadataMetricQuerySchema = exports_external.looseObject({
|
|
|
301714
301967
|
profileLevel: exports_external.string().optional().describe("Granularity of profiling when `includeProfile=true`"),
|
|
301715
301968
|
queryHints: exports_external.array(QueryHintSchema).optional().describe("Optional server hints; currently supports `ForceRange`")
|
|
301716
301969
|
});
|
|
301970
|
+
var MetricRegisterSchema = exports_external.looseObject({
|
|
301971
|
+
id: exports_external.string().optional(),
|
|
301972
|
+
sourceName: exports_external.string(),
|
|
301973
|
+
attributeName: exports_external.string(),
|
|
301974
|
+
type: exports_external.number().optional(),
|
|
301975
|
+
typeEnum: exports_external.array(exports_external.string()).optional(),
|
|
301976
|
+
attributes: exports_external.record(exports_external.string(), exports_external.unknown()).optional(),
|
|
301977
|
+
firstSeen: exports_external.number().optional(),
|
|
301978
|
+
lastSeen: exports_external.number().optional()
|
|
301979
|
+
});
|
|
301980
|
+
var MetricRegisterRequestSchema = exports_external.looseObject({
|
|
301981
|
+
sync: exports_external.boolean().optional(),
|
|
301982
|
+
metrics: exports_external.array(MetricRegisterSchema)
|
|
301983
|
+
});
|
|
301984
|
+
var MetricRegisterSourceSchema = exports_external.looseObject({
|
|
301985
|
+
sourceId: exports_external.string().optional(),
|
|
301986
|
+
name: exports_external.string().optional()
|
|
301987
|
+
});
|
|
301988
|
+
var MetricRegisterResponseSchema = exports_external.looseObject({
|
|
301989
|
+
metrics: exports_external.array(MetricRegisterSchema).optional(),
|
|
301990
|
+
sources: exports_external.array(MetricRegisterSourceSchema).optional()
|
|
301991
|
+
});
|
|
301717
301992
|
var MetricAttributeSchema = exports_external.looseObject({
|
|
301718
301993
|
id: exports_external.string().optional(),
|
|
301719
301994
|
sourceName: exports_external.string().optional(),
|
|
@@ -312642,36 +312917,33 @@ var LogQuery;
|
|
|
312642
312917
|
};
|
|
312643
312918
|
}
|
|
312644
312919
|
LogQuery2.createOr = createOr;
|
|
312645
|
-
function createLogQueryRequestBody(range, ors, severities = [
|
|
312920
|
+
function createLogQueryRequestBody(range, ors, severities = [], includes = [
|
|
312646
312921
|
"_id",
|
|
312647
312922
|
"host",
|
|
312648
312923
|
"logseverity",
|
|
312649
|
-
"
|
|
312924
|
+
"logtype",
|
|
312650
312925
|
"timestamp",
|
|
312651
312926
|
"file",
|
|
312652
312927
|
"message"
|
|
312653
312928
|
], size = 1000, sort = [{ sortKey: "timestamp", sortOrder: "Asc" }]) {
|
|
312929
|
+
const nonEmptySeverities = severities.filter((s2) => s2.length > 0);
|
|
312930
|
+
const severityClause = nonEmptySeverities.length > 0 ? [
|
|
312931
|
+
{
|
|
312932
|
+
or: {
|
|
312933
|
+
expressions: nonEmptySeverities.map((severity) => ({
|
|
312934
|
+
fieldDescription: "Log Severity",
|
|
312935
|
+
field: "logseverity",
|
|
312936
|
+
value: severity,
|
|
312937
|
+
condition: "equals"
|
|
312938
|
+
}))
|
|
312939
|
+
}
|
|
312940
|
+
}
|
|
312941
|
+
] : [];
|
|
312654
312942
|
return {
|
|
312655
312943
|
size,
|
|
312656
312944
|
query: {
|
|
312657
312945
|
and: {
|
|
312658
|
-
expressions: [
|
|
312659
|
-
{
|
|
312660
|
-
or: {
|
|
312661
|
-
expressions: [
|
|
312662
|
-
...severities.map((severity) => {
|
|
312663
|
-
return {
|
|
312664
|
-
fieldDescription: "Log Severity",
|
|
312665
|
-
field: "logseverity",
|
|
312666
|
-
value: severity,
|
|
312667
|
-
condition: "equals"
|
|
312668
|
-
};
|
|
312669
|
-
})
|
|
312670
|
-
]
|
|
312671
|
-
}
|
|
312672
|
-
},
|
|
312673
|
-
...ors
|
|
312674
|
-
]
|
|
312946
|
+
expressions: [...severityClause, ...ors]
|
|
312675
312947
|
}
|
|
312676
312948
|
},
|
|
312677
312949
|
includes,
|
|
@@ -320166,11 +320438,11 @@ class AgentService {
|
|
|
320166
320438
|
});
|
|
320167
320439
|
const helperInfrastructureAgentHostMap = new ListMap;
|
|
320168
320440
|
const indieInfrastructureAgentHostMap = new ListMap;
|
|
320169
|
-
function hostHasAppAgent(
|
|
320170
|
-
return javaAgentHostMap.getMap().has(
|
|
320441
|
+
function hostHasAppAgent(hostname4) {
|
|
320442
|
+
return javaAgentHostMap.getMap().has(hostname4) || nodeAgentHostMap.getMap().has(hostname4) || dotNETAgentHostMap.getMap().has(hostname4) || pythonAgentHostMap.getMap().has(hostname4);
|
|
320171
320443
|
}
|
|
320172
|
-
function hostAlreadyHasInfra(
|
|
320173
|
-
return helperInfrastructureAgentHostMap.getMap().has(
|
|
320444
|
+
function hostAlreadyHasInfra(hostname4) {
|
|
320445
|
+
return helperInfrastructureAgentHostMap.getMap().has(hostname4) || indieInfrastructureAgentHostMap.getMap().has(hostname4);
|
|
320174
320446
|
}
|
|
320175
320447
|
agentDescriptors.forEach((agentDescriptor) => {
|
|
320176
320448
|
if (this.isInfrastructureAgent(agentDescriptor)) {
|
|
@@ -320244,6 +320516,13 @@ class AgentService {
|
|
|
320244
320516
|
};
|
|
320245
320517
|
return this.dxSaaSService.tenantPost("/apm/atc/api/private/trace/summary", traceSummaryRequestBody);
|
|
320246
320518
|
}
|
|
320519
|
+
injectTrace(trace) {
|
|
320520
|
+
return this.injectTraces([trace]);
|
|
320521
|
+
}
|
|
320522
|
+
injectTraces(traces) {
|
|
320523
|
+
const body = { values: traces };
|
|
320524
|
+
return this.dxSaaSService.tenantPost("/tracestore/process", body);
|
|
320525
|
+
}
|
|
320247
320526
|
startAgentTrace(agents, minTXDuration, sessionDuration, parameterName, operationType, parameterNotSign, parameterValue, errorFilterValue) {
|
|
320248
320527
|
let body = {
|
|
320249
320528
|
agentList: agents,
|
|
@@ -326565,6 +326844,21 @@ class DxSaasService {
|
|
|
326565
326844
|
}
|
|
326566
326845
|
});
|
|
326567
326846
|
}
|
|
326847
|
+
async logPost(path3, body) {
|
|
326848
|
+
const logBase = this.dxdoConfiguration.dxConfiguration.dxLogIngestionURL;
|
|
326849
|
+
if (!logBase) {
|
|
326850
|
+
throw new Error('dxLogIngestionURL is not set in config — add it to your .dxo2.config.json (e.g. "https://logs-gateway.dxi-na1.saas.broadcom.com")');
|
|
326851
|
+
}
|
|
326852
|
+
const url3 = `${logBase}/${path3}`;
|
|
326853
|
+
this.log.debug(`log posting to: ${url3}`);
|
|
326854
|
+
return this._httpClient.post(url3, body ?? {}, this.createSimpleUserAuthorizedRequestConfig(undefined)).then((response) => response.data).catch((reason) => {
|
|
326855
|
+
if (reason.response || reason.request) {
|
|
326856
|
+
throw DxSaasService.handleAxiosError(reason);
|
|
326857
|
+
} else {
|
|
326858
|
+
throw new Error(reason);
|
|
326859
|
+
}
|
|
326860
|
+
});
|
|
326861
|
+
}
|
|
326568
326862
|
async accStream(path3, params, extraHeaders) {
|
|
326569
326863
|
const url3 = `${this.dxdoConfiguration.dxConfiguration.dxGatewayHost}${this.getCohortIDForURL()}/acc/${path3}`;
|
|
326570
326864
|
const aheaders = this.createUserAuthorizedRequestConfig(params);
|
|
@@ -329817,6 +330111,19 @@ class JsExtensionService {
|
|
|
329817
330111
|
return this.dxSaaSService.tenantRequest("POST", "/apm/atc/api/private/em/extensions", formData, undefined, formData.getHeaders());
|
|
329818
330112
|
}
|
|
329819
330113
|
}
|
|
330114
|
+
function detectIPv4() {
|
|
330115
|
+
const nets = networkInterfaces();
|
|
330116
|
+
for (const iface of Object.values(nets)) {
|
|
330117
|
+
if (!iface)
|
|
330118
|
+
continue;
|
|
330119
|
+
for (const net of iface) {
|
|
330120
|
+
if (net.family === "IPv4" && !net.internal) {
|
|
330121
|
+
return net.address;
|
|
330122
|
+
}
|
|
330123
|
+
}
|
|
330124
|
+
}
|
|
330125
|
+
return "127.0.0.1";
|
|
330126
|
+
}
|
|
329820
330127
|
|
|
329821
330128
|
class LogsService {
|
|
329822
330129
|
dxSaasService;
|
|
@@ -329826,6 +330133,54 @@ class LogsService {
|
|
|
329826
330133
|
queryLogs(logQueryBody) {
|
|
329827
330134
|
return this.dxSaasService.oiPost("oi/loganalytics/v1/api/logs/filter", logQueryBody);
|
|
329828
330135
|
}
|
|
330136
|
+
ingestLog(entry) {
|
|
330137
|
+
return this.ingestLogs([entry]);
|
|
330138
|
+
}
|
|
330139
|
+
buildLogPayload(entries) {
|
|
330140
|
+
const cohortId = this.dxSaasService.dxdoConfiguration.dxConfiguration.cohortId;
|
|
330141
|
+
const tenantIdUpper = cohortId.toUpperCase();
|
|
330142
|
+
const now2 = new Date().toISOString();
|
|
330143
|
+
return entries.map((e) => {
|
|
330144
|
+
const host = e.host ?? hostname3();
|
|
330145
|
+
const logtype = e.logtype;
|
|
330146
|
+
const ip = e.ip ?? detectIPv4();
|
|
330147
|
+
const agentInstance = e.agentInstance ?? "dx-do";
|
|
330148
|
+
const agentName = e.agentName ?? "Logs Collector";
|
|
330149
|
+
const containerId = e.containerId ?? host;
|
|
330150
|
+
const containerName = e.containerName ?? agentInstance;
|
|
330151
|
+
const file2 = e.file ?? "dx-do.cli";
|
|
330152
|
+
const tag2 = `${logtype} logs`;
|
|
330153
|
+
const temp_fields = `${tenantIdUpper} ${logtype} ${host} ${containerId} ${containerName} ${ip} ${tag2} ${file2}`;
|
|
330154
|
+
return {
|
|
330155
|
+
"@timestamp": now2,
|
|
330156
|
+
logtype,
|
|
330157
|
+
message: e.message ?? "",
|
|
330158
|
+
host: { name: host, hostname: host },
|
|
330159
|
+
tenant_id: tenantIdUpper,
|
|
330160
|
+
temp_fields,
|
|
330161
|
+
tags: [tag2],
|
|
330162
|
+
__agent_name: agentName,
|
|
330163
|
+
__agent_instance: agentInstance,
|
|
330164
|
+
container_id: containerId,
|
|
330165
|
+
container_name: containerName,
|
|
330166
|
+
...Object.fromEntries(Object.entries(e).filter(([k]) => ![
|
|
330167
|
+
"logtype",
|
|
330168
|
+
"message",
|
|
330169
|
+
"host",
|
|
330170
|
+
"timestamp",
|
|
330171
|
+
"ip",
|
|
330172
|
+
"agentInstance",
|
|
330173
|
+
"agentName",
|
|
330174
|
+
"containerId",
|
|
330175
|
+
"containerName",
|
|
330176
|
+
"file"
|
|
330177
|
+
].includes(k)))
|
|
330178
|
+
};
|
|
330179
|
+
});
|
|
330180
|
+
}
|
|
330181
|
+
ingestLogs(entries) {
|
|
330182
|
+
return this.dxSaasService.logPost("mdo/v2/aoanalytics/ingestion/uim_logs", this.buildLogPayload(entries));
|
|
330183
|
+
}
|
|
329829
330184
|
}
|
|
329830
330185
|
|
|
329831
330186
|
class ManagementModuleService {
|
|
@@ -331916,6 +332271,22 @@ class DataStoreMetricsMetadataService {
|
|
|
331916
332271
|
this.dxSaasService = dxSaasService;
|
|
331917
332272
|
this.log = log3;
|
|
331918
332273
|
}
|
|
332274
|
+
async registerMetrics(metrics, sync) {
|
|
332275
|
+
const body = {
|
|
332276
|
+
metrics,
|
|
332277
|
+
...sync !== undefined ? { sync } : {}
|
|
332278
|
+
};
|
|
332279
|
+
MetricRegisterRequestSchema.parse(body);
|
|
332280
|
+
const raw = await this.dxSaasService.tenantPost("metadata/registerMetric", body);
|
|
332281
|
+
const result = MetricRegisterResponseSchema.safeParse(raw);
|
|
332282
|
+
if (!result.success) {
|
|
332283
|
+
this.log.warn("MetricRegisterResponse validation warning:", result.error.message);
|
|
332284
|
+
}
|
|
332285
|
+
return raw;
|
|
332286
|
+
}
|
|
332287
|
+
async registerMetric(metric, sync) {
|
|
332288
|
+
return this.registerMetrics([metric], sync);
|
|
332289
|
+
}
|
|
331919
332290
|
async queryMetric(query) {
|
|
331920
332291
|
MetadataMetricQuerySchema.parse(query);
|
|
331921
332292
|
const raw = await this.dxSaasService.tenantPost("metadata/queryMetric", query);
|
|
@@ -332102,6 +332473,15 @@ class DataStoreTASService {
|
|
|
332102
332473
|
this.dxSaasService = dxSaasService;
|
|
332103
332474
|
this.log = log3;
|
|
332104
332475
|
}
|
|
332476
|
+
async storeGraph(input) {
|
|
332477
|
+
TasStoreGraphInputSchema.parse(input);
|
|
332478
|
+
const raw = await this.dxSaasService.tenantPost("tas/graph/store", input);
|
|
332479
|
+
const result = TasStoreGraphResponseSchema.safeParse(raw);
|
|
332480
|
+
if (!result.success) {
|
|
332481
|
+
this.log.warn("TasStoreGraphResponse validation warning:", result.error.message);
|
|
332482
|
+
}
|
|
332483
|
+
return raw;
|
|
332484
|
+
}
|
|
332105
332485
|
async executeQuery(query) {
|
|
332106
332486
|
TasQuerySchema.parse(query);
|
|
332107
332487
|
const raw = await this.dxSaasService.tenantPost("tas/graph/query", query);
|
|
@@ -332429,6 +332809,19 @@ class DataStoreTokensService {
|
|
|
332429
332809
|
return this.dxSaasService.tenantPost("tenants/token/import", request);
|
|
332430
332810
|
}
|
|
332431
332811
|
}
|
|
332812
|
+
|
|
332813
|
+
class DataStoreNASSService {
|
|
332814
|
+
dxSaasService;
|
|
332815
|
+
log;
|
|
332816
|
+
constructor(dxSaasService, log3) {
|
|
332817
|
+
this.dxSaasService = dxSaasService;
|
|
332818
|
+
this.log = log3;
|
|
332819
|
+
}
|
|
332820
|
+
async storeMetricValues(values2) {
|
|
332821
|
+
const body = { values: values2 };
|
|
332822
|
+
return this.dxSaasService.tenantPost("nass/metricValue/store", body);
|
|
332823
|
+
}
|
|
332824
|
+
}
|
|
332432
332825
|
var NullSimpleLog = Logging.NullSimpleLog;
|
|
332433
332826
|
function createServiceMonolith(dxDoConfiguration, log3 = new NullSimpleLog) {
|
|
332434
332827
|
const dxSaaSService = new DxSaasService(dxDoConfiguration, log3);
|
|
@@ -332452,6 +332845,7 @@ function createServiceMonolith(dxDoConfiguration, log3 = new NullSimpleLog) {
|
|
|
332452
332845
|
dxChannelService: new ChannelService(dxSaaSService),
|
|
332453
332846
|
dxDashboardService: new DashboardService(dxSaaSService),
|
|
332454
332847
|
dxDataStoreMetricsMetadataService: new DataStoreMetricsMetadataService(dxSaaSService, log3),
|
|
332848
|
+
dxDataStoreNASSService: new DataStoreNASSService(dxSaaSService, log3),
|
|
332455
332849
|
dxDataStoreNASSQLService: new DataStoreNASSQLService(dxSaaSService, log3),
|
|
332456
332850
|
dxDataStoreTASService: new DataStoreTASService(dxSaaSService, log3),
|
|
332457
332851
|
dxEventService: new EventService(dxSaaSService, log3),
|
|
@@ -378413,7 +378807,7 @@ var semver5 = __toESM(require_semver2(), 1);
|
|
|
378413
378807
|
|
|
378414
378808
|
// src/runtime.ts
|
|
378415
378809
|
function getVersion() {
|
|
378416
|
-
return "6.0
|
|
378810
|
+
return "6.1.0";
|
|
378417
378811
|
}
|
|
378418
378812
|
|
|
378419
378813
|
// src/app/commands/index.ts
|
|
@@ -378450,6 +378844,8 @@ __export(exports_commands, {
|
|
|
378450
378844
|
unacknowledgeCommand: () => unacknowledgeCommand,
|
|
378451
378845
|
uiStart: () => uiStart,
|
|
378452
378846
|
uiHelpCommand: () => uiHelpCommand,
|
|
378847
|
+
traceInjectSimpleCommand: () => traceInjectSimpleCommand,
|
|
378848
|
+
traceInjectCommand: () => traceInjectCommand,
|
|
378453
378849
|
traceDetailsCommand: () => traceDetailsCommand,
|
|
378454
378850
|
topographerTestConfigurationCommand: () => topographerTestConfigurationCommand,
|
|
378455
378851
|
topographerGenerateSampleCommand: () => topographerGenerateSampleCommand,
|
|
@@ -378536,6 +378932,7 @@ __export(exports_commands, {
|
|
|
378536
378932
|
o2AlertDetailCommand: () => o2AlertDetailCommand,
|
|
378537
378933
|
o2AlertDeleteCommand: () => o2AlertDeleteCommand,
|
|
378538
378934
|
o2AlertCreateCommand: () => o2AlertCreateCommand,
|
|
378935
|
+
nassMetricTypesHelpCommand: () => nassMetricTypesHelpCommand,
|
|
378539
378936
|
mmUpdateCommand: () => mmUpdateCommand,
|
|
378540
378937
|
mmListCalculatorsCommand: () => mmListCalculatorsCommand,
|
|
378541
378938
|
mmDownloadCommand: () => mmDownloadCommand,
|
|
@@ -378554,6 +378951,7 @@ __export(exports_commands, {
|
|
|
378554
378951
|
managementModuleImportCommand: () => managementModuleImportCommand,
|
|
378555
378952
|
managementModuleExportCommand: () => managementModuleExportCommand,
|
|
378556
378953
|
logQueryCommand: () => logQueryCommand,
|
|
378954
|
+
logIngestCommand: () => logIngestCommand,
|
|
378557
378955
|
listTemplatesCommand: () => listTemplatesCommand,
|
|
378558
378956
|
listSessionsCommand: () => listSessionsCommand,
|
|
378559
378957
|
listScreensCommand: () => listScreensCommand,
|
|
@@ -384826,6 +385224,15 @@ function prefixArgument(description2) {
|
|
|
384826
385224
|
isPrefix: true
|
|
384827
385225
|
};
|
|
384828
385226
|
}
|
|
385227
|
+
function flagArgument(description2, defaultValue) {
|
|
385228
|
+
return {
|
|
385229
|
+
description: description2,
|
|
385230
|
+
required: false,
|
|
385231
|
+
isPrefix: false,
|
|
385232
|
+
isFlag: true,
|
|
385233
|
+
flagDefault: defaultValue
|
|
385234
|
+
};
|
|
385235
|
+
}
|
|
384829
385236
|
|
|
384830
385237
|
// src/app/commands/acc/add-package-bundles.ts
|
|
384831
385238
|
var addPackageBundlesCommand = buildCommand("acc", "add-package-bundles", "attaches bundles to a package (single PATCH, no draft/publish dance)", { addOutputOptions: true }).setNormalArgumentDescriptors({
|
|
@@ -385472,6 +385879,10 @@ var setBundlePropertyCommand = buildCommand("acc", "set-bundle-property", "sets
|
|
|
385472
385879
|
// src/app/commands/trace/trace.util.ts
|
|
385473
385880
|
var progress = __toESM(require_cli_progress(), 1);
|
|
385474
385881
|
var import_promise_pool3 = __toESM(require_dist2(), 1);
|
|
385882
|
+
function traceNameFromResource(resource) {
|
|
385883
|
+
const pipeIndex = resource.indexOf("|");
|
|
385884
|
+
return pipeIndex === -1 ? resource : resource.slice(0, pipeIndex);
|
|
385885
|
+
}
|
|
385475
385886
|
var signale7 = Signaleton.getInstance();
|
|
385476
385887
|
async function processSummaries(argsMap, summariesResponse) {
|
|
385477
385888
|
if (summariesResponse && summariesResponse.summaries) {
|
|
@@ -399839,7 +400250,7 @@ var commandHelpCommand = createCommand("help", "commands", "explains commands.",
|
|
|
399839
400250
|
});
|
|
399840
400251
|
});
|
|
399841
400252
|
// src/resources/help/configuration.md
|
|
399842
|
-
var configuration_default = "./configuration-
|
|
400253
|
+
var configuration_default = "./configuration-w9qm0y9z.md";
|
|
399843
400254
|
|
|
399844
400255
|
// src/app/commands/help/configuration.ts
|
|
399845
400256
|
var configurationHelpCommand = createCommand("help", "configuration", "explains configuration", [], () => {
|
|
@@ -399870,6 +400281,17 @@ var dashboardHelpCommand = createCommand("help", "dashboard", "explains dashboar
|
|
|
399870
400281
|
executionTime: 0
|
|
399871
400282
|
});
|
|
399872
400283
|
});
|
|
400284
|
+
// src/resources/help/nass-metric-types.md
|
|
400285
|
+
var nass_metric_types_default = "./nass-metric-types-jjhb8037.md";
|
|
400286
|
+
|
|
400287
|
+
// src/app/commands/help/nass-metric-types.ts
|
|
400288
|
+
var nassMetricTypesHelpCommand = createCommand("help", "metric-types", "explains numericMetricType and enumMetricType for 'nass register-metric' and 'nass report-metric-value'.", [], () => Promise.resolve(emptyValidationResult()), async (_noArgs, signale10) => {
|
|
400289
|
+
signale10.note("<<-------- nass metric type help -------->>");
|
|
400290
|
+
d.use(markedTerminal());
|
|
400291
|
+
OutputHandler.console(`
|
|
400292
|
+
` + d(await ResourceLoader.loadResourceAsString(nass_metric_types_default)));
|
|
400293
|
+
return Promise.resolve({ executionTime: 0 });
|
|
400294
|
+
});
|
|
399873
400295
|
// src/resources/help/time-format.md
|
|
399874
400296
|
var time_format_default = "./time-format-0595g01j.md";
|
|
399875
400297
|
|
|
@@ -400339,6 +400761,70 @@ var disableJavascriptExtensionCommand = createCommand("jsextension", "disable",
|
|
|
400339
400761
|
continuation: deleted
|
|
400340
400762
|
});
|
|
400341
400763
|
});
|
|
400764
|
+
// src/app/commands/log/log-ingest.ts
|
|
400765
|
+
var logIngestCommand = buildCommand("log", "ingest", "ingest one or more log entries directly into the DXO2 log analytics gateway", {
|
|
400766
|
+
addOutputOptions: true,
|
|
400767
|
+
addTimeRangeOptions: false
|
|
400768
|
+
}).setNormalArgumentDescriptors({
|
|
400769
|
+
logtype: optionalArgument("log type label (e.g. generic, syslog, log4j) (default: generic)"),
|
|
400770
|
+
host: optionalArgument("host name to associate with the log entry (default: auto-detected hostname)"),
|
|
400771
|
+
message: optionalArgument("log message text"),
|
|
400772
|
+
timestamp: optionalArgument("log timestamp as ISO 8601 string (default: now)"),
|
|
400773
|
+
agentName: optionalArgument('agent name (default: "Logs Collector")'),
|
|
400774
|
+
agentInstance: optionalArgument('agent instance identifier (default: "dx-do")'),
|
|
400775
|
+
containerId: optionalArgument("container ID (default: same as host)"),
|
|
400776
|
+
containerName: optionalArgument("container name (default: same as agentInstance)"),
|
|
400777
|
+
file: optionalArgument('source file label (default: "dx-do.cli")'),
|
|
400778
|
+
"dry-run": flagArgument("print the request payload without sending it", false)
|
|
400779
|
+
}).setPrefixArgumentDescriptors({
|
|
400780
|
+
field: prefixArgument("extra fields to include in the log entry (e.g. field.severity=ERROR field.host=myserver)")
|
|
400781
|
+
}).setValidationFunction(async (_validate2) => {}).setCommandExecutionFunction(async (argsMap, signale10) => {
|
|
400782
|
+
const logtype = argsMap.getOrDefault("logtype", "generic");
|
|
400783
|
+
const host = argsMap.getUnsafe("host");
|
|
400784
|
+
const message = argsMap.getUnsafe("message");
|
|
400785
|
+
const timestamp2 = argsMap.getUnsafe("timestamp");
|
|
400786
|
+
const isDryRun = argsMap.getUnsafe("dry-run") === "true";
|
|
400787
|
+
const agentName = argsMap.getUnsafe("agentName");
|
|
400788
|
+
const agentInstance = argsMap.getUnsafe("agentInstance");
|
|
400789
|
+
const containerId = argsMap.getUnsafe("containerId");
|
|
400790
|
+
const containerName = argsMap.getUnsafe("containerName");
|
|
400791
|
+
const file2 = argsMap.getUnsafe("file");
|
|
400792
|
+
const entry = { logtype };
|
|
400793
|
+
if (host)
|
|
400794
|
+
entry.host = host;
|
|
400795
|
+
if (message)
|
|
400796
|
+
entry.message = message;
|
|
400797
|
+
if (timestamp2)
|
|
400798
|
+
entry.timestamp = timestamp2;
|
|
400799
|
+
if (agentName)
|
|
400800
|
+
entry.agentName = agentName;
|
|
400801
|
+
if (agentInstance)
|
|
400802
|
+
entry.agentInstance = agentInstance;
|
|
400803
|
+
if (containerId)
|
|
400804
|
+
entry.containerId = containerId;
|
|
400805
|
+
if (containerName)
|
|
400806
|
+
entry.containerName = containerName;
|
|
400807
|
+
if (file2)
|
|
400808
|
+
entry.file = file2;
|
|
400809
|
+
const fieldKeys = argsMap.getKeysForPrefix("field");
|
|
400810
|
+
for (const key of fieldKeys) {
|
|
400811
|
+
const fieldName = key.replace(/^field\./, "");
|
|
400812
|
+
entry[fieldName] = argsMap.get(key);
|
|
400813
|
+
}
|
|
400814
|
+
const payload = ServiceMonolith.dxLogsService.buildLogPayload([entry]);
|
|
400815
|
+
if (isDryRun) {
|
|
400816
|
+
signale10.info("dry-run: would POST to /mdo/v2/aoanalytics/ingestion/uim_logs");
|
|
400817
|
+
signale10.warn("this was a dry run, no logs actually sent");
|
|
400818
|
+
return { output: { dryRun: true, payload } };
|
|
400819
|
+
}
|
|
400820
|
+
signale10.pending(`ingesting 1 log entry with logtype='${logtype}'`);
|
|
400821
|
+
const response = await ServiceMonolith.dxLogsService.ingestLogs([entry]);
|
|
400822
|
+
signale10.success("log entry ingested");
|
|
400823
|
+
return {
|
|
400824
|
+
output: { success: true, count: 1, response },
|
|
400825
|
+
testContinuationValue: { success: true, count: 1 }
|
|
400826
|
+
};
|
|
400827
|
+
});
|
|
400342
400828
|
// src/app/commands/log/query.ts
|
|
400343
400829
|
var FieldCondition = LogQuery.FieldCondition;
|
|
400344
400830
|
var LogEntry = LogQuery.LogEntry;
|
|
@@ -400346,7 +400832,7 @@ var logQueryCommand = buildCommand("log", "query", "queries DXO2 Log analytics",
|
|
|
400346
400832
|
addOutputOptions: true,
|
|
400347
400833
|
addTimeRangeOptions: true
|
|
400348
400834
|
}).setNormalArgumentDescriptors({
|
|
400349
|
-
severities: optionalArgument("comma
|
|
400835
|
+
severities: optionalArgument("comma-separated list of logseverity values to filter by (e.g. Error,Warning); omit to return all severities"),
|
|
400350
400836
|
limit: optionalArgument("limit results returned default is 1000")
|
|
400351
400837
|
}).setPrefixArgumentDescriptors({
|
|
400352
400838
|
and: prefixArgument("e.g., and.host.contains=host1,host2,host3 means host1 or host2 or host3 -- ANDSs with other or filters")
|
|
@@ -400367,7 +400853,8 @@ var logQueryCommand = buildCommand("log", "query", "queries DXO2 Log analytics",
|
|
|
400367
400853
|
ors.push(createOr(andSplit[1], andSplit[2], orValues));
|
|
400368
400854
|
});
|
|
400369
400855
|
const { startTime, endTime } = getDurationFromArgsMap(argsMap);
|
|
400370
|
-
const
|
|
400856
|
+
const severitiesRaw = argsMap.getUnsafe("severities");
|
|
400857
|
+
const severities = severitiesRaw ? severitiesRaw.split(",") : [];
|
|
400371
400858
|
signale10.pending("Querying logs");
|
|
400372
400859
|
const logQueryBody = LogQuery.createLogQueryRequestBody({
|
|
400373
400860
|
gte: startTime.toMillis(),
|
|
@@ -401818,98 +402305,158 @@ var queryCommand = createCommand("nass", "query", "executes a nass query from fi
|
|
|
401818
402305
|
executionTime: 0
|
|
401819
402306
|
});
|
|
401820
402307
|
});
|
|
402308
|
+
// src/app/commands/nass/nass.util.ts
|
|
402309
|
+
function buildSourceName(sourceType, agentTriplet) {
|
|
402310
|
+
const upper = sourceType.toUpperCase();
|
|
402311
|
+
if (upper === "ATC" || upper === "APM") {
|
|
402312
|
+
return `SuperDomain|${agentTriplet}`;
|
|
402313
|
+
}
|
|
402314
|
+
if (upper === "OI") {
|
|
402315
|
+
return `OI|${agentTriplet}`;
|
|
402316
|
+
}
|
|
402317
|
+
return `${sourceType}|${agentTriplet}`;
|
|
402318
|
+
}
|
|
402319
|
+
function assertAgentTriplet(agentTriplet) {
|
|
402320
|
+
const parts = agentTriplet.split("|");
|
|
402321
|
+
if (parts.length !== 3) {
|
|
402322
|
+
throw new Error(`agentTriplet must have exactly 3 pipe-separated parts (e.g. host|process|agent), got ${parts.length}: '${agentTriplet}'`);
|
|
402323
|
+
}
|
|
402324
|
+
}
|
|
402325
|
+
|
|
401821
402326
|
// src/app/commands/nass/register-metric.ts
|
|
401822
|
-
var registerMetricCommand =
|
|
401823
|
-
|
|
401824
|
-
|
|
401825
|
-
|
|
401826
|
-
|
|
401827
|
-
|
|
401828
|
-
|
|
401829
|
-
|
|
401830
|
-
|
|
401831
|
-
|
|
401832
|
-
|
|
401833
|
-
|
|
401834
|
-
|
|
401835
|
-
|
|
402327
|
+
var registerMetricCommand = buildCommand("nass", "register-metric", "register a metric in the NASS metadata store", {
|
|
402328
|
+
addOutputOptions: true,
|
|
402329
|
+
addTimeRangeOptions: false
|
|
402330
|
+
}).setNormalArgumentDescriptors({
|
|
402331
|
+
sourceType: requiredArgument('source type — ATC and APM prepend "SuperDomain|", OI prepends "OI|", others are used as-is (e.g. ATC, APM, OI, Custom)'),
|
|
402332
|
+
agentTriplet: requiredArgument("exactly 3 pipe-separated agent path segments (e.g. host|process|agent)"),
|
|
402333
|
+
attributeName: requiredArgument("attribute name (e.g. 'Resource|Folder:Metric Name')"),
|
|
402334
|
+
numericMetricType: optionalArgument("numeric metric type as a 32-bit integer (see help metric-types for details)"),
|
|
402335
|
+
enumMetricType: optionalArgument("comma-separated metric type enum values (e.g. MONITOR_INT_DURATION,TYPE_INFO_FRONTEND; see help metric-types)")
|
|
402336
|
+
}).setPrefixArgumentDescriptors({
|
|
402337
|
+
metricAttribute: prefixArgument("set a metadata attribute on the metric — repeat for multiple (e.g. metricAttribute.unit=ms metricAttribute.team=platform)")
|
|
402338
|
+
}).setValidationFunction(async (validate5) => {
|
|
402339
|
+
validate5.thatValueOfArgument("sourceType").exists();
|
|
402340
|
+
validate5.thatValueOfArgument("agentTriplet").exists();
|
|
402341
|
+
validate5.thatValueOfArgument("attributeName").exists();
|
|
402342
|
+
}).setCommandExecutionFunction(async (argsMap, signale14) => {
|
|
402343
|
+
const sourceType = argsMap.get("sourceType");
|
|
402344
|
+
const agentTriplet = argsMap.get("agentTriplet");
|
|
402345
|
+
assertAgentTriplet(agentTriplet);
|
|
402346
|
+
const sourceName = buildSourceName(sourceType, agentTriplet);
|
|
401836
402347
|
const attributeName = argsMap.get("attributeName");
|
|
401837
|
-
const
|
|
401838
|
-
|
|
401839
|
-
const
|
|
401840
|
-
|
|
401841
|
-
|
|
401842
|
-
|
|
401843
|
-
|
|
402348
|
+
const numericMetricTypeStr = argsMap.getUnsafe("numericMetricType");
|
|
402349
|
+
const enumMetricTypeStr = argsMap.getUnsafe("enumMetricType");
|
|
402350
|
+
const attributes = {};
|
|
402351
|
+
for (const key of argsMap.getKeysForPrefix("metricAttribute")) {
|
|
402352
|
+
attributes[key.slice("metricAttribute.".length)] = argsMap.get(key);
|
|
402353
|
+
}
|
|
402354
|
+
const metric = {
|
|
402355
|
+
sourceName,
|
|
402356
|
+
attributeName,
|
|
402357
|
+
...numericMetricTypeStr ? { type: parseInt(numericMetricTypeStr, 10) } : {},
|
|
402358
|
+
...enumMetricTypeStr ? { typeEnum: enumMetricTypeStr.split(",").map((s7) => s7.trim()) } : {},
|
|
402359
|
+
...Object.keys(attributes).length > 0 ? { attributes } : {}
|
|
402360
|
+
};
|
|
402361
|
+
signale14.pending("registering metric");
|
|
402362
|
+
const result = await ServiceMonolith.dxDataStoreMetricsMetadataService.registerMetric(metric);
|
|
402363
|
+
const registered = result.metrics ?? [];
|
|
402364
|
+
if (registered.length > 0) {
|
|
402365
|
+
signale14.success(`metric registered — id: ${registered[0].id}`);
|
|
402366
|
+
}
|
|
402367
|
+
return { output: result, testContinuationValue: result };
|
|
401844
402368
|
});
|
|
401845
402369
|
// src/app/commands/nass/report-metric-value.ts
|
|
401846
|
-
var reportMetricValueCommand =
|
|
401847
|
-
|
|
401848
|
-
|
|
401849
|
-
|
|
401850
|
-
|
|
401851
|
-
|
|
401852
|
-
|
|
401853
|
-
|
|
401854
|
-
|
|
401855
|
-
|
|
401856
|
-
|
|
401857
|
-
|
|
401858
|
-
|
|
401859
|
-
|
|
402370
|
+
var reportMetricValueCommand = buildCommand("nass", "report-metric-value", "register a metric and store a single value for it at the current time", {
|
|
402371
|
+
addOutputOptions: true,
|
|
402372
|
+
addTimeRangeOptions: false
|
|
402373
|
+
}).setNormalArgumentDescriptors({
|
|
402374
|
+
sourceType: requiredArgument('source type — ATC and APM prepend "SuperDomain|", OI prepends "OI|", others are used as-is (e.g. ATC, APM, OI, Custom)'),
|
|
402375
|
+
agentTriplet: requiredArgument("exactly 3 pipe-separated agent path segments (e.g. host|process|agent)"),
|
|
402376
|
+
attributeName: requiredArgument("attribute name (e.g. 'Resource|Folder:Metric Name')"),
|
|
402377
|
+
numericMetricType: optionalArgument("numeric metric type as a 32-bit integer (see help metric-types for details)"),
|
|
402378
|
+
enumMetricType: optionalArgument("comma-separated metric type enum values (e.g. MONITOR_INT_DURATION,TYPE_INFO_FRONTEND; see help metric-types)"),
|
|
402379
|
+
value: optionalArgument("numeric value to store (default: 1)")
|
|
402380
|
+
}).setPrefixArgumentDescriptors({}).setValidationFunction(async (validate5) => {
|
|
402381
|
+
validate5.thatValueOfArgument("sourceType").exists();
|
|
402382
|
+
validate5.thatValueOfArgument("agentTriplet").exists();
|
|
402383
|
+
validate5.thatValueOfArgument("attributeName").exists();
|
|
402384
|
+
}).setCommandExecutionFunction(async (argsMap, signale14) => {
|
|
402385
|
+
const sourceType = argsMap.get("sourceType");
|
|
402386
|
+
const agentTriplet = argsMap.get("agentTriplet");
|
|
402387
|
+
assertAgentTriplet(agentTriplet);
|
|
402388
|
+
const sourceName = buildSourceName(sourceType, agentTriplet);
|
|
401860
402389
|
const attributeName = argsMap.get("attributeName");
|
|
401861
|
-
const
|
|
401862
|
-
|
|
401863
|
-
const
|
|
401864
|
-
|
|
401865
|
-
|
|
401866
|
-
|
|
401867
|
-
|
|
401868
|
-
|
|
401869
|
-
{
|
|
401870
|
-
|
|
401871
|
-
|
|
401872
|
-
|
|
401873
|
-
|
|
401874
|
-
|
|
401875
|
-
|
|
401876
|
-
|
|
401877
|
-
|
|
402390
|
+
const metricTypeStr = argsMap.getUnsafe("numericMetricType");
|
|
402391
|
+
const typeEnumStr = argsMap.getUnsafe("enumMetricType");
|
|
402392
|
+
const rawValue = argsMap.getUnsafe("value");
|
|
402393
|
+
const numericValue = rawValue !== undefined ? parseFloat(rawValue) : 1;
|
|
402394
|
+
const metric = {
|
|
402395
|
+
sourceName,
|
|
402396
|
+
attributeName,
|
|
402397
|
+
...metricTypeStr ? { type: parseInt(metricTypeStr, 10) } : {},
|
|
402398
|
+
...typeEnumStr ? { typeEnum: typeEnumStr.split(",").map((s7) => s7.trim()) } : {}
|
|
402399
|
+
};
|
|
402400
|
+
signale14.pending("registering metric");
|
|
402401
|
+
const registerResult = await ServiceMonolith.dxDataStoreMetricsMetadataService.registerMetric(metric);
|
|
402402
|
+
const registered = registerResult.metrics ?? [];
|
|
402403
|
+
if (registered.length !== 1 || !registered[0].id) {
|
|
402404
|
+
throw new Error(`expected 1 registered metric, got ${registered.length}`);
|
|
402405
|
+
}
|
|
402406
|
+
const metricId = registered[0].id;
|
|
402407
|
+
const timeSeconds = Math.ceil(Date.now() / 1000);
|
|
402408
|
+
const datapoint = [
|
|
402409
|
+
metricId,
|
|
402410
|
+
timeSeconds,
|
|
402411
|
+
numericValue,
|
|
402412
|
+
numericValue,
|
|
402413
|
+
numericValue,
|
|
402414
|
+
1,
|
|
402415
|
+
15
|
|
402416
|
+
];
|
|
402417
|
+
signale14.pending(`storing value ${numericValue} for metric '${metricId}'`);
|
|
402418
|
+
const storeResult = await ServiceMonolith.dxDataStoreNASSService.storeMetricValues([
|
|
402419
|
+
datapoint
|
|
401878
402420
|
]);
|
|
401879
|
-
|
|
401880
|
-
return
|
|
401881
|
-
|
|
401882
|
-
|
|
402421
|
+
signale14.success(`value stored for metric '${metricId}'`);
|
|
402422
|
+
return {
|
|
402423
|
+
output: { metricId, value: numericValue, store: storeResult },
|
|
402424
|
+
testContinuationValue: { metricId, value: numericValue }
|
|
402425
|
+
};
|
|
401883
402426
|
});
|
|
401884
402427
|
// src/app/commands/nass/update-metadata-attribute.ts
|
|
401885
|
-
var updateMetadataAttributeCommand =
|
|
401886
|
-
|
|
401887
|
-
|
|
401888
|
-
|
|
401889
|
-
|
|
401890
|
-
|
|
401891
|
-
|
|
401892
|
-
|
|
401893
|
-
|
|
401894
|
-
|
|
401895
|
-
|
|
401896
|
-
|
|
401897
|
-
|
|
401898
|
-
|
|
401899
|
-
|
|
401900
|
-
signale14.await("executing query");
|
|
402428
|
+
var updateMetadataAttributeCommand = buildCommand("nass", "update-metadata-attribute", "update a single metadata attribute on a metric", {
|
|
402429
|
+
addOutputOptions: true,
|
|
402430
|
+
addTimeRangeOptions: false
|
|
402431
|
+
}).setNormalArgumentDescriptors({
|
|
402432
|
+
source: requiredArgument("full agent name or regex (e.g. 'SuperDomain|Host|Process|Agent')"),
|
|
402433
|
+
attribute: requiredArgument("full metric name or regex (e.g. 'Resource|Folder:Metric')"),
|
|
402434
|
+
metadataAttributeName: requiredArgument("the metadata attribute key to set"),
|
|
402435
|
+
metadataAttributeValue: requiredArgument("the metadata attribute value to set")
|
|
402436
|
+
}).setPrefixArgumentDescriptors({}).setValidationFunction(async (validate5) => {
|
|
402437
|
+
validate5.thatValueOfArgument("source").exists();
|
|
402438
|
+
validate5.thatValueOfArgument("attribute").exists();
|
|
402439
|
+
validate5.thatValueOfArgument("metadataAttributeName").exists();
|
|
402440
|
+
validate5.thatValueOfArgument("metadataAttributeValue").exists();
|
|
402441
|
+
}).setCommandExecutionFunction(async (argsMap, signale14) => {
|
|
402442
|
+
signale14.pending("querying metric metadata");
|
|
401901
402443
|
const queryResult = await ServiceMonolith.dxNASSService.queryMetadata(argsMap.get("source"), "EXACT", argsMap.get("attribute"), "EXACT");
|
|
401902
|
-
if (queryResult.metrics.length
|
|
401903
|
-
throw new Error("
|
|
401904
|
-
}
|
|
401905
|
-
|
|
401906
|
-
|
|
401907
|
-
|
|
401908
|
-
signale14.
|
|
401909
|
-
await
|
|
401910
|
-
|
|
401911
|
-
|
|
401912
|
-
|
|
402444
|
+
if (queryResult.metrics.length === 0) {
|
|
402445
|
+
throw new Error("no metric found matching the given source and attribute");
|
|
402446
|
+
}
|
|
402447
|
+
const attrName = argsMap.get("metadataAttributeName");
|
|
402448
|
+
const attrValue = argsMap.get("metadataAttributeValue");
|
|
402449
|
+
queryResult.metrics[0].attributes[attrName] = attrValue;
|
|
402450
|
+
signale14.pending("updating metric registration");
|
|
402451
|
+
const updated = await ServiceMonolith.dxDataStoreMetricsMetadataService.registerMetrics(queryResult.metrics.map((m2) => ({
|
|
402452
|
+
id: m2.id,
|
|
402453
|
+
sourceName: m2.sourceName,
|
|
402454
|
+
attributeName: m2.attributeName,
|
|
402455
|
+
type: m2.type,
|
|
402456
|
+
attributes: m2.attributes
|
|
402457
|
+
})));
|
|
402458
|
+
signale14.success("metadata attribute updated");
|
|
402459
|
+
return { output: updated, testContinuationValue: updated };
|
|
401913
402460
|
});
|
|
401914
402461
|
// src/app/commands/o2-alert/alert-constants.ts
|
|
401915
402462
|
var RESOLUTION_MAP = {
|
|
@@ -403660,26 +404207,32 @@ var queryJSONCommand = createCommand("tas", "query-json", "executes a query defi
|
|
|
403660
404207
|
});
|
|
403661
404208
|
});
|
|
403662
404209
|
// src/app/commands/tas/store-graph.ts
|
|
403663
|
-
import
|
|
403664
|
-
var tasStoreGraphCommand =
|
|
403665
|
-
|
|
403666
|
-
|
|
403667
|
-
|
|
403668
|
-
|
|
403669
|
-
|
|
403670
|
-
|
|
403671
|
-
|
|
403672
|
-
}, async (argsMap, signale14) => {
|
|
404210
|
+
import { readFileSync as readFileSync21 } from "fs";
|
|
404211
|
+
var tasStoreGraphCommand = buildCommand("tas", "store-graph", "store vertices and edges in the TAS topology store from a JSON file", {
|
|
404212
|
+
addOutputOptions: true,
|
|
404213
|
+
addTimeRangeOptions: false
|
|
404214
|
+
}).setNormalArgumentDescriptors({
|
|
404215
|
+
graphFile: requiredArgument("path to a JSON file containing a TasStoreGraphInput object")
|
|
404216
|
+
}).setPrefixArgumentDescriptors({}).setValidationFunction(async (validate5) => {
|
|
404217
|
+
validate5.thatValueOfArgument("graphFile").exists();
|
|
404218
|
+
}).setCommandExecutionFunction(async (argsMap, signale14) => {
|
|
403673
404219
|
const graphFileLocation = argsMap.get("graphFile");
|
|
403674
|
-
|
|
403675
|
-
|
|
403676
|
-
|
|
403677
|
-
|
|
403678
|
-
|
|
403679
|
-
|
|
403680
|
-
|
|
403681
|
-
|
|
403682
|
-
|
|
404220
|
+
let graphInput;
|
|
404221
|
+
try {
|
|
404222
|
+
graphInput = JSON.parse(readFileSync21(graphFileLocation, "utf-8"));
|
|
404223
|
+
} catch (e) {
|
|
404224
|
+
throw new Error(`Failed to read or parse '${graphFileLocation}': ${e}`);
|
|
404225
|
+
}
|
|
404226
|
+
signale14.pending(`storing graph from '${graphFileLocation}'`);
|
|
404227
|
+
const result = await ServiceMonolith.dxDataStoreTASService.storeGraph(graphInput);
|
|
404228
|
+
const failedVertices = result.failedVertices?.length ?? 0;
|
|
404229
|
+
const failedEdges = result.failedEdges?.length ?? 0;
|
|
404230
|
+
if (failedVertices > 0 || failedEdges > 0) {
|
|
404231
|
+
signale14.warn(`graph stored with ${failedVertices} failed vertex(es) and ${failedEdges} failed edge(s)`);
|
|
404232
|
+
} else {
|
|
404233
|
+
signale14.success("graph stored successfully");
|
|
404234
|
+
}
|
|
404235
|
+
return { output: result, testContinuationValue: result };
|
|
403683
404236
|
});
|
|
403684
404237
|
// src/app/commands/topographer/dump-topographer-configuration-schema.ts
|
|
403685
404238
|
var dumpTopographerConfigurationSchemaCommand = createCommand("topographer", "dump-schema", "dumps the topographer configuration schema (for use in IDE)", [], () => {
|
|
@@ -403694,7 +404247,7 @@ var dumpTopographerConfigurationSchemaCommand = createCommand("topographer", "du
|
|
|
403694
404247
|
});
|
|
403695
404248
|
// src/app/commands/topographer/generate-sample-topographer-configuration.ts
|
|
403696
404249
|
var import_yaml6 = __toESM(require_yaml2(), 1);
|
|
403697
|
-
import * as
|
|
404250
|
+
import * as fs49 from "fs";
|
|
403698
404251
|
var topographerGenerateSampleCommand = createCommand("topographer", "generate-sample", "generate a sample topographer configuration", [
|
|
403699
404252
|
createParameterDescriptor("identifyingVertexType", "ALL_CAPS underscore separated vertex type.", true),
|
|
403700
404253
|
createParameterDescriptor("topographerConfigurationFile", "filename to generate sample into", true),
|
|
@@ -403742,7 +404295,7 @@ var topographerGenerateSampleCommand = createCommand("topographer", "generate-sa
|
|
|
403742
404295
|
if (validation2.valid) {
|
|
403743
404296
|
signale14.success("Sample Topographer Configuration validated");
|
|
403744
404297
|
signale14.info(`Writing sample topographer configuration to ${topographerConfigurationFileName}`);
|
|
403745
|
-
|
|
404298
|
+
fs49.writeFileSync(topographerConfigurationFileName, stringifiedSampleConfig);
|
|
403746
404299
|
signale14.info("wrote sample config.");
|
|
403747
404300
|
} else {
|
|
403748
404301
|
signale14.log(validation2.errors);
|
|
@@ -403754,7 +404307,7 @@ var topographerGenerateSampleCommand = createCommand("topographer", "generate-sa
|
|
|
403754
404307
|
});
|
|
403755
404308
|
// src/app/commands/topographer/test-configuration.ts
|
|
403756
404309
|
var import_yaml7 = __toESM(require_yaml2(), 1);
|
|
403757
|
-
import * as
|
|
404310
|
+
import * as fs50 from "node:fs";
|
|
403758
404311
|
var topographerTestConfigurationCommand = createCommand("topographer", "test-configuration", "test a topographer configuration", [
|
|
403759
404312
|
createParameterDescriptor("topographerConfigurationFile", "location of the topographer configuration to use.", true),
|
|
403760
404313
|
createParameterDescriptor("testGraphOutput", "location to store the resulting graph.", false)
|
|
@@ -403764,7 +404317,7 @@ var topographerTestConfigurationCommand = createCommand("topographer", "test-con
|
|
|
403764
404317
|
return Promise.resolve(validationResult);
|
|
403765
404318
|
}, async (argMap, signale14) => {
|
|
403766
404319
|
ServiceMonolith.dxTopographerService.validateTopographerConfigurationFile(argMap.get("topographerConfigurationFile"));
|
|
403767
|
-
const topographerConfiguration = import_yaml7.parse(
|
|
404320
|
+
const topographerConfiguration = import_yaml7.parse(fs50.readFileSync(argMap.get("topographerConfigurationFile")).toString());
|
|
403768
404321
|
const edges = await ServiceMonolith.dxTopographerService.executeTopographer(topographerConfiguration);
|
|
403769
404322
|
signale14.info(`discovered ${edges.length} edges`);
|
|
403770
404323
|
if (argMap.has("testGraphOutput")) {
|
|
@@ -403782,7 +404335,7 @@ var topographerTestConfigurationCommand = createCommand("topographer", "test-con
|
|
|
403782
404335
|
targetExternalId: edge[1]
|
|
403783
404336
|
});
|
|
403784
404337
|
});
|
|
403785
|
-
|
|
404338
|
+
fs50.writeFileSync(argMap.get("testGraphOutput"), JSON.stringify(graph, null, 2));
|
|
403786
404339
|
signale14.complete(`wrote test graph to ${argMap.get("testGraphOutput")}`);
|
|
403787
404340
|
} else {
|
|
403788
404341
|
signale14.warn("No testGraphOutput parameter provided, not saving graph.");
|
|
@@ -403870,6 +404423,161 @@ var traceDetailsCommand = createCommand("trace", "trace-details", "get trace det
|
|
|
403870
404423
|
executionTime: 0
|
|
403871
404424
|
});
|
|
403872
404425
|
});
|
|
404426
|
+
// src/app/commands/trace/trace-inject-simple.ts
|
|
404427
|
+
import { randomUUID } from "crypto";
|
|
404428
|
+
var traceInjectSimpleCommand = buildCommand("trace", "inject-simple", "inject a synthetic APM transaction trace into the tracestore using CLI arguments", {
|
|
404429
|
+
addOutputOptions: true,
|
|
404430
|
+
addTimeRangeOptions: false
|
|
404431
|
+
}).setNormalArgumentDescriptors({
|
|
404432
|
+
agentTriplet: requiredArgument("exactly 3 pipe-separated agent path segments — used as-is as the trace agent name (e.g. host|process|agent)"),
|
|
404433
|
+
resource: requiredArgument("resource/URL path for the trace root"),
|
|
404434
|
+
app: optionalArgument("application name"),
|
|
404435
|
+
host: optionalArgument("host name"),
|
|
404436
|
+
duration: optionalArgument("trace duration in milliseconds (default: 1000)"),
|
|
404437
|
+
type: optionalArgument("trace type: Normal | Sampled | Stall | ErrorSnapShot (default: Normal)"),
|
|
404438
|
+
error: optionalArgument("error message — sets type to ErrorSnapShot automatically"),
|
|
404439
|
+
traceId: optionalArgument("explicit trace ID (default: auto-generated UUID)"),
|
|
404440
|
+
description: optionalArgument("trace description"),
|
|
404441
|
+
endTime: optionalArgument("trace end time as epoch milliseconds (default: now); startTime is derived as endTime - duration"),
|
|
404442
|
+
"dry-run": flagArgument("print the request body without sending it", false)
|
|
404443
|
+
}).setPrefixArgumentDescriptors({}).setValidationFunction(async (validate5) => {
|
|
404444
|
+
validate5.thatValueOfArgument("agentTriplet").exists();
|
|
404445
|
+
validate5.thatValueOfArgument("resource").exists();
|
|
404446
|
+
}).setCommandExecutionFunction(async (argsMap, signale14) => {
|
|
404447
|
+
const agent4 = argsMap.get("agentTriplet");
|
|
404448
|
+
const resource = argsMap.get("resource");
|
|
404449
|
+
const app = argsMap.getUnsafe("app");
|
|
404450
|
+
const host = argsMap.getUnsafe("host");
|
|
404451
|
+
const description2 = argsMap.getUnsafe("description");
|
|
404452
|
+
const traceId = argsMap.getUnsafe("traceId") ?? randomUUID();
|
|
404453
|
+
const errorMessage = argsMap.getUnsafe("error");
|
|
404454
|
+
const durationStr = argsMap.getUnsafe("duration");
|
|
404455
|
+
const duration4 = durationStr ? parseInt(durationStr, 10) : 1000;
|
|
404456
|
+
const endTimeStr = argsMap.getUnsafe("endTime");
|
|
404457
|
+
const endTime = endTimeStr ? parseInt(endTimeStr, 10) : Date.now();
|
|
404458
|
+
const startTime = endTime - duration4;
|
|
404459
|
+
const rawType = argsMap.getUnsafe("type");
|
|
404460
|
+
const type6 = errorMessage ? "ErrorSnapShot" : rawType ?? "Normal";
|
|
404461
|
+
const trace = {
|
|
404462
|
+
summary: {
|
|
404463
|
+
traceId,
|
|
404464
|
+
type: type6,
|
|
404465
|
+
agent: agent4,
|
|
404466
|
+
resource,
|
|
404467
|
+
startTime,
|
|
404468
|
+
duration: duration4,
|
|
404469
|
+
compCount: 1,
|
|
404470
|
+
appName: app ?? traceNameFromResource(resource),
|
|
404471
|
+
...host ? { host } : {},
|
|
404472
|
+
...description2 ? { description: description2 } : {},
|
|
404473
|
+
...errorMessage ? { errorMessage } : {}
|
|
404474
|
+
},
|
|
404475
|
+
components: [
|
|
404476
|
+
{
|
|
404477
|
+
componentId: 1,
|
|
404478
|
+
parentId: 0,
|
|
404479
|
+
resource,
|
|
404480
|
+
startTime,
|
|
404481
|
+
duration: duration4,
|
|
404482
|
+
...description2 ? { description: description2 } : {},
|
|
404483
|
+
parameters: {
|
|
404484
|
+
"Trace Type": type6,
|
|
404485
|
+
DataCreationType: "1"
|
|
404486
|
+
}
|
|
404487
|
+
}
|
|
404488
|
+
]
|
|
404489
|
+
};
|
|
404490
|
+
const isDryRun = argsMap.getUnsafe("dry-run") === "true";
|
|
404491
|
+
if (isDryRun) {
|
|
404492
|
+
signale14.info("dry-run: would POST to /tracestore/process");
|
|
404493
|
+
return { output: { dryRun: true, request: { values: [trace] } } };
|
|
404494
|
+
}
|
|
404495
|
+
signale14.pending(`injecting trace '${traceId}' for agent '${agent4}' resource '${resource}'`);
|
|
404496
|
+
const response = await ServiceMonolith.dxAgentService.injectTrace(trace);
|
|
404497
|
+
if (response.failedTraces?.length > 0) {
|
|
404498
|
+
signale14.error(`tracestore rejected ${response.failedTraces.length} trace(s)`);
|
|
404499
|
+
return {
|
|
404500
|
+
output: { traceId, success: false, failedTraces: response.failedTraces }
|
|
404501
|
+
};
|
|
404502
|
+
}
|
|
404503
|
+
signale14.success(`trace injected — traceId: ${traceId}`);
|
|
404504
|
+
return {
|
|
404505
|
+
output: { traceId, success: true },
|
|
404506
|
+
testContinuationValue: { traceId, success: true }
|
|
404507
|
+
};
|
|
404508
|
+
});
|
|
404509
|
+
// src/app/commands/trace/trace-inject.ts
|
|
404510
|
+
import { readFileSync as readFileSync23 } from "fs";
|
|
404511
|
+
import { randomUUID as randomUUID2 } from "crypto";
|
|
404512
|
+
var traceInjectCommand = buildCommand("trace", "inject", "inject APM transaction trace(s) from a JSON file into the tracestore", {
|
|
404513
|
+
addOutputOptions: true,
|
|
404514
|
+
addTimeRangeOptions: false
|
|
404515
|
+
}).setNormalArgumentDescriptors({
|
|
404516
|
+
file: requiredArgument("path to a JSON file containing a TraceData object or an array of TraceData objects"),
|
|
404517
|
+
"refresh-ids": flagArgument("replace each traceId with a fresh UUID so repeated injections do not overwrite each other", false),
|
|
404518
|
+
"refresh-time": flagArgument("set each startTime to now minus its duration so traces appear at the current time", false),
|
|
404519
|
+
"dry-run": flagArgument("print the request body without sending it", false)
|
|
404520
|
+
}).setPrefixArgumentDescriptors({}).setValidationFunction(async (validate5) => {
|
|
404521
|
+
validate5.thatValueOfArgument("file").exists();
|
|
404522
|
+
}).setCommandExecutionFunction(async (argsMap, signale14) => {
|
|
404523
|
+
const filePath = argsMap.get("file");
|
|
404524
|
+
let parsed;
|
|
404525
|
+
try {
|
|
404526
|
+
parsed = JSON.parse(readFileSync23(filePath, "utf-8"));
|
|
404527
|
+
} catch (e) {
|
|
404528
|
+
throw new Error(`Failed to read or parse '${filePath}': ${e}`);
|
|
404529
|
+
}
|
|
404530
|
+
let traces = Array.isArray(parsed) ? parsed : [parsed];
|
|
404531
|
+
const refreshIds = argsMap.getUnsafe("refresh-ids") === "true";
|
|
404532
|
+
const refreshTime = argsMap.getUnsafe("refresh-time") === "true";
|
|
404533
|
+
traces = traces.map((t4) => ({
|
|
404534
|
+
...t4,
|
|
404535
|
+
summary: {
|
|
404536
|
+
...t4.summary,
|
|
404537
|
+
...!t4.summary.appName ? { appName: traceNameFromResource(t4.summary.resource) } : {}
|
|
404538
|
+
}
|
|
404539
|
+
}));
|
|
404540
|
+
if (refreshIds || refreshTime) {
|
|
404541
|
+
traces = traces.map((t4) => ({
|
|
404542
|
+
...t4,
|
|
404543
|
+
summary: {
|
|
404544
|
+
...t4.summary,
|
|
404545
|
+
...refreshIds ? { traceId: randomUUID2() } : {},
|
|
404546
|
+
...refreshTime ? { startTime: Date.now() - (t4.summary.duration ?? 0) } : {}
|
|
404547
|
+
},
|
|
404548
|
+
...refreshTime && t4.components ? {
|
|
404549
|
+
components: t4.components.map((c) => ({
|
|
404550
|
+
...c,
|
|
404551
|
+
startTime: Date.now() - (t4.summary.duration ?? 0)
|
|
404552
|
+
}))
|
|
404553
|
+
} : {}
|
|
404554
|
+
}));
|
|
404555
|
+
}
|
|
404556
|
+
const isDryRun = argsMap.getUnsafe("dry-run") === "true";
|
|
404557
|
+
if (isDryRun) {
|
|
404558
|
+
signale14.info("dry-run: would POST to /tracestore/process");
|
|
404559
|
+
return { output: { dryRun: true, request: { values: traces } } };
|
|
404560
|
+
}
|
|
404561
|
+
signale14.pending(`injecting ${traces.length} trace(s) from '${filePath}'`);
|
|
404562
|
+
const response = await ServiceMonolith.dxAgentService.injectTraces(traces);
|
|
404563
|
+
if (response.failedTraces?.length > 0) {
|
|
404564
|
+
signale14.error(`tracestore rejected ${response.failedTraces.length} trace(s)`);
|
|
404565
|
+
return {
|
|
404566
|
+
output: {
|
|
404567
|
+
success: false,
|
|
404568
|
+
attempted: traces.length,
|
|
404569
|
+
failed: response.failedTraces.length,
|
|
404570
|
+
failedTraces: response.failedTraces
|
|
404571
|
+
}
|
|
404572
|
+
};
|
|
404573
|
+
}
|
|
404574
|
+
signale14.success(`${traces.length} trace(s) injected successfully`);
|
|
404575
|
+
const traceIds = traces.map((t4) => t4.summary.traceId);
|
|
404576
|
+
return {
|
|
404577
|
+
output: { success: true, injected: traces.length, traceIds },
|
|
404578
|
+
testContinuationValue: { traceIds }
|
|
404579
|
+
};
|
|
404580
|
+
});
|
|
403873
404581
|
// src/app/commands/ui/start.ts
|
|
403874
404582
|
var uiStart = buildCommand("ui", "start", "Start the dx-do query builder UI server (Fastify + MCP) and open the browser", {
|
|
403875
404583
|
addOutputOptions: false,
|
|
@@ -403931,7 +404639,7 @@ var uiStart = buildCommand("ui", "start", "Start the dx-do query builder UI serv
|
|
|
403931
404639
|
};
|
|
403932
404640
|
});
|
|
403933
404641
|
// src/app/commands/vertex/add-vertex-definition.ts
|
|
403934
|
-
import * as
|
|
404642
|
+
import * as fs51 from "fs";
|
|
403935
404643
|
var addVertexDefinitionCommand = createCommand("vertex", "add-vertex-definition", "add vertex definition from a file", [
|
|
403936
404644
|
createParameterDescriptor("vertexDefinitionFile", "location of the vertex definition to upload.", true)
|
|
403937
404645
|
], (argMap) => {
|
|
@@ -403941,7 +404649,7 @@ var addVertexDefinitionCommand = createCommand("vertex", "add-vertex-definition"
|
|
|
403941
404649
|
}, async (argMap, signale14) => {
|
|
403942
404650
|
signale14.pending("retrieving vertex definitions");
|
|
403943
404651
|
const vertexMapping = await ServiceMonolith.dxVertexService.getVertexDefinitions();
|
|
403944
|
-
const vertexDefinition = JSON.parse(
|
|
404652
|
+
const vertexDefinition = JSON.parse(fs51.readFileSync(argMap.get("vertexDefinitionFile")).toString());
|
|
403945
404653
|
const addVertexDefinitionResponse = ServiceMonolith.dxVertexService.setVertexDefinition(vertexDefinition);
|
|
403946
404654
|
signale14.complete("uploaded vertex definition.");
|
|
403947
404655
|
await OutputHandler.handleOutput(addVertexDefinitionResponse, argMap);
|
|
@@ -403997,7 +404705,7 @@ var vertexAttributesCommand = createCommand("vertex", "attributes", "list ATC at
|
|
|
403997
404705
|
});
|
|
403998
404706
|
// src/app/commands/vertex/bulk-patch-rollback.ts
|
|
403999
404707
|
var import_promise_pool26 = __toESM(require_dist2(), 1);
|
|
404000
|
-
import * as
|
|
404708
|
+
import * as fs52 from "fs";
|
|
404001
404709
|
var bulkPatchRollbackCommand = createCommand("vertex", "bulk-patch-rollback", "rolls back a bulk-patch with a rollback file.", [
|
|
404002
404710
|
createParameterDescriptor("rollbackFile", "file that contains the original vertex states", true)
|
|
404003
404711
|
], (argsMap) => {
|
|
@@ -404005,7 +404713,7 @@ var bulkPatchRollbackCommand = createCommand("vertex", "bulk-patch-rollback", "r
|
|
|
404005
404713
|
ensureArgumentIsExistingFile(argsMap, "rollbackFile", false, validationResult);
|
|
404006
404714
|
return Promise.resolve(validationResult);
|
|
404007
404715
|
}, async (argsMap, signale14) => {
|
|
404008
|
-
const rollback = JSON.parse(
|
|
404716
|
+
const rollback = JSON.parse(fs52.readFileSync(argsMap.get("rollbackFile")).toString());
|
|
404009
404717
|
signale14.pending(`Rolling back ${rollback.length} vertices.`);
|
|
404010
404718
|
const poolPromises = await import_promise_pool26.PromisePool.for(rollback).withConcurrency(1).handleError((error50, rollback2) => {
|
|
404011
404719
|
signale14.error(error50, rollback2);
|
|
@@ -404060,7 +404768,7 @@ var bulkPatchRollbackCommand = createCommand("vertex", "bulk-patch-rollback", "r
|
|
|
404060
404768
|
});
|
|
404061
404769
|
});
|
|
404062
404770
|
// src/app/commands/vertex/bulk-patch-schema.ts
|
|
404063
|
-
import * as
|
|
404771
|
+
import * as fs53 from "fs";
|
|
404064
404772
|
|
|
404065
404773
|
// src/resources/bulk-vertex-patch/bulk-vertex-patch.schema.json
|
|
404066
404774
|
var bulk_vertex_patch_schema_default = `{
|
|
@@ -404163,7 +404871,7 @@ var bulkPatchSchemaCommand = createCommand("vertex", "bulk-patch-schema", "gener
|
|
|
404163
404871
|
ensureArgumentIsNotExistingFile(argsMap, "schemaFile", false, validationResult);
|
|
404164
404872
|
return Promise.resolve(validationResult);
|
|
404165
404873
|
}, async (argsMap, signale14) => {
|
|
404166
|
-
|
|
404874
|
+
fs53.writeFileSync(argsMap.get("schemaFile"), bulk_vertex_patch_schema_default);
|
|
404167
404875
|
signale14.success(`wrote bulk patch schema to: ${argsMap.get("schemaFile")}`);
|
|
404168
404876
|
return Promise.resolve({
|
|
404169
404877
|
executionTime: 0,
|
|
@@ -404172,7 +404880,7 @@ var bulkPatchSchemaCommand = createCommand("vertex", "bulk-patch-schema", "gener
|
|
|
404172
404880
|
});
|
|
404173
404881
|
// src/app/commands/vertex/bulk-patch.ts
|
|
404174
404882
|
var import_ajv3 = __toESM(require_ajv(), 1);
|
|
404175
|
-
import * as
|
|
404883
|
+
import * as fs54 from "fs";
|
|
404176
404884
|
var import_promise_pool27 = __toESM(require_dist2(), 1);
|
|
404177
404885
|
var bulkPatchCommand = createCommand("vertex", "bulk-patch", "patches mutiple vertices using the bulk-patch file.", [
|
|
404178
404886
|
createParameterDescriptor("patchFile", "file in bulk vertex patch schema format.", true),
|
|
@@ -404199,7 +404907,7 @@ var bulkPatchCommand = createCommand("vertex", "bulk-patch", "patches mutiple ve
|
|
|
404199
404907
|
const ajv2 = new import_ajv3.default;
|
|
404200
404908
|
const schema = JSON.parse(bulk_vertex_patch_schema_default);
|
|
404201
404909
|
const validate5 = ajv2.compile(schema);
|
|
404202
|
-
const bulkPatch = JSON.parse(
|
|
404910
|
+
const bulkPatch = JSON.parse(fs54.readFileSync(argsMap.get("patchFile")).toString());
|
|
404203
404911
|
const valid4 = validate5(bulkPatch);
|
|
404204
404912
|
if (valid4) {
|
|
404205
404913
|
signale14.success(`Patch JSON in '${argsMap.get("patchFile")}' is valid`);
|
|
@@ -404361,7 +405069,7 @@ var bulkPatchCommand = createCommand("vertex", "bulk-patch", "patches mutiple ve
|
|
|
404361
405069
|
if (executePatch) {
|
|
404362
405070
|
signale14.pending(`Writing rollbackFile ${argsMap.get("rollbackFile")} with ${rollbackMap.size} entries`);
|
|
404363
405071
|
const rollbackJSONText = JSON.stringify(Array.from(rollbackMap.entries()), null, 2);
|
|
404364
|
-
|
|
405072
|
+
fs54.writeFileSync(argsMap.get("rollbackFile"), rollbackJSONText);
|
|
404365
405073
|
signale14.complete("Finished writing rollbackFile.");
|
|
404366
405074
|
}
|
|
404367
405075
|
return Promise.resolve({
|
|
@@ -404391,7 +405099,7 @@ var detailCommand = createCommand("vertex", "detail", "provides detail on a sing
|
|
|
404391
405099
|
});
|
|
404392
405100
|
// src/app/commands/vertex/generate-patch-from-csv.ts
|
|
404393
405101
|
var import_ajv4 = __toESM(require_ajv(), 1);
|
|
404394
|
-
import * as
|
|
405102
|
+
import * as fs55 from "fs";
|
|
404395
405103
|
var csv4 = __toESM(require_src3(), 1);
|
|
404396
405104
|
var generatePatchFromCSVCommand = createCommand("vertex", "generate-patch-from-csv", "generates a bulk-patch file from a CSV", [
|
|
404397
405105
|
createParameterDescriptor("csvFile", "containing data for the patch", true),
|
|
@@ -404469,7 +405177,7 @@ var generatePatchFromCSVCommand = createCommand("vertex", "generate-patch-from-c
|
|
|
404469
405177
|
signale14.info("Only patching vertices matching filter:", csvBulkPatch.patchFilter);
|
|
404470
405178
|
signale14.pending(`Reading csv from '${argsMap.get("csvFile")}'`);
|
|
404471
405179
|
const processPromise = new Promise((resolve7, reject) => {
|
|
404472
|
-
const csvStream =
|
|
405180
|
+
const csvStream = fs55.createReadStream(argsMap.get("csvFile"), "utf8");
|
|
404473
405181
|
csvStream.pipe(new RemoveEmptyTransform).pipe(csv4.parse({ headers: true })).on("error", (error50) => {
|
|
404474
405182
|
reject(error50);
|
|
404475
405183
|
}).on("data", function(row) {
|
|
@@ -404512,7 +405220,7 @@ var generatePatchFromCSVCommand = createCommand("vertex", "generate-patch-from-c
|
|
|
404512
405220
|
if (valid4) {
|
|
404513
405221
|
signale14.success("Patch is valid");
|
|
404514
405222
|
signale14.pending(`Writing patch file to ${argsMap.get("patchFile")}`);
|
|
404515
|
-
|
|
405223
|
+
fs55.writeFileSync(argsMap.get("patchFile"), JSON.stringify(csvBulkPatch));
|
|
404516
405224
|
signale14.complete("Patch file written.");
|
|
404517
405225
|
} else {
|
|
404518
405226
|
signale14.log(validate5.errors);
|
|
@@ -404532,7 +405240,7 @@ var generatePatchFromCSVCommand = createCommand("vertex", "generate-patch-from-c
|
|
|
404532
405240
|
});
|
|
404533
405241
|
});
|
|
404534
405242
|
// src/app/commands/vertex/override-vertex-type-metric-mapping.ts
|
|
404535
|
-
import * as
|
|
405243
|
+
import * as fs56 from "fs";
|
|
404536
405244
|
var overrideVertexMetricMappingCommand = createCommand("vertex", "override-vertex-metric-mapping", "dumps performance specifier and metric root for a vertex type", [createParameterDescriptor("vertexType", "type of metric mapping", true)], (argsMap) => {
|
|
404537
405245
|
const validationResult = emptyValidationResult();
|
|
404538
405246
|
ensureArgumentAndValue(argsMap, "vertexType", validationResult);
|
|
@@ -404545,7 +405253,7 @@ var overrideVertexMetricMappingCommand = createCommand("vertex", "override-verte
|
|
|
404545
405253
|
signale14.note(`Found Vertex Performance Specifier(s) for ${vertexType}`);
|
|
404546
405254
|
const tempPSLocation = ServiceMonolith.dxVertexService.getTemporaryVertexMappingOverrideLocation(vertexType, "performanceSpecifier");
|
|
404547
405255
|
signale14.pending(`Writing vertex performance specifier to ${tempPSLocation}`);
|
|
404548
|
-
|
|
405256
|
+
fs56.writeFileSync(tempPSLocation, JSON.stringify(vertexPS, null, 2));
|
|
404549
405257
|
} else {
|
|
404550
405258
|
throw new Error(`Did not find Vertex Performance Specifier(s) for ${vertexType}`);
|
|
404551
405259
|
}
|
|
@@ -404554,7 +405262,7 @@ var overrideVertexMetricMappingCommand = createCommand("vertex", "override-verte
|
|
|
404554
405262
|
signale14.note(`Found Vertex Metric Root(s) for ${vertexType}`);
|
|
404555
405263
|
const tempPSLocation = ServiceMonolith.dxVertexService.getTemporaryVertexMappingOverrideLocation(vertexType, "metricRoot");
|
|
404556
405264
|
signale14.pending(`Writing vertex metric root to ${tempPSLocation}`);
|
|
404557
|
-
|
|
405265
|
+
fs56.writeFileSync(tempPSLocation, JSON.stringify(vertexMR, null, 2));
|
|
404558
405266
|
} else {
|
|
404559
405267
|
signale14.warn(`Did not find Vertex Metric Root(s) for ${vertexType}`);
|
|
404560
405268
|
}
|