SlideShare a Scribd company logo
1 of 12
By Ramakrishna Narkedamilli
Mule Management Console ( MMC ) is a great tool to deploy Mule
applications and control. Using MMC you can perform many operations like
Deploy, Un deploy, Redeploy along with Monitoring of flows etc.
MMC provides options to monitor the failing flows and inform people about
failures. In MMC Alert mechanism you can create Alert definitions for
different types of exceptions and send mail to people using Alert
notifications.
Typically MMC will raise alerts for each exception it encountered on the
configured deployed applications. There is no intelligent mechanism on MMC
itself to raise the Alerts based on exception ratio ( Based on no of service calls
and no of failures among that )
Unfortunately there is no ‘out of the box’ MMC feature to solve this, so we have
to cater for it ourselves. Luckily Mule provides some APIs that give us good
statistical information. Using these APIs, we can write a small class that calculates
the ratio of the error messages coming in a flow compared to the messages that
were processed successfully.
To Monitoring the consistently failing flows from MMC and raising alerts on ratio
based instead of for each exception, we can add
1) Java class to calculate the ratio.
2) Spring code to call the Java class for a period of time Continuously.
3) Spring code to expose value as Mbean
4) Alert creation in MMC for the JMX value (Mbean)
Now Will see how to Implement this
Consider a simple web service like below
Now we will write Java code that calculate the failure ratio
The idea is to have the monitor() method execute every couple of seconds.
On each execution, we receive updated statistics of execution errors versus
completed executions. From these values, we subtract the same values
recorded in the previous run so that we get the values for just this period.
Once this calculation is complete, we divide the errors with the total
events to get a ratio of the two values. If the ratio exceeds a certain
threshold (by default set to 0.5), then the String class variable
constantlyFailingString is set to true.
Having the monitoring code ready, we need to instruct Mule to execute
this code every few seconds; 10 seconds for example . We also need to tell
ConsistentlyFailingMonitor which Flow to monitor. Spring comes in very
handy to do just that. Spring code we need add the in the simple web
service mule flow and it follows like
Below XML code shows the call of Java code for every 20000 milliseconds time
So at this stage, we have a class monitoring our flow for a stream of
consistently failing messages. This is all well and good, but we need a way to
raise an alert if our flow is failing. For this will use JMX attribute. The value of
ratio we stored in a variable that we need to expose as a Bean, SO MMC will
monitor bean and if it crossed the mentioned thresh hold value, it will raise
Alert.
To expose as Bean again we need to use Spring and the XML code follows like
below
To Review what ever done, it follows like
1) We created sample web service.
2) We created Java code to monitor the failures and calculate ratio.
3) Configured Spring code in Mule flow, to call the Java code continuously.
4) Configured Spring code to expose the Ration Value as bean.
After these steps, below steps need be done in MMC
5) Create alert definition for the JMX value and configure the threshold value.
Whenever the JMX value (Ration value ) crosses the threshold value, MMC will
raise Alert.
I hope this will help.
THANK YOU
By Ramakrishna Narkedamilli

More Related Content

Similar to MMC control for failing flows consistently

Moving towards Reactive Programming
Moving towards Reactive ProgrammingMoving towards Reactive Programming
Moving towards Reactive ProgrammingDeepak Shevani
 
Tips and Tricks for new async web client capabilities on model driven apps
Tips and Tricks for new async web client capabilities on model driven appsTips and Tricks for new async web client capabilities on model driven apps
Tips and Tricks for new async web client capabilities on model driven appsMehdi El Amri
 
SAS Macros part 1
SAS Macros part 1SAS Macros part 1
SAS Macros part 1venkatam
 
Loadrunner interview questions and answers
Loadrunner interview questions and answersLoadrunner interview questions and answers
Loadrunner interview questions and answersGaruda Trainings
 
MUnit Testing With Mulesoft (Mock Message Processor)-Part II
MUnit Testing With Mulesoft (Mock Message Processor)-Part II MUnit Testing With Mulesoft (Mock Message Processor)-Part II
MUnit Testing With Mulesoft (Mock Message Processor)-Part II Jitendra Bafna
 
Flowsinmule 160517130818
Flowsinmule 160517130818Flowsinmule 160517130818
Flowsinmule 160517130818ppts123456
 
CV_Amit_Bhanegaonkar_BE._with_4.11_years_of_experience_in_Software_Testing
CV_Amit_Bhanegaonkar_BE._with_4.11_years_of_experience_in_Software_TestingCV_Amit_Bhanegaonkar_BE._with_4.11_years_of_experience_in_Software_Testing
CV_Amit_Bhanegaonkar_BE._with_4.11_years_of_experience_in_Software_TestingAmit Bhanegaonkar
 
Roboconf Detailed Presentation
Roboconf Detailed PresentationRoboconf Detailed Presentation
Roboconf Detailed PresentationVincent Zurczak
 
