SlideShare una empresa de Scribd logo
1 de 48
Descargar para leer sin conexión
Centralized Logging System Using MongoDB
@vparihar
AVP Engineering,Webonise Lab
Vivek Parihar
Who Am I?
● A Weboniser and Rubyist
● Blogger(vparihar01.github.com)
● MongoDb user
● Geek
● DevOps
● Mainly write Ruby, but have great passion for Javascript and Cloud
Platforms...
● What is Logging?
● Why we need Logging?
● Logging DO’s and Don’t
● Logs are Streams, Not FIles
● Problems managing Logs for huge INFRA
● What Central Logging System can do for us?
● Central Logging System Architecture
● What and why Fluentd?
● Why MongoDB is good fit.
Agenda
What is Logging?
Mmmm Logging: It is the most important part of any
application.
In General, Logging refers to keeping track of
something.
Why we need Logging?
Logging: Helps me finding and fixing bugs
Logging: Extensively used for Debugging
Logging: Helps us diagnose & understand the
behaviour of application.
Logging: Tells us exactly what happened
when, where and why?
Who did it ?
At what time ?
What did he steal ?
Logging: Do’s and Don’t
#1 It should be FAST
Logging: Do’s and Don’t
#2 Should not affect user
Prevent DISK BLOAT
It should not be like-:
{
● "#########its working#########"
● "!!!!!coming here in to get secondary users!!!!!"
● "#########I am Here#########"
● "#########Task completed#######"
}
Logging: Do’s and Don’t
#3 Do Log only useful INFO
Logging: Do’s and Don’t
4. Differentiate Log Levels
Logs Are Streams, Not Files
Logs are a stream, and it behooves everyone to treat them as such. Your
programs should log to stdout and/or stderr and omit any attempt to handle
log paths, log rotation, or sending logs over the syslog protocol.
Directing where the program’s log stream goes can be left up to the runtime
container: a local terminal or IDE (in development environments), an Upstart
/ Systemd launch script (in traditional hosting environments), or a system
like Logplex/Heroku (in a platform environment).
By: Adam Wiggins, Heroku co-founder.
Problems managing Logs for huge Infra
What about infra like these ?
Problems managing Logs for huge Infra
Expression like:
How can we solve huge Infra problem ?
Solution: Centralized Logging System
What Centralized Logging System can do
for us?
What Centralized Logging System can do for
us?
All of the logs are in one place, this makes things like searching
through logs and analysis across multiple servers easier than
bouncing around between boxes. Greatly simplifying log analysis
and correlation tasks.
#1 Log Collections
#2 Aggregation
Scaled-out servers behind load balancers each produce their
own log files, making it impossible to debug a single action flow
that distributed between servers, unless the logs converge into
a single article.
What Centralized Logging System can do for
us?
#3 High Availability
Suppose your system is down or overloaded and unable to tell
you what happened.
What Centralized Logging System can do for
us?
Local logs from the server may be lost in the event of an
intrusion or system failure. But by having the logs elsewhere
you at least have a chance of finding something useful about
what happened.
#4 Security
What Centralized Logging System can do for
us?
It reduces disk space usage and disk I/O on core servers
that should be busy doing something else.
#5 Prevent Disk BLOAT
What Centralized Logging System can do for
us?
#6 Visual Indicators
Abnormal behaviors can be detected faster when we see
them in a visual instrument such as a graph, where peak
points are easily noticed.
What Centralized Logging System can do for
us?
Centralized Logging System Architecture
What and Why ?
What’s Fluentd?
It’s like syslogd, but uses JSON for log messages
What’s Fluentd?
What’s Fluentd?
time
tag
record
What’s Fluentd?
What’s Fluentd?
Plug-in Plug-in Plug-in
So Fluentd is a:
Buffer
Router
Collector
Converter
Aggregator
…….
What’s Fluentd?
It’s written in RUBY :)
Why Fluentd?
Extensibility - Plugin Architecture
Why Fluentd?
Unified log format - JSON format
Why Fluentd?
Reliable - HA configuration
Why Fluentd?
Easy to install - RPM/deb packages
> sudo fluentd --setup && fluentd
Very small footprint
> small engine (3,000 line) + plugins
Why Fluentd?
Why is good fit ?
1. It’s Schemaless
Document-oriented / JSON is
a great format for log
information. Very flexible and
“schemaless” in the sense we
can throw in an extra field
any time we want.
Why ?
2. Fire and Forget
MongoDB inserts can be done asynchronously.
Why ?
3. Scalable and easy to replicate.
Built in ReplicaSet and Sharding provides high availability.
Why ?
4. Centralized and easy remote access
Why ?
5. Capped Collection
● They "remember" the insertion order of their documents
● They store inserted documents in the insertion order on disk
● They remove the oldest documents in the collection automatically as new
documents are inserted
However, you give up some things with capped collections:
● They have a fixed maximum size
● You cannot shared a capped collection
● Any updates to documents in a capped collection must not cause a document to
grow. (i.e. not all$set operations will work, and no $push or $pushAll will)
● You may not explicitly .remove() documents from a capped collection
Why ?
6. Tailing Logs
● You’ll really miss ability to tail logfiles
● Or, .. will you?
● MongoDB offers tailable cursors
Why ?
Tailable Cursors
What with Tailable Cursors ?
We can implement the pub/sub using
Node.js and MongoDB
https://github.com/scttnlsn/mubsub
Why ?
Thanks
Would Love to answer your queries...
Vivek Parihar
@vparihar

