SlideShare una empresa de Scribd logo
1 de 15
Graylog2 use cases for
distributed web applications
Manage your logs in the dark and have lasers
going and make it look like you're from space
Lennart Koopmann, 2010
www.lennartkoopmann.net / www.graylog2.org
It's a DevOps thing.
Compose meaningful and structured log
messages to allow easy analysis and searching.
Bad:
- Could not repair image foo.jpg
- Could not repair image bar.jpg
- Could not repair image baz.jpg – Invalid header checksum.
- Missing POST param 'creditcardnumber'
- Payment of John Doe did not succeeed.
Good:
- [runner][repair-broken-images]Could not repair image
foo.jpg – File not found.
- [runner][repair-broken-images] Could not repair image
bar.jpg – File not found.
- [runner][repair-broken-images] Could not repair image
baz.jpg – Invalid header checksum.
- [payment][checkout] Missing POST param 'creditcartnumber'
CUSTOMER #1337
- [payment][backend] Payment of CUSTOMER #1337 did not
succeeed.
Which images were broken?
repair-broken-images.+repair images(.+.jpg)s.s(.+)
foo.jpg
File not found.
bar.jpg
File not found.
baz.jpg
Invalid header checksum.
Why did the payment fail in the
backend?
payment].+CUSTOMER #1337
[payment][checkout] Missing POST param 'creditcartnumber'
CUSTOMER #1337
[payment][backend] Payment of CUSTOMER #1337 did not
succeeed.
Message type distribution
payment
runner
payment-backend
payment-checkout
runner-image
Define log guidelines
Just like your usual coding guidelines.
(slap everybody who does not follow them with a large trout )
Use case 0:
The usual stuff.
Use Graylog2 to monitor your applications from the inside. Analyze
your logs, see if something goes wrong, receive warnings when
messages rates climb over a given level. Check the logs regularly
to identify problems.
Use case 1:
Developer logs.
Use GELF and give every developer his own hostname like
yourapp-johndoe – Now create a stream for every developer. Voilá:
No more tail -f debug.log and Graylog2 sugar from the beginning of
your development cycle.
Use case 2:
Important messages
Imagine you do some kind of domain registration for customers.
This stuff likes to fail and you want to be informed when it does and
why it did. Create a stream that fetches all failed domain
registrations and subscribe to it by email (released in v. 0.9.4) to be
notified instantly.
Use case 3:
Streams of certain application parts.
You have some scripts searching for broken images, deleting or
repairing them that are running the whole day. Create a stream
that fetches all messages from a runner and get a live output of
what it is doing right now. You could also create a blacklist instead
of a stream if you don't want to bug others with the messages. Get
warnings like in use case 2 when something goes wrong.
Use case 4:
Live tail at release.
You are releasing a new version of your application today. Start the
live tail (released in v. 0.9.4) to see what is happening in your
system in real time.
Use case 5:
Activity log.
A user blames the support that you deleted all his content. How to
debug this? Would be not such a big problem if you had logged
every activity of your users to Graylog2. Blacklist [activitylog]
and Log messages like [activitylog] USER #45262 DELETED
image25526. Search for what you need with blacklist disabled.
(released in v. 0.9.4)
Important:
Use structured and meaningful messages.
Have logging guidelines. (and follow them)
Choose severity with care: You might be called in the night once
that EMERG message arrives.
Don't log useless messages. That will be the clutter that ruins your
analysis, statistics and warning levels.
Already think of what to log in your problem analysis steps.

Más contenido relacionado

Similar a Graylog2 use cases distributed web apps

香港六合彩
香港六合彩香港六合彩
香港六合彩uliuqd
 
Handson1 6 federp
Handson1 6 federpHandson1 6 federp
Handson1 6 federpfederpmatc
 
Teach Your Sites to Call for Help: Automated Problem Reporting for Online Ser...
Teach Your Sites to Call for Help: Automated Problem Reporting for Online Ser...Teach Your Sites to Call for Help: Automated Problem Reporting for Online Ser...
Teach Your Sites to Call for Help: Automated Problem Reporting for Online Ser...Caktus Group
 
CQRS and Event Sourcing with MongoDB and PHP
CQRS and Event Sourcing with MongoDB and PHPCQRS and Event Sourcing with MongoDB and PHP
CQRS and Event Sourcing with MongoDB and PHPDavide Bellettini
 
The Digital Demise - by Robin Turner
The Digital Demise - by Robin TurnerThe Digital Demise - by Robin Turner
The Digital Demise - by Robin Turnerrobinturner
 
Code instrumentation
Code instrumentationCode instrumentation
Code instrumentationMennan Tekbir
 
