feat(atlas): implement comprehensive MongoDB Atlas alerting system#3
Merged
Conversation
Add complete alert configuration and management capabilities with both CLI and YAML ApplyDocument support. This feature provides critical monitoring and notification functionality for MongoDB Atlas infrastructure. BREAKING CHANGE: None - This is a new feature addition. - `matlas atlas alerts list/get/acknowledge` - Alert monitoring and management - `matlas atlas alert-configurations list/get/delete/matcher-fields` - Configuration CRUD operations - AlertConfiguration kind for declarative alert management - Alert kind for read-only alert status information - Full ApplyDocument integration with validation - EMAIL, SMS, SLACK, PAGER_DUTY, OPS_GENIE, DATADOG - MICROSOFT_TEAMS, WEBHOOK, USER, GROUP, TEAM - EQUALS, NOT_EQUALS, CONTAINS, NOT_CONTAINS - STARTS_WITH, ENDS_WITH, REGEX, NOT_REGEX - MetricThreshold: CPU, memory, disk usage with AVERAGE/TOTAL modes - GeneralThreshold: Simple numeric thresholds for events - AlertsService: Alert operations (list, get, acknowledge) - AlertConfigurationsService: Full CRUD for alert configurations - Bidirectional conversion between internal and Atlas SDK types - AlertConfig: Complete configuration structure - AlertMatcher: Rule-based targeting system - AlertNotification: Multi-channel notification support - AlertMetricThreshold/AlertThreshold: Flexible threshold system - Comprehensive field validation and type checking - Enum validation for operators and notification types - Range validation for thresholds and numeric fields - internal/types/apply.go: Added KindAlert and KindAlertConfiguration - internal/types/config.go: Alert configuration type definitions - internal/services/atlas/alerts.go: Alert operations service - internal/services/atlas/alert_configurations.go: Configuration service - internal/apply/validation.go: Alert validation functions - cmd/atlas/alerts/alerts.go: Alert management commands - cmd/atlas/alerts/alert_configurations.go: Configuration commands - cmd/atlas/atlas.go: Integration with main atlas command - docs/alerts.md: Complete alerting documentation - docs/examples/alerts.md: Usage examples and patterns - examples/alert-*.yaml: 4 comprehensive example configurations - features/2025-08-30-alerting-system.md: Feature specification - scripts/test/alerts-lifecycle.sh: Comprehensive test suite - .github/workflows/release.yml: Updated CI configuration - Alert configuration CRUD operations - All notification channel types and matcher operators - Threshold configurations and validation - YAML parsing and ApplyDocument integration - Error handling and edge cases - Baseline integrity verification - Atlas Go SDK AlertConfigurationsApi and AlertsApi - Full matlas infra apply/plan/diff/validate support - Consistent CLI patterns and output formatting - Environment variable support for sensitive credentials Closes: Related to monitoring and alerting infrastructure requirements Refs: Feature specification in features/2025-08-30-alerting-system.md
|
🎉 This PR is included in version 2.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add complete alert configuration and management capabilities with both CLI and YAML ApplyDocument support. This feature provides critical monitoring and notification functionality for MongoDB Atlas infrastructure.
BREAKING CHANGE: None - This is a new feature addition.
matlas atlas alerts list/get/acknowledge- Alert monitoring and managementmatlas atlas alert-configurations list/get/delete/matcher-fields- Configuration CRUD operationsAlertConfiguration kind for declarative alert management
Alert kind for read-only alert status information
Full ApplyDocument integration with validation
EMAIL, SMS, SLACK, PAGER_DUTY, OPS_GENIE, DATADOG
MICROSOFT_TEAMS, WEBHOOK, USER, GROUP, TEAM
EQUALS, NOT_EQUALS, CONTAINS, NOT_CONTAINS
STARTS_WITH, ENDS_WITH, REGEX, NOT_REGEX
MetricThreshold: CPU, memory, disk usage with AVERAGE/TOTAL modes
GeneralThreshold: Simple numeric thresholds for events
AlertsService: Alert operations (list, get, acknowledge)
AlertConfigurationsService: Full CRUD for alert configurations
Bidirectional conversion between internal and Atlas SDK types
AlertConfig: Complete configuration structure
AlertMatcher: Rule-based targeting system
AlertNotification: Multi-channel notification support
AlertMetricThreshold/AlertThreshold: Flexible threshold system
Comprehensive field validation and type checking
Enum validation for operators and notification types
Range validation for thresholds and numeric fields
internal/types/apply.go: Added KindAlert and KindAlertConfiguration
internal/types/config.go: Alert configuration type definitions
internal/services/atlas/alerts.go: Alert operations service
internal/services/atlas/alert_configurations.go: Configuration service
internal/apply/validation.go: Alert validation functions
cmd/atlas/alerts/alerts.go: Alert management commands
cmd/atlas/alerts/alert_configurations.go: Configuration commands
cmd/atlas/atlas.go: Integration with main atlas command
docs/alerts.md: Complete alerting documentation
docs/examples/alerts.md: Usage examples and patterns
examples/alert-*.yaml: 4 comprehensive example configurations
features/2025-08-30-alerting-system.md: Feature specification
scripts/test/alerts-lifecycle.sh: Comprehensive test suite
.github/workflows/release.yml: Updated CI configuration
Alert configuration CRUD operations
All notification channel types and matcher operators
Threshold configurations and validation
YAML parsing and ApplyDocument integration
Error handling and edge cases
Baseline integrity verification
Atlas Go SDK AlertConfigurationsApi and AlertsApi
Full matlas infra apply/plan/diff/validate support
Consistent CLI patterns and output formatting
Environment variable support for sensitive credentials
Closes: Related to monitoring and alerting infrastructure requirements
Refs: Feature specification in features/2025-08-30-alerting-system.md