Más contenido relacionado

La actualidad más candente

ELK at LinkedIn - Kafka, scaling, lessons learned
ELK at LinkedIn - Kafka, scaling, lessons learnedELK at LinkedIn - Kafka, scaling, lessons learned
ELK at LinkedIn - Kafka, scaling, lessons learnedTin Le
 
Elk devops
Elk devopsElk devops
Elk devopsIdeato
 
Toronto High Scalability meetup - Scaling ELK
Toronto High Scalability meetup - Scaling ELKToronto High Scalability meetup - Scaling ELK
Toronto High Scalability meetup - Scaling ELKAndrew Trossman
 
Open Source Logging and Monitoring Tools
Open Source Logging and Monitoring ToolsOpen Source Logging and Monitoring Tools
Open Source Logging and Monitoring ToolsPhase2
 
Elastic - ELK, Logstash & Kibana
Elastic - ELK, Logstash & KibanaElastic - ELK, Logstash & Kibana
Elastic - ELK, Logstash & KibanaSpringPeople
 
Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...
Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...
Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...Andrii Vozniuk
 
Logs aggregation and analysis
Logs aggregation and analysisLogs aggregation and analysis
Logs aggregation and analysisDivante
 
The ELK Stack - Get to Know Logs
The ELK Stack - Get to Know LogsThe ELK Stack - Get to Know Logs
The ELK Stack - Get to Know LogsGlobalLogic Ukraine
 
Elasitcsearch + Logstash + Kibana 日誌監控
Elasitcsearch + Logstash + Kibana 日誌監控Elasitcsearch + Logstash + Kibana 日誌監控
Elasitcsearch + Logstash + Kibana 日誌監控Jui An Huang (黃瑞安)
 
ELK, a real case study
ELK,  a real case studyELK,  a real case study
ELK, a real case studyPaolo Tonin
 
ELK Wrestling (Leeds DevOps)
ELK Wrestling (Leeds DevOps)ELK Wrestling (Leeds DevOps)
ELK Wrestling (Leeds DevOps)Steve Elliott
 
Log analysis using Logstash,ElasticSearch and Kibana
Log analysis using Logstash,ElasticSearch and KibanaLog analysis using Logstash,ElasticSearch and Kibana
Log analysis using Logstash,ElasticSearch and KibanaAvinash Ramineni
 
"How about no grep and zabbix?". ELK based alerts and metrics.
"How about no grep and zabbix?". ELK based alerts and metrics."How about no grep and zabbix?". ELK based alerts and metrics.
"How about no grep and zabbix?". ELK based alerts and metrics.Vladimir Pavkin
 