Avg Technologies Vawtrak Banking Trojan White Paper
Avg Technologies Vawtrak Banking Trojan White PaperAvg Technologies Vawtrak Banking Trojan White Paper
Avg Technologies Vawtrak Banking Trojan White PaperAVG Technologies
 
AIESEC CMS - Bug tracking
AIESEC CMS - Bug trackingAIESEC CMS - Bug tracking
AIESEC CMS - Bug trackingBogdan Rusu
 
Polyline download and visualization over terrain models
Polyline download and visualization over terrain modelsPolyline download and visualization over terrain models
Polyline download and visualization over terrain modelsgraphitech
 
PERTEMUAN 3_INTRO TO ANDROID APP DEV.pdf
PERTEMUAN 3_INTRO TO ANDROID APP DEV.pdfPERTEMUAN 3_INTRO TO ANDROID APP DEV.pdf
PERTEMUAN 3_INTRO TO ANDROID APP DEV.pdfarfa442827
 
Cs seminar 20071207
Cs seminar 20071207Cs seminar 20071207
Cs seminar 20071207Todd Deshane
 
ASP.NET Core and Docker
ASP.NET Core and DockerASP.NET Core and Docker
ASP.NET Core and DockerChuck Megivern
 
Dev with github enterprise
Dev with github enterpriseDev with github enterprise
Dev with github enterpriseHiroshi Wada
 
