SlideShare a Scribd company logo
1 of 11
Download to read offline
Mulesoft ELK
Introduction
Use the Elastic Stack (ELK stack) to analyze the business data and API analytics. You can use Logstash for
Filebeat to process Anypoint Platform log files, insert them into an Elasticsearch database, and then
analyze them with Kibana.
Elastic Stack overview
ELK stands for the three Elastic products - Elasticsearch, Logstash, and Kibana
To understand what the Elastic core products, we will use a simple architecture:
1. The logs will be created by an application and pushed into the AWS SQS Queue.
2. Logstash aggregates the logs from different sources and processes it.
3. Elasticsearch stores and indexes the data in order to search it.
4. Kibana is the visualization tool that makes sense of the data.
What is Logstash?
Logstash is a data collection tool. It consists of three elements: input, filters, and output.
What is Elasticsearch?
ES (Elasticsearch) is a NoSQL database that is based on the Lucene search engine. ES provides RESTful
APIs to search and analyze the data. Different data types such as numbers, text, and geo — structured or
unstructured — can be stored.
What is Kibana?
Kibana is a data visualization tool. It helps you to quickly get insight into the data and offers capabilities
like diagrams, dashboards, etc. Kibana uses all the data stored on Elasticsearch.
Why we need to push logs into Kibana ?
Mulesoft CloudHub stores up to 100 MB of log data per application per worker, or up to 30 days,
whichever limit is reached first. Due to this, we are not able to preserve all the logs for long time. And the
searching process is laborious. So, you have to push the logs into to ELK, which can store the logs for long
time and can visualize the logs.
How to push the logs into ELK ?
Externalize the Mulesoft Logs to Elastic Search using AWS Service.
Assumptions:
1. User is aware about the Mulesoft. And User have already created Hello world Application with
Mulesoft logger. For Hello world Application Read Here…
2. SQS is created and the API Gateway is created for SQS. If you are not aware to create the API
Gateway.
Procedure:
1. Configure Log4J.
2. Install Logstash, Elastic Search, Kibana
3. Configure Logstash.
4. configure Elastic Search.
5. Configure Kibana.
6. Visualize logs into Kibana.
1. Configure LOG4J.
Step 1. You have to create the application, for which you need to push the logs into Kibana.
Step 2. You have to open the log4j file of mule project and update the appender as following.
Step 3. Update the Appender Reference for SQS (Appender Name will appear in Appender Ref)
You have completed the Log4j Configuration, to push the logs into Kibana.
Step 4. Deploy the Project into CloudHub, and while deploying the application please disable the
CloudHub Logs.
Note : Once we Disable the CloudHub logs, the logs will not appear into the CloudHub. It will move to
the AWS SQS Service. If you need the logs available in both places(CloudHub and SQS), Please update
the Log4j as below.
2. Install Logstash, Elastic Search, Kibana
Logstash : The Logstash binaries are available from https://www.elastic.co/downloads. Download the
Logstash installation file for your host environment—TARG.GZ, DEB, ZIP, or RPM.
Unpack the file. Do not install Logstash into a directory path that contains colon (:) characters.
Elastic Search: The Elastic Search are available from the following link.
https://www.elastic.co/guide/en/elasticsearch/reference/current/zip-windows.html
This comes with a elasticsearch-service.bat command which will setup Elasticsearch to run as a
service.
Kibana: Download the .zip windows archive for Kibana v7.13.1 from the following link.
https://artifacts.elastic.co/downloads/kibana/kibana-7.13.1-windows-x86_64.zip
Please update the latest version.
3. Configure Logstash :
Step 1. Open the Config Folder in Logstash.
Step 2. Verify the *.conf file in Logstash, if available
Step 3. If only Sample config file available, please ignore and create a new file as name logstash-
sqs.conf
Step 4. Update the file with following Content:
input {
sqs {
region => "eu-central-1" // SQS Region
queue => "MuleSoftLogs" // SQS Queue Name
access_key_id => "XXXXXXXXXXXXXX" //AWS Access Key
secret_access_key => " XXXXXXXXXXXXXX " //AWS Secret key
}
}
filter {
json {
# Parses the incoming JSON message into fields.
source => "message"
}
}
output {
elasticsearch {
hosts => "localhost:9200"
codec => "json"
index => "mule-sqs"
#user => "elastic"
#password => "changeme"
}
}
Step 5. Go to Logstash bin folder and find the logstash.bat file.
Step 6. Open the Logstash Config file { logstash/bin/logstash.conf file }
Step 7. Set the output for elastic search as following
Note : The Elastic search port will be set in next step. So, we can set the same, once we will
setup the Elastic Search Configuration.
Step 8. Create the index for Kibana. (Kibana requires an index pattern to access the Elasticsearch
data that you want to explore. An index pattern selects the data to use and allows you to define
properties of the fields. An index pattern can point to a specific index, for example, your log data
from yesterday, or all indices that contain your data.)
Step 9. Trigger the Logstash.bat file to execute the Logstash.
Step 10. The default port for Logstash is 9600 (For Localhost)
Logs :
4. Configure Elastic Search.
Step 1. Open the elastic search folder and go to the Config folder.
Step 2. Open the file “elasticsearch.yml” and verify the port Number. (Default Port : 9200)
Note : Set the Same port Number in Logstash -> bin -> logstash.conf File -> output
Step 3. Run the elastic Search. { Elastic Search -> Bin -> elasticsearch.bat }
Step 4. Verify the elastic Search logs as below :
5. Configure Kibana.
Step 1. Open the Kibana Folder and go to the Kibana.yml file from config folder.
Step 2. Verify the kibana host and port. {Default Host : Localhost, Default Port : 5601}
Step 3. Verify the elastic Search URLs in the same file. { As elsticsearch config we set the host as
localhost and port is 9200 – In Configure Elastic Search Step 2.}
Step 4. Run the kibana application. { Kibana -> Bin -> kibana.bat }
Step 5. Verify the elastic Search logs as below :
Note: Elastic Search should be up and running for Kibana application, If elastic search fails to
run, you will not be able to run the Kibana application.
6. Visualize logs into Kibana.
Step 1. Open the Kibana application and click on Hamburger Icon.
Step 2. Go to Management Tab -> Stack Management.
Step 3. Go to Kibana -> Index Patterns
Step 4. Create the index Pattern
Step 5. Provide the same index name, which we defined in Logstash Output.
Note : Index Name should be same as defined in Logstash (Defined in Configure Logstash ->
Step Number 7)
Step 6. Config the Setting for index management as per the requirement. And create the index
pattern.
Step 7. Index Pattern Created Successfully.
Step 8. Click on Hamburger Icon -> Kibana -> Discover.
Step 9. Select the Valid index Pattern as below :
Step 10. Run the Application, once the logs create it will be visible to your Kibana Application as
below :
References:
1. https://docs.mulesoft.com/runtime-manager/custom-log-appender
2. https://www.elastic.co/elasticsearch/
3. https://www.elastic.co/kibana
4. https://www.elastic.co/logstash