Fluentd - Flexible, Stable, Scalable
Fluentd - Flexible, Stable, ScalableFluentd - Flexible, Stable, Scalable
Fluentd - Flexible, Stable, ScalableShu Ting Tseng
 
Introduction to ELK
Introduction to ELKIntroduction to ELK
Introduction to ELKYuHsuan Chen
 
使用 Elasticsearch 及 Kibana 進行巨量資料搜尋及視覺化-曾書庭
使用 Elasticsearch 及 Kibana 進行巨量資料搜尋及視覺化-曾書庭使用 Elasticsearch 及 Kibana 進行巨量資料搜尋及視覺化-曾書庭
使用 Elasticsearch 及 Kibana 進行巨量資料搜尋及視覺化-曾書庭台灣資料科學年會
 
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
 

La actualidad más candente (20)

ELK at LinkedIn - Kafka, scaling, lessons learned
ELK at LinkedIn - Kafka, scaling, lessons learnedELK at LinkedIn - Kafka, scaling, lessons learned
ELK at LinkedIn - Kafka, scaling, lessons learned
 
Elk devops
Elk devopsElk devops
Elk devops
 
Toronto High Scalability meetup - Scaling ELK
Toronto High Scalability meetup - Scaling ELKToronto High Scalability meetup - Scaling ELK
Toronto High Scalability meetup - Scaling ELK
 
Open Source Logging and Monitoring Tools
Open Source Logging and Monitoring ToolsOpen Source Logging and Monitoring Tools
Open Source Logging and Monitoring Tools
 
Elastic - ELK, Logstash & Kibana
Elastic - ELK, Logstash & KibanaElastic - ELK, Logstash & Kibana
Elastic - ELK, Logstash & Kibana
 
Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...
Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...
Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...
 
Logs aggregation and analysis
Logs aggregation and analysisLogs aggregation and analysis
Logs aggregation and analysis
 
The ELK Stack - Get to Know Logs
The ELK Stack - Get to Know LogsThe ELK Stack - Get to Know Logs
The ELK Stack - Get to Know Logs
 
Elasitcsearch + Logstash + Kibana 日誌監控
Elasitcsearch + Logstash + Kibana 日誌監控Elasitcsearch + Logstash + Kibana 日誌監控
Elasitcsearch + Logstash + Kibana 日誌監控
 
ELK, a real case study
ELK,  a real case studyELK,  a real case study
ELK, a real case study
 
ELK Wrestling (Leeds DevOps)
ELK Wrestling (Leeds DevOps)ELK Wrestling (Leeds DevOps)
ELK Wrestling (Leeds DevOps)
 
Elk
Elk Elk
Elk
 
Log analysis using Logstash,ElasticSearch and Kibana
Log analysis using Logstash,ElasticSearch and KibanaLog analysis using Logstash,ElasticSearch and Kibana
Log analysis using Logstash,ElasticSearch and Kibana
 
"How about no grep and zabbix?". ELK based alerts and metrics.
"How about no grep and zabbix?". ELK based alerts and metrics."How about no grep and zabbix?". ELK based alerts and metrics.
"How about no grep and zabbix?". ELK based alerts and metrics.
 
Fluentd - Flexible, Stable, Scalable
Fluentd - Flexible, Stable, ScalableFluentd - Flexible, Stable, Scalable
Fluentd - Flexible, Stable, Scalable
 
Introduction to ELK
Introduction to ELKIntroduction to ELK
Introduction to ELK
 
ELK Stack
ELK StackELK Stack
ELK Stack
 
使用 Elasticsearch 及 Kibana 進行巨量資料搜尋及視覺化-曾書庭
使用 Elasticsearch 及 Kibana 進行巨量資料搜尋及視覺化-曾書庭使用 Elasticsearch 及 Kibana 進行巨量資料搜尋及視覺化-曾書庭
使用 Elasticsearch 及 Kibana 進行巨量資料搜尋及視覺化-曾書庭
 
