SlideShare ist ein Scribd-Unternehmen logo
1 von 25
May 26th, 2021
¿Cómo generar e implementar
monitoreo para aplicaciones de
Mule?
Paola Alcantar Valdes
2
● About me
● What is a Health Monitoring
● Importance of implementing a Health Monitoring
● Health Monitoring application objectives
● Application metricts to watch
● Building a basic Health Monitoring for Mule Application
● How to implement a Health Monitoring Library in a Mule Application
● DEMO – Basic Health Monitoring for Mule Application
● Questions
Agenda
3
●Paola Alcantar Valdes
○ Jr. Integration Engineer with Mulesoft at Twitter
○ Mulesoft Certified Developer – Level 1 (Mule 4)
○ Over two years of experience as a Managed Services
About me
Importance of implementing a health monitoring
What is a Health Monitoring?
5
● What is a Health Monitoring?
○ It is an application that continually checks the status of an integration that is running.
● Differences between Application Health Monitoring and Application Health Checks:
○ Application Health Monitoring:
○ It is a good practice that allows collecting key metrics about different aspects of an application to
watch how it's working over time.
○ Application Health Checks:
○ Definition of “healthy” parameters based on regular checks information to ensure the system is
working the way it’s expected to.
○ Based on a business logic criteria, this should not be just “black“ or “white“
Health Monitoring
6
● Importance of implementing a Health Monitoring:
○ It allows you to detect issues before they become complete outages. It will help you to detect
incidents before they affect customers.
○ Building and implementing a health monitoring application will help you create an action plan if an
incident does pop up.
○ A health monitoring application will allow helping you to understand better the behavior of
applications, servers, external systems. Also, to close visibility and performance gaps, correct
processes, and ensure you're getting total value from your applications.
Health Monitoring
Application metricts to watch
Health Monitoring application
objectives
8
● There is no single way to build health monitoring for your applications. It is why different IT
teams will have different perspectives about the thing you need to care about. However, a
basic and useful health monitoring application might consider the following aspects.
○ Application’s general information: Get application name, application version, application environment,
mule runtime version, etc.
○ Memory Information: Get Heap Memory, Non-Heap Memory, Garbage Collection information from JVM.
○ Thread information: Return the number of demon threads, non-demon threads, and peak threads.
○ Overall availability (External systems): Retrieve the status of the external system with which the
application interacts (Know if external systems are up-and-running or not).
Health Monitoring application objectives
9
● Application’s general information:
Health Monitoring application objectives
%dw 2.0
output application/json
---
{
apiName: app.name,
apiVersion: p("apiVersion") default "",
env: p("env") default "",
runtimeVersion: mule.version,
startDate: ((app.muleContext.startDate default now()) as DateTime
{unit: "milliseconds"}),
timeZone: server.timeZone,
traceId: correlationId,
}
10
● Memory Information :
Health Monitoring application objectives
public static void heapMemoryDetails() {
MemoryMXBean memBean = ManagementFactory.getMemoryMXBean() ;
MemoryUsage heapMemoryUsage = memBean.getHeapMemoryUsage();
long heapInitSize = heapMemoryUsage.getInit();
long heapUsedSize = heapMemoryUsage.getUsed();
long heapCommitedSize = heapMemoryUsage.getCommitted();
long heapMaxSize = heapMemoryUsage.getMax();
}
11
● Garbage Collection Information :
Health Monitoring application objectives
public static ArrayList<GarbageCollection> garbageCollection(){
ArrayList<GarbageCollectorMXBean> memBean =
(ArrayList<GarbageCollectorMXBean>)
ManagementFactory.getGarbageCollectorMXBeans();
ArrayList<GarbageCollection> gc = new
ArrayList<GarbageCollection>();
for (GarbageCollectorMXBean garbageCollectorMXBean : memBean)
{
gc.add(new
GarbageCollection(garbageCollectorMXBean.getName(),
garbageCollectorMXBean.getCollectionCount(),
garbageCollectorMXBean.getCollectionTime()));
}
return gc;
}
12
● Thread information :
Health Monitoring application objectives
public static void threadInformation() {
int demonThreads =
ManagementFactory.getThreadMXBean().getDaemonThreadCount();
int peakThreads =
ManagementFactory.getThreadMXBean().getPeakThreadCount();
int threadCount =
ManagementFactory.getThreadMXBean().getThreadCount();
long startedThreadCount =
ManagementFactory.getThreadMXBean().getTotalStartedThreadCount();
}
Building a basic Health
Monitoring for Mule Application
14
1. Create a Mule 4 application.
2. Update the pom.xml file to define the “classifier” of the mule application as a “mule-plugin”.
3. Define the endpoints for the health monitoring library in a RAML Definition file. For example:
○ /health/application
○ /health/server
○ /health/thirdParty
○ /health/general
Walkthrough: How to build a Health Monitoring for
Mule Applications
See Health Monitoring RAML Definition
File
15
4. Define the response for each endpoint.
5. Generate Flows based on RAML Definition file.
6. Remove auto-generated HTTP Configuration.
7. Set “config-ref” value on HTTP Listener Configuration with “${health.http.config}”
Walkthrough: How to build a Health Monitoring for
Mule Applications
See Health Monitoring application
objectives
Note: Value of “health.http.config” property will be defined in each mule
application that implements health monitoring library.
16
8. Get objective keys related to each endpoint.
9. Generate dataweave scripts to format endpoint responses. For example:
10. Install our health monitoring plugin into a repository using command mvn clean install.
11. Implement health monitoring library following next steps.
Walkthrough: How to build a Health Monitoring for
Mule Applications
See Health Monitoring RAML Definition
File
%dw 2.0
output application/json
---
{
apiName: app.name,
apiVersion: p("apiVersion") default "",
env: p("env") default "",
runtimeVersion: mule.version,
startDate: ((app.muleContext.startDate default now()) as DateTime {unit: "milliseconds"}),
timeZone: server.timeZone,
traceId: correlationId,
}
How to implement a Health
Monitoring Library in a Mule
Application
Walkthrough: How to implement a Health
Monitoring Library
1. Add the Health Monitoring library dependency to our mule application pom.xml file.
2. Import into our mule application the mule configuration files from the library.
3. Define the following properties into our mule application. The thirdPartyFlows property is
optional and does not need to be defined.
18
Walkthrough to implement the Health Monitoring
Library
4. Optional. Define subflows that will be used to ´ping´ external systems.
19
Important: The subflows are in charge of calling external systems
to validate that service is up and running. Those subflows are
defined in our mule application, and they are called from the
health monitoring library through the property “thirdPartyFlows”.
DEMO – Basic Health Monitoring
of Mule Application
21
● http://test-health-monitoring.us-e2.cloudhub.io/api/health/application
● http://test-health-monitoring.us-e2.cloudhub.io/api/health/server
● http://test-health-monitoring.us-e2.cloudhub.io/api/health/thirdParty
● http://test-health-monitoring.us-e2.cloudhub.io/api/health/general
Health Monitoring Endpoints
Questions?
23
● https://docs.mulesoft.com/mule-runtime/4.3/dataweave-variables-context
● https://docs.mulesoft.com/java-module/1.2/java-invoke-method
● https://docs.oracle.com/javase/9/docs/api/java/lang/management/MemoryUsage.html
● https://docs.oracle.com/javase/9/docs/api/java/lang/management/GarbageCollectorMXBean.ht
ml
● https://docs.oracle.com/javase/9/docs/api/java/lang/management/ThreadMXBean.html
● https://github.com/paola-alcval/health-monitoring-library
● https://github.com/paola-alcval/test-health-monitoring
● https://github.com/paola-alcval/test-weather-api
Helpful links
24
Personal email address:
paola.alcval@gmail.com
LinkedIn:
https://www.linkedin.com/in/paola-alcantar-valdes-a74087b3/
Twitter:
@PaoAlcVal
Contact me
Thank you

Weitere ähnliche Inhalte

Ähnlich wie Cómo generar e implementar monitoreo para aplicaciones de Mule

What is HTTP Monitor and Why Do You Need It
What is HTTP Monitor and Why Do You Need ItWhat is HTTP Monitor and Why Do You Need It
What is HTTP Monitor and Why Do You Need Itawakish
 
Websphere doctor - your guide to diagnose issues
Websphere doctor - your guide to diagnose issues Websphere doctor - your guide to diagnose issues
Websphere doctor - your guide to diagnose issues Joseph's WebSphere Library
 
Software engineering project guidelines.pptx
Software engineering project guidelines.pptxSoftware engineering project guidelines.pptx
Software engineering project guidelines.pptxsanasaeed84
 
Software engineering project guidelines.pptx
Software engineering project guidelines.pptxSoftware engineering project guidelines.pptx
Software engineering project guidelines.pptxsanasaeed84
 
Abstraction and Automation: A Software Design Approach for Developing Secure ...
Abstraction and Automation: A Software Design Approach for Developing Secure ...Abstraction and Automation: A Software Design Approach for Developing Secure ...
Abstraction and Automation: A Software Design Approach for Developing Secure ...iosrjce
 
beginners-guide-to-observability.pdf
beginners-guide-to-observability.pdfbeginners-guide-to-observability.pdf
beginners-guide-to-observability.pdfValerioArvizzigno1
 