More Related Content

What's hot

'Scalable Logging and Analytics with LogStash'
'Scalable Logging and Analytics with LogStash''Scalable Logging and Analytics with LogStash'
'Scalable Logging and Analytics with LogStash'Cloud Elements
 
Experiences in ELK with D3.js for Large Log Analysis and Visualization
Experiences in ELK with D3.js  for Large Log Analysis  and VisualizationExperiences in ELK with D3.js  for Large Log Analysis  and Visualization
Experiences in ELK with D3.js for Large Log Analysis and VisualizationSurasak Sanguanpong
 
How bol.com makes sense of its logs, using the Elastic technology stack.
How bol.com makes sense of its logs, using the Elastic technology stack.How bol.com makes sense of its logs, using the Elastic technology stack.
How bol.com makes sense of its logs, using the Elastic technology stack.Renzo Tomà
 
Centralised logging with ELK stack
Centralised logging with ELK stackCentralised logging with ELK stack
Centralised logging with ELK stackSimon Hanmer
 
Logstash + Elasticsearch + Kibana Presentation on Startit Tech Meetup
Logstash + Elasticsearch + Kibana Presentation on Startit Tech MeetupLogstash + Elasticsearch + Kibana Presentation on Startit Tech Meetup
Logstash + Elasticsearch + Kibana Presentation on Startit Tech MeetupStartit
 
