Contenu connexe Similaire à Mulesoft meetup 9thmay Thiruvananthapuram Similaire à Mulesoft meetup 9thmay Thiruvananthapuram (20) Plus de Anurag Dwivedi (8) Mulesoft meetup 9thmay Thiruvananthapuram1. May 9th 2020 : INTRODUCTION TO MULESOFT AND
LOGGING WITH ELK
[Thiruvananthapuram –INDIA]
Virtual Meetup #1
2. All contents © MuleSoft Inc.
Guidelines for Thiruvananthapuram MuleSoft
Meetup #01 [Virtual]
2
• Please keep yourself unless you have any questions.
• We encourage you to keep your video on for interactive session.
• You can write down your question in the chat session.
• Once join please write down your name and email id in chat so that we
can have attendance.
• As this is our first online Meetup we appreciate your valuable feedback.
Thanks.
4. All contents © MuleSoft Inc.
Agenda
• Introductions
• Introduction to MuleSoft and
API Development with MuleSoft
• Logging with ELK
• Plan for next meetup
• Networking time
5. All contents © MuleSoft Inc.
Why we are here?
5
• A group of community, by the community.
• A platform to learn and share integration
experiences with like-minded world.
• Discuss a set of important contents relating
to development and deployment with
MuleSoft’s Anypoint Platform.
6. All contents © MuleSoft Inc.
Introductions
6
• About the organizer:
– Anurag Kumar Dwivedi
• About the Sponsers:
– MuleSoft
7. All contents © MuleSoft Inc.
Speakers
7
• About the Speakers:
– Lalit Panwar
– Mazhar Mohammad Ansari
A SHOW OF HANDS:
Who is new to this MeetUp?
9. All contents © MuleSoft Inc.
Bit of History
9
The "mule" in the name comes from the drudgery, or "donkey work,"
of data integration that our platform was created to escape. Also, like a
mule, it deliver the strength of a donkey to haul the heavy workload, and the
speed of a racehorse to get it done quickly.
The company originally provided middleware and messaging, and
later expanded to provide an integration platform as a service (iPaaS)
approach for companies through its main product, Anypoint Platform.
MuleSoft's Anypoint Platform includes various components such as
Anypoint Design Center, which allows API developers to design and build
APIs; Anypoint Exchange, a library for API providers to share APIs, templa-
tes, and assets; and Anypoint Management Center, a centralized web interface to analyze, manage, and monitor APIs and
integrations. MuleSoft also offers the Mule runtime engine, a runtime solution for connecting enterprise applications on-
premises and to the cloud, designed to eliminate the need for custom point-to-point integration code. On May 2, 2018,
Salesforce acquired Mulesoft.
10. All contents © MuleSoft Inc.
Bit of History
10
The "mule" in the name comes from the drudgery, or "donkey work,"
of data integration that our platform was created to escape. Also, like a
mule, it deliver the strength of a donkey to haul the heavy workload, and the
speed of a racehorse to get it done quickly.
The company originally provided middleware and messaging, and
later expanded to provide an integration platform as a service (iPaaS)
approach for companies through its main product, Anypoint Platform.
MuleSoft's Anypoint Platform includes various components such as
Anypoint Design Center, which allows API developers to design and build
APIs; Anypoint Exchange, a library for API providers to share APIs, templa-
tes, and assets; and Anypoint Management Center, a centralized web interface to analyze, manage, and monitor APIs and
integrations. MuleSoft also offers the Mule runtime engine, a runtime solution for connecting enterprise applications on-
premises and to the cloud, designed to eliminate the need for custom point-to-point integration code. On May 2, 2018,
Salesforce acquired Mulesoft.
11. All contents © MuleSoft Inc. 11
Production
Reusable
assets
Consumption
Feedback and
usage metrics
Discoverable
Self-service
12. All contents © MuleSoft Inc.
Modern API: The core enabler of a new operating model
12
Modern
API
• Discoverable and accessible
through self-service
• Productized and designed for
ease of consumption
• Easily managed for security,
scalability, and performance
15. All contents © MuleSoft Inc.
Design Phase
15
● RESTful API Modeling
Language (RAML)
○ Based on YAML
○ Simple, powerful tooling
○ Human readable format
○ Developer friendly
○ Code Reuse
○ Open standard, vendor-neutral
○ Pattern based design
● https://raml.org
● OpenAPI Specification (OAS)
○ Formerly called Swagger (OAS 2.0)
○ Open standard to define RESTful
API interfaces in YAML or JSON
format
○ Large ecosystem of tools
○ Wide adoption
○ Files tend to get bigger
○ Less pattern sharing / includes
○ OAS 2.0 supported on Anypoint
Platform
28. All contents © MuleSoft Inc.
TOC
28
• Why Log In The First Place?
• Logging Bad Practice
• Logging Best Practices
• Logging With Log4j 2
• What is the ELK Stack
• Install ELK
• Logging using ELK
• What is Splunk
• Logging using Splunk
• Integrating with Your Logging System Using Log4j (Hybrid)
• Demo
29. All contents © MuleSoft Inc.
Why Log In The First Place?
29
• System visibility
• System traceability
• Debugging
30. All contents © MuleSoft Inc.
Logging Bad Practice
30
• No logging standards
• Hard coding
• Empty loggers
• Beware: CloudHub logs are limited by size
– 100MB or 30 days, whichever comes first
31. All contents © MuleSoft Inc.
Logging Best Practices
31
• Standards, standards, standards
– JSON
– Key-value pairs
– Other formats
• Informative messages
– Visibility into the system
– Enhance debugging
– Before and after external system calls
• Request identifier
– Trace transaction from end to end
– Ability to calculate latency
• Dynamic error messages
32. All contents © MuleSoft Inc.
Logging Best Practices Contd…
32
• Persisting logs to a system
– Maintain historical logs
– Allows non-technical users to access and support applications
• Not too much logging, not too little
33. All contents © MuleSoft Inc.
Logging With Log4j 2
33
• Configuration in
src/main/resources/log4j2.xml
• Components
– Configuration
– Appenders
• Use Log4J2CloudhubLogAppender to continue to
log to MuleSoft server logs
• Loggers
– Async Logger
• Log level
34. All contents © MuleSoft Inc.
What is the ELK Stack
34
• ELK is the acronym for three open source projects: Elasticsearch,
Logstash, and Kibana
• Elasticsearch is a search and analytics engine
– Elasticsearch is an open source, full-text search and analysis engine, based on
the Apache Lucene search engine
• Logstash is a server-side data processing pipeline that ingests data
from multiple sources simultaneously, transforms it, and then sends
it to a "stash" like Elasticsearch
• Kibana lets users visualize data with charts and graphs in
Elasticsearch
35. All contents © MuleSoft Inc.
Download ELK
35
• Elastic Search
– https://www.elastic.co/downloads/elasticsearch
• Kibana
– https://www.elastic.co/downloads/kibana
• Logstash
– https://www.elastic.co/downloads/logstash
• Filebeat
– https://www.elastic.co/downloads/beats/filebeat
40. All contents © MuleSoft Inc.
What is the Splunk
40
• Splunk is an advanced,
scalable, and effective
technology that indexes
and searches log files
stored in a system
• It analyzes the machine-
generated data to
provide operational
intelligence
41. All contents © MuleSoft Inc.
Splunk Integration Option
41
• Rest API
• HTTP Event Collector
42. All contents © MuleSoft Inc.
Logging using Splunk
42
<Appenders>
<Http name=”Splunk”
url=”http://localhost:8088/services/collector/raw”>
<Property name=”Authorization” value=”Splunk f90ac541-
3cf2-4f30-a6aa-9988a9e0a435”/>
<PatternLayout pattern=”[%d{MM-dd HH:mm:ss}] %-5p
%c{1} [%t]: %m%n”/>
</Http>
</Appenders>
43. All contents © MuleSoft Inc.
Integrating with Your Logging System Using
Log4j (Hybrid)
43
• Login to Anypoint MuleSoft
• Go to Runtime Manager
• Go to Server
• Go to Setting
• Go to Plugins
• Select ELK or Splunk
44. All contents © MuleSoft Inc.
Integrating with Your Logging System Using
Log4j (Hybrid) Contd...
44
ELK Splunk HTTP Event Splunk Rest API
45. All contents © MuleSoft Inc.
Integrating with Your Logging System Using
Log4j (CloudHub)
45
Requirements and Restrictions
• This feature is available only on request
• MuleSoft is not responsible for issues arising from misconfiguration
of your Log4j appender, including these or other issues:
– Lost logging data
– Performance degradation
– Running out of disk space
• Do not use synchronous log appenders
• When you disable CloudHub logs
– Only the system logs are available in Runtime Manager
46. All contents © MuleSoft Inc.
Example Subtitle
Reference Material
46
• How to Install ELK
– https://logz.io/blog/elastic-stack-windows/
– https://logz.io/learn/complete-guide-elk-stack/#installing-elk
• How to Use ELK
– https://www.youtube.com/watch?v=WRUk1nRSXq0
– https://www.javainuse.com/elasticsearch/filebeat-elk
– https://www.youtube.com/watch?v=vZQMoY_2_AA
• MuleSoft with ELK/Splunk
– https://help.mulesoft.com/s/article/How-to-send-CloudHub-Logs-to-Splunk
– https://help.mulesoft.com/s/article/How-to-send-Mule-application-logging-entries-to-
Elastic-Stack-ELK-using-Socket-Appender
47. All contents © MuleSoft Inc.
What’s next
47
• Share:
– Tweet your pictures with the hashtag #MuleMeetup
– Invite your network to join:
https://meetups.mulesoft.com/Thiruvananthapuram/
• Feedback:
– Contact your organizer Anurag Dwivedi to suggest topics
– Contact MuleSoft at meetup@mulesoft.com for ways to improve the program
• Our next meetup:
– Date: TBD
– Location: TBD
– Topic: TBD
48. All contents © MuleSoft Inc.
MuleSoft CONNECT Digital is a live virtual experience — bringing
you a full program of educational sessions and content, streamed
online for free.
AMER: May 20, 2020
EMEA: June 4, 2020
JAPAC: June 25, 2020
Register for free: https://connect.mulesoft.com
49. All contents © MuleSoft Inc.
Meet the MuleSoft Community at:
- Our digital community booth
- Q&A sessions with MuleSoft Ambassadors
- Our special Developer Meetup
JOIN ONLINE FOR FREE:
AMER: May 20, 2020
EMEA: June 4, 2020
JAPAC: June 25, 2020
Register: https://connect.mulesoft.com
52. See you next time
Please send topic suggestions to the organizer
Notes de l'éditeur Talk Track:
CONNECT Digital will include keynote speakers, breakout sessions, and our developer Meetup
Event is free!
May 20,2020 is the AMER event, anyone is welcome to register
There will be a CONNECT for EMEA on June 4, 2020 for APAC on June 25, 2020, more information about these coming soon. Talk Track:
There will be several opportunities to connect with the Developer Community at CONNECT
A digital booth, to register for Meetup groups, learn about community from MuleSoft community team, meet Ambassadors for Q&A sessions
A special Developer Meetup, with technical speakers from customers and from the community
Overall: great place to connect, learn, and show your MuleSoft expertise
Anyone welcome to join
Free to participate