Skip to content

Commit 42a6cd9

Browse files
upcoming: [DI-27571] - Blockstorage onboarding for ACLP Alerts (#13048)
* upcoming: [DI-27571] - Blockstorage onboarding for ACLP Alerts * Addressing review comments * add changeset
1 parent 61c134d commit 42a6cd9

File tree

19 files changed

+938
-85
lines changed

19 files changed

+938
-85
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@linode/manager": Upcoming Features
3+
---
4+
5+
ACLP-Alerting: Onboarding Blockstorage service for ACLP Alerts ([#13048](https://github.com/linode/manager/pull/13048))

packages/manager/src/factories/cloudpulse/alerts.ts

Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,3 +360,222 @@ export const objectStorageMetricRules: MetricDefinition[] = [
360360
],
361361
},
362362
];
363+
364+
export const blockStorageMetricRules: MetricDefinition[] = [
365+
{
366+
label: 'Volume Read Operations',
367+
metric: 'volume_read_ops',
368+
unit: 'Count',
369+
metric_type: 'gauge',
370+
scrape_interval: '300s',
371+
is_alertable: true,
372+
available_aggregate_functions: ['avg'],
373+
dimensions: [
374+
{
375+
label: 'linode_id',
376+
dimension_label: 'linode_id',
377+
values: [],
378+
},
379+
],
380+
},
381+
{
382+
label: 'Volume Write Operations',
383+
metric: 'volume_write_ops',
384+
unit: 'Count',
385+
metric_type: 'gauge',
386+
scrape_interval: '300s',
387+
is_alertable: true,
388+
available_aggregate_functions: ['avg'],
389+
dimensions: [
390+
{
391+
label: 'linode_id',
392+
dimension_label: 'linode_id',
393+
values: [],
394+
},
395+
],
396+
},
397+
{
398+
label: 'Volume Read Bytes',
399+
metric: 'volume_read_bytes',
400+
unit: 'KB',
401+
metric_type: 'gauge',
402+
scrape_interval: '300s',
403+
is_alertable: true,
404+
available_aggregate_functions: ['avg'],
405+
dimensions: [
406+
{
407+
label: 'linode_id',
408+
dimension_label: 'linode_id',
409+
values: [],
410+
},
411+
],
412+
},
413+
{
414+
label: 'Volume Write Bytes',
415+
metric: 'volume_write_bytes',
416+
unit: 'KB',
417+
metric_type: 'gauge',
418+
scrape_interval: '300s',
419+
is_alertable: true,
420+
available_aggregate_functions: ['avg'],
421+
dimensions: [
422+
{
423+
label: 'linode_id',
424+
dimension_label: 'linode_id',
425+
values: [],
426+
},
427+
],
428+
},
429+
{
430+
label: 'Volume Read Latency p99',
431+
metric: 'volume_read_latency_p99',
432+
unit: 'ms',
433+
metric_type: 'gauge',
434+
scrape_interval: '300s',
435+
is_alertable: true,
436+
available_aggregate_functions: ['avg'],
437+
dimensions: [
438+
{
439+
label: 'linode_id',
440+
dimension_label: 'linode_id',
441+
values: [],
442+
},
443+
],
444+
},
445+
{
446+
label: 'Volume Read Latency p95',
447+
metric: 'volume_read_latency_p95',
448+
unit: 'ms',
449+
metric_type: 'gauge',
450+
scrape_interval: '300s',
451+
is_alertable: true,
452+
available_aggregate_functions: ['avg'],
453+
dimensions: [
454+
{
455+
label: 'linode_id',
456+
dimension_label: 'linode_id',
457+
values: [],
458+
},
459+
],
460+
},
461+
{
462+
label: 'Volume Read Latency p90',
463+
metric: 'volume_read_latency_p90',
464+
unit: 'ms',
465+
metric_type: 'gauge',
466+
scrape_interval: '300s',
467+
is_alertable: true,
468+
available_aggregate_functions: ['avg'],
469+
dimensions: [
470+
{
471+
label: 'linode_id',
472+
dimension_label: 'linode_id',
473+
values: [],
474+
},
475+
],
476+
},
477+
{
478+
label: 'Volume Read Latency p50',
479+
metric: 'volume_read_latency_p50',
480+
unit: 'ms',
481+
metric_type: 'gauge',
482+
scrape_interval: '300s',
483+
is_alertable: true,
484+
available_aggregate_functions: ['avg'],
485+
dimensions: [
486+
{
487+
label: 'linode_id',
488+
dimension_label: 'linode_id',
489+
values: [],
490+
},
491+
],
492+
},
493+
{
494+
label: 'Volume Write Latency p99',
495+
metric: 'volume_write_latency_p99',
496+
unit: 'ms',
497+
metric_type: 'gauge',
498+
scrape_interval: '300s',
499+
is_alertable: true,
500+
available_aggregate_functions: ['avg'],
501+
dimensions: [
502+
{
503+
label: 'linode_id',
504+
dimension_label: 'linode_id',
505+
values: [],
506+
},
507+
],
508+
},
509+
{
510+
label: 'Volume Write Latency p95',
511+
metric: 'volume_write_latency_p95',
512+
unit: 'ms',
513+
metric_type: 'gauge',
514+
scrape_interval: '300s',
515+
is_alertable: true,
516+
available_aggregate_functions: ['avg'],
517+
dimensions: [
518+
{
519+
label: 'linode_id',
520+
dimension_label: 'linode_id',
521+
values: [],
522+
},
523+
],
524+
},
525+
{
526+
label: 'Volume Write Latency p90',
527+
metric: 'volume_write_latency_p90',
528+
unit: 'ms',
529+
metric_type: 'gauge',
530+
scrape_interval: '300s',
531+
is_alertable: true,
532+
available_aggregate_functions: ['avg'],
533+
dimensions: [
534+
{
535+
label: 'linode_id',
536+
dimension_label: 'linode_id',
537+
values: [],
538+
},
539+
],
540+
},
541+
{
542+
label: 'Volume Write Latency p50',
543+
metric: 'volume_write_latency_p50',
544+
unit: 'ms',
545+
metric_type: 'gauge',
546+
scrape_interval: '300s',
547+
is_alertable: true,
548+
available_aggregate_functions: ['avg'],
549+
dimensions: [
550+
{
551+
label: 'linode_id',
552+
dimension_label: 'linode_id',
553+
values: [],
554+
},
555+
],
556+
},
557+
];
558+
559+
export const blockStorageMetricCriteria =
560+
Factory.Sync.makeFactory<AlertDefinitionMetricCriteria>({
561+
label: 'Volume Read Operations',
562+
metric: 'volume_read_ops',
563+
unit: 'Count',
564+
aggregate_function: 'avg',
565+
operator: 'gt',
566+
threshold: 1000,
567+
dimension_filters: [
568+
{
569+
label: 'linode_id',
570+
dimension_label: 'linode_id',
571+
operator: 'in',
572+
value: '1,2,3',
573+
},
574+
{
575+
label: 'linode_id',
576+
dimension_label: 'linode_id',
577+
operator: 'eq',
578+
value: '5',
579+
},
580+
],
581+
});

packages/manager/src/features/CloudPulse/Alerts/AlertsResources/AlertsResources.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ export const AlertResources = React.memo((props: AlertResourcesProp) => {
138138
if (
139139
serviceType === 'firewall' ||
140140
serviceType === 'objectstorage' ||
141+
serviceType === 'blockstorage' ||
141142
!supportedRegionIds?.length
142143
) {
143144
return undefined;
@@ -197,7 +198,11 @@ export const AlertResources = React.memo((props: AlertResourcesProp) => {
197198
);
198199

199200
const regionFilteredResources = React.useMemo(() => {
200-
if (serviceType === 'objectstorage' && resources && supportedRegionIds) {
201+
if (
202+
(serviceType === 'objectstorage' || serviceType === 'blockstorage') &&
203+
resources &&
204+
supportedRegionIds
205+
) {
201206
return getOfflineRegionFilteredResources(resources, supportedRegionIds);
202207
}
203208
return resources;

packages/manager/src/features/CloudPulse/Alerts/AlertsResources/constants.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,18 @@ export const serviceTypeBasedColumns: ServiceColumns<AlertInstance> = {
104104
sortingKey: 'endpoint',
105105
},
106106
],
107+
blockstorage: [
108+
{
109+
accessor: ({ label }) => label,
110+
label: 'Entity',
111+
sortingKey: 'label',
112+
},
113+
{
114+
accessor: ({ region }) => region,
115+
label: 'Region',
116+
sortingKey: 'region',
117+
},
118+
],
107119
};
108120

109121
export const serviceToFiltersMap: Partial<
@@ -125,6 +137,7 @@ export const serviceToFiltersMap: Partial<
125137
{ component: AlertsRegionFilter, filterKey: 'region' },
126138
{ component: AlertsEndpointFilter, filterKey: 'endpoint' },
127139
],
140+
blockstorage: [{ component: AlertsRegionFilter, filterKey: 'region' }],
128141
};
129142
export const applicableAdditionalFilterKeys: AlertAdditionalFilterKey[] = [
130143
'engineType', // Extendable in future for filter keys like 'tags', 'plan', etc.

0 commit comments

Comments
 (0)