Serhii Matynenko "How to Deal with Logs, Migrating from Monolith Architecture...
Serhii Matynenko "How to Deal with Logs, Migrating from Monolith Architecture...Serhii Matynenko "How to Deal with Logs, Migrating from Monolith Architecture...
Serhii Matynenko "How to Deal with Logs, Migrating from Monolith Architecture...LogeekNightUkraine
 
Monitoring Docker with ELK
Monitoring Docker with ELKMonitoring Docker with ELK
Monitoring Docker with ELKDaniel Berman
 
Open stack swift architecture and monitoring
Open stack swift architecture and monitoringOpen stack swift architecture and monitoring
Open stack swift architecture and monitoringKavit Munshi
 
Key features of rails 5.2 (2)
Key features of rails 5.2 (2)Key features of rails 5.2 (2)
Key features of rails 5.2 (2)Namrata Ukirde
 
Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit ...
Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit ...Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit ...
Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit ...ForgeRock
 
How we use Fluentd in Treasure Data
How we use Fluentd in Treasure DataHow we use Fluentd in Treasure Data
How we use Fluentd in Treasure DataSadayuki Furuhashi
 
AusNOG 2017: APNIC Update
AusNOG 2017: APNIC UpdateAusNOG 2017: APNIC Update
AusNOG 2017: APNIC UpdateAPNIC
 
Apache spark undocumented extensions
Apache spark undocumented extensionsApache spark undocumented extensions
Apache spark undocumented extensionsSandeep Joshi
 
Icinga 2009 at OSMC
Icinga 2009 at OSMCIcinga 2009 at OSMC
Icinga 2009 at OSMCIcinga
 
Working with large archives in AtoM in National Library of Wales
Working with large archives in AtoM in National Library of WalesWorking with large archives in AtoM in National Library of Wales
Working with large archives in AtoM in National Library of WalesVicky-Phillips
 
Logmanagement with Icinga2 and ELK
Logmanagement with Icinga2 and ELKLogmanagement with Icinga2 and ELK
Logmanagement with Icinga2 and ELKIcinga
 

What's hot (19)

'Scalable Logging and Analytics with LogStash'
'Scalable Logging and Analytics with LogStash''Scalable Logging and Analytics with LogStash'
'Scalable Logging and Analytics with LogStash'
 
Experiences in ELK with D3.js for Large Log Analysis and Visualization
Experiences in ELK with D3.js  for Large Log Analysis  and VisualizationExperiences in ELK with D3.js  for Large Log Analysis  and Visualization
Experiences in ELK with D3.js for Large Log Analysis and Visualization
 
Elk
Elk Elk
Elk
 
How bol.com makes sense of its logs, using the Elastic technology stack.
How bol.com makes sense of its logs, using the Elastic technology stack.How bol.com makes sense of its logs, using the Elastic technology stack.
How bol.com makes sense of its logs, using the Elastic technology stack.
 
Centralised logging with ELK stack
Centralised logging with ELK stackCentralised logging with ELK stack
Centralised logging with ELK stack
 
Logstash
LogstashLogstash
Logstash
 
Logstash + Elasticsearch + Kibana Presentation on Startit Tech Meetup
Logstash + Elasticsearch + Kibana Presentation on Startit Tech MeetupLogstash + Elasticsearch + Kibana Presentation on Startit Tech Meetup
Logstash + Elasticsearch + Kibana Presentation on Startit Tech Meetup
 
Serhii Matynenko "How to Deal with Logs, Migrating from Monolith Architecture...
Serhii Matynenko "How to Deal with Logs, Migrating from Monolith Architecture...Serhii Matynenko "How to Deal with Logs, Migrating from Monolith Architecture...
Serhii Matynenko "How to Deal with Logs, Migrating from Monolith Architecture...
 
Monitoring Docker with ELK
Monitoring Docker with ELKMonitoring Docker with ELK
Monitoring Docker with ELK
 
Open stack swift architecture and monitoring
Open stack swift architecture and monitoringOpen stack swift architecture and monitoring
Open stack swift architecture and monitoring
 
Key features of rails 5.2 (2)
Key features of rails 5.2 (2)Key features of rails 5.2 (2)
Key features of rails 5.2 (2)
 
Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit ...
Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit ...Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit ...
Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit ...
 
How to Develop OpenStack
How to Develop OpenStackHow to Develop OpenStack
How to Develop OpenStack
 