Introduction to ELK
Introduction to ELKIntroduction to ELK
Introduction to ELK
 
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
 

Similar a Centralized logging system using mongoDB

Monitoring.pptx
Monitoring.pptxMonitoring.pptx
Monitoring.pptxShadi Akil
 
Discover a lightning fast way to debug in Salesforce with RFLIB - Summer 20
Discover a lightning fast way to debug in Salesforce with RFLIB - Summer 20Discover a lightning fast way to debug in Salesforce with RFLIB - Summer 20
Discover a lightning fast way to debug in Salesforce with RFLIB - Summer 20Johannes Fischer
 
Log Management Systems
Log Management SystemsLog Management Systems
Log Management SystemsMehdi Hamidi
 
cLoki: Like Loki but for ClickHouse
cLoki: Like Loki but for ClickHousecLoki: Like Loki but for ClickHouse
cLoki: Like Loki but for ClickHouseAltinity Ltd
 
Serverless for High Performance Computing
Serverless for High Performance ComputingServerless for High Performance Computing
Serverless for High Performance ComputingLuciano Mammino
 
Developer Fundamentals - Logging
Developer Fundamentals - LoggingDeveloper Fundamentals - Logging
Developer Fundamentals - LoggingAxel Irriger
 
DevOps - Interview Question.pdf
DevOps - Interview Question.pdfDevOps - Interview Question.pdf
DevOps - Interview Question.pdfMinhTrnNht7
 
Turbo charge your logs
Turbo charge your logsTurbo charge your logs
Turbo charge your logsJeremy Cook
 
Monitoring&Logging - Stanislav Kolenkin
Monitoring&Logging - Stanislav Kolenkin  Monitoring&Logging - Stanislav Kolenkin
Monitoring&Logging - Stanislav Kolenkin Kuberton
 
Distributed tracing 101
Distributed tracing 101Distributed tracing 101
Distributed tracing 101Itiel Shwartz
 
Advantages of golang development services & 10 most used go frameworks
Advantages of golang development services & 10 most used go frameworksAdvantages of golang development services & 10 most used go frameworks
Advantages of golang development services & 10 most used go frameworksKaty Slemon
 
Not my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructureNot my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructureYshay Yaacobi
 
Building a blog with an Onion Architecture
Building a blog with an Onion ArchitectureBuilding a blog with an Onion Architecture
Building a blog with an Onion ArchitectureBarry O Sullivan
 
Onion Architecture and the Blog
Onion Architecture and the BlogOnion Architecture and the Blog
Onion Architecture and the Blogbarryosull
 
DevOps - A Purpose for an Institution.pdf
DevOps - A Purpose for an Institution.pdfDevOps - A Purpose for an Institution.pdf
DevOps - A Purpose for an Institution.pdfVishwas N
 
Building scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thriftBuilding scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thriftTalentica Software
 
Has serverless adoption hit a roadblock?
Has serverless adoption hit a roadblock?Has serverless adoption hit a roadblock?
Has serverless adoption hit a roadblock?Veselin Pizurica
 
Turbo charge your logs
Turbo charge your logsTurbo charge your logs
Turbo charge your logsJeremy Cook
 
Prefect Paris Airflow Meetup Jeff Hale April 2023.pdf
Prefect Paris Airflow Meetup Jeff Hale April 2023.pdfPrefect Paris Airflow Meetup Jeff Hale April 2023.pdf
Prefect Paris Airflow Meetup Jeff Hale April 2023.pdfJeff Hale
 

Similar a Centralized logging system using mongoDB (20)

Monitoring.pptx
Monitoring.pptxMonitoring.pptx
Monitoring.pptx
 
Discover a lightning fast way to debug in Salesforce with RFLIB - Summer 20
Discover a lightning fast way to debug in Salesforce with RFLIB - Summer 20Discover a lightning fast way to debug in Salesforce with RFLIB - Summer 20
Discover a lightning fast way to debug in Salesforce with RFLIB - Summer 20
 
Log Management Systems
Log Management SystemsLog Management Systems
Log Management Systems
 