Data Warehouses & Deployment By Ankita dubey
Data Warehouses & Deployment By Ankita dubeyData Warehouses & Deployment By Ankita dubey
Data Warehouses & Deployment By Ankita dubeyAnkita Dubey
 
Srs dispensary-management
Srs dispensary-managementSrs dispensary-management
Srs dispensary-managementStayTuned3
 
Clinic management system
Clinic management systemClinic management system
Clinic management systemMike Taylor
 
IRJET- Application Backup and Restore across Multiple Devices
IRJET-	 Application Backup and Restore across Multiple DevicesIRJET-	 Application Backup and Restore across Multiple Devices
IRJET- Application Backup and Restore across Multiple DevicesIRJET Journal
 
Software Engineering Important Short Question for Exams
Software Engineering Important Short Question for ExamsSoftware Engineering Important Short Question for Exams
Software Engineering Important Short Question for ExamsMuhammadTalha436
 
Google app engine
Google app engineGoogle app engine
Google app engineRenjith318
 
Healthcare Management System for paperless management
Healthcare Management System for paperless managementHealthcare Management System for paperless management
Healthcare Management System for paperless managementMike Taylor
 
Observability vs APM vs Monitoring Comparison
Observability vs APM vs  Monitoring ComparisonObservability vs APM vs  Monitoring Comparison
Observability vs APM vs Monitoring Comparisonjeetendra mandal
 
hospital management system.docx
hospital management system.docxhospital management system.docx
hospital management system.docxNikhil Patil
 
Identifying Software Performance Bottlenecks Using Diagnostic Tools- Impetus ...
Identifying Software Performance Bottlenecks Using Diagnostic Tools- Impetus ...Identifying Software Performance Bottlenecks Using Diagnostic Tools- Impetus ...
Identifying Software Performance Bottlenecks Using Diagnostic Tools- Impetus ...Impetus Technologies
 
Health Prediction System - an Artificial Intelligence Project 2015
Health Prediction System - an Artificial Intelligence Project 2015Health Prediction System - an Artificial Intelligence Project 2015
Health Prediction System - an Artificial Intelligence Project 2015Maruf Abdullah (Rion)
 
PROPOSING AUTOMATED REGRESSION SUITE USING OPEN SOURCE TOOLS FOR A HEALTH CAR...
PROPOSING AUTOMATED REGRESSION SUITE USING OPEN SOURCE TOOLS FOR A HEALTH CAR...PROPOSING AUTOMATED REGRESSION SUITE USING OPEN SOURCE TOOLS FOR A HEALTH CAR...
PROPOSING AUTOMATED REGRESSION SUITE USING OPEN SOURCE TOOLS FOR A HEALTH CAR...ijseajournal
 

Ähnlich wie Cómo generar e implementar monitoreo para aplicaciones de Mule (20)

What is HTTP Monitor and Why Do You Need It
What is HTTP Monitor and Why Do You Need ItWhat is HTTP Monitor and Why Do You Need It
What is HTTP Monitor and Why Do You Need It
 
Websphere doctor - your guide to diagnose issues
Websphere doctor - your guide to diagnose issues Websphere doctor - your guide to diagnose issues
Websphere doctor - your guide to diagnose issues
 
Software engineering project guidelines.pptx
Software engineering project guidelines.pptxSoftware engineering project guidelines.pptx
Software engineering project guidelines.pptx
 
Software engineering project guidelines.pptx
Software engineering project guidelines.pptxSoftware engineering project guidelines.pptx
Software engineering project guidelines.pptx
 
J017325660
J017325660J017325660
J017325660
 
