Skip to Content
Technical Articles

How to set immediate alert when Pipeline Job gets Failed

Hi everyone,

Background to this Article: 📰

I recently got a question from customer, How to get a real time alerts when there is event of failure job noticed and quickly alert their Internal teams who are experienced to resolve failed pipeline job or work with SAP Technical Support team.?  Do you have any solution to address my team ?

In today’s scenario, customer comes to identify the pipeline job failure after someone reports by logging into UI Pipeline workspace or the next day,  so the time and SLA is down..

Most of you will have to think in quick time in troubleshooting failed job when already time is crossed.. Situation will be like this


My Solution💡 to the above question is below & successfully implemented for customer request

The purpose of this article is to explain how to get Alerts when there is event of pipeline job gets failed in real time and saves time to resolve.

( Note : This is a custom solution for customers looking to implement real time alerts/notifications)

Prerequisites

For you to follow along with this, you will need:    (below is my favorites tools)

  • The Visual Studio Code installed on your machine
  • The latest Python version (Py) installed on your machine
  • SAP Commission user having RestAPI role to authenticate Pipeline Jobs
  • Scheduling Job for Python script to run every second ( Unix – Crontab – Preferred)
  • A basic understanding of writing Python language
  • Slack Channel for sending Alerts 💬

Python Script – Checks Status in Failed for jobs triggered current date.

Pipeline Status shows latest pipeline job got failed – Needs Urgent Attention

Script will get the latest job with results in JSON


How to send Real-time alerts to Admin ?

Read my earlier article

Install Slack, create your own Channel and create a web-hook to send notifications to your channel.
Python script will send a information to your channel through web-hook link in real time from auto scheduler .  you can find lot many source in the internet to know more details.

💬 Reference screenshot for above use case.

Lesson learnt from this : Customers expect personalized digital experiences to solve issues in quick time.

📌 Thank you for reading!. I feel much better. It’s good to be liked. (Hit Like Button). you can also share this blog through LinkedIn or twitter.

4 Comments
You must be Logged on to comment or reply to a post.