cLoki: Like Loki but for ClickHouse
cLoki: Like Loki but for ClickHousecLoki: Like Loki but for ClickHouse
cLoki: Like Loki but for ClickHouse
 
Serverless for High Performance Computing
Serverless for High Performance ComputingServerless for High Performance Computing
Serverless for High Performance Computing
 
Developer Fundamentals - Logging
Developer Fundamentals - LoggingDeveloper Fundamentals - Logging
Developer Fundamentals - Logging
 
DevOps - Interview Question.pdf
DevOps - Interview Question.pdfDevOps - Interview Question.pdf
DevOps - Interview Question.pdf
 
Turbo charge your logs
Turbo charge your logsTurbo charge your logs
Turbo charge your logs
 
Monitoring&Logging - Stanislav Kolenkin
Monitoring&Logging - Stanislav Kolenkin  Monitoring&Logging - Stanislav Kolenkin
Monitoring&Logging - Stanislav Kolenkin
 
FluentD vs. Logstash
FluentD vs. LogstashFluentD vs. Logstash
FluentD vs. Logstash
 
Distributed tracing 101
Distributed tracing 101Distributed tracing 101
Distributed tracing 101
 
Advantages of golang development services & 10 most used go frameworks
Advantages of golang development services & 10 most used go frameworksAdvantages of golang development services & 10 most used go frameworks
Advantages of golang development services & 10 most used go frameworks
 
Not my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructureNot my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructure
 
Building a blog with an Onion Architecture
Building a blog with an Onion ArchitectureBuilding a blog with an Onion Architecture
Building a blog with an Onion Architecture
 
Onion Architecture and the Blog
Onion Architecture and the BlogOnion Architecture and the Blog
Onion Architecture and the Blog
 
DevOps - A Purpose for an Institution.pdf
DevOps - A Purpose for an Institution.pdfDevOps - A Purpose for an Institution.pdf
DevOps - A Purpose for an Institution.pdf
 
Building scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thriftBuilding scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thrift
 
Has serverless adoption hit a roadblock?
Has serverless adoption hit a roadblock?Has serverless adoption hit a roadblock?
Has serverless adoption hit a roadblock?
 
Turbo charge your logs
Turbo charge your logsTurbo charge your logs
Turbo charge your logs
 
Prefect Paris Airflow Meetup Jeff Hale April 2023.pdf
Prefect Paris Airflow Meetup Jeff Hale April 2023.pdfPrefect Paris Airflow Meetup Jeff Hale April 2023.pdf
Prefect Paris Airflow Meetup Jeff Hale April 2023.pdf
 

Más de Vivek Parihar

A Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching StrategyA Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching StrategyVivek Parihar
 
Programming languages and concepts by vivek parihar
Programming languages and concepts by vivek pariharProgramming languages and concepts by vivek parihar
Programming languages and concepts by vivek pariharVivek Parihar
 
Case Study to build a tablet based app that is a shopping assistant.
Case Study to build a tablet based app that is a shopping assistant.Case Study to build a tablet based app that is a shopping assistant.
Case Study to build a tablet based app that is a shopping assistant.Vivek Parihar
 
Too much into acquisition without fixing retention problem: Let's Re-prioriti...
Too much into acquisition without fixing retention problem: Let's Re-prioriti...Too much into acquisition without fixing retention problem: Let's Re-prioriti...
Too much into acquisition without fixing retention problem: Let's Re-prioriti...Vivek Parihar
 
Devops for beginners
Devops for beginnersDevops for beginners
Devops for beginnersVivek Parihar
 
How fast can you onboard a new team member with VAGRANT ?
How fast can you onboard a new team member with VAGRANT ?How fast can you onboard a new team member with VAGRANT ?
How fast can you onboard a new team member with VAGRANT ?Vivek Parihar
 
Mobile First Approach - The key to cross platform interface design
Mobile First Approach - The key to cross platform interface designMobile First Approach - The key to cross platform interface design
Mobile First Approach - The key to cross platform interface designVivek Parihar
 