How we use Fluentd in Treasure Data
How we use Fluentd in Treasure DataHow we use Fluentd in Treasure Data
How we use Fluentd in Treasure Data
 
AusNOG 2017: APNIC Update
AusNOG 2017: APNIC UpdateAusNOG 2017: APNIC Update
AusNOG 2017: APNIC Update
 
Apache spark undocumented extensions
Apache spark undocumented extensionsApache spark undocumented extensions
Apache spark undocumented extensions
 
Icinga 2009 at OSMC
Icinga 2009 at OSMCIcinga 2009 at OSMC
Icinga 2009 at OSMC
 
Working with large archives in AtoM in National Library of Wales
Working with large archives in AtoM in National Library of WalesWorking with large archives in AtoM in National Library of Wales
Working with large archives in AtoM in National Library of Wales
 
Logmanagement with Icinga2 and ELK
Logmanagement with Icinga2 and ELKLogmanagement with Icinga2 and ELK
Logmanagement with Icinga2 and ELK
 

Similar to Mulesoft ELK

Mulesoft with ELK (Elastic Search, Log stash, Kibana)
Mulesoft with ELK (Elastic Search, Log stash, Kibana)Mulesoft with ELK (Elastic Search, Log stash, Kibana)
Mulesoft with ELK (Elastic Search, Log stash, Kibana)Gaurav Sethi
 
Centralized log-management-with-elastic-stack
Centralized log-management-with-elastic-stackCentralized log-management-with-elastic-stack
Centralized log-management-with-elastic-stackRich Lee
 
2015 03-16-elk at-bsides
2015 03-16-elk at-bsides2015 03-16-elk at-bsides
2015 03-16-elk at-bsidesJeremy Cohoe
 
Introduction to Kibana
Introduction to KibanaIntroduction to Kibana
Introduction to KibanaVineet .
 
Log analysis with the elk stack
Log analysis with the elk stackLog analysis with the elk stack
Log analysis with the elk stackVikrant Chauhan
 
Elk ruminating on logs
Elk ruminating on logsElk ruminating on logs
Elk ruminating on logsMathew Beane
 
ELK Ruminating on Logs (Zendcon 2016)
ELK Ruminating on Logs (Zendcon 2016)ELK Ruminating on Logs (Zendcon 2016)
ELK Ruminating on Logs (Zendcon 2016)Mathew Beane
 
Elk presentation 2#3
Elk presentation 2#3Elk presentation 2#3
Elk presentation 2#3uzzal basak
 
Filebeat Elastic Search Presentation.pptx
Filebeat Elastic Search Presentation.pptxFilebeat Elastic Search Presentation.pptx
Filebeat Elastic Search Presentation.pptxKnoldus Inc.
 
Content server installation guide
Content server installation guideContent server installation guide
Content server installation guideNaveed Bashir
 
Centralized Logging System Using ELK Stack
Centralized Logging System Using ELK StackCentralized Logging System Using ELK Stack
Centralized Logging System Using ELK StackRohit Sharma
 
AWS re:Invent 2016: Workshop: Building Your First Big Data Application with A...
AWS re:Invent 2016: Workshop: Building Your First Big Data Application with A...AWS re:Invent 2016: Workshop: Building Your First Big Data Application with A...
AWS re:Invent 2016: Workshop: Building Your First Big Data Application with A...Amazon Web Services
 
It Shore Beats Working: Configuring Elasticsearch to get the Most out of Clo...
It Shore Beats Working:  Configuring Elasticsearch to get the Most out of Clo...It Shore Beats Working:  Configuring Elasticsearch to get the Most out of Clo...
It Shore Beats Working: Configuring Elasticsearch to get the Most out of Clo...Ipro Tech
 
Elasticsearch features and ecosystem
Elasticsearch features and ecosystemElasticsearch features and ecosystem
Elasticsearch features and ecosystemPavel Alexeev
 
Case Study: Elasticsearch Ingest Using StreamSets at Cisco Intercloud
Case Study: Elasticsearch Ingest Using StreamSets at Cisco IntercloudCase Study: Elasticsearch Ingest Using StreamSets at Cisco Intercloud
Case Study: Elasticsearch Ingest Using StreamSets at Cisco IntercloudRick Bilodeau
 