Abstraction and Automation: A Software Design Approach for Developing Secure ...
Abstraction and Automation: A Software Design Approach for Developing Secure ...Abstraction and Automation: A Software Design Approach for Developing Secure ...
Abstraction and Automation: A Software Design Approach for Developing Secure ...
 
beginners-guide-to-observability.pdf
beginners-guide-to-observability.pdfbeginners-guide-to-observability.pdf
beginners-guide-to-observability.pdf
 
Data Warehouses & Deployment By Ankita dubey
Data Warehouses & Deployment By Ankita dubeyData Warehouses & Deployment By Ankita dubey
Data Warehouses & Deployment By Ankita dubey
 
Srs dispensary-management
Srs dispensary-managementSrs dispensary-management
Srs dispensary-management
 
Clinic management system
Clinic management systemClinic management system
Clinic management system
 
IRJET- Application Backup and Restore across Multiple Devices
IRJET-	 Application Backup and Restore across Multiple DevicesIRJET-	 Application Backup and Restore across Multiple Devices
IRJET- Application Backup and Restore across Multiple Devices
 
Software Engineering Important Short Question for Exams
Software Engineering Important Short Question for ExamsSoftware Engineering Important Short Question for Exams
Software Engineering Important Short Question for Exams
 
SAD_SDLC.pptx
SAD_SDLC.pptxSAD_SDLC.pptx
SAD_SDLC.pptx
 
Google app engine
Google app engineGoogle app engine
Google app engine
 
Healthcare Management System for paperless management
Healthcare Management System for paperless managementHealthcare Management System for paperless management
Healthcare Management System for paperless management
 
Observability vs APM vs Monitoring Comparison
Observability vs APM vs  Monitoring ComparisonObservability vs APM vs  Monitoring Comparison
Observability vs APM vs Monitoring Comparison
 
hospital management system.docx
hospital management system.docxhospital management system.docx
hospital management system.docx
 
Identifying Software Performance Bottlenecks Using Diagnostic Tools- Impetus ...
Identifying Software Performance Bottlenecks Using Diagnostic Tools- Impetus ...Identifying Software Performance Bottlenecks Using Diagnostic Tools- Impetus ...
Identifying Software Performance Bottlenecks Using Diagnostic Tools- Impetus ...
 
Health Prediction System - an Artificial Intelligence Project 2015
Health Prediction System - an Artificial Intelligence Project 2015Health Prediction System - an Artificial Intelligence Project 2015
Health Prediction System - an Artificial Intelligence Project 2015
 
PROPOSING AUTOMATED REGRESSION SUITE USING OPEN SOURCE TOOLS FOR A HEALTH CAR...
PROPOSING AUTOMATED REGRESSION SUITE USING OPEN SOURCE TOOLS FOR A HEALTH CAR...PROPOSING AUTOMATED REGRESSION SUITE USING OPEN SOURCE TOOLS FOR A HEALTH CAR...
PROPOSING AUTOMATED REGRESSION SUITE USING OPEN SOURCE TOOLS FOR A HEALTH CAR...
 

Mehr von Alexandra N. Martinez

Mejora tu productividad creando aplicaciones de Slack
Mejora tu productividad creando aplicaciones de SlackMejora tu productividad creando aplicaciones de Slack
Mejora tu productividad creando aplicaciones de SlackAlexandra N. Martinez
 
Women Who Mule - Workshop series #2: Ghost
Women Who Mule - Workshop series #2: GhostWomen Who Mule - Workshop series #2: Ghost
Women Who Mule - Workshop series #2: GhostAlexandra N. Martinez
 
Women Who Mule - Workshop series: Create your own blog from scratch without a...
Women Who Mule - Workshop series: Create your own blog from scratch without a...Women Who Mule - Workshop series: Create your own blog from scratch without a...
Women Who Mule - Workshop series: Create your own blog from scratch without a...Alexandra N. Martinez
 
Toronto Virtual Meetup #12 - Testing Strategies and MUnit Test Recorder
Toronto Virtual Meetup #12 - Testing Strategies and MUnit Test RecorderToronto Virtual Meetup #12 - Testing Strategies and MUnit Test Recorder
Toronto Virtual Meetup #12 - Testing Strategies and MUnit Test RecorderAlexandra N. Martinez
 