10 Deployments a day - A brief on extreme release protocols
10 Deployments a day - A brief on extreme release protocols10 Deployments a day - A brief on extreme release protocols
10 Deployments a day - A brief on extreme release protocolsVivek Parihar
 
MongoDb scalability and high availability with Replica-Set
MongoDb scalability and high availability with Replica-SetMongoDb scalability and high availability with Replica-Set
MongoDb scalability and high availability with Replica-SetVivek Parihar
 
Cloud foundry presentation
Cloud foundry presentation Cloud foundry presentation
Cloud foundry presentation Vivek Parihar
 

Más de Vivek Parihar (11)

A Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching StrategyA Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching Strategy
 
Programming languages and concepts by vivek parihar
Programming languages and concepts by vivek pariharProgramming languages and concepts by vivek parihar
Programming languages and concepts by vivek parihar
 
Case Study to build a tablet based app that is a shopping assistant.
Case Study to build a tablet based app that is a shopping assistant.Case Study to build a tablet based app that is a shopping assistant.
Case Study to build a tablet based app that is a shopping assistant.
 
Too much into acquisition without fixing retention problem: Let's Re-prioriti...
Too much into acquisition without fixing retention problem: Let's Re-prioriti...Too much into acquisition without fixing retention problem: Let's Re-prioriti...
Too much into acquisition without fixing retention problem: Let's Re-prioriti...
 
Devops for beginners
Devops for beginnersDevops for beginners
Devops for beginners
 
How fast can you onboard a new team member with VAGRANT ?
How fast can you onboard a new team member with VAGRANT ?How fast can you onboard a new team member with VAGRANT ?
How fast can you onboard a new team member with VAGRANT ?
 
Mobile First Approach - The key to cross platform interface design
Mobile First Approach - The key to cross platform interface designMobile First Approach - The key to cross platform interface design
Mobile First Approach - The key to cross platform interface design
 
10 Deployments a day - A brief on extreme release protocols
10 Deployments a day - A brief on extreme release protocols10 Deployments a day - A brief on extreme release protocols
10 Deployments a day - A brief on extreme release protocols
 
MongoDb scalability and high availability with Replica-Set
MongoDb scalability and high availability with Replica-SetMongoDb scalability and high availability with Replica-Set
MongoDb scalability and high availability with Replica-Set
 
Cloud foundry presentation
Cloud foundry presentation Cloud foundry presentation
Cloud foundry presentation
 
Hu mongous db v2
Hu mongous db v2Hu mongous db v2
Hu mongous db v2
 

Último

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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
 
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
 
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
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
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
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 

