@oneuptime/common 14.0.96 → 14.0.98
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/Models/AnalyticsModels/NetworkFlow.d.mts +4 -0
- package/Models/AnalyticsModels/NetworkFlow.d.ts +4 -0
- package/Models/AnalyticsModels/NetworkFlow.js +50 -0
- package/Models/DatabaseModels/Alert.d.mts +2 -0
- package/Models/DatabaseModels/Alert.d.ts +2 -0
- package/Models/DatabaseModels/Alert.js +63 -0
- package/Models/DatabaseModels/CodeRepository.d.mts +3 -0
- package/Models/DatabaseModels/CodeRepository.d.ts +3 -0
- package/Models/DatabaseModels/CodeRepository.js +104 -0
- package/Models/DatabaseModels/Incident.d.mts +2 -0
- package/Models/DatabaseModels/Incident.d.ts +2 -0
- package/Models/DatabaseModels/Incident.js +63 -0
- package/Models/DatabaseModels/Index.js +12 -0
- package/Models/DatabaseModels/NetworkAddressName.d.mts +14 -0
- package/Models/DatabaseModels/NetworkAddressName.d.ts +14 -0
- package/Models/DatabaseModels/NetworkAddressName.js +300 -0
- package/Models/DatabaseModels/NetworkAddressName.mjs +2 -0
- package/Models/DatabaseModels/NetworkDevice.d.mts +1 -0
- package/Models/DatabaseModels/NetworkDevice.d.ts +1 -0
- package/Models/DatabaseModels/NetworkDevice.js +38 -0
- package/Models/DatabaseModels/SecurityCase.d.mts +8 -0
- package/Models/DatabaseModels/SecurityCase.d.ts +8 -0
- package/Models/DatabaseModels/SecurityCase.js +145 -0
- package/Models/DatabaseModels/SecurityCaseEvidence.d.mts +32 -0
- package/Models/DatabaseModels/SecurityCaseEvidence.d.ts +32 -0
- package/Models/DatabaseModels/SecurityCaseEvidence.js +548 -0
- package/Models/DatabaseModels/SecurityCaseEvidence.mjs +2 -0
- package/Models/DatabaseModels/SecurityCaseFeed.d.mts +4 -1
- package/Models/DatabaseModels/SecurityCaseFeed.d.ts +4 -1
- package/Models/DatabaseModels/SecurityCaseFeed.js +6 -0
- package/Models/DatabaseModels/SecurityCasePriority.d.mts +2 -0
- package/Models/DatabaseModels/SecurityCasePriority.d.ts +2 -0
- package/Models/DatabaseModels/SecurityCasePriority.js +44 -0
- package/Models/DatabaseModels/SecurityCaseTask.d.mts +22 -0
- package/Models/DatabaseModels/SecurityCaseTask.d.ts +22 -0
- package/Models/DatabaseModels/SecurityCaseTask.js +467 -0
- package/Models/DatabaseModels/SecurityCaseTask.mjs +2 -0
- package/Models/DatabaseModels/SecurityHunt.d.mts +34 -0
- package/Models/DatabaseModels/SecurityHunt.d.ts +34 -0
- package/Models/DatabaseModels/SecurityHunt.js +608 -0
- package/Models/DatabaseModels/SecurityHunt.mjs +2 -0
- package/Models/DatabaseModels/SecurityWatchlist.d.mts +22 -0
- package/Models/DatabaseModels/SecurityWatchlist.d.ts +22 -0
- package/Models/DatabaseModels/SecurityWatchlist.js +411 -0
- package/Models/DatabaseModels/SecurityWatchlist.mjs +2 -0
- package/Models/DatabaseModels/SecurityWatchlistItem.d.mts +17 -0
- package/Models/DatabaseModels/SecurityWatchlistItem.d.ts +17 -0
- package/Models/DatabaseModels/SecurityWatchlistItem.js +321 -0
- package/Models/DatabaseModels/SecurityWatchlistItem.mjs +2 -0
- package/Types/AI/AIChatTypes.d.mts +1 -0
- package/Types/AI/AIChatTypes.d.ts +1 -0
- package/Types/AI/AIRunEventType.d.mts +1 -0
- package/Types/AI/AIRunEventType.d.ts +1 -0
- package/Types/AI/AIRunEventType.js +8 -0
- package/Types/AI/AiAffectedResources.d.mts +2 -1
- package/Types/AI/AiAffectedResources.d.ts +2 -1
- package/Types/AI/AiAffectedResources.js +12 -1
- package/Types/AI/AiTokenCount.d.mts +22 -1
- package/Types/AI/AiTokenCount.d.ts +22 -1
- package/Types/AI/AiTokenCount.js +126 -57
- package/Types/AI/AiTokenCount.mjs +2 -0
- package/Types/AI/CodeFixTaskContext.d.mts +1 -0
- package/Types/AI/CodeFixTaskContext.d.ts +1 -0
- package/Types/AffectedResources/AffectedResourceSearch.d.mts +53 -0
- package/Types/AffectedResources/AffectedResourceSearch.d.ts +53 -0
- package/Types/AffectedResources/AffectedResourceSearch.js +224 -0
- package/Types/AffectedResources/AffectedResourceSearch.mjs +11 -0
- package/Types/ArchivableValue/ArchivableValueUsage.d.mts +21 -2
- package/Types/ArchivableValue/ArchivableValueUsage.d.ts +21 -2
- package/Types/ArchivableValue/ArchivableValueUsage.js +91 -12
- package/Types/ArchivableValue/ArchivableValueUsage.mjs +1 -0
- package/Types/CodeRepository/CodeRepositorySetting.d.mts +1 -0
- package/Types/CodeRepository/CodeRepositorySetting.d.ts +1 -0
- package/Types/CodeRepository/CodeRepositorySetting.js +2 -0
- package/Types/Color.d.mts +0 -2
- package/Types/Color.d.ts +0 -2
- package/Types/Color.js +0 -14
- package/Types/Database/DatabaseProperty.d.mts +0 -2
- package/Types/Database/DatabaseProperty.d.ts +0 -2
- package/Types/Database/DatabaseProperty.js +0 -3
- package/Types/Date.d.mts +0 -2
- package/Types/Date.d.ts +0 -2
- package/Types/Date.js +0 -23
- package/Types/Domain.d.mts +0 -2
- package/Types/Domain.d.ts +0 -2
- package/Types/Domain.js +0 -14
- package/Types/Email/EmailTemplateType.d.mts +3 -0
- package/Types/Email/EmailTemplateType.d.ts +3 -0
- package/Types/Email/EmailTemplateType.js +4 -0
- package/Types/Email.d.mts +0 -2
- package/Types/Email.d.ts +0 -2
- package/Types/Email.js +0 -15
- package/Types/IP/IP.d.mts +0 -2
- package/Types/IP/IP.d.ts +0 -2
- package/Types/IP/IP.js +0 -14
- package/Types/Link.d.mts +1 -0
- package/Types/Link.d.ts +1 -0
- package/Types/Monitor/CriteriaAlert.d.mts +0 -2
- package/Types/Monitor/CriteriaAlert.d.ts +0 -2
- package/Types/Monitor/CriteriaAlert.js +0 -18
- package/Types/Monitor/CriteriaAlert.mjs +1 -2
- package/Types/Monitor/CriteriaFilter.d.mts +0 -2
- package/Types/Monitor/CriteriaFilter.d.ts +0 -2
- package/Types/Monitor/CriteriaFilter.js +1 -42
- package/Types/Monitor/CriteriaFilter.mjs +0 -1
- package/Types/Monitor/CriteriaIncident.d.mts +0 -2
- package/Types/Monitor/CriteriaIncident.d.ts +0 -2
- package/Types/Monitor/CriteriaIncident.js +0 -23
- package/Types/Monitor/CriteriaIncident.mjs +1 -2
- package/Types/Monitor/IncomingMonitor/IncidentGroupingConfig.d.mts +0 -2
- package/Types/Monitor/IncomingMonitor/IncidentGroupingConfig.d.ts +0 -2
- package/Types/Monitor/IncomingMonitor/IncidentGroupingConfig.js +0 -11
- package/Types/Monitor/IncomingMonitor/IncidentGroupingConfig.mjs +1 -2
- package/Types/Monitor/MonitorCriteria.d.mts +0 -2
- package/Types/Monitor/MonitorCriteria.d.ts +0 -2
- package/Types/Monitor/MonitorCriteria.js +0 -21
- package/Types/Monitor/MonitorCriteriaInstance.d.mts +0 -2
- package/Types/Monitor/MonitorCriteriaInstance.d.ts +0 -2
- package/Types/Monitor/MonitorCriteriaInstance.js +0 -54
- package/Types/Monitor/MonitorStep.d.mts +0 -2
- package/Types/Monitor/MonitorStep.d.ts +0 -2
- package/Types/Monitor/MonitorStep.js +0 -80
- package/Types/Monitor/MonitorSteps.d.mts +0 -2
- package/Types/Monitor/MonitorSteps.d.ts +0 -2
- package/Types/Monitor/MonitorSteps.js +0 -31
- package/Types/Name.d.mts +0 -2
- package/Types/Name.d.ts +0 -2
- package/Types/Name.js +0 -14
- package/Types/NetFlow/NetworkAddressName.d.mts +30 -0
- package/Types/NetFlow/NetworkAddressName.d.ts +30 -0
- package/Types/NetFlow/NetworkAddressName.js +149 -0
- package/Types/NetFlow/NetworkAddressName.mjs +6 -0
- package/Types/NetFlow/NetworkTraffic.d.mts +20 -0
- package/Types/NetFlow/NetworkTraffic.d.ts +20 -0
- package/Types/NetFlow/NetworkTraffic.js +5 -1
- package/Types/NetFlow/NetworkTraffic.mjs +2 -0
- package/Types/NetworkController/NetworkControllerReadSummary.d.mts +2 -0
- package/Types/NetworkController/NetworkControllerReadSummary.d.ts +2 -0
- package/Types/NetworkController/NetworkControllerReadSummary.js +7 -1
- package/Types/NetworkDevice/NetworkDeviceDiscoveredDetails.d.mts +47 -1
- package/Types/NetworkDevice/NetworkDeviceDiscoveredDetails.d.ts +47 -1
- package/Types/NetworkDevice/NetworkDeviceDiscoveredDetails.js +173 -8
- package/Types/NetworkDevice/NetworkDeviceDiscoveredDetails.mjs +7 -0
- package/Types/NotificationSetting/NotificationEmailRollupCategory.d.mts +1 -0
- package/Types/NotificationSetting/NotificationEmailRollupCategory.d.ts +1 -0
- package/Types/NotificationSetting/NotificationEmailRollupCategory.js +12 -0
- package/Types/NotificationSetting/NotificationEmailRollupPolicy.js +6 -0
- package/Types/NotificationSetting/NotificationSettingEventType.d.mts +3 -0
- package/Types/NotificationSetting/NotificationSettingEventType.d.ts +3 -0
- package/Types/NotificationSetting/NotificationSettingEventType.js +15 -0
- package/Types/ObjectID.d.mts +0 -1
- package/Types/ObjectID.d.ts +0 -1
- package/Types/ObjectID.js +0 -9
- package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunEnding.d.mts +4 -0
- package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunEnding.d.ts +4 -0
- package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunEnding.js +25 -1
- package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunEnding.mjs +4 -0
- package/Types/OnCallDutyPolicy/OnCallEmptyLevel.d.mts +15 -0
- package/Types/OnCallDutyPolicy/OnCallEmptyLevel.d.ts +15 -0
- package/Types/OnCallDutyPolicy/OnCallEmptyLevel.js +118 -0
- package/Types/OnCallDutyPolicy/OnCallEmptyLevel.mjs +9 -0
- package/Types/Permission.d.mts +8 -0
- package/Types/Permission.d.ts +8 -0
- package/Types/Permission.js +87 -3
- package/Types/Phone.d.mts +0 -2
- package/Types/Phone.d.ts +0 -2
- package/Types/Phone.js +0 -14
- package/Types/Port.d.mts +0 -2
- package/Types/Port.d.ts +0 -2
- package/Types/Port.js +0 -14
- package/Types/ProviderLogo/ProviderLogo.d.mts +8 -1
- package/Types/ProviderLogo/ProviderLogo.d.ts +8 -1
- package/Types/ProviderLogo/ProviderLogo.js +14 -0
- package/Types/SecurityCase/SecurityCaseEventEvidence.d.mts +67 -0
- package/Types/SecurityCase/SecurityCaseEventEvidence.d.ts +67 -0
- package/Types/SecurityCase/SecurityCaseEventEvidence.js +271 -0
- package/Types/SecurityCase/SecurityCaseEventEvidence.mjs +13 -0
- package/Types/SecurityCase/SecurityCaseEvidenceKind.d.mts +8 -0
- package/Types/SecurityCase/SecurityCaseEvidenceKind.d.ts +8 -0
- package/Types/SecurityCase/SecurityCaseEvidenceKind.js +34 -0
- package/Types/SecurityCase/SecurityCaseEvidenceKind.mjs +4 -0
- package/Types/SecurityEvent/SecurityHunt.d.mts +122 -0
- package/Types/SecurityEvent/SecurityHunt.d.ts +122 -0
- package/Types/SecurityEvent/SecurityHunt.js +391 -0
- package/Types/SecurityEvent/SecurityHunt.mjs +32 -0
- package/Types/SecurityEvent/SecurityWatchlist.d.mts +167 -0
- package/Types/SecurityEvent/SecurityWatchlist.d.ts +167 -0
- package/Types/SecurityEvent/SecurityWatchlist.js +648 -0
- package/Types/SecurityEvent/SecurityWatchlist.mjs +51 -0
- package/Types/SecurityEvent/SigmaRule.d.mts +2 -0
- package/Types/SecurityEvent/SigmaRule.d.ts +2 -0
- package/Types/SecurityEvent/SigmaRule.js +5 -0
- package/Types/Telemetry/OpenTelemetryGuides.js +177 -5
- package/Types/Version.d.mts +0 -2
- package/Types/Version.d.ts +0 -2
- package/Types/Version.js +0 -14
- package/Types/Workflow/AffectedResourcesSetting.d.mts +13 -0
- package/Types/Workflow/AffectedResourcesSetting.d.ts +13 -0
- package/Types/Workflow/AffectedResourcesSetting.js +120 -0
- package/Types/Workflow/AffectedResourcesSetting.mjs +8 -0
- package/Types/Workflow/Components/BaseModel.js +15 -3
- package/Types/Workflow/Documentation/DatabaseDocumentation.js +36 -0
- package/Types/Workflow/RunRecord.d.mts +3 -14
- package/Types/Workflow/RunRecord.d.ts +3 -14
- package/Types/Workflow/RunRecord.js +10 -51
- package/Utils/AI/InvestigationLogStall.d.mts +38 -0
- package/Utils/AI/InvestigationLogStall.d.ts +38 -0
- package/Utils/AI/InvestigationLogStall.js +163 -0
- package/Utils/AI/InvestigationLogStall.mjs +11 -0
- package/Utils/Inventory/AssetFactSource.d.mts +6 -2
- package/Utils/Inventory/AssetFactSource.d.ts +6 -2
- package/Utils/Inventory/AssetFactSource.js +18 -1
- package/Utils/Inventory/AssetFactSource.mjs +1 -0
- package/Utils/Markdown/FeedLead.d.mts +10 -0
- package/Utils/Markdown/FeedLead.d.ts +10 -0
- package/Utils/Markdown/FeedLead.js +198 -0
- package/Utils/Markdown/FeedLead.mjs +8 -0
- package/Utils/NetworkDevice/NetworkDeviceAssetFacts.d.mts +9 -1
- package/Utils/NetworkDevice/NetworkDeviceAssetFacts.d.ts +9 -1
- package/Utils/NetworkDevice/NetworkDeviceAssetFacts.js +139 -18
- package/Utils/NetworkDevice/NetworkDeviceAssetFacts.mjs +1 -0
- package/Utils/NetworkDevice/NetworkDeviceRefresh.d.mts +88 -0
- package/Utils/NetworkDevice/NetworkDeviceRefresh.d.ts +88 -0
- package/Utils/NetworkDevice/NetworkDeviceRefresh.js +232 -0
- package/Utils/NetworkDevice/NetworkDeviceRefresh.mjs +16 -0
- package/Utils/NetworkTraffic/NetworkAddressBlock.d.mts +20 -0
- package/Utils/NetworkTraffic/NetworkAddressBlock.d.ts +20 -0
- package/Utils/NetworkTraffic/NetworkAddressBlock.js +264 -0
- package/Utils/NetworkTraffic/NetworkAddressBlock.mjs +3 -0
- package/Utils/Project/RecordNumber.d.mts +43 -0
- package/Utils/Project/RecordNumber.d.ts +43 -0
- package/Utils/Project/RecordNumber.js +151 -0
- package/Utils/Project/RecordNumber.mjs +6 -0
- package/Utils/Schema/MonitorSchemas.d.mts +9 -0
- package/Utils/Schema/MonitorSchemas.d.ts +9 -0
- package/Utils/Schema/MonitorSchemas.js +291 -0
- package/Utils/Schema/MonitorSchemas.mjs +9 -0
- package/Utils/Schema/TypeSchemas.d.mts +12 -0
- package/Utils/Schema/TypeSchemas.d.ts +12 -0
- package/Utils/Schema/TypeSchemas.js +176 -0
- package/Utils/Schema/TypeSchemas.mjs +11 -0
- package/Utils/Schema/Zod.js +17 -17
- package/Utils/SecurityCase/SecurityCaseMarkdown.d.mts +43 -0
- package/Utils/SecurityCase/SecurityCaseMarkdown.d.ts +43 -0
- package/Utils/SecurityCase/SecurityCaseMarkdown.js +89 -0
- package/Utils/SecurityCase/SecurityCaseMarkdown.mjs +11 -0
- package/Utils/SecurityCase/SecurityCasePriorities.d.mts +2 -0
- package/Utils/SecurityCase/SecurityCasePriorities.d.ts +2 -0
- package/Utils/SecurityCase/SecurityCasePriorities.js +15 -1
- package/Utils/SecurityCase/SecurityCaseTargets.d.mts +128 -0
- package/Utils/SecurityCase/SecurityCaseTargets.d.ts +128 -0
- package/Utils/SecurityCase/SecurityCaseTargets.js +482 -0
- package/Utils/SecurityCase/SecurityCaseTargets.mjs +28 -0
- package/Utils/SecurityEvent/SecurityEventSearch.d.mts +56 -0
- package/Utils/SecurityEvent/SecurityEventSearch.d.ts +56 -0
- package/Utils/SecurityEvent/SecurityEventSearch.js +422 -0
- package/Utils/SecurityEvent/SecurityEventSearch.mjs +21 -0
- package/Utils/SecurityEvent/SecurityHuntSearch.d.mts +12 -0
- package/Utils/SecurityEvent/SecurityHuntSearch.d.ts +12 -0
- package/Utils/SecurityEvent/SecurityHuntSearch.js +51 -0
- package/Utils/SecurityEvent/SecurityHuntSearch.mjs +3 -0
- package/Utils/SecurityEvent/Sigma/SigmaRuleParser.js +22 -0
- package/Utils/SecurityEvent/Sigma/SigmaWatchlists.d.mts +24 -0
- package/Utils/SecurityEvent/Sigma/SigmaWatchlists.d.ts +24 -0
- package/Utils/SecurityEvent/Sigma/SigmaWatchlists.js +183 -0
- package/Utils/SecurityEvent/Sigma/SigmaWatchlists.mjs +9 -0
- package/Utils/Suggestions/TracePerformanceFixSuggestion.d.mts +9 -0
- package/Utils/Suggestions/TracePerformanceFixSuggestion.d.ts +9 -0
- package/Utils/Suggestions/TracePerformanceFixSuggestion.js +69 -1
- package/Utils/Suggestions/TracePerformanceFixSuggestion.mjs +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare enum NetworkAddressNameSource {
|
|
2
|
+
AddressName = "address-name",
|
|
3
|
+
NetworkDevice = "network-device",
|
|
4
|
+
Host = "host",
|
|
5
|
+
CloudResource = "cloud-resource",
|
|
6
|
+
KubernetesNode = "kubernetes-node",
|
|
7
|
+
KubernetesPod = "kubernetes-pod",
|
|
8
|
+
Dns = "dns"
|
|
9
|
+
}
|
|
10
|
+
export declare const NETWORK_ADDRESS_NAME_SOURCES: ReadonlyArray<NetworkAddressNameSource>;
|
|
11
|
+
export declare const MAX_NETWORK_ADDRESS_NAME_LENGTH: number;
|
|
12
|
+
export declare const MAX_NAMED_ADDRESSES_PER_PAGE: number;
|
|
13
|
+
export interface NetworkAddressNameCandidate {
|
|
14
|
+
source: NetworkAddressNameSource;
|
|
15
|
+
name: string;
|
|
16
|
+
resourceId?: string | undefined;
|
|
17
|
+
}
|
|
18
|
+
export interface NetworkTrafficAddressName {
|
|
19
|
+
name?: string | undefined;
|
|
20
|
+
source?: NetworkAddressNameSource | undefined;
|
|
21
|
+
resourceId?: string | undefined;
|
|
22
|
+
subnetName?: string | undefined;
|
|
23
|
+
subnet?: string | undefined;
|
|
24
|
+
}
|
|
25
|
+
export type NetworkTrafficAddressNames = Record<string, NetworkTrafficAddressName>;
|
|
26
|
+
export declare class NetworkAddressNameUtil {
|
|
27
|
+
static pick(candidates: ReadonlyArray<NetworkAddressNameCandidate>): NetworkAddressNameCandidate | null;
|
|
28
|
+
static cleanName(value: unknown): string | null;
|
|
29
|
+
static isKnown(name: NetworkTrafficAddressName | undefined | null): boolean;
|
|
30
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare enum NetworkAddressNameSource {
|
|
2
|
+
AddressName = "address-name",
|
|
3
|
+
NetworkDevice = "network-device",
|
|
4
|
+
Host = "host",
|
|
5
|
+
CloudResource = "cloud-resource",
|
|
6
|
+
KubernetesNode = "kubernetes-node",
|
|
7
|
+
KubernetesPod = "kubernetes-pod",
|
|
8
|
+
Dns = "dns"
|
|
9
|
+
}
|
|
10
|
+
export declare const NETWORK_ADDRESS_NAME_SOURCES: ReadonlyArray<NetworkAddressNameSource>;
|
|
11
|
+
export declare const MAX_NETWORK_ADDRESS_NAME_LENGTH: number;
|
|
12
|
+
export declare const MAX_NAMED_ADDRESSES_PER_PAGE: number;
|
|
13
|
+
export interface NetworkAddressNameCandidate {
|
|
14
|
+
source: NetworkAddressNameSource;
|
|
15
|
+
name: string;
|
|
16
|
+
resourceId?: string | undefined;
|
|
17
|
+
}
|
|
18
|
+
export interface NetworkTrafficAddressName {
|
|
19
|
+
name?: string | undefined;
|
|
20
|
+
source?: NetworkAddressNameSource | undefined;
|
|
21
|
+
resourceId?: string | undefined;
|
|
22
|
+
subnetName?: string | undefined;
|
|
23
|
+
subnet?: string | undefined;
|
|
24
|
+
}
|
|
25
|
+
export type NetworkTrafficAddressNames = Record<string, NetworkTrafficAddressName>;
|
|
26
|
+
export declare class NetworkAddressNameUtil {
|
|
27
|
+
static pick(candidates: ReadonlyArray<NetworkAddressNameCandidate>): NetworkAddressNameCandidate | null;
|
|
28
|
+
static cleanName(value: unknown): string | null;
|
|
29
|
+
static isKnown(name: NetworkTrafficAddressName | undefined | null): boolean;
|
|
30
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* WHAT AN ADDRESS IS CALLED on the Traffic pages (issue #5340).
|
|
4
|
+
*
|
|
5
|
+
* The pages count traffic by address. An address the project knows
|
|
6
|
+
* something about is shown by its name first - "mumbai-fs01", "Payroll
|
|
7
|
+
* SaaS" - with the address beside it, still there for people who think in
|
|
8
|
+
* addresses. Where a name comes from, the first source that has one wins:
|
|
9
|
+
*
|
|
10
|
+
* 1. A name someone gave this exact address (Network > Settings >
|
|
11
|
+
* Address Names): the most deliberate thing anyone said about it.
|
|
12
|
+
* 2. The project's own inventory, a record that holds the address: a
|
|
13
|
+
* network device (the address it is polled at, or one of its Other
|
|
14
|
+
* Addresses), a host (the addresses its agent reports), a cloud
|
|
15
|
+
* resource (the addresses its cloud lists), a Kubernetes node or pod.
|
|
16
|
+
* Records the project keeps itself come first, the ones it reads from
|
|
17
|
+
* elsewhere after them, and a pod - whose address goes to the next pod
|
|
18
|
+
* within minutes - last. A record names traffic of a time it was there.
|
|
19
|
+
* 3. DNS: the name the address had when its flows arrived, as the probe
|
|
20
|
+
* that received them looked it up on the network it sits in - and only
|
|
21
|
+
* when that name points back to the address, so a stale or forged
|
|
22
|
+
* reverse record names nothing.
|
|
23
|
+
*
|
|
24
|
+
* A name someone gave a SUBNET is not the address's name: "Mumbai office"
|
|
25
|
+
* says where an address is, for all of its addresses at once. It is shown
|
|
26
|
+
* beside the address, never in place of a name.
|
|
27
|
+
*
|
|
28
|
+
* Pure and shared: the server that resolves names, the dashboard that draws
|
|
29
|
+
* them and the tests read the order here.
|
|
30
|
+
*/
|
|
31
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
exports.NetworkAddressNameUtil = exports.MAX_NAMED_ADDRESSES_PER_PAGE = exports.MAX_NETWORK_ADDRESS_NAME_LENGTH = exports.NETWORK_ADDRESS_NAME_SOURCES = exports.NetworkAddressNameSource = void 0;
|
|
33
|
+
var NetworkAddressNameSource;
|
|
34
|
+
(function (NetworkAddressNameSource) {
|
|
35
|
+
NetworkAddressNameSource["AddressName"] = "address-name";
|
|
36
|
+
NetworkAddressNameSource["NetworkDevice"] = "network-device";
|
|
37
|
+
NetworkAddressNameSource["Host"] = "host";
|
|
38
|
+
NetworkAddressNameSource["CloudResource"] = "cloud-resource";
|
|
39
|
+
NetworkAddressNameSource["KubernetesNode"] = "kubernetes-node";
|
|
40
|
+
NetworkAddressNameSource["KubernetesPod"] = "kubernetes-pod";
|
|
41
|
+
NetworkAddressNameSource["Dns"] = "dns";
|
|
42
|
+
})(NetworkAddressNameSource || (exports.NetworkAddressNameSource = NetworkAddressNameSource = {}));
|
|
43
|
+
// The order names are picked in: the first source that names an address wins.
|
|
44
|
+
exports.NETWORK_ADDRESS_NAME_SOURCES = [
|
|
45
|
+
NetworkAddressNameSource.AddressName,
|
|
46
|
+
NetworkAddressNameSource.NetworkDevice,
|
|
47
|
+
NetworkAddressNameSource.Host,
|
|
48
|
+
NetworkAddressNameSource.CloudResource,
|
|
49
|
+
NetworkAddressNameSource.KubernetesNode,
|
|
50
|
+
NetworkAddressNameSource.KubernetesPod,
|
|
51
|
+
NetworkAddressNameSource.Dns,
|
|
52
|
+
];
|
|
53
|
+
// The longest name a page shows (an Address Name's own limit, and DNS's 253 cut to it).
|
|
54
|
+
exports.MAX_NETWORK_ADDRESS_NAME_LENGTH = 100;
|
|
55
|
+
/*
|
|
56
|
+
* The most addresses one page asks names for: its top lists, both ends of
|
|
57
|
+
* its conversations, its filters and the exporters that are no device yet
|
|
58
|
+
* come to well under this. Anything past it is shown by address.
|
|
59
|
+
*/
|
|
60
|
+
exports.MAX_NAMED_ADDRESSES_PER_PAGE = 200;
|
|
61
|
+
function sourceRank(source) {
|
|
62
|
+
const rank = exports.NETWORK_ADDRESS_NAME_SOURCES.indexOf(source);
|
|
63
|
+
return rank === -1 ? exports.NETWORK_ADDRESS_NAME_SOURCES.length : rank;
|
|
64
|
+
}
|
|
65
|
+
/*
|
|
66
|
+
* Control characters (C0, DEL, C1), and the marks that turn text around or
|
|
67
|
+
* hide in it (zero-width ones, bidi embeddings, overrides and isolates):
|
|
68
|
+
* none belongs in a name drawn on one line.
|
|
69
|
+
*/
|
|
70
|
+
function isUnwantedCharacter(code) {
|
|
71
|
+
return (code < 0x20 ||
|
|
72
|
+
(code >= 0x7f && code <= 0x9f) ||
|
|
73
|
+
(code >= 0x200b && code <= 0x200f) ||
|
|
74
|
+
(code >= 0x202a && code <= 0x202e) ||
|
|
75
|
+
(code >= 0x2066 && code <= 0x2069) ||
|
|
76
|
+
code === 0xfeff);
|
|
77
|
+
}
|
|
78
|
+
class NetworkAddressNameUtil {
|
|
79
|
+
/*
|
|
80
|
+
* The candidate that names an address: the first by source, and between
|
|
81
|
+
* two of one source (two hosts report the address) the one whose name
|
|
82
|
+
* sorts first, so the same page always says the same thing.
|
|
83
|
+
*/
|
|
84
|
+
static pick(candidates) {
|
|
85
|
+
let best = null;
|
|
86
|
+
for (const candidate of candidates) {
|
|
87
|
+
if (!candidate || !candidate.name) {
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
if (!best) {
|
|
91
|
+
best = candidate;
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
const byRank = sourceRank(candidate.source) - sourceRank(best.source);
|
|
95
|
+
if (byRank < 0 ||
|
|
96
|
+
(byRank === 0 &&
|
|
97
|
+
candidate.name.localeCompare(best.name, "en", {
|
|
98
|
+
sensitivity: "base",
|
|
99
|
+
}) < 0)) {
|
|
100
|
+
best = candidate;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return best;
|
|
104
|
+
}
|
|
105
|
+
/*
|
|
106
|
+
* A name as a page may show it: one line, trimmed, runs of white space
|
|
107
|
+
* as one space, nothing that is not text, at most
|
|
108
|
+
* MAX_NETWORK_ADDRESS_NAME_LENGTH characters. Null when nothing is left -
|
|
109
|
+
* the address is shown instead.
|
|
110
|
+
*/
|
|
111
|
+
static cleanName(value) {
|
|
112
|
+
if (typeof value !== "string") {
|
|
113
|
+
return null;
|
|
114
|
+
}
|
|
115
|
+
let cleaned = "";
|
|
116
|
+
let pendingSpace = false;
|
|
117
|
+
for (const character of value) {
|
|
118
|
+
const code = character.codePointAt(0) || 0;
|
|
119
|
+
if (character === " " ||
|
|
120
|
+
character === "\t" ||
|
|
121
|
+
character === "\n" ||
|
|
122
|
+
character === "\r" ||
|
|
123
|
+
code === 0xa0) {
|
|
124
|
+
pendingSpace = cleaned.length > 0;
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
127
|
+
if (isUnwantedCharacter(code)) {
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
if (pendingSpace) {
|
|
131
|
+
cleaned += " ";
|
|
132
|
+
pendingSpace = false;
|
|
133
|
+
}
|
|
134
|
+
cleaned += character;
|
|
135
|
+
}
|
|
136
|
+
if (!cleaned) {
|
|
137
|
+
return null;
|
|
138
|
+
}
|
|
139
|
+
const characters = Array.from(cleaned);
|
|
140
|
+
return characters.length > exports.MAX_NETWORK_ADDRESS_NAME_LENGTH
|
|
141
|
+
? characters.slice(0, exports.MAX_NETWORK_ADDRESS_NAME_LENGTH).join("").trim()
|
|
142
|
+
: cleaned;
|
|
143
|
+
}
|
|
144
|
+
// Whether a page's names say anything about an address (a name or a subnet).
|
|
145
|
+
static isKnown(name) {
|
|
146
|
+
return Boolean(name && (name.name || name.subnetName));
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
exports.NetworkAddressNameUtil = NetworkAddressNameUtil;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import commonJsModule from "./NetworkAddressName.js";
|
|
2
|
+
export const MAX_NAMED_ADDRESSES_PER_PAGE = commonJsModule.MAX_NAMED_ADDRESSES_PER_PAGE;
|
|
3
|
+
export const MAX_NETWORK_ADDRESS_NAME_LENGTH = commonJsModule.MAX_NETWORK_ADDRESS_NAME_LENGTH;
|
|
4
|
+
export const NETWORK_ADDRESS_NAME_SOURCES = commonJsModule.NETWORK_ADDRESS_NAME_SOURCES;
|
|
5
|
+
export const NetworkAddressNameSource = commonJsModule.NetworkAddressNameSource;
|
|
6
|
+
export const NetworkAddressNameUtil = commonJsModule.NetworkAddressNameUtil;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { NetworkAddressNameSource, NetworkTrafficAddressNames } from "./NetworkAddressName.mjs";
|
|
1
2
|
export declare const MAX_NETWORK_TRAFFIC_RANGE_DAYS: number;
|
|
2
3
|
export declare const NETWORK_TRAFFIC_TOP_LIMIT: number;
|
|
3
4
|
export declare const NETWORK_TRAFFIC_SOURCES_LOOKBACK_MINUTES: number;
|
|
@@ -88,6 +89,25 @@ export interface NetworkTrafficSummary {
|
|
|
88
89
|
topDevices: Array<NetworkTrafficDeviceRow>;
|
|
89
90
|
sources: Array<NetworkTrafficSource>;
|
|
90
91
|
lastFlowAt: string | null;
|
|
92
|
+
addressNames: NetworkTrafficAddressNames;
|
|
93
|
+
}
|
|
94
|
+
export declare const MAX_NETWORK_TRAFFIC_FIND_QUERY_LENGTH: number;
|
|
95
|
+
export declare const NETWORK_TRAFFIC_FIND_LIMIT: number;
|
|
96
|
+
export interface NetworkTrafficFindRequest {
|
|
97
|
+
networkDeviceId?: string | undefined;
|
|
98
|
+
networkSiteId?: string | undefined;
|
|
99
|
+
startTime: string;
|
|
100
|
+
endTime: string;
|
|
101
|
+
query: string;
|
|
102
|
+
}
|
|
103
|
+
export interface NetworkTrafficFindMatch {
|
|
104
|
+
address: string;
|
|
105
|
+
name: string;
|
|
106
|
+
source: NetworkAddressNameSource;
|
|
107
|
+
octets: number;
|
|
108
|
+
}
|
|
109
|
+
export interface NetworkTrafficFindResult {
|
|
110
|
+
matches: Array<NetworkTrafficFindMatch>;
|
|
91
111
|
}
|
|
92
112
|
export declare function getNetworkTrafficBucketSeconds(windowInSeconds: number): number;
|
|
93
113
|
export declare class NetworkTrafficFiltersUtil {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { NetworkAddressNameSource, NetworkTrafficAddressNames } from "./NetworkAddressName";
|
|
1
2
|
export declare const MAX_NETWORK_TRAFFIC_RANGE_DAYS: number;
|
|
2
3
|
export declare const NETWORK_TRAFFIC_TOP_LIMIT: number;
|
|
3
4
|
export declare const NETWORK_TRAFFIC_SOURCES_LOOKBACK_MINUTES: number;
|
|
@@ -88,6 +89,25 @@ export interface NetworkTrafficSummary {
|
|
|
88
89
|
topDevices: Array<NetworkTrafficDeviceRow>;
|
|
89
90
|
sources: Array<NetworkTrafficSource>;
|
|
90
91
|
lastFlowAt: string | null;
|
|
92
|
+
addressNames: NetworkTrafficAddressNames;
|
|
93
|
+
}
|
|
94
|
+
export declare const MAX_NETWORK_TRAFFIC_FIND_QUERY_LENGTH: number;
|
|
95
|
+
export declare const NETWORK_TRAFFIC_FIND_LIMIT: number;
|
|
96
|
+
export interface NetworkTrafficFindRequest {
|
|
97
|
+
networkDeviceId?: string | undefined;
|
|
98
|
+
networkSiteId?: string | undefined;
|
|
99
|
+
startTime: string;
|
|
100
|
+
endTime: string;
|
|
101
|
+
query: string;
|
|
102
|
+
}
|
|
103
|
+
export interface NetworkTrafficFindMatch {
|
|
104
|
+
address: string;
|
|
105
|
+
name: string;
|
|
106
|
+
source: NetworkAddressNameSource;
|
|
107
|
+
octets: number;
|
|
108
|
+
}
|
|
109
|
+
export interface NetworkTrafficFindResult {
|
|
110
|
+
matches: Array<NetworkTrafficFindMatch>;
|
|
91
111
|
}
|
|
92
112
|
export declare function getNetworkTrafficBucketSeconds(windowInSeconds: number): number;
|
|
93
113
|
export declare class NetworkTrafficFiltersUtil {
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.NetworkTrafficFiltersUtil = exports.NETWORK_TRAFFIC_SOURCES_LIMIT = exports.NETWORK_TRAFFIC_SOURCES_LOOKBACK_MINUTES = exports.NETWORK_TRAFFIC_TOP_LIMIT = exports.MAX_NETWORK_TRAFFIC_RANGE_DAYS = void 0;
|
|
6
|
+
exports.NetworkTrafficFiltersUtil = exports.NETWORK_TRAFFIC_FIND_LIMIT = exports.MAX_NETWORK_TRAFFIC_FIND_QUERY_LENGTH = exports.NETWORK_TRAFFIC_SOURCES_LIMIT = exports.NETWORK_TRAFFIC_SOURCES_LOOKBACK_MINUTES = exports.NETWORK_TRAFFIC_TOP_LIMIT = exports.MAX_NETWORK_TRAFFIC_RANGE_DAYS = void 0;
|
|
7
7
|
exports.getNetworkTrafficBucketSeconds = getNetworkTrafficBucketSeconds;
|
|
8
8
|
const BadDataException_1 = __importDefault(require("../Exception/BadDataException"));
|
|
9
9
|
const IP_1 = __importDefault(require("../IP/IP"));
|
|
@@ -28,6 +28,10 @@ exports.NETWORK_TRAFFIC_TOP_LIMIT = 10;
|
|
|
28
28
|
exports.NETWORK_TRAFFIC_SOURCES_LOOKBACK_MINUTES = 60;
|
|
29
29
|
// Exporters listed at most.
|
|
30
30
|
exports.NETWORK_TRAFFIC_SOURCES_LIMIT = 100;
|
|
31
|
+
// The longest text "find an address" searches names for.
|
|
32
|
+
exports.MAX_NETWORK_TRAFFIC_FIND_QUERY_LENGTH = 100;
|
|
33
|
+
// Addresses "find an address" answers with at most.
|
|
34
|
+
exports.NETWORK_TRAFFIC_FIND_LIMIT = 10;
|
|
31
35
|
/*
|
|
32
36
|
* Bucket width for traffic over time: whole minutes, about 120 points a
|
|
33
37
|
* window. An hour is 1-minute buckets, a day 12-minute, 31 days ~6-hour.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import commonJsModule from "./NetworkTraffic.js";
|
|
2
|
+
export const MAX_NETWORK_TRAFFIC_FIND_QUERY_LENGTH = commonJsModule.MAX_NETWORK_TRAFFIC_FIND_QUERY_LENGTH;
|
|
2
3
|
export const MAX_NETWORK_TRAFFIC_RANGE_DAYS = commonJsModule.MAX_NETWORK_TRAFFIC_RANGE_DAYS;
|
|
4
|
+
export const NETWORK_TRAFFIC_FIND_LIMIT = commonJsModule.NETWORK_TRAFFIC_FIND_LIMIT;
|
|
3
5
|
export const NETWORK_TRAFFIC_SOURCES_LIMIT = commonJsModule.NETWORK_TRAFFIC_SOURCES_LIMIT;
|
|
4
6
|
export const NETWORK_TRAFFIC_SOURCES_LOOKBACK_MINUTES = commonJsModule.NETWORK_TRAFFIC_SOURCES_LOOKBACK_MINUTES;
|
|
5
7
|
export const NETWORK_TRAFFIC_TOP_LIMIT = commonJsModule.NETWORK_TRAFFIC_TOP_LIMIT;
|
|
@@ -8,6 +8,8 @@ export interface NetworkControllerReadSummary {
|
|
|
8
8
|
networkCount: number;
|
|
9
9
|
applianceCount: number;
|
|
10
10
|
matchedDeviceCount: number;
|
|
11
|
+
deviceCount?: number | undefined;
|
|
12
|
+
describedDeviceCount?: number | undefined;
|
|
11
13
|
uplinkWindows: number;
|
|
12
14
|
newestUplinkAt?: string | undefined;
|
|
13
15
|
analyticsNetworks: number;
|
|
@@ -8,6 +8,8 @@ export interface NetworkControllerReadSummary {
|
|
|
8
8
|
networkCount: number;
|
|
9
9
|
applianceCount: number;
|
|
10
10
|
matchedDeviceCount: number;
|
|
11
|
+
deviceCount?: number | undefined;
|
|
12
|
+
describedDeviceCount?: number | undefined;
|
|
11
13
|
uplinkWindows: number;
|
|
12
14
|
newestUplinkAt?: string | undefined;
|
|
13
15
|
analyticsNetworks: number;
|
|
@@ -31,7 +31,13 @@ function readNetworkControllerReadSummary(value) {
|
|
|
31
31
|
}
|
|
32
32
|
const failureKind = summary["failureKind"];
|
|
33
33
|
const newestUplinkAt = readText(summary["newestUplinkAt"]);
|
|
34
|
-
|
|
34
|
+
const hasDeviceCounts = summary["deviceCount"] !== undefined && summary["deviceCount"] !== null;
|
|
35
|
+
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ status: status, organizationName: readText(summary["organizationName"]), networkCount: readNumber(summary["networkCount"]), applianceCount: readNumber(summary["applianceCount"]), matchedDeviceCount: readNumber(summary["matchedDeviceCount"]) }, (hasDeviceCounts
|
|
36
|
+
? {
|
|
37
|
+
deviceCount: readNumber(summary["deviceCount"]),
|
|
38
|
+
describedDeviceCount: Math.min(readNumber(summary["deviceCount"]), readNumber(summary["describedDeviceCount"])),
|
|
39
|
+
}
|
|
40
|
+
: {})), { uplinkWindows: readNumber(summary["uplinkWindows"]) }), (newestUplinkAt ? { newestUplinkAt: newestUplinkAt } : {})), { analyticsNetworks: readNumber(summary["analyticsNetworks"]), analyticsNetworksWaiting: readNumber(summary["analyticsNetworksWaiting"]), trafficAnalysisOffNetworks: readNumber(summary["trafficAnalysisOffNetworks"]), rowsWritten: readNumber(summary["rowsWritten"]), requestCount: readNumber(summary["requestCount"]), wasRateLimited: summary["wasRateLimited"] === true, warnings: Array.isArray(summary["warnings"])
|
|
35
41
|
? summary["warnings"]
|
|
36
42
|
.filter((warning) => {
|
|
37
43
|
return typeof warning === "string" && warning.length > 0;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import NetworkControllerProvider from "../NetworkController/NetworkControllerProvider.mjs";
|
|
1
2
|
export declare enum NetworkDeviceDiscoveredField {
|
|
2
3
|
SystemName = "sysName",
|
|
3
4
|
SystemDescription = "sysDescr",
|
|
@@ -19,7 +20,8 @@ export declare enum NetworkDeviceDiscoveryMethod {
|
|
|
19
20
|
export declare enum NetworkDeviceDiscoveryReaderType {
|
|
20
21
|
DiscoveryScan = "discoveryScan",
|
|
21
22
|
NetworkDevice = "networkDevice",
|
|
22
|
-
Probe = "probe"
|
|
23
|
+
Probe = "probe",
|
|
24
|
+
NetworkController = "networkController"
|
|
23
25
|
}
|
|
24
26
|
export interface NetworkDeviceDiscoveryReader {
|
|
25
27
|
type: NetworkDeviceDiscoveryReaderType;
|
|
@@ -44,11 +46,33 @@ export interface NetworkDeviceOtherMachineSighting {
|
|
|
44
46
|
dnsName?: string | undefined;
|
|
45
47
|
netbiosName?: string | undefined;
|
|
46
48
|
}
|
|
49
|
+
export declare enum NetworkDeviceControllerField {
|
|
50
|
+
Name = "name",
|
|
51
|
+
Model = "model",
|
|
52
|
+
SerialNumber = "serialNumber",
|
|
53
|
+
MacAddress = "macAddress",
|
|
54
|
+
IpAddress = "ipAddress",
|
|
55
|
+
FirmwareVersion = "firmwareVersion",
|
|
56
|
+
ProductType = "productType",
|
|
57
|
+
NetworkName = "networkName",
|
|
58
|
+
Address = "address"
|
|
59
|
+
}
|
|
60
|
+
export declare const NETWORK_DEVICE_CONTROLLER_FIELDS: ReadonlyArray<NetworkDeviceControllerField>;
|
|
61
|
+
export declare const NETWORK_CONTROLLER_PRODUCT_TYPES: ReadonlyArray<string>;
|
|
62
|
+
export declare const MAX_CONTROLLER_VALUE_LENGTH: Readonly<Record<NetworkDeviceControllerField, number>>;
|
|
63
|
+
export interface NetworkDeviceControllerReading {
|
|
64
|
+
provider: NetworkControllerProvider;
|
|
65
|
+
readBy: NetworkDeviceDiscoveryReader;
|
|
66
|
+
readAt: string;
|
|
67
|
+
values: Partial<Record<NetworkDeviceControllerField, string>>;
|
|
68
|
+
}
|
|
47
69
|
export interface NetworkDeviceDiscoveredDetails {
|
|
48
70
|
values: Partial<Record<NetworkDeviceDiscoveredField, NetworkDeviceDiscoveredValue>>;
|
|
49
71
|
foundBy?: NetworkDeviceDiscoverySighting | undefined;
|
|
50
72
|
otherMachine?: NetworkDeviceOtherMachineSighting | undefined;
|
|
73
|
+
controller?: NetworkDeviceControllerReading | undefined;
|
|
51
74
|
}
|
|
75
|
+
export declare const DISCOVERED_DETAILS_CONTROLLER_KEY: string;
|
|
52
76
|
export declare const DISCOVERED_DETAILS_FOUND_BY_KEY: string;
|
|
53
77
|
export declare const DISCOVERED_DETAILS_OTHER_MACHINE_KEY: string;
|
|
54
78
|
export declare const NETWORK_DEVICE_DISCOVERED_FIELDS: ReadonlyArray<NetworkDeviceDiscoveredField>;
|
|
@@ -107,6 +131,28 @@ export declare function buildOtherMachineSighting(data: {
|
|
|
107
131
|
dnsName?: unknown;
|
|
108
132
|
netbiosName?: unknown;
|
|
109
133
|
}): NetworkDeviceOtherMachineSighting | undefined;
|
|
134
|
+
/**
|
|
135
|
+
* One value of a controller reading as it may be stored and shown, or
|
|
136
|
+
* undefined when it is not usable as one: a MAC through the one MAC
|
|
137
|
+
* normaliser, an address only when it is an address literal, a product type
|
|
138
|
+
* only when it is one the controller names, and cleaned, bounded text for the
|
|
139
|
+
* rest. The controller's answer is outside text, and so is the column an API
|
|
140
|
+
* create can carry: both pass through here.
|
|
141
|
+
*/
|
|
142
|
+
export declare function normalizeControllerValue(field: NetworkDeviceControllerField, value: unknown): string | undefined;
|
|
143
|
+
/**
|
|
144
|
+
* A controller reading, ready to store - or undefined when the controller is
|
|
145
|
+
* not one OneUptime reads, the reader is not a network controller
|
|
146
|
+
* connection, the time does not parse, or nothing it holds is usable. Every
|
|
147
|
+
* writer builds its reading here, and the reader below reads stored ones
|
|
148
|
+
* through it, so what is stored is what is read back.
|
|
149
|
+
*/
|
|
150
|
+
export declare function buildControllerReading(data: {
|
|
151
|
+
provider: unknown;
|
|
152
|
+
readBy: unknown;
|
|
153
|
+
readAt: unknown;
|
|
154
|
+
values: unknown;
|
|
155
|
+
}): NetworkDeviceControllerReading | undefined;
|
|
110
156
|
/**
|
|
111
157
|
* A device's discovered details, read defensively out of its jsonb column:
|
|
112
158
|
* every entry that is not exactly what OneUptime writes - an unknown key, a
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import NetworkControllerProvider from "../NetworkController/NetworkControllerProvider";
|
|
1
2
|
export declare enum NetworkDeviceDiscoveredField {
|
|
2
3
|
SystemName = "sysName",
|
|
3
4
|
SystemDescription = "sysDescr",
|
|
@@ -19,7 +20,8 @@ export declare enum NetworkDeviceDiscoveryMethod {
|
|
|
19
20
|
export declare enum NetworkDeviceDiscoveryReaderType {
|
|
20
21
|
DiscoveryScan = "discoveryScan",
|
|
21
22
|
NetworkDevice = "networkDevice",
|
|
22
|
-
Probe = "probe"
|
|
23
|
+
Probe = "probe",
|
|
24
|
+
NetworkController = "networkController"
|
|
23
25
|
}
|
|
24
26
|
export interface NetworkDeviceDiscoveryReader {
|
|
25
27
|
type: NetworkDeviceDiscoveryReaderType;
|
|
@@ -44,11 +46,33 @@ export interface NetworkDeviceOtherMachineSighting {
|
|
|
44
46
|
dnsName?: string | undefined;
|
|
45
47
|
netbiosName?: string | undefined;
|
|
46
48
|
}
|
|
49
|
+
export declare enum NetworkDeviceControllerField {
|
|
50
|
+
Name = "name",
|
|
51
|
+
Model = "model",
|
|
52
|
+
SerialNumber = "serialNumber",
|
|
53
|
+
MacAddress = "macAddress",
|
|
54
|
+
IpAddress = "ipAddress",
|
|
55
|
+
FirmwareVersion = "firmwareVersion",
|
|
56
|
+
ProductType = "productType",
|
|
57
|
+
NetworkName = "networkName",
|
|
58
|
+
Address = "address"
|
|
59
|
+
}
|
|
60
|
+
export declare const NETWORK_DEVICE_CONTROLLER_FIELDS: ReadonlyArray<NetworkDeviceControllerField>;
|
|
61
|
+
export declare const NETWORK_CONTROLLER_PRODUCT_TYPES: ReadonlyArray<string>;
|
|
62
|
+
export declare const MAX_CONTROLLER_VALUE_LENGTH: Readonly<Record<NetworkDeviceControllerField, number>>;
|
|
63
|
+
export interface NetworkDeviceControllerReading {
|
|
64
|
+
provider: NetworkControllerProvider;
|
|
65
|
+
readBy: NetworkDeviceDiscoveryReader;
|
|
66
|
+
readAt: string;
|
|
67
|
+
values: Partial<Record<NetworkDeviceControllerField, string>>;
|
|
68
|
+
}
|
|
47
69
|
export interface NetworkDeviceDiscoveredDetails {
|
|
48
70
|
values: Partial<Record<NetworkDeviceDiscoveredField, NetworkDeviceDiscoveredValue>>;
|
|
49
71
|
foundBy?: NetworkDeviceDiscoverySighting | undefined;
|
|
50
72
|
otherMachine?: NetworkDeviceOtherMachineSighting | undefined;
|
|
73
|
+
controller?: NetworkDeviceControllerReading | undefined;
|
|
51
74
|
}
|
|
75
|
+
export declare const DISCOVERED_DETAILS_CONTROLLER_KEY: string;
|
|
52
76
|
export declare const DISCOVERED_DETAILS_FOUND_BY_KEY: string;
|
|
53
77
|
export declare const DISCOVERED_DETAILS_OTHER_MACHINE_KEY: string;
|
|
54
78
|
export declare const NETWORK_DEVICE_DISCOVERED_FIELDS: ReadonlyArray<NetworkDeviceDiscoveredField>;
|
|
@@ -107,6 +131,28 @@ export declare function buildOtherMachineSighting(data: {
|
|
|
107
131
|
dnsName?: unknown;
|
|
108
132
|
netbiosName?: unknown;
|
|
109
133
|
}): NetworkDeviceOtherMachineSighting | undefined;
|
|
134
|
+
/**
|
|
135
|
+
* One value of a controller reading as it may be stored and shown, or
|
|
136
|
+
* undefined when it is not usable as one: a MAC through the one MAC
|
|
137
|
+
* normaliser, an address only when it is an address literal, a product type
|
|
138
|
+
* only when it is one the controller names, and cleaned, bounded text for the
|
|
139
|
+
* rest. The controller's answer is outside text, and so is the column an API
|
|
140
|
+
* create can carry: both pass through here.
|
|
141
|
+
*/
|
|
142
|
+
export declare function normalizeControllerValue(field: NetworkDeviceControllerField, value: unknown): string | undefined;
|
|
143
|
+
/**
|
|
144
|
+
* A controller reading, ready to store - or undefined when the controller is
|
|
145
|
+
* not one OneUptime reads, the reader is not a network controller
|
|
146
|
+
* connection, the time does not parse, or nothing it holds is usable. Every
|
|
147
|
+
* writer builds its reading here, and the reader below reads stored ones
|
|
148
|
+
* through it, so what is stored is what is read back.
|
|
149
|
+
*/
|
|
150
|
+
export declare function buildControllerReading(data: {
|
|
151
|
+
provider: unknown;
|
|
152
|
+
readBy: unknown;
|
|
153
|
+
readAt: unknown;
|
|
154
|
+
values: unknown;
|
|
155
|
+
}): NetworkDeviceControllerReading | undefined;
|
|
110
156
|
/**
|
|
111
157
|
* A device's discovered details, read defensively out of its jsonb column:
|
|
112
158
|
* every entry that is not exactly what OneUptime writes - an unknown key, a
|