diff --git a/services/NetApp/netAppAccounts/alerts.yaml b/services/NetApp/netAppAccounts/alerts.yaml index b1fde6e08..ed1d48a4b 100644 --- a/services/NetApp/netAppAccounts/alerts.yaml +++ b/services/NetApp/netAppAccounts/alerts.yaml @@ -55,7 +55,6 @@ criterionType: StaticThresholdCriterion threshold: 20.0 autoMitigate: false -- name: AverageWriteLatency - name: capacityPools/volumes - AverageWriteLatency description: Average write latency in milliseconds per operation type: Metric diff --git a/tooling/export-alerts/export-alerts.py b/tooling/export-alerts/export-alerts.py index f981c8357..ff12e2be1 100644 --- a/tooling/export-alerts/export-alerts.py +++ b/tooling/export-alerts/export-alerts.py @@ -141,18 +141,21 @@ def exportToXls(data, templateFile, outputFile): type ] - match alert['type'].lower(): - case 'metric': - wsMetric.append(columnsToAdd) - addAlertToSheet(alert, wsMetric) - case 'log': - wsLog.append(columnsToAdd) - addAlertToSheet(alert, wsLog) - case 'activitylog': - wsActivity.append(columnsToAdd) - addAlertToSheet(alert, wsActivity) - case _: - print('Unknown alert type: ' + alert['type']) + if 'type' in alert: + match alert['type'].lower(): + case 'metric': + wsMetric.append(columnsToAdd) + addAlertToSheet(alert, wsMetric) + case 'log': + wsLog.append(columnsToAdd) + addAlertToSheet(alert, wsLog) + case 'activitylog': + wsActivity.append(columnsToAdd) + addAlertToSheet(alert, wsActivity) + case _: + print('Unknown alert type: ' + alert['type']) + else: + print(f"No alert type for alert: {category} - {type} - {alert['name']}") for ws in [wsMetric, wsLog, wsActivity]: