@oneuptime/common 11.1.2 → 11.2.1
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/DatabaseModels/Alert.ts +55 -0
- package/Models/DatabaseModels/Incident.ts +55 -0
- package/Models/DatabaseModels/Index.ts +12 -0
- package/Models/DatabaseModels/IoTDevice.ts +690 -0
- package/Models/DatabaseModels/IoTFleet.ts +862 -0
- package/Models/DatabaseModels/IoTFleetLabelRule.ts +514 -0
- package/Models/DatabaseModels/IoTFleetOwnerRule.ts +596 -0
- package/Models/DatabaseModels/IoTFleetOwnerTeam.ts +485 -0
- package/Models/DatabaseModels/IoTFleetOwnerUser.ts +484 -0
- package/Models/DatabaseModels/ScheduledMaintenance.ts +55 -0
- package/Server/API/IoTDeviceAPI.ts +128 -0
- package/Server/API/TelemetryAPI.ts +104 -35
- package/Server/Infrastructure/Postgres/SchemaMigrations/1782900000000-AddIoTFleetAndDeviceTables.ts +399 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783000000000-AddIoTFleetActivityJoinTables.ts +97 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783010000000-MigrationName.ts +979 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +6 -0
- package/Server/Services/AlertService.ts +24 -3
- package/Server/Services/IncidentService.ts +24 -3
- package/Server/Services/IoTDeviceService.ts +356 -0
- package/Server/Services/IoTFleetLabelRuleEngineService.ts +198 -0
- package/Server/Services/IoTFleetLabelRuleService.ts +14 -0
- package/Server/Services/IoTFleetOwnerRuleEngineService.ts +216 -0
- package/Server/Services/IoTFleetOwnerRuleService.ts +14 -0
- package/Server/Services/IoTFleetOwnerTeamService.ts +10 -0
- package/Server/Services/IoTFleetOwnerUserService.ts +10 -0
- package/Server/Services/IoTFleetService.ts +376 -0
- package/Server/Services/OpenTelemetryIngestService.ts +16 -0
- package/Server/Services/StatusPageService.ts +69 -26
- package/Server/Services/StatusPageSubscriberNotificationTemplateService.ts +36 -0
- package/Server/Services/TelemetryUsageBillingService.ts +18 -0
- package/Server/Services/TraceAggregationService.ts +174 -0
- package/Server/Utils/Monitor/Criteria/ServerMonitorCriteria.ts +1 -1
- package/Server/Utils/Monitor/MonitorAlert.ts +24 -4
- package/Server/Utils/Monitor/MonitorClusterContext.ts +26 -2
- package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +4 -2
- package/Server/Utils/Monitor/MonitorIncident.ts +39 -5
- package/Server/Utils/Monitor/MonitorMaintenanceSuppression.ts +14 -0
- package/Server/Utils/Monitor/SeriesResourceLabels.ts +22 -0
- package/Server/Utils/Telemetry/IoTSnapshotScan.ts +408 -0
- package/Tests/Server/Utils/Monitor/MonitorMaintenanceSuppression.test.ts +36 -0
- package/Types/Icon/IconProp.ts +1 -0
- package/Types/Monitor/IotAlertTemplates.ts +593 -0
- package/Types/Monitor/IotMetricCatalog.ts +146 -0
- package/Types/Monitor/MonitorStep.ts +31 -0
- package/Types/Monitor/MonitorStepIoTMonitor.ts +65 -0
- package/Types/Monitor/MonitorType.ts +12 -1
- package/Types/Permission.ts +230 -0
- package/Types/StatusPage/StatusPageSubscriberNotificationEventType.ts +3 -0
- package/Types/Telemetry/ServiceType.ts +1 -0
- package/UI/Components/Charts/ChartGroup/ChartGroup.tsx +5 -5
- package/UI/Components/Icon/Icon.tsx +18 -2
- package/UI/Components/Page/Page.tsx +1 -2
- package/build/dist/Models/DatabaseModels/Alert.js +54 -0
- package/build/dist/Models/DatabaseModels/Alert.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Incident.js +54 -0
- package/build/dist/Models/DatabaseModels/Incident.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +12 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IoTDevice.js +722 -0
- package/build/dist/Models/DatabaseModels/IoTDevice.js.map +1 -0
- package/build/dist/Models/DatabaseModels/IoTFleet.js +882 -0
- package/build/dist/Models/DatabaseModels/IoTFleet.js.map +1 -0
- package/build/dist/Models/DatabaseModels/IoTFleetLabelRule.js +522 -0
- package/build/dist/Models/DatabaseModels/IoTFleetLabelRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/IoTFleetOwnerRule.js +603 -0
- package/build/dist/Models/DatabaseModels/IoTFleetOwnerRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/IoTFleetOwnerTeam.js +503 -0
- package/build/dist/Models/DatabaseModels/IoTFleetOwnerTeam.js.map +1 -0
- package/build/dist/Models/DatabaseModels/IoTFleetOwnerUser.js +502 -0
- package/build/dist/Models/DatabaseModels/IoTFleetOwnerUser.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenance.js +54 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenance.js.map +1 -1
- package/build/dist/Server/API/IoTDeviceAPI.js +92 -0
- package/build/dist/Server/API/IoTDeviceAPI.js.map +1 -0
- package/build/dist/Server/API/TelemetryAPI.js +76 -27
- package/build/dist/Server/API/TelemetryAPI.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1782900000000-AddIoTFleetAndDeviceTables.js +187 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1782900000000-AddIoTFleetAndDeviceTables.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783000000000-AddIoTFleetActivityJoinTables.js +48 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783000000000-AddIoTFleetActivityJoinTables.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783010000000-MigrationName.js +340 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783010000000-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +6 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Services/AlertService.js +22 -3
- package/build/dist/Server/Services/AlertService.js.map +1 -1
- package/build/dist/Server/Services/IncidentService.js +22 -3
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/IoTDeviceService.js +249 -0
- package/build/dist/Server/Services/IoTDeviceService.js.map +1 -0
- package/build/dist/Server/Services/IoTFleetLabelRuleEngineService.js +166 -0
- package/build/dist/Server/Services/IoTFleetLabelRuleEngineService.js.map +1 -0
- package/build/dist/Server/Services/IoTFleetLabelRuleService.js +13 -0
- package/build/dist/Server/Services/IoTFleetLabelRuleService.js.map +1 -0
- package/build/dist/Server/Services/IoTFleetOwnerRuleEngineService.js +186 -0
- package/build/dist/Server/Services/IoTFleetOwnerRuleEngineService.js.map +1 -0
- package/build/dist/Server/Services/IoTFleetOwnerRuleService.js +13 -0
- package/build/dist/Server/Services/IoTFleetOwnerRuleService.js.map +1 -0
- package/build/dist/Server/Services/IoTFleetOwnerTeamService.js +9 -0
- package/build/dist/Server/Services/IoTFleetOwnerTeamService.js.map +1 -0
- package/build/dist/Server/Services/IoTFleetOwnerUserService.js +9 -0
- package/build/dist/Server/Services/IoTFleetOwnerUserService.js.map +1 -0
- package/build/dist/Server/Services/IoTFleetService.js +340 -0
- package/build/dist/Server/Services/IoTFleetService.js.map +1 -0
- package/build/dist/Server/Services/OpenTelemetryIngestService.js +26 -11
- package/build/dist/Server/Services/OpenTelemetryIngestService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageService.js +57 -23
- package/build/dist/Server/Services/StatusPageService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageSubscriberNotificationTemplateService.js +34 -0
- package/build/dist/Server/Services/StatusPageSubscriberNotificationTemplateService.js.map +1 -1
- package/build/dist/Server/Services/TelemetryUsageBillingService.js +13 -0
- package/build/dist/Server/Services/TelemetryUsageBillingService.js.map +1 -1
- package/build/dist/Server/Services/TraceAggregationService.js +136 -0
- package/build/dist/Server/Services/TraceAggregationService.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/ServerMonitorCriteria.js +15 -15
- package/build/dist/Server/Utils/Monitor/Criteria/ServerMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js +37 -19
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorClusterContext.js +27 -4
- package/build/dist/Server/Utils/Monitor/MonitorClusterContext.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +4 -2
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js +39 -11
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorMaintenanceSuppression.js +8 -0
- package/build/dist/Server/Utils/Monitor/MonitorMaintenanceSuppression.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/SeriesResourceLabels.js +17 -0
- package/build/dist/Server/Utils/Monitor/SeriesResourceLabels.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/IoTSnapshotScan.js +300 -0
- package/build/dist/Server/Utils/Telemetry/IoTSnapshotScan.js.map +1 -0
- package/build/dist/Types/Icon/IconProp.js +1 -0
- package/build/dist/Types/Icon/IconProp.js.map +1 -1
- package/build/dist/Types/Monitor/IotAlertTemplates.js +467 -0
- package/build/dist/Types/Monitor/IotAlertTemplates.js.map +1 -0
- package/build/dist/Types/Monitor/IotMetricCatalog.js +108 -0
- package/build/dist/Types/Monitor/IotMetricCatalog.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorStep.js +23 -0
- package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStepIoTMonitor.js +32 -0
- package/build/dist/Types/Monitor/MonitorStepIoTMonitor.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorType.js +11 -1
- package/build/dist/Types/Monitor/MonitorType.js.map +1 -1
- package/build/dist/Types/Permission.js +204 -0
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/StatusPage/StatusPageSubscriberNotificationEventType.js +2 -0
- package/build/dist/Types/StatusPage/StatusPageSubscriberNotificationEventType.js.map +1 -1
- package/build/dist/Types/Telemetry/ServiceType.js +1 -0
- package/build/dist/Types/Telemetry/ServiceType.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartGroup/ChartGroup.js +3 -3
- package/build/dist/UI/Components/Charts/ChartGroup/ChartGroup.js.map +1 -1
- package/build/dist/UI/Components/Icon/Icon.js +12 -2
- package/build/dist/UI/Components/Icon/Icon.js.map +1 -1
- package/build/dist/UI/Components/Page/Page.js +1 -2
- package/build/dist/UI/Components/Page/Page.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,467 @@
|
|
|
1
|
+
import ObjectID from "../ObjectID";
|
|
2
|
+
import MonitorStep from "./MonitorStep";
|
|
3
|
+
import MonitorCriteria from "./MonitorCriteria";
|
|
4
|
+
import MonitorCriteriaInstance from "./MonitorCriteriaInstance";
|
|
5
|
+
import FilterCondition from "../Filter/FilterCondition";
|
|
6
|
+
import { CheckOn, FilterType, EvaluateOverTimeType } from "./CriteriaFilter";
|
|
7
|
+
import RollingTime from "../RollingTime/RollingTime";
|
|
8
|
+
import MetricsAggregationType from "../Metrics/MetricsAggregationType";
|
|
9
|
+
/*
|
|
10
|
+
* Filter contract: IoT devices push OTel metrics that carry the `device.id`
|
|
11
|
+
* datapoint label per device, plus the datapoint attributes `iot.scope`
|
|
12
|
+
* (fleet | device), `iot.device.type` and `iot.device.kind`. Templates filter
|
|
13
|
+
* on those attributes and group by the untouched `device.id` label so one
|
|
14
|
+
* incident fires per device. All of these are datapoint attributes, so they
|
|
15
|
+
* are NOT `resource.`-prefixed in ClickHouse.
|
|
16
|
+
*/
|
|
17
|
+
export function buildIoTMonitorStep(args) {
|
|
18
|
+
const monitorStep = new MonitorStep();
|
|
19
|
+
const monitorCriteria = new MonitorCriteria();
|
|
20
|
+
monitorCriteria.data = {
|
|
21
|
+
monitorCriteriaInstanceArray: [
|
|
22
|
+
args.offlineCriteriaInstance,
|
|
23
|
+
args.onlineCriteriaInstance,
|
|
24
|
+
],
|
|
25
|
+
};
|
|
26
|
+
monitorStep.data = {
|
|
27
|
+
id: ObjectID.generate().toString(),
|
|
28
|
+
monitorDestination: undefined,
|
|
29
|
+
doNotFollowRedirects: undefined,
|
|
30
|
+
monitorDestinationPort: undefined,
|
|
31
|
+
monitorCriteria: monitorCriteria,
|
|
32
|
+
requestType: "GET",
|
|
33
|
+
requestHeaders: undefined,
|
|
34
|
+
requestBody: undefined,
|
|
35
|
+
customCode: undefined,
|
|
36
|
+
screenSizeTypes: undefined,
|
|
37
|
+
browserTypes: undefined,
|
|
38
|
+
retryCountOnError: undefined,
|
|
39
|
+
logMonitor: undefined,
|
|
40
|
+
traceMonitor: undefined,
|
|
41
|
+
metricMonitor: undefined,
|
|
42
|
+
exceptionMonitor: undefined,
|
|
43
|
+
snmpMonitor: undefined,
|
|
44
|
+
dnsMonitor: undefined,
|
|
45
|
+
domainMonitor: undefined,
|
|
46
|
+
externalStatusPageMonitor: undefined,
|
|
47
|
+
kubernetesMonitor: undefined,
|
|
48
|
+
profileMonitor: undefined,
|
|
49
|
+
dockerMonitor: undefined,
|
|
50
|
+
iotMonitor: args.iotMonitor,
|
|
51
|
+
};
|
|
52
|
+
return monitorStep;
|
|
53
|
+
}
|
|
54
|
+
export function buildIoTOfflineCriteriaInstance(args) {
|
|
55
|
+
const instance = new MonitorCriteriaInstance();
|
|
56
|
+
const incidentTitle = args.incidentTitle || `${args.monitorName} - Alert Triggered`;
|
|
57
|
+
const incidentDescription = args.incidentDescription ||
|
|
58
|
+
`${args.monitorName} has triggered an alert condition. See root cause for detailed IoT device information.`;
|
|
59
|
+
instance.data = {
|
|
60
|
+
id: ObjectID.generate().toString(),
|
|
61
|
+
monitorStatusId: args.offlineMonitorStatusId,
|
|
62
|
+
filterCondition: FilterCondition.Any,
|
|
63
|
+
filters: [
|
|
64
|
+
{
|
|
65
|
+
checkOn: CheckOn.MetricValue,
|
|
66
|
+
filterType: args.filterType,
|
|
67
|
+
metricMonitorOptions: {
|
|
68
|
+
metricAggregationType: EvaluateOverTimeType.AnyValue,
|
|
69
|
+
metricAlias: args.metricAlias,
|
|
70
|
+
},
|
|
71
|
+
value: args.value,
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
incidents: [
|
|
75
|
+
{
|
|
76
|
+
title: incidentTitle,
|
|
77
|
+
description: incidentDescription,
|
|
78
|
+
incidentSeverityId: args.incidentSeverityId,
|
|
79
|
+
autoResolveIncident: true,
|
|
80
|
+
id: ObjectID.generate().toString(),
|
|
81
|
+
onCallPolicyIds: [],
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
alerts: [
|
|
85
|
+
{
|
|
86
|
+
title: incidentTitle,
|
|
87
|
+
description: incidentDescription,
|
|
88
|
+
alertSeverityId: args.alertSeverityId,
|
|
89
|
+
autoResolveAlert: true,
|
|
90
|
+
id: ObjectID.generate().toString(),
|
|
91
|
+
onCallPolicyIds: [],
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
changeMonitorStatus: true,
|
|
95
|
+
createIncidents: true,
|
|
96
|
+
createAlerts: true,
|
|
97
|
+
name: args.criteriaName || `${args.monitorName} - Unhealthy`,
|
|
98
|
+
description: args.criteriaDescription || `Criteria for detecting unhealthy state.`,
|
|
99
|
+
};
|
|
100
|
+
return instance;
|
|
101
|
+
}
|
|
102
|
+
export function buildIoTOnlineCriteriaInstance(args) {
|
|
103
|
+
const instance = new MonitorCriteriaInstance();
|
|
104
|
+
instance.data = {
|
|
105
|
+
id: ObjectID.generate().toString(),
|
|
106
|
+
monitorStatusId: args.onlineMonitorStatusId,
|
|
107
|
+
filterCondition: FilterCondition.Any,
|
|
108
|
+
filters: [
|
|
109
|
+
{
|
|
110
|
+
checkOn: CheckOn.MetricValue,
|
|
111
|
+
filterType: args.filterType,
|
|
112
|
+
metricMonitorOptions: {
|
|
113
|
+
metricAggregationType: EvaluateOverTimeType.AnyValue,
|
|
114
|
+
metricAlias: args.metricAlias,
|
|
115
|
+
},
|
|
116
|
+
value: args.value,
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
incidents: [],
|
|
120
|
+
alerts: [],
|
|
121
|
+
changeMonitorStatus: true,
|
|
122
|
+
createIncidents: false,
|
|
123
|
+
createAlerts: false,
|
|
124
|
+
name: "Healthy",
|
|
125
|
+
description: "Criteria for healthy state.",
|
|
126
|
+
};
|
|
127
|
+
return instance;
|
|
128
|
+
}
|
|
129
|
+
export function buildIoTMonitorConfig(args) {
|
|
130
|
+
return {
|
|
131
|
+
fleetIdentifier: args.fleetIdentifier,
|
|
132
|
+
resourceFilters: {},
|
|
133
|
+
metricViewConfig: {
|
|
134
|
+
queryConfigs: [
|
|
135
|
+
{
|
|
136
|
+
metricAliasData: {
|
|
137
|
+
metricVariable: args.metricAlias,
|
|
138
|
+
title: args.metricAlias,
|
|
139
|
+
description: args.metricAlias,
|
|
140
|
+
legend: args.metricAlias,
|
|
141
|
+
legendUnit: undefined,
|
|
142
|
+
},
|
|
143
|
+
metricQueryData: Object.assign({ filterData: {
|
|
144
|
+
metricName: args.metricName,
|
|
145
|
+
attributes: args.attributes || {},
|
|
146
|
+
aggegationType: args.aggregationType,
|
|
147
|
+
aggregateBy: {},
|
|
148
|
+
} }, (args.groupByAttributeKey
|
|
149
|
+
? { groupByAttributeKeys: [args.groupByAttributeKey] }
|
|
150
|
+
: {})),
|
|
151
|
+
},
|
|
152
|
+
],
|
|
153
|
+
formulaConfigs: [],
|
|
154
|
+
},
|
|
155
|
+
rollingTime: args.rollingTime,
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Build a ratio monitor: `(numerator / denominator) * 100`, optionally
|
|
160
|
+
* grouped by an OpenTelemetry attribute so one incident fires per group
|
|
161
|
+
* (e.g. per `device.id` = per device).
|
|
162
|
+
*
|
|
163
|
+
* Aggregation contract (see buildKubernetesRatioMonitorConfig for the full
|
|
164
|
+
* derivation): the per-series worker buckets raw rows by (group, minute)
|
|
165
|
+
* and applies the aggregation across both the grouped series AND the
|
|
166
|
+
* scrapes in that minute. `Sum` is only correct when numerator and
|
|
167
|
+
* denominator ride the SAME receiver/scrape so the scrape multiple
|
|
168
|
+
* cancels: `(Σnum × scrapes) / (Σden × scrapes)`. Every IoT metric for a
|
|
169
|
+
* device comes from ONE push from that device — so all IoT ratios are
|
|
170
|
+
* same-receiver and default to `Sum`/`Sum`. (`Avg`/`Avg` is the
|
|
171
|
+
* cross-receiver variant; not needed here.)
|
|
172
|
+
*
|
|
173
|
+
* `attributes` is applied to BOTH queries — the device stamps `iot.scope` /
|
|
174
|
+
* `iot.device.type` on every series of a push (including the *_info metadata
|
|
175
|
+
* series, which also carry `device.id`), so a shared equality filter is safe.
|
|
176
|
+
*/
|
|
177
|
+
export function buildIoTRatioMonitorConfig(args) {
|
|
178
|
+
const aggregationType = args.aggregationType || MetricsAggregationType.Sum;
|
|
179
|
+
const buildQueryConfig = (alias, metricName) => {
|
|
180
|
+
return {
|
|
181
|
+
metricAliasData: {
|
|
182
|
+
metricVariable: alias,
|
|
183
|
+
title: alias,
|
|
184
|
+
description: alias,
|
|
185
|
+
legend: alias,
|
|
186
|
+
legendUnit: undefined,
|
|
187
|
+
},
|
|
188
|
+
metricQueryData: Object.assign({ filterData: {
|
|
189
|
+
metricName: metricName,
|
|
190
|
+
attributes: args.attributes || {},
|
|
191
|
+
aggegationType: aggregationType,
|
|
192
|
+
aggregateBy: {},
|
|
193
|
+
} }, (args.groupByAttributeKey
|
|
194
|
+
? { groupByAttributeKeys: [args.groupByAttributeKey] }
|
|
195
|
+
: {})),
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
return {
|
|
199
|
+
fleetIdentifier: args.fleetIdentifier,
|
|
200
|
+
resourceFilters: {},
|
|
201
|
+
metricViewConfig: {
|
|
202
|
+
queryConfigs: [
|
|
203
|
+
buildQueryConfig(args.numeratorAlias, args.numeratorMetricName),
|
|
204
|
+
buildQueryConfig(args.denominatorAlias, args.denominatorMetricName),
|
|
205
|
+
],
|
|
206
|
+
formulaConfigs: [
|
|
207
|
+
{
|
|
208
|
+
metricAliasData: {
|
|
209
|
+
metricVariable: args.resultAlias,
|
|
210
|
+
title: args.resultLegend,
|
|
211
|
+
description: args.resultLegend,
|
|
212
|
+
legend: args.resultLegend,
|
|
213
|
+
legendUnit: "%",
|
|
214
|
+
},
|
|
215
|
+
metricFormulaData: {
|
|
216
|
+
metricFormula: `(${args.numeratorAlias} / ${args.denominatorAlias}) * 100`,
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
],
|
|
220
|
+
},
|
|
221
|
+
rollingTime: args.rollingTime,
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
// --- Template Definitions ---
|
|
225
|
+
const deviceOfflineTemplate = {
|
|
226
|
+
id: "iot-device-offline",
|
|
227
|
+
name: "Device Offline",
|
|
228
|
+
description: "Alert when any IoT device reports as down (iot_device_up = 0). One incident per device, grouped by device.id.",
|
|
229
|
+
category: "Availability",
|
|
230
|
+
severity: "Critical",
|
|
231
|
+
getMonitorStep: (args) => {
|
|
232
|
+
const metricAlias = "device_up";
|
|
233
|
+
return buildIoTMonitorStep({
|
|
234
|
+
iotMonitor: buildIoTMonitorConfig({
|
|
235
|
+
fleetIdentifier: args.fleetIdentifier,
|
|
236
|
+
metricName: "iot_device_up",
|
|
237
|
+
metricAlias,
|
|
238
|
+
rollingTime: RollingTime.Past5Minutes,
|
|
239
|
+
/*
|
|
240
|
+
* Min per device — a single down push trips the threshold instead
|
|
241
|
+
* of being masked by pushes where the device was still up.
|
|
242
|
+
*/
|
|
243
|
+
aggregationType: MetricsAggregationType.Min,
|
|
244
|
+
attributes: {},
|
|
245
|
+
groupByAttributeKey: "device.id",
|
|
246
|
+
}),
|
|
247
|
+
offlineCriteriaInstance: buildIoTOfflineCriteriaInstance({
|
|
248
|
+
offlineMonitorStatusId: args.offlineMonitorStatusId,
|
|
249
|
+
incidentSeverityId: args.defaultIncidentSeverityId,
|
|
250
|
+
alertSeverityId: args.defaultAlertSeverityId,
|
|
251
|
+
monitorName: args.monitorName,
|
|
252
|
+
metricAlias,
|
|
253
|
+
filterType: FilterType.LessThan,
|
|
254
|
+
value: 1,
|
|
255
|
+
incidentTitle: `[IoT] Device Offline - ${args.monitorName}`,
|
|
256
|
+
incidentDescription: `An IoT device is reporting as down (iot_device_up = 0). The device is unreachable, powered off, or has lost connectivity to its gateway. Check the root cause for the affected device id, verify the device's power and network state, and confirm its gateway is forwarding telemetry.`,
|
|
257
|
+
criteriaName: "Device Offline - iot_device_up < 1",
|
|
258
|
+
criteriaDescription: "Triggers when any device reports iot_device_up below 1 over the monitoring window.",
|
|
259
|
+
}),
|
|
260
|
+
onlineCriteriaInstance: buildIoTOnlineCriteriaInstance({
|
|
261
|
+
onlineMonitorStatusId: args.onlineMonitorStatusId,
|
|
262
|
+
metricAlias,
|
|
263
|
+
filterType: FilterType.GreaterThanOrEqualTo,
|
|
264
|
+
value: 1,
|
|
265
|
+
}),
|
|
266
|
+
});
|
|
267
|
+
},
|
|
268
|
+
};
|
|
269
|
+
const lowBatteryTemplate = {
|
|
270
|
+
id: "iot-low-battery",
|
|
271
|
+
name: "Low Battery",
|
|
272
|
+
description: "Alert when any IoT device's battery level drops below 20% (iot_battery_percent < 20). One incident per device, grouped by device.id.",
|
|
273
|
+
category: "Power",
|
|
274
|
+
severity: "Warning",
|
|
275
|
+
getMonitorStep: (args) => {
|
|
276
|
+
const metricAlias = "battery_percent";
|
|
277
|
+
return buildIoTMonitorStep({
|
|
278
|
+
iotMonitor: buildIoTMonitorConfig({
|
|
279
|
+
fleetIdentifier: args.fleetIdentifier,
|
|
280
|
+
metricName: "iot_battery_percent",
|
|
281
|
+
metricAlias,
|
|
282
|
+
rollingTime: RollingTime.Past5Minutes,
|
|
283
|
+
/*
|
|
284
|
+
* Avg per device — battery percentage is a slow-moving level, so
|
|
285
|
+
* the per-minute average is the representative reading regardless
|
|
286
|
+
* of push count.
|
|
287
|
+
*/
|
|
288
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
289
|
+
attributes: {},
|
|
290
|
+
groupByAttributeKey: "device.id",
|
|
291
|
+
}),
|
|
292
|
+
offlineCriteriaInstance: buildIoTOfflineCriteriaInstance({
|
|
293
|
+
offlineMonitorStatusId: args.offlineMonitorStatusId,
|
|
294
|
+
incidentSeverityId: args.defaultIncidentSeverityId,
|
|
295
|
+
alertSeverityId: args.defaultAlertSeverityId,
|
|
296
|
+
monitorName: args.monitorName,
|
|
297
|
+
metricAlias,
|
|
298
|
+
filterType: FilterType.LessThan,
|
|
299
|
+
value: 20,
|
|
300
|
+
incidentTitle: `[IoT] Low Battery (<20%) - ${args.monitorName}`,
|
|
301
|
+
incidentDescription: `An IoT device's battery has dropped below 20%. The device will stop reporting once its battery is exhausted. Check the root cause for the affected device id, then replace or recharge its battery before it dies.`,
|
|
302
|
+
criteriaName: "Low Battery - iot_battery_percent < 20",
|
|
303
|
+
criteriaDescription: "Triggers when any device's battery level drops below 20% over the monitoring window.",
|
|
304
|
+
}),
|
|
305
|
+
onlineCriteriaInstance: buildIoTOnlineCriteriaInstance({
|
|
306
|
+
onlineMonitorStatusId: args.onlineMonitorStatusId,
|
|
307
|
+
metricAlias,
|
|
308
|
+
filterType: FilterType.GreaterThanOrEqualTo,
|
|
309
|
+
value: 20,
|
|
310
|
+
}),
|
|
311
|
+
});
|
|
312
|
+
},
|
|
313
|
+
};
|
|
314
|
+
const weakSignalTemplate = {
|
|
315
|
+
id: "iot-weak-signal",
|
|
316
|
+
name: "Weak Signal",
|
|
317
|
+
description: "Alert when any IoT device's signal strength drops below -100 dBm (iot_signal_strength_dbm < -100). One incident per device, grouped by device.id.",
|
|
318
|
+
category: "Connectivity",
|
|
319
|
+
severity: "Warning",
|
|
320
|
+
getMonitorStep: (args) => {
|
|
321
|
+
const metricAlias = "signal_strength";
|
|
322
|
+
return buildIoTMonitorStep({
|
|
323
|
+
iotMonitor: buildIoTMonitorConfig({
|
|
324
|
+
fleetIdentifier: args.fleetIdentifier,
|
|
325
|
+
metricName: "iot_signal_strength_dbm",
|
|
326
|
+
metricAlias,
|
|
327
|
+
rollingTime: RollingTime.Past5Minutes,
|
|
328
|
+
/*
|
|
329
|
+
* Avg per device — signal strength (dBm) is a level reading, so
|
|
330
|
+
* the per-minute average is the representative value regardless
|
|
331
|
+
* of push count.
|
|
332
|
+
*/
|
|
333
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
334
|
+
attributes: {},
|
|
335
|
+
groupByAttributeKey: "device.id",
|
|
336
|
+
}),
|
|
337
|
+
offlineCriteriaInstance: buildIoTOfflineCriteriaInstance({
|
|
338
|
+
offlineMonitorStatusId: args.offlineMonitorStatusId,
|
|
339
|
+
incidentSeverityId: args.defaultIncidentSeverityId,
|
|
340
|
+
alertSeverityId: args.defaultAlertSeverityId,
|
|
341
|
+
monitorName: args.monitorName,
|
|
342
|
+
metricAlias,
|
|
343
|
+
filterType: FilterType.LessThan,
|
|
344
|
+
value: -100,
|
|
345
|
+
incidentTitle: `[IoT] Weak Signal (<-100 dBm) - ${args.monitorName}`,
|
|
346
|
+
incidentDescription: `An IoT device's radio signal strength has dropped below -100 dBm. A weak signal causes dropped telemetry and intermittent connectivity. Check the root cause for the affected device id, then verify its proximity to the gateway, check for interference, or reposition the device or gateway.`,
|
|
347
|
+
criteriaName: "Weak Signal - iot_signal_strength_dbm < -100",
|
|
348
|
+
criteriaDescription: "Triggers when any device's signal strength drops below -100 dBm over the monitoring window.",
|
|
349
|
+
}),
|
|
350
|
+
onlineCriteriaInstance: buildIoTOnlineCriteriaInstance({
|
|
351
|
+
onlineMonitorStatusId: args.onlineMonitorStatusId,
|
|
352
|
+
metricAlias,
|
|
353
|
+
filterType: FilterType.GreaterThanOrEqualTo,
|
|
354
|
+
value: -100,
|
|
355
|
+
}),
|
|
356
|
+
});
|
|
357
|
+
},
|
|
358
|
+
};
|
|
359
|
+
const highTemperatureTemplate = {
|
|
360
|
+
id: "iot-high-temperature",
|
|
361
|
+
name: "High Temperature",
|
|
362
|
+
description: "Alert when any IoT device's temperature exceeds 70°C (iot_temperature_celsius > 70). One incident per device, grouped by device.id.",
|
|
363
|
+
category: "Environment",
|
|
364
|
+
severity: "Critical",
|
|
365
|
+
getMonitorStep: (args) => {
|
|
366
|
+
const metricAlias = "temperature_celsius";
|
|
367
|
+
return buildIoTMonitorStep({
|
|
368
|
+
iotMonitor: buildIoTMonitorConfig({
|
|
369
|
+
fleetIdentifier: args.fleetIdentifier,
|
|
370
|
+
metricName: "iot_temperature_celsius",
|
|
371
|
+
metricAlias,
|
|
372
|
+
rollingTime: RollingTime.Past5Minutes,
|
|
373
|
+
/*
|
|
374
|
+
* Max per device — a single hot reading should trip the threshold
|
|
375
|
+
* instead of being masked by cooler readings in the same minute.
|
|
376
|
+
*/
|
|
377
|
+
aggregationType: MetricsAggregationType.Max,
|
|
378
|
+
attributes: {},
|
|
379
|
+
groupByAttributeKey: "device.id",
|
|
380
|
+
}),
|
|
381
|
+
offlineCriteriaInstance: buildIoTOfflineCriteriaInstance({
|
|
382
|
+
offlineMonitorStatusId: args.offlineMonitorStatusId,
|
|
383
|
+
incidentSeverityId: args.defaultIncidentSeverityId,
|
|
384
|
+
alertSeverityId: args.defaultAlertSeverityId,
|
|
385
|
+
monitorName: args.monitorName,
|
|
386
|
+
metricAlias,
|
|
387
|
+
filterType: FilterType.GreaterThan,
|
|
388
|
+
value: 70,
|
|
389
|
+
incidentTitle: `[IoT] High Temperature (>70°C) - ${args.monitorName}`,
|
|
390
|
+
incidentDescription: `An IoT device is reporting a temperature above 70°C. Overheating can damage the device, shorten battery life, and corrupt readings. Check the root cause for the affected device id, then verify ventilation, ambient conditions, and the device's workload.`,
|
|
391
|
+
criteriaName: "High Temperature - iot_temperature_celsius > 70",
|
|
392
|
+
criteriaDescription: "Triggers when any device's temperature exceeds 70°C over the monitoring window.",
|
|
393
|
+
}),
|
|
394
|
+
onlineCriteriaInstance: buildIoTOnlineCriteriaInstance({
|
|
395
|
+
onlineMonitorStatusId: args.onlineMonitorStatusId,
|
|
396
|
+
metricAlias,
|
|
397
|
+
filterType: FilterType.LessThanOrEqualTo,
|
|
398
|
+
value: 70,
|
|
399
|
+
}),
|
|
400
|
+
});
|
|
401
|
+
},
|
|
402
|
+
};
|
|
403
|
+
const highCpuTemplate = {
|
|
404
|
+
id: "iot-high-cpu",
|
|
405
|
+
name: "High CPU Usage",
|
|
406
|
+
description: "Alert when any IoT device's CPU usage exceeds 90% (iot_cpu_usage_ratio > 0.9). One incident per device, grouped by device.id.",
|
|
407
|
+
category: "System",
|
|
408
|
+
severity: "Warning",
|
|
409
|
+
getMonitorStep: (args) => {
|
|
410
|
+
const metricAlias = "cpu_usage";
|
|
411
|
+
return buildIoTMonitorStep({
|
|
412
|
+
iotMonitor: buildIoTMonitorConfig({
|
|
413
|
+
fleetIdentifier: args.fleetIdentifier,
|
|
414
|
+
metricName: "iot_cpu_usage_ratio",
|
|
415
|
+
metricAlias,
|
|
416
|
+
rollingTime: RollingTime.Past5Minutes,
|
|
417
|
+
/*
|
|
418
|
+
* Avg per device — iot_cpu_usage_ratio is already a true 0-1 ratio
|
|
419
|
+
* (one series per device), so the per-minute average is the
|
|
420
|
+
* sustained utilization regardless of push count.
|
|
421
|
+
*/
|
|
422
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
423
|
+
attributes: {},
|
|
424
|
+
groupByAttributeKey: "device.id",
|
|
425
|
+
}),
|
|
426
|
+
offlineCriteriaInstance: buildIoTOfflineCriteriaInstance({
|
|
427
|
+
offlineMonitorStatusId: args.offlineMonitorStatusId,
|
|
428
|
+
incidentSeverityId: args.defaultIncidentSeverityId,
|
|
429
|
+
alertSeverityId: args.defaultAlertSeverityId,
|
|
430
|
+
monitorName: args.monitorName,
|
|
431
|
+
metricAlias,
|
|
432
|
+
filterType: FilterType.GreaterThan,
|
|
433
|
+
value: 0.9,
|
|
434
|
+
incidentTitle: `[IoT] High CPU Usage (>90%) - ${args.monitorName}`,
|
|
435
|
+
incidentDescription: `An IoT device's CPU usage has exceeded 90% of its capacity. Sustained high CPU can delay telemetry, drain the battery faster, and cause the device to become unresponsive. Check the root cause for the affected device id, then investigate the workload running on the device.`,
|
|
436
|
+
criteriaName: "High CPU - iot_cpu_usage_ratio > 0.9",
|
|
437
|
+
criteriaDescription: "Triggers when any device's average CPU usage ratio exceeds 0.9 over the monitoring window.",
|
|
438
|
+
}),
|
|
439
|
+
onlineCriteriaInstance: buildIoTOnlineCriteriaInstance({
|
|
440
|
+
onlineMonitorStatusId: args.onlineMonitorStatusId,
|
|
441
|
+
metricAlias,
|
|
442
|
+
filterType: FilterType.LessThanOrEqualTo,
|
|
443
|
+
value: 0.9,
|
|
444
|
+
}),
|
|
445
|
+
});
|
|
446
|
+
},
|
|
447
|
+
};
|
|
448
|
+
export function getAllIoTAlertTemplates() {
|
|
449
|
+
return [
|
|
450
|
+
deviceOfflineTemplate,
|
|
451
|
+
lowBatteryTemplate,
|
|
452
|
+
weakSignalTemplate,
|
|
453
|
+
highTemperatureTemplate,
|
|
454
|
+
highCpuTemplate,
|
|
455
|
+
];
|
|
456
|
+
}
|
|
457
|
+
export function getIoTAlertTemplatesByCategory(category) {
|
|
458
|
+
return getAllIoTAlertTemplates().filter((template) => {
|
|
459
|
+
return template.category === category;
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
export function getIoTAlertTemplateById(id) {
|
|
463
|
+
return getAllIoTAlertTemplates().find((template) => {
|
|
464
|
+
return template.id === id;
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
//# sourceMappingURL=IotAlertTemplates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IotAlertTemplates.js","sourceRoot":"","sources":["../../../../Types/Monitor/IotAlertTemplates.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAA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;gBAClC,KAAK,EAAE,GAAG;gBACV,aAAa,EAAE,iCAAiC,IAAI,CAAC,WAAW,EAAE;gBAClE,mBAAmB,EAAE,kRAAkR;gBACvS,YAAY,EAAE,sCAAsC;gBACpD,mBAAmB,EACjB,4FAA4F;aAC/F,CAAC;YACF,sBAAsB,EAAE,8BAA8B,CAAC;gBACrD,qBAAqB,EAAE,IAAI,CAAC,qBAAqB;gBACjD,WAAW;gBACX,UAAU,EAAE,UAAU,CAAC,iBAAiB;gBACxC,KAAK,EAAE,GAAG;aACX,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF,CAAC;AAEF,MAAM,UAAU,uBAAuB;IACrC,OAAO;QACL,qBAAqB;QACrB,kBAAkB;QAClB,kBAAkB;QAClB,uBAAuB;QACvB,eAAe;KAChB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,8BAA8B,CAC5C,QAAkC;IAElC,OAAO,uBAAuB,EAAE,CAAC,MAAM,CAAC,CAAC,QAA0B,EAAE,EAAE;QACrE,OAAO,QAAQ,CAAC,QAAQ,KAAK,QAAQ,CAAC;IACxC,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,EAAU;IAEV,OAAO,uBAAuB,EAAE,CAAC,IAAI,CAAC,CAAC,QAA0B,EAAE,EAAE;QACnE,OAAO,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { IoTResourceScope } from "./MonitorStepIoTMonitor";
|
|
2
|
+
import MetricsAggregationType from "../Metrics/MetricsAggregationType";
|
|
3
|
+
/*
|
|
4
|
+
* Metric names follow the OneUptime IoT naming scheme. Each series carries a
|
|
5
|
+
* `device.id` datapoint label identifying the IoT device it belongs to, plus
|
|
6
|
+
* the agent stamps `iot.scope` (fleet | device), `iot.device.type` and
|
|
7
|
+
* `iot.device.kind` as datapoint attributes — `defaultResourceScope` is the
|
|
8
|
+
* `iot.scope` value the metric is usually filtered to (Fleet = spans the whole
|
|
9
|
+
* fleet; don't pre-filter).
|
|
10
|
+
*/
|
|
11
|
+
const iotMetricCatalog = [
|
|
12
|
+
// Availability Metrics
|
|
13
|
+
{
|
|
14
|
+
id: "iot-device-up",
|
|
15
|
+
friendlyName: "Device Up",
|
|
16
|
+
description: "Whether an IoT device is up (1) or down/offline (0). Reported per device — filter on the device.id label to scope to one device.",
|
|
17
|
+
metricName: "iot_device_up",
|
|
18
|
+
category: "Availability",
|
|
19
|
+
defaultAggregation: MetricsAggregationType.Min,
|
|
20
|
+
defaultResourceScope: IoTResourceScope.Device,
|
|
21
|
+
},
|
|
22
|
+
// Power Metrics
|
|
23
|
+
{
|
|
24
|
+
id: "iot-battery-percent",
|
|
25
|
+
friendlyName: "Battery Level",
|
|
26
|
+
description: "Remaining battery charge of a device as a percentage (0 to 100). Falling levels indicate a device that will soon go offline.",
|
|
27
|
+
metricName: "iot_battery_percent",
|
|
28
|
+
category: "Power",
|
|
29
|
+
defaultAggregation: MetricsAggregationType.Avg,
|
|
30
|
+
defaultResourceScope: IoTResourceScope.Device,
|
|
31
|
+
unit: "%",
|
|
32
|
+
},
|
|
33
|
+
// Connectivity Metrics
|
|
34
|
+
{
|
|
35
|
+
id: "iot-signal-strength",
|
|
36
|
+
friendlyName: "Signal Strength",
|
|
37
|
+
description: "Wireless signal strength of a device in dBm (closer to 0 is stronger; more negative is weaker). Weak signal precedes connectivity loss.",
|
|
38
|
+
metricName: "iot_signal_strength_dbm",
|
|
39
|
+
category: "Connectivity",
|
|
40
|
+
defaultAggregation: MetricsAggregationType.Avg,
|
|
41
|
+
defaultResourceScope: IoTResourceScope.Device,
|
|
42
|
+
unit: "dBm",
|
|
43
|
+
},
|
|
44
|
+
// Environment Metrics
|
|
45
|
+
{
|
|
46
|
+
id: "iot-temperature",
|
|
47
|
+
friendlyName: "Temperature",
|
|
48
|
+
description: "Temperature reported by a device in degrees Celsius. High readings can indicate overheating hardware or an environmental issue.",
|
|
49
|
+
metricName: "iot_temperature_celsius",
|
|
50
|
+
category: "Environment",
|
|
51
|
+
defaultAggregation: MetricsAggregationType.Avg,
|
|
52
|
+
defaultResourceScope: IoTResourceScope.Device,
|
|
53
|
+
unit: "°C",
|
|
54
|
+
},
|
|
55
|
+
// System Metrics
|
|
56
|
+
{
|
|
57
|
+
id: "iot-cpu-usage",
|
|
58
|
+
friendlyName: "CPU Usage Ratio",
|
|
59
|
+
description: "CPU usage of a device as a ratio of available CPU (0 to 1, where 1 = fully used).",
|
|
60
|
+
metricName: "iot_cpu_usage_ratio",
|
|
61
|
+
category: "System",
|
|
62
|
+
defaultAggregation: MetricsAggregationType.Avg,
|
|
63
|
+
defaultResourceScope: IoTResourceScope.Device,
|
|
64
|
+
unit: "ratio",
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
id: "iot-memory-usage",
|
|
68
|
+
friendlyName: "Memory Usage",
|
|
69
|
+
description: "Memory currently in use by a device, in bytes. Compare against the device's total memory to gauge memory pressure.",
|
|
70
|
+
metricName: "iot_memory_usage_bytes",
|
|
71
|
+
category: "System",
|
|
72
|
+
defaultAggregation: MetricsAggregationType.Avg,
|
|
73
|
+
defaultResourceScope: IoTResourceScope.Device,
|
|
74
|
+
unit: "bytes",
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: "iot-uptime",
|
|
78
|
+
friendlyName: "Uptime",
|
|
79
|
+
description: "How long a device has been running. Drops to zero when the device is restarted or rebooted.",
|
|
80
|
+
metricName: "iot_uptime_seconds",
|
|
81
|
+
category: "System",
|
|
82
|
+
defaultAggregation: MetricsAggregationType.Max,
|
|
83
|
+
defaultResourceScope: IoTResourceScope.Device,
|
|
84
|
+
unit: "s",
|
|
85
|
+
},
|
|
86
|
+
];
|
|
87
|
+
export function getAllIoTMetrics() {
|
|
88
|
+
return iotMetricCatalog;
|
|
89
|
+
}
|
|
90
|
+
export function getIoTMetricsByCategory(category) {
|
|
91
|
+
return iotMetricCatalog.filter((m) => {
|
|
92
|
+
return m.category === category;
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
export function getIoTMetricById(id) {
|
|
96
|
+
return iotMetricCatalog.find((m) => {
|
|
97
|
+
return m.id === id;
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
export function getIoTMetricByMetricName(metricName) {
|
|
101
|
+
return iotMetricCatalog.find((m) => {
|
|
102
|
+
return m.metricName === metricName;
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
export function getAllIoTMetricCategories() {
|
|
106
|
+
return ["Availability", "Power", "Connectivity", "Environment", "System"];
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=IotMetricCatalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IotMetricCatalog.js","sourceRoot":"","sources":["../../../../Types/Monitor/IotMetricCatalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,sBAAsB,MAAM,mCAAmC,CAAC;AAoBvE;;;;;;;GAOG;AACH,MAAM,gBAAgB,GAA+B;IACnD,uBAAuB;IACvB;QACE,EAAE,EAAE,eAAe;QACnB,YAAY,EAAE,WAAW;QACzB,WAAW,EACT,kIAAkI;QACpI,UAAU,EAAE,eAAe;QAC3B,QAAQ,EAAE,cAAc;QACxB,kBAAkB,EAAE,sBAAsB,CAAC,GAAG;QAC9C,oBAAoB,EAAE,gBAAgB,CAAC,MAAM;KAC9C;IAED,gBAAgB;IAChB;QACE,EAAE,EAAE,qBAAqB;QACzB,YAAY,EAAE,eAAe;QAC7B,WAAW,EACT,8HAA8H;QAChI,UAAU,EAAE,qBAAqB;QACjC,QAAQ,EAAE,OAAO;QACjB,kBAAkB,EAAE,sBAAsB,CAAC,GAAG;QAC9C,oBAAoB,EAAE,gBAAgB,CAAC,MAAM;QAC7C,IAAI,EAAE,GAAG;KACV;IAED,uBAAuB;IACvB;QACE,E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