Skip to content

Commit

Permalink
Merge pull request #178 from JoeyBarnes/main
Browse files Browse the repository at this point in the history
Fixed an issue in export-alerts.py and a misconfiguration for NetApp…
  • Loading branch information
judyer28 authored Mar 26, 2024
2 parents 2fb9a0d + 26ddcd4 commit c27f4aa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
1 change: 0 additions & 1 deletion services/NetApp/netAppAccounts/alerts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
27 changes: 15 additions & 12 deletions tooling/export-alerts/export-alerts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:

Expand Down

0 comments on commit c27f4aa

Please sign in to comment.