Alerting/Notification is an essential part of Tech operations to make sure business continuity and mitigating the financial loss. Nevertheless, self-healing platforms(e.g Kubernetes) on the market, there are some cases that human intervention is indispensable.
In the mean time, proper alerting/notification system are crucial. E-mail notification quite outdated, and can be easily ignored by Operators due to sheer of
false positive alerts which yields
Slack is modern cloud-based communication and collaboration platform. Its aim to manage all of your business work in single place, in terms of communication and management. It has plenty of Apps by which, you can integrate it with other platforms(e.g Opsgenie).
Opsgenie is a cloud based alert and incident management system, it takes alerts and forwards/calls to correct person/team. It is highly intelligent system that
aggregates multiple alerts of the same to avoid
Opsgenie with other systems quite easy, thanks to their
RESTful API system. One example of it with Jenkins, in which I am sharing this blog post.
You can use Jenkins Shared Library in my GitHub repo to get notified/alerted in case of failure in your CI/CD Pipelines or cronjobs in Jenkins.
Example Jenkins Pipeline
Note: There is Jenkins plugins for Slack and Opsgenie, but I prefer to use this approach as it requires single plugin(HTTP Request Plugin), which is highly important not to face
Jenkins dependecy hell.
- Slack: Incoming Webhook enabled for desired Slack channel to notified from.
- Opsgenie: Restful API integration created and Enabled.
HTTP Request Pluginavailable in Jenkins instance.