Último (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
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
 
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
 
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
 
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?
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
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...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

Centralized logging system using mongoDB

  • 1. Centralized Logging System Using MongoDB @vparihar AVP Engineering,Webonise Lab Vivek Parihar
  • 2. Who Am I? ● A Weboniser and Rubyist ● Blogger(vparihar01.github.com) ● MongoDb user ● Geek ● DevOps ● Mainly write Ruby, but have great passion for Javascript and Cloud Platforms...
  • 3. ● What is Logging? ● Why we need Logging? ● Logging DO’s and Don’t ● Logs are Streams, Not FIles ● Problems managing Logs for huge INFRA ● What Central Logging System can do for us? ● Central Logging System Architecture ● What and why Fluentd? ● Why MongoDB is good fit. Agenda
  • 4. What is Logging? Mmmm Logging: It is the most important part of any application. In General, Logging refers to keeping track of something.
  • 5. Why we need Logging?
  • 6. Logging: Helps me finding and fixing bugs
  • 8. Logging: Helps us diagnose & understand the behaviour of application.
  • 9. Logging: Tells us exactly what happened when, where and why? Who did it ? At what time ? What did he steal ?
  • 10. Logging: Do’s and Don’t #1 It should be FAST
  • 11. Logging: Do’s and Don’t #2 Should not affect user Prevent DISK BLOAT
  • 12. It should not be like-: { ● "#########its working#########" ● "!!!!!coming here in to get secondary users!!!!!" ● "#########I am Here#########" ● "#########Task completed#######" } Logging: Do’s and Don’t #3 Do Log only useful INFO
  • 13. Logging: Do’s and Don’t 4. Differentiate Log Levels
  • 14. Logs Are Streams, Not Files Logs are a stream, and it behooves everyone to treat them as such. Your programs should log to stdout and/or stderr and omit any attempt to handle log paths, log rotation, or sending logs over the syslog protocol. Directing where the program’s log stream goes can be left up to the runtime container: a local terminal or IDE (in development environments), an Upstart / Systemd launch script (in traditional hosting environments), or a system like Logplex/Heroku (in a platform environment). By: Adam Wiggins, Heroku co-founder.
  • 15. Problems managing Logs for huge Infra
  • 16. What about infra like these ? Problems managing Logs for huge Infra
  • 18. How can we solve huge Infra problem ?
  • 20. What Centralized Logging System can do for us?
  • 21. What Centralized Logging System can do for us? All of the logs are in one place, this makes things like searching through logs and analysis across multiple servers easier than bouncing around between boxes. Greatly simplifying log analysis and correlation tasks. #1 Log Collections
  • 22. #2 Aggregation Scaled-out servers behind load balancers each produce their own log files, making it impossible to debug a single action flow that distributed between servers, unless the logs converge into a single article. What Centralized Logging System can do for us?
  • 23. #3 High Availability Suppose your system is down or overloaded and unable to tell you what happened. What Centralized Logging System can do for us?
  • 24. Local logs from the server may be lost in the event of an intrusion or system failure. But by having the logs elsewhere you at least have a chance of finding something useful about what happened. #4 Security What Centralized Logging System can do for us?
  • 25. It reduces disk space usage and disk I/O on core servers that should be busy doing something else. #5 Prevent Disk BLOAT What Centralized Logging System can do for us?
  • 26. #6 Visual Indicators Abnormal behaviors can be detected faster when we see them in a visual instrument such as a graph, where peak points are easily noticed. What Centralized Logging System can do for us?
  • 29. What’s Fluentd? It’s like syslogd, but uses JSON for log messages
  • 34. So Fluentd is a: Buffer Router Collector Converter Aggregator ……. What’s Fluentd?
  • 35. It’s written in RUBY :) Why Fluentd?
  • 36. Extensibility - Plugin Architecture Why Fluentd?
  • 37. Unified log format - JSON format Why Fluentd?
  • 38. Reliable - HA configuration Why Fluentd?
  • 39. Easy to install - RPM/deb packages > sudo fluentd --setup && fluentd Very small footprint > small engine (3,000 line) + plugins Why Fluentd?
  • 40. Why is good fit ?
  • 41. 1. It’s Schemaless Document-oriented / JSON is a great format for log information. Very flexible and “schemaless” in the sense we can throw in an extra field any time we want. Why ?
  • 42. 2. Fire and Forget MongoDB inserts can be done asynchronously. Why ?
  • 43. 3. Scalable and easy to replicate. Built in ReplicaSet and Sharding provides high availability. Why ?
  • 44. 4. Centralized and easy remote access Why ?
  • 45. 5. Capped Collection ● They "remember" the insertion order of their documents ● They store inserted documents in the insertion order on disk ● They remove the oldest documents in the collection automatically as new documents are inserted However, you give up some things with capped collections: ● They have a fixed maximum size ● You cannot shared a capped collection ● Any updates to documents in a capped collection must not cause a document to grow. (i.e. not all$set operations will work, and no $push or $pushAll will) ● You may not explicitly .remove() documents from a capped collection Why ?
  • 46. 6. Tailing Logs ● You’ll really miss ability to tail logfiles ● Or, .. will you? ● MongoDB offers tailable cursors Why ?
  • 47. Tailable Cursors What with Tailable Cursors ? We can implement the pub/sub using Node.js and MongoDB https://github.com/scttnlsn/mubsub Why ?
  • 48. Thanks Would Love to answer your queries... Vivek Parihar @vparihar