Case Study: Elasticsearch Ingest Using StreamSets @ Cisco Intercloud
Case Study: Elasticsearch Ingest Using StreamSets @ Cisco IntercloudCase Study: Elasticsearch Ingest Using StreamSets @ Cisco Intercloud
Case Study: Elasticsearch Ingest Using StreamSets @ Cisco IntercloudStreamsets Inc.
 
Alfresco monitoring with Nagios and ELK stack
Alfresco monitoring with Nagios and ELK stackAlfresco monitoring with Nagios and ELK stack
Alfresco monitoring with Nagios and ELK stackCesar Capillas
 
BDA402 Deep Dive: Log Analytics with Amazon Elasticsearch Service
BDA402 Deep Dive: Log Analytics with Amazon Elasticsearch ServiceBDA402 Deep Dive: Log Analytics with Amazon Elasticsearch Service
BDA402 Deep Dive: Log Analytics with Amazon Elasticsearch ServiceAmazon Web Services
 
438996599-Kibana-101-pptx.pptx
438996599-Kibana-101-pptx.pptx438996599-Kibana-101-pptx.pptx
438996599-Kibana-101-pptx.pptxPranav684095
 
OSMC 2021 | Monitoring Open Infrastructure Logs – With Real Life Examples
OSMC 2021 | Monitoring Open Infrastructure Logs – With Real Life ExamplesOSMC 2021 | Monitoring Open Infrastructure Logs – With Real Life Examples
OSMC 2021 | Monitoring Open Infrastructure Logs – With Real Life ExamplesNETWAYS
 

Similar to Mulesoft ELK (20)

Mulesoft with ELK (Elastic Search, Log stash, Kibana)
Mulesoft with ELK (Elastic Search, Log stash, Kibana)Mulesoft with ELK (Elastic Search, Log stash, Kibana)
Mulesoft with ELK (Elastic Search, Log stash, Kibana)
 
Centralized log-management-with-elastic-stack
Centralized log-management-with-elastic-stackCentralized log-management-with-elastic-stack
Centralized log-management-with-elastic-stack
 
2015 03-16-elk at-bsides
2015 03-16-elk at-bsides2015 03-16-elk at-bsides
2015 03-16-elk at-bsides
 
Introduction to Kibana
Introduction to KibanaIntroduction to Kibana
Introduction to Kibana
 
Log analysis with the elk stack
Log analysis with the elk stackLog analysis with the elk stack
Log analysis with the elk stack
 
Elk ruminating on logs
Elk ruminating on logsElk ruminating on logs
Elk ruminating on logs
 
ELK Ruminating on Logs (Zendcon 2016)
ELK Ruminating on Logs (Zendcon 2016)ELK Ruminating on Logs (Zendcon 2016)
ELK Ruminating on Logs (Zendcon 2016)
 
Elk presentation 2#3
Elk presentation 2#3Elk presentation 2#3
Elk presentation 2#3
 
Filebeat Elastic Search Presentation.pptx
Filebeat Elastic Search Presentation.pptxFilebeat Elastic Search Presentation.pptx
Filebeat Elastic Search Presentation.pptx
 
Content server installation guide
Content server installation guideContent server installation guide
Content server installation guide
 
Centralized Logging System Using ELK Stack
Centralized Logging System Using ELK StackCentralized Logging System Using ELK Stack
Centralized Logging System Using ELK Stack
 
AWS re:Invent 2016: Workshop: Building Your First Big Data Application with A...
AWS re:Invent 2016: Workshop: Building Your First Big Data Application with A...AWS re:Invent 2016: Workshop: Building Your First Big Data Application with A...
AWS re:Invent 2016: Workshop: Building Your First Big Data Application with A...
 
It Shore Beats Working: Configuring Elasticsearch to get the Most out of Clo...
It Shore Beats Working:  Configuring Elasticsearch to get the Most out of Clo...It Shore Beats Working:  Configuring Elasticsearch to get the Most out of Clo...
It Shore Beats Working: Configuring Elasticsearch to get the Most out of Clo...
 
Elasticsearch features and ecosystem
Elasticsearch features and ecosystemElasticsearch features and ecosystem
Elasticsearch features and ecosystem
 
Case Study: Elasticsearch Ingest Using StreamSets at Cisco Intercloud
Case Study: Elasticsearch Ingest Using StreamSets at Cisco IntercloudCase Study: Elasticsearch Ingest Using StreamSets at Cisco Intercloud
Case Study: Elasticsearch Ingest Using StreamSets at Cisco Intercloud
 
Case Study: Elasticsearch Ingest Using StreamSets @ Cisco Intercloud
Case Study: Elasticsearch Ingest Using StreamSets @ Cisco IntercloudCase Study: Elasticsearch Ingest Using StreamSets @ Cisco Intercloud
Case Study: Elasticsearch Ingest Using StreamSets @ Cisco Intercloud
 
Alfresco monitoring with Nagios and ELK stack
Alfresco monitoring with Nagios and ELK stackAlfresco monitoring with Nagios and ELK stack
Alfresco monitoring with Nagios and ELK stack
 
BDA402 Deep Dive: Log Analytics with Amazon Elasticsearch Service
BDA402 Deep Dive: Log Analytics with Amazon Elasticsearch ServiceBDA402 Deep Dive: Log Analytics with Amazon Elasticsearch Service
BDA402 Deep Dive: Log Analytics with Amazon Elasticsearch Service
 
438996599-Kibana-101-pptx.pptx
438996599-Kibana-101-pptx.pptx438996599-Kibana-101-pptx.pptx
438996599-Kibana-101-pptx.pptx
 
OSMC 2021 | Monitoring Open Infrastructure Logs – With Real Life Examples
OSMC 2021 | Monitoring Open Infrastructure Logs – With Real Life ExamplesOSMC 2021 | Monitoring Open Infrastructure Logs – With Real Life Examples
OSMC 2021 | Monitoring Open Infrastructure Logs – With Real Life Examples
 

Recently uploaded

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
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
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 

Recently uploaded (20)

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
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
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 