Broker Pattern Backbone of Distributed Processing
Broker Pattern Backbone of Distributed ProcessingBroker Pattern Backbone of Distributed Processing
Broker Pattern Backbone of Distributed ProcessingNilay Mishra
 
Component based message alerting on as abap scn
Component based message alerting on as abap   scnComponent based message alerting on as abap   scn
Component based message alerting on as abap scnPradeep Tiwary
 
Common Sense Driven Development
Common Sense Driven DevelopmentCommon Sense Driven Development
Common Sense Driven DevelopmentBozhidar Bozhanov
 
Software defect estimation using machine learning algorithms
Software defect estimation using machine learning algorithmsSoftware defect estimation using machine learning algorithms
Software defect estimation using machine learning algorithmsVenkat Projects
 
Software defect estimation using machine learning algorithms
Software defect estimation using machine learning algorithmsSoftware defect estimation using machine learning algorithms
Software defect estimation using machine learning algorithmsVenkat Projects
 
Dynamic autoselection and autotuning of machine learning models forcloud netw...
Dynamic autoselection and autotuning of machine learning models forcloud netw...Dynamic autoselection and autotuning of machine learning models forcloud netw...
Dynamic autoselection and autotuning of machine learning models forcloud netw...Venkat Projects
 
Microservices in Action: putting microservice-based applications into production
Microservices in Action: putting microservice-based applications into productionMicroservices in Action: putting microservice-based applications into production
Microservices in Action: putting microservice-based applications into productionManning Publications
 
Model Execution and System Simulation
Model Execution and System SimulationModel Execution and System Simulation
Model Execution and System SimulationObeo
 

Similar to MMC control for failing flows consistently (20)

Moving towards Reactive Programming
Moving towards Reactive ProgrammingMoving towards Reactive Programming
Moving towards Reactive Programming
 
Tips and Tricks for new async web client capabilities on model driven apps
Tips and Tricks for new async web client capabilities on model driven appsTips and Tricks for new async web client capabilities on model driven apps
Tips and Tricks for new async web client capabilities on model driven apps
 
SAS Macros part 1
SAS Macros part 1SAS Macros part 1
SAS Macros part 1
 
Loadrunner interview questions and answers
Loadrunner interview questions and answersLoadrunner interview questions and answers
Loadrunner interview questions and answers
 
Flows in mule
Flows in muleFlows in mule
Flows in mule
 
Jmh
JmhJmh
Jmh
 
MUnit Testing With Mulesoft (Mock Message Processor)-Part II
MUnit Testing With Mulesoft (Mock Message Processor)-Part II MUnit Testing With Mulesoft (Mock Message Processor)-Part II
MUnit Testing With Mulesoft (Mock Message Processor)-Part II
 
selenium_master.pdf
selenium_master.pdfselenium_master.pdf
selenium_master.pdf
 
Flowsinmule 160517130818
Flowsinmule 160517130818Flowsinmule 160517130818
Flowsinmule 160517130818
 
CV_Amit_Bhanegaonkar_BE._with_4.11_years_of_experience_in_Software_Testing
CV_Amit_Bhanegaonkar_BE._with_4.11_years_of_experience_in_Software_TestingCV_Amit_Bhanegaonkar_BE._with_4.11_years_of_experience_in_Software_Testing
CV_Amit_Bhanegaonkar_BE._with_4.11_years_of_experience_in_Software_Testing
 
Roboconf Detailed Presentation
Roboconf Detailed PresentationRoboconf Detailed Presentation
Roboconf Detailed Presentation
 
Broker Pattern Backbone of Distributed Processing
Broker Pattern Backbone of Distributed ProcessingBroker Pattern Backbone of Distributed Processing
Broker Pattern Backbone of Distributed Processing
 
Component based message alerting on as abap scn
Component based message alerting on as abap   scnComponent based message alerting on as abap   scn
Component based message alerting on as abap scn
 
Common Sense Driven Development
Common Sense Driven DevelopmentCommon Sense Driven Development
Common Sense Driven Development
 
Software defect estimation using machine learning algorithms
Software defect estimation using machine learning algorithmsSoftware defect estimation using machine learning algorithms
Software defect estimation using machine learning algorithms
 
Software defect estimation using machine learning algorithms
Software defect estimation using machine learning algorithmsSoftware defect estimation using machine learning algorithms
Software defect estimation using machine learning algorithms
 
Dynamic autoselection and autotuning of machine learning models forcloud netw...
Dynamic autoselection and autotuning of machine learning models forcloud netw...Dynamic autoselection and autotuning of machine learning models forcloud netw...
Dynamic autoselection and autotuning of machine learning models forcloud netw...
 
Microservices in Action: putting microservice-based applications into production
Microservices in Action: putting microservice-based applications into productionMicroservices in Action: putting microservice-based applications into production
Microservices in Action: putting microservice-based applications into production
 