Data Warehousing (Practical Questions Paper) [CBSGS - 75:25 Pattern] {2015 Ma...
Data Warehousing (Practical Questions Paper) [CBSGS - 75:25 Pattern] {2015 Ma...Data Warehousing (Practical Questions Paper) [CBSGS - 75:25 Pattern] {2015 Ma...
Data Warehousing (Practical Questions Paper) [CBSGS - 75:25 Pattern] {2015 Ma...Mumbai B.Sc.IT Study
 
Pipe your script to slack
Pipe your script to slackPipe your script to slack
Pipe your script to slackChikashi Kato
 

Similar a Graylog2 use cases distributed web apps (20)

香港六合彩
香港六合彩香港六合彩
香港六合彩
 
Handson1 6 federp
Handson1 6 federpHandson1 6 federp
Handson1 6 federp
 
Teach Your Sites to Call for Help: Automated Problem Reporting for Online Ser...
Teach Your Sites to Call for Help: Automated Problem Reporting for Online Ser...Teach Your Sites to Call for Help: Automated Problem Reporting for Online Ser...
Teach Your Sites to Call for Help: Automated Problem Reporting for Online Ser...
 
Kashif guffar
Kashif guffarKashif guffar
Kashif guffar
 
CQRS and Event Sourcing with MongoDB and PHP
CQRS and Event Sourcing with MongoDB and PHPCQRS and Event Sourcing with MongoDB and PHP
CQRS and Event Sourcing with MongoDB and PHP
 
The Digital Demise - by Robin Turner
The Digital Demise - by Robin TurnerThe Digital Demise - by Robin Turner
The Digital Demise - by Robin Turner
 
Code instrumentation
Code instrumentationCode instrumentation
Code instrumentation
 
Avg Technologies Vawtrak Banking Trojan White Paper
Avg Technologies Vawtrak Banking Trojan White PaperAvg Technologies Vawtrak Banking Trojan White Paper
Avg Technologies Vawtrak Banking Trojan White Paper
 
AIESEC CMS - Bug tracking
AIESEC CMS - Bug trackingAIESEC CMS - Bug tracking
AIESEC CMS - Bug tracking
 
Polyline download and visualization over terrain models
Polyline download and visualization over terrain modelsPolyline download and visualization over terrain models
Polyline download and visualization over terrain models
 
How to build your own Android App -Step by Step Guide
How to build your own Android App -Step by Step GuideHow to build your own Android App -Step by Step Guide
How to build your own Android App -Step by Step Guide
 
PERTEMUAN 3_INTRO TO ANDROID APP DEV.pdf
PERTEMUAN 3_INTRO TO ANDROID APP DEV.pdfPERTEMUAN 3_INTRO TO ANDROID APP DEV.pdf
PERTEMUAN 3_INTRO TO ANDROID APP DEV.pdf
 
Cs seminar 20071207
Cs seminar 20071207Cs seminar 20071207
Cs seminar 20071207
 
ASP.NET Core and Docker
ASP.NET Core and DockerASP.NET Core and Docker
ASP.NET Core and Docker
 
Users guide
Users guideUsers guide
Users guide
 
Dev with github enterprise
Dev with github enterpriseDev with github enterprise
Dev with github enterprise
 
Bug Tracking System
Bug Tracking SystemBug Tracking System
Bug Tracking System
 
Data Warehousing (Practical Questions Paper) [CBSGS - 75:25 Pattern] {2015 Ma...
Data Warehousing (Practical Questions Paper) [CBSGS - 75:25 Pattern] {2015 Ma...Data Warehousing (Practical Questions Paper) [CBSGS - 75:25 Pattern] {2015 Ma...
Data Warehousing (Practical Questions Paper) [CBSGS - 75:25 Pattern] {2015 Ma...
 
Pipe your script to slack
Pipe your script to slackPipe your script to slack
Pipe your script to slack
 
fowa miami
fowa miamifowa miami
fowa miami
 

Último

DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Fact vs. Fiction: Autodetecting Hallucinations in LLMs
Fact vs. Fiction: Autodetecting Hallucinations in LLMsFact vs. Fiction: Autodetecting Hallucinations in LLMs
Fact vs. Fiction: Autodetecting Hallucinations in LLMsZilliz
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your QueriesExploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your QueriesSanjay Willie
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 

Último (20)

DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Fact vs. Fiction: Autodetecting Hallucinations in LLMs
Fact vs. Fiction: Autodetecting Hallucinations in LLMsFact vs. Fiction: Autodetecting Hallucinations in LLMs
Fact vs. Fiction: Autodetecting Hallucinations in LLMs
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your QueriesExploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 

Graylog2 use cases distributed web apps

  • 1. Graylog2 use cases for distributed web applications Manage your logs in the dark and have lasers going and make it look like you're from space Lennart Koopmann, 2010 www.lennartkoopmann.net / www.graylog2.org
  • 2. It's a DevOps thing. Compose meaningful and structured log messages to allow easy analysis and searching.
  • 3. Bad: - Could not repair image foo.jpg - Could not repair image bar.jpg - Could not repair image baz.jpg – Invalid header checksum. - Missing POST param 'creditcardnumber' - Payment of John Doe did not succeeed.
  • 4. Good: - [runner][repair-broken-images]Could not repair image foo.jpg – File not found. - [runner][repair-broken-images] Could not repair image bar.jpg – File not found. - [runner][repair-broken-images] Could not repair image baz.jpg – Invalid header checksum. - [payment][checkout] Missing POST param 'creditcartnumber' CUSTOMER #1337 - [payment][backend] Payment of CUSTOMER #1337 did not succeeed.
  • 5. Which images were broken? repair-broken-images.+repair images(.+.jpg)s.s(.+) foo.jpg File not found. bar.jpg File not found. baz.jpg Invalid header checksum.
  • 6. Why did the payment fail in the backend? payment].+CUSTOMER #1337 [payment][checkout] Missing POST param 'creditcartnumber' CUSTOMER #1337 [payment][backend] Payment of CUSTOMER #1337 did not succeeed.
  • 8. Define log guidelines Just like your usual coding guidelines. (slap everybody who does not follow them with a large trout )
  • 9. Use case 0: The usual stuff. Use Graylog2 to monitor your applications from the inside. Analyze your logs, see if something goes wrong, receive warnings when messages rates climb over a given level. Check the logs regularly to identify problems.
  • 10. Use case 1: Developer logs. Use GELF and give every developer his own hostname like yourapp-johndoe – Now create a stream for every developer. Voilá: No more tail -f debug.log and Graylog2 sugar from the beginning of your development cycle.
  • 11. Use case 2: Important messages Imagine you do some kind of domain registration for customers. This stuff likes to fail and you want to be informed when it does and why it did. Create a stream that fetches all failed domain registrations and subscribe to it by email (released in v. 0.9.4) to be notified instantly.
  • 12. Use case 3: Streams of certain application parts. You have some scripts searching for broken images, deleting or repairing them that are running the whole day. Create a stream that fetches all messages from a runner and get a live output of what it is doing right now. You could also create a blacklist instead of a stream if you don't want to bug others with the messages. Get warnings like in use case 2 when something goes wrong.
  • 13. Use case 4: Live tail at release. You are releasing a new version of your application today. Start the live tail (released in v. 0.9.4) to see what is happening in your system in real time.
  • 14. Use case 5: Activity log. A user blames the support that you deleted all his content. How to debug this? Would be not such a big problem if you had logged every activity of your users to Graylog2. Blacklist [activitylog] and Log messages like [activitylog] USER #45262 DELETED image25526. Search for what you need with blacklist disabled. (released in v. 0.9.4)
  • 15. Important: Use structured and meaningful messages. Have logging guidelines. (and follow them) Choose severity with care: You might be called in the night once that EMERG message arrives. Don't log useless messages. That will be the clutter that ruins your analysis, statistics and warning levels. Already think of what to log in your problem analysis steps.