Closed svevang closed 1 year ago
In the end I'd like the slack alarms to link to the log files. I think this PR gets us a bit closer.
It seems to get the reference to the log lines, I'd have to add one of these: https://github.com/PRX/Infrastructure/blob/ed1556a0b7cc6a64eb8ec4a372f2cf43f981306f/devops/tooling/chat-ops/cloudwatch-alarms/src/slack/log-groups.js#L11 to the alarm resources. Maybe?
Just to clarify my above question @farski. Is it possible to get the link to CloudWatch insights in slack ops-error message if I incorporate these alarms into the functionality described here? If so, I'll work up another smallish PR to get those links set up.
Yes, as long as the namespace that an alarm belongs to is in that list and the alarm includes the prx:ops:cloudwatch-log-group-name
tag with an appropriate value, the Slack messages will include a link to CloudWatch Logs Insights for the period the alarm covers. If you need to add any namespaces to that list, I wouldn't worry about a PR; just add them.
Fixes up the previous #669
This: