Skip to Content
Technical Articles
Author's profile photo Yogananda Muthaiah

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.

 

Thanks, for reading it till the end. 🙏


Hope you find that helpful! Let me know your thoughts on this in the comments section.
Don’t forget to share this article with your friends or colleagues.
Feel free to connect with me on any of the platforms below! 🚀

SAP |Twitter | LinkedIn | GitHub

Assigned Tags

      10 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Teja Thogaru
      Teja Thogaru

      Nice Article yoga.

      Author's profile photo Yogananda Muthaiah
      Yogananda Muthaiah
      Blog Post Author

      Thanks Mike!!

      Author's profile photo Praveen Gatakala
      Praveen Gatakala

      Nicely Explained!! Thank you Yoga.

      Author's profile photo Yogananda Muthaiah
      Yogananda Muthaiah
      Blog Post Author

      Thanks Praveen!!

      Author's profile photo Vijaya Rayapudi
      Vijaya Rayapudi

      Nice article, Yoga!! Thank you for sharing 🙂

      Author's profile photo Yogananda Muthaiah
      Yogananda Muthaiah
      Blog Post Author

      Thanks Vijaya Rayapudi !!!

      Author's profile photo Javier Miranda
      Javier Miranda

      Great Article Yoga!!, very useful for some customers needs

      Author's profile photo Yogananda Muthaiah
      Yogananda Muthaiah
      Blog Post Author

      Thanks Javier Miranda

      Author's profile photo Tas Cullen
      Tas Cullen

      Really good article. The only callout that I can see is that you'll need a dedicated host to run the script on, ensuring it's always on (particularly if you're sending notifications to a team, and not just yourself).

      Author's profile photo Yogananda Muthaiah
      Yogananda Muthaiah
      Blog Post Author

      Tas Cullen

      Thank you for reading the blog ! Keep circulating to your friends as well 🙂

      yes , you will have to deploy it VM box and have cronJob enabled or enable BTP Job Scheduling Services, so its always checks in every min and if it finds your filter.. it will push a notification to end user via 3rd Party communication channel.