Toronto Virtual Meetup #11 - Reviewing Complex DataWeave Transformation Use-case
Toronto Virtual Meetup #11 - Reviewing Complex DataWeave Transformation Use-caseToronto Virtual Meetup #11 - Reviewing Complex DataWeave Transformation Use-case
Toronto Virtual Meetup #11 - Reviewing Complex DataWeave Transformation Use-caseAlexandra N. Martinez
 
reCONNECT 2021 May Meetup - Women Who Mule #4
reCONNECT 2021 May Meetup - Women Who Mule #4reCONNECT 2021 May Meetup - Women Who Mule #4
reCONNECT 2021 May Meetup - Women Who Mule #4Alexandra N. Martinez
 
Women Who Mule - April Meetup (Diane Kesler's Journey)
Women Who Mule - April Meetup (Diane Kesler's Journey)Women Who Mule - April Meetup (Diane Kesler's Journey)
Women Who Mule - April Meetup (Diane Kesler's Journey)Alexandra N. Martinez
 
Toronto Virtual Meetup #9 - KPIs and metrics accelerator
Toronto Virtual Meetup #9 - KPIs and metrics acceleratorToronto Virtual Meetup #9 - KPIs and metrics accelerator
Toronto Virtual Meetup #9 - KPIs and metrics acceleratorAlexandra N. Martinez
 
Reviewing a complex dataweave transformation use case v3
Reviewing a complex dataweave transformation use case v3Reviewing a complex dataweave transformation use case v3
Reviewing a complex dataweave transformation use case v3Alexandra N. Martinez
 
What is munit and how to create your first unit test
What is munit and how to create your first unit testWhat is munit and how to create your first unit test
What is munit and how to create your first unit testAlexandra N. Martinez
 
Toronto Virtual Meetup #8 - Tips for Reusability
Toronto Virtual Meetup #8 - Tips for ReusabilityToronto Virtual Meetup #8 - Tips for Reusability
Toronto Virtual Meetup #8 - Tips for ReusabilityAlexandra N. Martinez
 
Meetup en español #6 - MuleSoft para profesionales de Java (segunda edición)
Meetup en español #6 - MuleSoft para profesionales de Java (segunda edición)Meetup en español #6 - MuleSoft para profesionales de Java (segunda edición)
Meetup en español #6 - MuleSoft para profesionales de Java (segunda edición)Alexandra N. Martinez
 
Meetup en español #5 - Continuous Integration and Continuous Delivery (CI/CD)...
Meetup en español #5 - Continuous Integration and Continuous Delivery (CI/CD)...Meetup en español #5 - Continuous Integration and Continuous Delivery (CI/CD)...
Meetup en español #5 - Continuous Integration and Continuous Delivery (CI/CD)...Alexandra N. Martinez
 
Toronto Virtual Meetup #7 - Anypoint VPC, VPN and DLB Architecture
Toronto Virtual Meetup #7 - Anypoint VPC, VPN and DLB ArchitectureToronto Virtual Meetup #7 - Anypoint VPC, VPN and DLB Architecture
Toronto Virtual Meetup #7 - Anypoint VPC, VPN and DLB ArchitectureAlexandra N. Martinez
 
Reviewing a Complex DataWeave Transformation Use-case v2
Reviewing a Complex DataWeave Transformation Use-case v2Reviewing a Complex DataWeave Transformation Use-case v2
Reviewing a Complex DataWeave Transformation Use-case v2Alexandra N. Martinez
 
How to use Salesforce composite request connector in Mule
How to use Salesforce composite request connector in MuleHow to use Salesforce composite request connector in Mule
How to use Salesforce composite request connector in MuleAlexandra N. Martinez
 
Meetup en español #4 - MuleSoft para profesionales de Java
 Meetup en español #4 - MuleSoft para profesionales de Java Meetup en español #4 - MuleSoft para profesionales de Java
Meetup en español #4 - MuleSoft para profesionales de JavaAlexandra N. Martinez
 

Mehr von Alexandra N. Martinez (20)

Mejora tu productividad creando aplicaciones de Slack
Mejora tu productividad creando aplicaciones de SlackMejora tu productividad creando aplicaciones de Slack
Mejora tu productividad creando aplicaciones de Slack
 
Women Who Mule - Workshop series #2: Ghost
Women Who Mule - Workshop series #2: GhostWomen Who Mule - Workshop series #2: Ghost
Women Who Mule - Workshop series #2: Ghost
 
Women Who Mule - Workshop series: Create your own blog from scratch without a...
Women Who Mule - Workshop series: Create your own blog from scratch without a...Women Who Mule - Workshop series: Create your own blog from scratch without a...
Women Who Mule - Workshop series: Create your own blog from scratch without a...
 
Toronto Virtual Meetup #12 - Testing Strategies and MUnit Test Recorder
Toronto Virtual Meetup #12 - Testing Strategies and MUnit Test RecorderToronto Virtual Meetup #12 - Testing Strategies and MUnit Test Recorder
Toronto Virtual Meetup #12 - Testing Strategies and MUnit Test Recorder
 
Women Who Mule - June Meetup (EMEA)
Women Who Mule - June Meetup (EMEA)Women Who Mule - June Meetup (EMEA)
Women Who Mule - June Meetup (EMEA)
 
Toronto Virtual Meetup #11 - Reviewing Complex DataWeave Transformation Use-case
Toronto Virtual Meetup #11 - Reviewing Complex DataWeave Transformation Use-caseToronto Virtual Meetup #11 - Reviewing Complex DataWeave Transformation Use-case
Toronto Virtual Meetup #11 - Reviewing Complex DataWeave Transformation Use-case
 
reCONNECT 2021 May Meetup - Women Who Mule #4
reCONNECT 2021 May Meetup - Women Who Mule #4reCONNECT 2021 May Meetup - Women Who Mule #4
reCONNECT 2021 May Meetup - Women Who Mule #4
 
Women Who Mule - April Meetup (Diane Kesler's Journey)
Women Who Mule - April Meetup (Diane Kesler's Journey)Women Who Mule - April Meetup (Diane Kesler's Journey)
Women Who Mule - April Meetup (Diane Kesler's Journey)
 
Toronto Virtual Meetup #9 - KPIs and metrics accelerator
Toronto Virtual Meetup #9 - KPIs and metrics acceleratorToronto Virtual Meetup #9 - KPIs and metrics accelerator
Toronto Virtual Meetup #9 - KPIs and metrics accelerator
 
Reviewing a complex dataweave transformation use case v3
Reviewing a complex dataweave transformation use case v3Reviewing a complex dataweave transformation use case v3
Reviewing a complex dataweave transformation use case v3
 
Introduction to MuleSoft
Introduction to MuleSoftIntroduction to MuleSoft
Introduction to MuleSoft
 
What is munit and how to create your first unit test
What is munit and how to create your first unit testWhat is munit and how to create your first unit test
What is munit and how to create your first unit test
 
Truly Human part 1
Truly Human part 1Truly Human part 1
Truly Human part 1
 
Toronto Virtual Meetup #8 - Tips for Reusability
Toronto Virtual Meetup #8 - Tips for ReusabilityToronto Virtual Meetup #8 - Tips for Reusability
Toronto Virtual Meetup #8 - Tips for Reusability
 
Meetup en español #6 - MuleSoft para profesionales de Java (segunda edición)
Meetup en español #6 - MuleSoft para profesionales de Java (segunda edición)Meetup en español #6 - MuleSoft para profesionales de Java (segunda edición)
Meetup en español #6 - MuleSoft para profesionales de Java (segunda edición)
 
Meetup en español #5 - Continuous Integration and Continuous Delivery (CI/CD)...
Meetup en español #5 - Continuous Integration and Continuous Delivery (CI/CD)...Meetup en español #5 - Continuous Integration and Continuous Delivery (CI/CD)...
Meetup en español #5 - Continuous Integration and Continuous Delivery (CI/CD)...
 
Toronto Virtual Meetup #7 - Anypoint VPC, VPN and DLB Architecture
Toronto Virtual Meetup #7 - Anypoint VPC, VPN and DLB ArchitectureToronto Virtual Meetup #7 - Anypoint VPC, VPN and DLB Architecture
Toronto Virtual Meetup #7 - Anypoint VPC, VPN and DLB Architecture
 
Reviewing a Complex DataWeave Transformation Use-case v2
Reviewing a Complex DataWeave Transformation Use-case v2Reviewing a Complex DataWeave Transformation Use-case v2
Reviewing a Complex DataWeave Transformation Use-case v2
 
How to use Salesforce composite request connector in Mule
How to use Salesforce composite request connector in MuleHow to use Salesforce composite request connector in Mule
How to use Salesforce composite request connector in Mule
 
Meetup en español #4 - MuleSoft para profesionales de Java
 Meetup en español #4 - MuleSoft para profesionales de Java Meetup en español #4 - MuleSoft para profesionales de Java
Meetup en español #4 - MuleSoft para profesionales de Java
 

Kürzlich hochgeladen

How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17Celine George
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfPrerana Jadhav
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseCeline George
 
ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6Vanessa Camilleri
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Association for Project Management
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Celine George
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationdeepaannamalai16
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSMae Pangan
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxSayali Powar
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdfMr Bounab Samir
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...DhatriParmar
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptxDhatriParmar
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQuiz Club NITW
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operationalssuser3e220a
 

Kürzlich hochgeladen (20)

How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdf
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 Database
 
ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentation
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHS
 
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdf
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operational
 

Cómo generar e implementar monitoreo para aplicaciones de Mule

  • 1. May 26th, 2021 ¿Cómo generar e implementar monitoreo para aplicaciones de Mule? Paola Alcantar Valdes
  • 2. 2 ● About me ● What is a Health Monitoring ● Importance of implementing a Health Monitoring ● Health Monitoring application objectives ● Application metricts to watch ● Building a basic Health Monitoring for Mule Application ● How to implement a Health Monitoring Library in a Mule Application ● DEMO – Basic Health Monitoring for Mule Application ● Questions Agenda
  • 3. 3 ●Paola Alcantar Valdes ○ Jr. Integration Engineer with Mulesoft at Twitter ○ Mulesoft Certified Developer – Level 1 (Mule 4) ○ Over two years of experience as a Managed Services About me
  • 4. Importance of implementing a health monitoring What is a Health Monitoring?
  • 5. 5 ● What is a Health Monitoring? ○ It is an application that continually checks the status of an integration that is running. ● Differences between Application Health Monitoring and Application Health Checks: ○ Application Health Monitoring: ○ It is a good practice that allows collecting key metrics about different aspects of an application to watch how it's working over time. ○ Application Health Checks: ○ Definition of “healthy” parameters based on regular checks information to ensure the system is working the way it’s expected to. ○ Based on a business logic criteria, this should not be just “black“ or “white“ Health Monitoring
  • 6. 6 ● Importance of implementing a Health Monitoring: ○ It allows you to detect issues before they become complete outages. It will help you to detect incidents before they affect customers. ○ Building and implementing a health monitoring application will help you create an action plan if an incident does pop up. ○ A health monitoring application will allow helping you to understand better the behavior of applications, servers, external systems. Also, to close visibility and performance gaps, correct processes, and ensure you're getting total value from your applications. Health Monitoring
  • 7. Application metricts to watch Health Monitoring application objectives
  • 8. 8 ● There is no single way to build health monitoring for your applications. It is why different IT teams will have different perspectives about the thing you need to care about. However, a basic and useful health monitoring application might consider the following aspects. ○ Application’s general information: Get application name, application version, application environment, mule runtime version, etc. ○ Memory Information: Get Heap Memory, Non-Heap Memory, Garbage Collection information from JVM. ○ Thread information: Return the number of demon threads, non-demon threads, and peak threads. ○ Overall availability (External systems): Retrieve the status of the external system with which the application interacts (Know if external systems are up-and-running or not). Health Monitoring application objectives
  • 9. 9 ● Application’s general information: Health Monitoring application objectives %dw 2.0 output application/json --- { apiName: app.name, apiVersion: p("apiVersion") default "", env: p("env") default "", runtimeVersion: mule.version, startDate: ((app.muleContext.startDate default now()) as DateTime {unit: "milliseconds"}), timeZone: server.timeZone, traceId: correlationId, }
  • 10. 10 ● Memory Information : Health Monitoring application objectives public static void heapMemoryDetails() { MemoryMXBean memBean = ManagementFactory.getMemoryMXBean() ; MemoryUsage heapMemoryUsage = memBean.getHeapMemoryUsage(); long heapInitSize = heapMemoryUsage.getInit(); long heapUsedSize = heapMemoryUsage.getUsed(); long heapCommitedSize = heapMemoryUsage.getCommitted(); long heapMaxSize = heapMemoryUsage.getMax(); }
  • 11. 11 ● Garbage Collection Information : Health Monitoring application objectives public static ArrayList<GarbageCollection> garbageCollection(){ ArrayList<GarbageCollectorMXBean> memBean = (ArrayList<GarbageCollectorMXBean>) ManagementFactory.getGarbageCollectorMXBeans(); ArrayList<GarbageCollection> gc = new ArrayList<GarbageCollection>(); for (GarbageCollectorMXBean garbageCollectorMXBean : memBean) { gc.add(new GarbageCollection(garbageCollectorMXBean.getName(), garbageCollectorMXBean.getCollectionCount(), garbageCollectorMXBean.getCollectionTime())); } return gc; }
  • 12. 12 ● Thread information : Health Monitoring application objectives public static void threadInformation() { int demonThreads = ManagementFactory.getThreadMXBean().getDaemonThreadCount(); int peakThreads = ManagementFactory.getThreadMXBean().getPeakThreadCount(); int threadCount = ManagementFactory.getThreadMXBean().getThreadCount(); long startedThreadCount = ManagementFactory.getThreadMXBean().getTotalStartedThreadCount(); }
  • 13. Building a basic Health Monitoring for Mule Application
  • 14. 14 1. Create a Mule 4 application. 2. Update the pom.xml file to define the “classifier” of the mule application as a “mule-plugin”. 3. Define the endpoints for the health monitoring library in a RAML Definition file. For example: ○ /health/application ○ /health/server ○ /health/thirdParty ○ /health/general Walkthrough: How to build a Health Monitoring for Mule Applications See Health Monitoring RAML Definition File
  • 15. 15 4. Define the response for each endpoint. 5. Generate Flows based on RAML Definition file. 6. Remove auto-generated HTTP Configuration. 7. Set “config-ref” value on HTTP Listener Configuration with “${health.http.config}” Walkthrough: How to build a Health Monitoring for Mule Applications See Health Monitoring application objectives Note: Value of “health.http.config” property will be defined in each mule application that implements health monitoring library.
  • 16. 16 8. Get objective keys related to each endpoint. 9. Generate dataweave scripts to format endpoint responses. For example: 10. Install our health monitoring plugin into a repository using command mvn clean install. 11. Implement health monitoring library following next steps. Walkthrough: How to build a Health Monitoring for Mule Applications See Health Monitoring RAML Definition File %dw 2.0 output application/json --- { apiName: app.name, apiVersion: p("apiVersion") default "", env: p("env") default "", runtimeVersion: mule.version, startDate: ((app.muleContext.startDate default now()) as DateTime {unit: "milliseconds"}), timeZone: server.timeZone, traceId: correlationId, }
  • 17. How to implement a Health Monitoring Library in a Mule Application
  • 18. Walkthrough: How to implement a Health Monitoring Library 1. Add the Health Monitoring library dependency to our mule application pom.xml file. 2. Import into our mule application the mule configuration files from the library. 3. Define the following properties into our mule application. The thirdPartyFlows property is optional and does not need to be defined. 18
  • 19. Walkthrough to implement the Health Monitoring Library 4. Optional. Define subflows that will be used to ´ping´ external systems. 19 Important: The subflows are in charge of calling external systems to validate that service is up and running. Those subflows are defined in our mule application, and they are called from the health monitoring library through the property “thirdPartyFlows”.
  • 20. DEMO – Basic Health Monitoring of Mule Application
  • 21. 21 ● http://test-health-monitoring.us-e2.cloudhub.io/api/health/application ● http://test-health-monitoring.us-e2.cloudhub.io/api/health/server ● http://test-health-monitoring.us-e2.cloudhub.io/api/health/thirdParty ● http://test-health-monitoring.us-e2.cloudhub.io/api/health/general Health Monitoring Endpoints
  • 23. 23 ● https://docs.mulesoft.com/mule-runtime/4.3/dataweave-variables-context ● https://docs.mulesoft.com/java-module/1.2/java-invoke-method ● https://docs.oracle.com/javase/9/docs/api/java/lang/management/MemoryUsage.html ● https://docs.oracle.com/javase/9/docs/api/java/lang/management/GarbageCollectorMXBean.ht ml ● https://docs.oracle.com/javase/9/docs/api/java/lang/management/ThreadMXBean.html ● https://github.com/paola-alcval/health-monitoring-library ● https://github.com/paola-alcval/test-health-monitoring ● https://github.com/paola-alcval/test-weather-api Helpful links