Mulesoft ELK

  • 1. Mulesoft ELK Introduction Use the Elastic Stack (ELK stack) to analyze the business data and API analytics. You can use Logstash for Filebeat to process Anypoint Platform log files, insert them into an Elasticsearch database, and then analyze them with Kibana. Elastic Stack overview ELK stands for the three Elastic products - Elasticsearch, Logstash, and Kibana To understand what the Elastic core products, we will use a simple architecture: 1. The logs will be created by an application and pushed into the AWS SQS Queue. 2. Logstash aggregates the logs from different sources and processes it. 3. Elasticsearch stores and indexes the data in order to search it. 4. Kibana is the visualization tool that makes sense of the data. What is Logstash? Logstash is a data collection tool. It consists of three elements: input, filters, and output.
  • 2. What is Elasticsearch? ES (Elasticsearch) is a NoSQL database that is based on the Lucene search engine. ES provides RESTful APIs to search and analyze the data. Different data types such as numbers, text, and geo — structured or unstructured — can be stored. What is Kibana? Kibana is a data visualization tool. It helps you to quickly get insight into the data and offers capabilities like diagrams, dashboards, etc. Kibana uses all the data stored on Elasticsearch. Why we need to push logs into Kibana ? Mulesoft CloudHub stores up to 100 MB of log data per application per worker, or up to 30 days, whichever limit is reached first. Due to this, we are not able to preserve all the logs for long time. And the searching process is laborious. So, you have to push the logs into to ELK, which can store the logs for long time and can visualize the logs. How to push the logs into ELK ? Externalize the Mulesoft Logs to Elastic Search using AWS Service. Assumptions: 1. User is aware about the Mulesoft. And User have already created Hello world Application with Mulesoft logger. For Hello world Application Read Here… 2. SQS is created and the API Gateway is created for SQS. If you are not aware to create the API Gateway. Procedure: 1. Configure Log4J. 2. Install Logstash, Elastic Search, Kibana 3. Configure Logstash. 4. configure Elastic Search. 5. Configure Kibana. 6. Visualize logs into Kibana. 1. Configure LOG4J. Step 1. You have to create the application, for which you need to push the logs into Kibana.
  • 3. Step 2. You have to open the log4j file of mule project and update the appender as following. Step 3. Update the Appender Reference for SQS (Appender Name will appear in Appender Ref) You have completed the Log4j Configuration, to push the logs into Kibana. Step 4. Deploy the Project into CloudHub, and while deploying the application please disable the CloudHub Logs.
  • 4. Note : Once we Disable the CloudHub logs, the logs will not appear into the CloudHub. It will move to the AWS SQS Service. If you need the logs available in both places(CloudHub and SQS), Please update the Log4j as below. 2. Install Logstash, Elastic Search, Kibana Logstash : The Logstash binaries are available from https://www.elastic.co/downloads. Download the Logstash installation file for your host environment—TARG.GZ, DEB, ZIP, or RPM.
  • 5. Unpack the file. Do not install Logstash into a directory path that contains colon (:) characters. Elastic Search: The Elastic Search are available from the following link. https://www.elastic.co/guide/en/elasticsearch/reference/current/zip-windows.html This comes with a elasticsearch-service.bat command which will setup Elasticsearch to run as a service. Kibana: Download the .zip windows archive for Kibana v7.13.1 from the following link. https://artifacts.elastic.co/downloads/kibana/kibana-7.13.1-windows-x86_64.zip Please update the latest version. 3. Configure Logstash : Step 1. Open the Config Folder in Logstash. Step 2. Verify the *.conf file in Logstash, if available Step 3. If only Sample config file available, please ignore and create a new file as name logstash- sqs.conf Step 4. Update the file with following Content: input { sqs { region => "eu-central-1" // SQS Region queue => "MuleSoftLogs" // SQS Queue Name access_key_id => "XXXXXXXXXXXXXX" //AWS Access Key
  • 6. secret_access_key => " XXXXXXXXXXXXXX " //AWS Secret key } } filter { json { # Parses the incoming JSON message into fields. source => "message" } } output { elasticsearch { hosts => "localhost:9200" codec => "json" index => "mule-sqs" #user => "elastic" #password => "changeme" } } Step 5. Go to Logstash bin folder and find the logstash.bat file. Step 6. Open the Logstash Config file { logstash/bin/logstash.conf file } Step 7. Set the output for elastic search as following
  • 7. Note : The Elastic search port will be set in next step. So, we can set the same, once we will setup the Elastic Search Configuration. Step 8. Create the index for Kibana. (Kibana requires an index pattern to access the Elasticsearch data that you want to explore. An index pattern selects the data to use and allows you to define properties of the fields. An index pattern can point to a specific index, for example, your log data from yesterday, or all indices that contain your data.) Step 9. Trigger the Logstash.bat file to execute the Logstash. Step 10. The default port for Logstash is 9600 (For Localhost) Logs : 4. Configure Elastic Search. Step 1. Open the elastic search folder and go to the Config folder.
  • 8. Step 2. Open the file “elasticsearch.yml” and verify the port Number. (Default Port : 9200) Note : Set the Same port Number in Logstash -> bin -> logstash.conf File -> output Step 3. Run the elastic Search. { Elastic Search -> Bin -> elasticsearch.bat } Step 4. Verify the elastic Search logs as below : 5. Configure Kibana. Step 1. Open the Kibana Folder and go to the Kibana.yml file from config folder. Step 2. Verify the kibana host and port. {Default Host : Localhost, Default Port : 5601} Step 3. Verify the elastic Search URLs in the same file. { As elsticsearch config we set the host as localhost and port is 9200 – In Configure Elastic Search Step 2.} Step 4. Run the kibana application. { Kibana -> Bin -> kibana.bat } Step 5. Verify the elastic Search logs as below :
  • 9. Note: Elastic Search should be up and running for Kibana application, If elastic search fails to run, you will not be able to run the Kibana application. 6. Visualize logs into Kibana. Step 1. Open the Kibana application and click on Hamburger Icon. Step 2. Go to Management Tab -> Stack Management. Step 3. Go to Kibana -> Index Patterns Step 4. Create the index Pattern Step 5. Provide the same index name, which we defined in Logstash Output. Note : Index Name should be same as defined in Logstash (Defined in Configure Logstash -> Step Number 7) Step 6. Config the Setting for index management as per the requirement. And create the index pattern.
  • 10. Step 7. Index Pattern Created Successfully. Step 8. Click on Hamburger Icon -> Kibana -> Discover. Step 9. Select the Valid index Pattern as below :
  • 11. Step 10. Run the Application, once the logs create it will be visible to your Kibana Application as below : References: 1. https://docs.mulesoft.com/runtime-manager/custom-log-appender 2. https://www.elastic.co/elasticsearch/ 3. https://www.elastic.co/kibana 4. https://www.elastic.co/logstash