SlideShare a Scribd company logo
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.

More Related Content

Similar to Graylog2 use cases for distributed web applications

香港六合彩
香港六合彩香港六合彩
香港六合彩
uliuqd
 
Handson1 6 federp
Handson1 6 federpHandson1 6 federp
Handson1 6 federp
federpmatc
 
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
 
Kashif guffar
Kashif guffarKashif guffar
Kashif guffar
Kashif Asim
 
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
Davide Bellettini
 
The Digital Demise - by Robin Turner
The Digital Demise - by Robin TurnerThe Digital Demise - by Robin Turner
The Digital Demise - by Robin Turner
robinturner
 
Code instrumentation
Code instrumentationCode instrumentation
Code instrumentation
Mennan 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 Paper
AVG 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 models
graphitech
 
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
Ace Web Academy -Career Development Center
 
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
arfa442827
 
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 Docker
Chuck Megivern
 
Dev with github enterprise
Dev with github enterpriseDev with github enterprise
Dev with github enterprise
Hiroshi Wada
 
Bug Tracking System
Bug Tracking SystemBug Tracking System
Bug Tracking System
Kishan Acharya
 
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 slack
Chikashi Kato
 
fowa miami
fowa miamifowa miami
fowa miami
Jonathan LeBlanc
 

Similar to Graylog2 use cases for distributed web applications (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
 

Recently uploaded

AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 

Recently uploaded (20)

AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 

Graylog2 use cases for distributed web applications

  • 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.