Verify That Alertmanager Sends Notifications
Verify the configuration to ensure that alerts are properly routed to your communication platform, and the notifications are reaching the intended recipients.
Prerequisite
You have enabled an Alertmanager configuration for Slack or Microsoft Teams:
Send a Test Alert
Trigger a mock DKP Insights alert to confirm the configuration is successful.
Open a local port for the Alertmanager mock alert:
CODEkubectl -n kommander port-forward svc/kube-prometheus-stack-alertmanager 8083:9093
In another terminal session, send a mock alert to the open port:
CODEcurl -L 'http://localhost:8083/api/v2/alerts' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -d \ '[{ "labels": { "alertname": "Test Insight Alert", "namespace": "kommander", "status": "Open", "source": "Insights", "severity": "Critical", "cluster": "Kommander Host (Test)" }, "annotations": { "description": "This is a mock Insight for testing", "generatorURL": "https://test-endpoint.com", "categories": "Best-Practices, Configuration" } }]'
This sends a Critical mock Insights alert to Alertmanager, which triggers sending a notification to the configured communication platform.