SAS Macro
SAS MacroSAS Macro
SAS Macro
 
Model Execution and System Simulation
Model Execution and System SimulationModel Execution and System Simulation
Model Execution and System Simulation
 

More from Ramakrishna Narkedamilli

More from Ramakrishna Narkedamilli (9)

Enabling Security For ActiveMQ JMX Access
Enabling Security For ActiveMQ JMX AccessEnabling Security For ActiveMQ JMX Access
Enabling Security For ActiveMQ JMX Access
 
Mule Requester Usage Demo
Mule Requester Usage DemoMule Requester Usage Demo
Mule Requester Usage Demo
 
Mule Integration with Dropbox
Mule Integration with DropboxMule Integration with Dropbox
Mule Integration with Dropbox
 
Mule ESB integration with Stripe
Mule ESB integration with StripeMule ESB integration with Stripe
Mule ESB integration with Stripe
 
Activemq installation and master slave setup using shared broker data
Activemq installation and master slave setup using shared broker dataActivemq installation and master slave setup using shared broker data
Activemq installation and master slave setup using shared broker data
 
Mule integration with Servicenow
Mule integration with ServicenowMule integration with Servicenow
Mule integration with Servicenow
 
Active mq Installation and Master Slave setup
Active mq Installation and Master Slave setupActive mq Installation and Master Slave setup
Active mq Installation and Master Slave setup
 
Custom connector development using mule DevKit
Custom connector development using mule DevKitCustom connector development using mule DevKit
Custom connector development using mule DevKit
 
Salesforce Integration Using javacode
Salesforce Integration Using javacodeSalesforce Integration Using javacode
Salesforce Integration Using javacode
 

Recently uploaded

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

Recently uploaded (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

MMC control for failing flows consistently

  • 2. Mule Management Console ( MMC ) is a great tool to deploy Mule applications and control. Using MMC you can perform many operations like Deploy, Un deploy, Redeploy along with Monitoring of flows etc. MMC provides options to monitor the failing flows and inform people about failures. In MMC Alert mechanism you can create Alert definitions for different types of exceptions and send mail to people using Alert notifications.
  • 3. Typically MMC will raise alerts for each exception it encountered on the configured deployed applications. There is no intelligent mechanism on MMC itself to raise the Alerts based on exception ratio ( Based on no of service calls and no of failures among that )
  • 4. Unfortunately there is no ‘out of the box’ MMC feature to solve this, so we have to cater for it ourselves. Luckily Mule provides some APIs that give us good statistical information. Using these APIs, we can write a small class that calculates the ratio of the error messages coming in a flow compared to the messages that were processed successfully. To Monitoring the consistently failing flows from MMC and raising alerts on ratio based instead of for each exception, we can add 1) Java class to calculate the ratio. 2) Spring code to call the Java class for a period of time Continuously. 3) Spring code to expose value as Mbean 4) Alert creation in MMC for the JMX value (Mbean) Now Will see how to Implement this
  • 5. Consider a simple web service like below
  • 6. Now we will write Java code that calculate the failure ratio
  • 7.
  • 8. The idea is to have the monitor() method execute every couple of seconds. On each execution, we receive updated statistics of execution errors versus completed executions. From these values, we subtract the same values recorded in the previous run so that we get the values for just this period. Once this calculation is complete, we divide the errors with the total events to get a ratio of the two values. If the ratio exceeds a certain threshold (by default set to 0.5), then the String class variable constantlyFailingString is set to true. Having the monitoring code ready, we need to instruct Mule to execute this code every few seconds; 10 seconds for example . We also need to tell ConsistentlyFailingMonitor which Flow to monitor. Spring comes in very handy to do just that. Spring code we need add the in the simple web service mule flow and it follows like
  • 9. Below XML code shows the call of Java code for every 20000 milliseconds time
  • 10. So at this stage, we have a class monitoring our flow for a stream of consistently failing messages. This is all well and good, but we need a way to raise an alert if our flow is failing. For this will use JMX attribute. The value of ratio we stored in a variable that we need to expose as a Bean, SO MMC will monitor bean and if it crossed the mentioned thresh hold value, it will raise Alert. To expose as Bean again we need to use Spring and the XML code follows like below
  • 11. To Review what ever done, it follows like 1) We created sample web service. 2) We created Java code to monitor the failures and calculate ratio. 3) Configured Spring code in Mule flow, to call the Java code continuously. 4) Configured Spring code to expose the Ration Value as bean. After these steps, below steps need be done in MMC 5) Create alert definition for the JMX value and configure the threshold value. Whenever the JMX value (Ration value ) crosses the threshold value, MMC will raise Alert. I hope this will help.
  • 12. THANK YOU By Ramakrishna Narkedamilli