SlideShare une entreprise Scribd logo
1  sur  34
Rails exception tracking with Graylog2 Manage your logs in the dark and have lasers going and make it look like you're from space Lennart Koopmann RubyAndRails EU Amsterdam, 2010
About me Lennart Koopmann 22 years old Living in Hamburg, working at Jimdo lennartkoopmann.net / @_lennart
Log server with web interface.
phpLogCon …  let's not talk about that Graylog1: August 2009 Graylog2: August 2010
 
Syslog daemon (TCP/UDP)
GELF (UDP)
Graylog extended log format UDP - Max (GZIP) 8192 byte per message (Chunking is supported) Libraries for Ruby and PHP available
{ }
{ ' message ':'Exception: Something went wrong.' }
{ ' message ':'Exception: Something went wrong.', ' full_message ':'Stacktrace.Some env vars' }
{ ' message ':'Exception: Something went wrong.', ' full_message ':'Stacktrace.Some env vars', ' host ':'www19' }
{ ' message ':'Exception: Something went wrong.', ' full_message ':'Stacktrace.Some env vars', ' host ':'www19', ' file ':'/var/www/index.php' }
{ ' message ':'Exception: Something went wrong.', ' full_message ':'Stacktrace.Some env vars', ' host ':'www19', ' file ':'/var/www/index.php', ' line ':2638 }
{ ' message ':'Exception: Something went wrong.', ' full_message ':'Stacktrace.Some env vars', ' host ':'www19', ' file ':'/var/www/index.php', ' line ':2638, ' level ':1 }
{ ' message ':'Exception: Something went wrong.', ' full_message ':'Stacktrace.Some env vars', ' host ':'www19', ' file ':'/var/www/index.php', ' line ':2638, ' level ':1, ' something ':'foo' }
{ ' message ':'Exception: Something went wrong.', ' full_message ':'Stacktrace.Some env vars', ' host ':'www19', ' file ':'/var/www/index.php', ' line ':2638, ' level ':1, ' something ':'foo', ' something_else ':'bar' }
Chunking
Use Cases
Plain syslog Collect everything of your /var/log from all servers, aggregate, analyze and get a warning if something goes wrong
GELF Embed it into the logging class of your application and trigger with every error. Include stacktrace and env vars in full message. Later filter by file:line to get statistics.
Aggregate, analyze and get a warning if something goes wrong
Notifications Currently only Nagios hook (rake task) – Triggered at too many messages in last X minutes
Average page generation time Graylog1 / MySQL: ~12000ms
Average page generation time Graylog1 / MySQL: ~12000ms Graylog2 / MongoDB: ~250ms
Exception tracking with Rails Rack middleware available as gem
lennart   ~$  sudo gem install graylog2_exceptions Successfully installed gelf-0.9.1 Successfully installed graylog2_exceptions-0.5.3
# config/environment.rb config.middleware.use " Graylog2Exceptions ", { :host  => ' 127.0.0.1 ', :port  => ' 12201 ', :local_app_name  => ' mama ' }
Roadmap
Incident management Define chained rules that explain an incident. Trigger several actions when incident occurs.
Fine grained notifications Be informed via Email, XMPP, SMS by Graylog2 directly without Nagios hook
More analyzing
More search features
Live demo. www.graylog2.org / @Graylog2 www.lennartkoopmann.net / @_lennart (Slides are on Slideshare)

Contenu connexe

Tendances

Apache Flink Training: DataStream API Part 1 Basic
 Apache Flink Training: DataStream API Part 1 Basic Apache Flink Training: DataStream API Part 1 Basic
Apache Flink Training: DataStream API Part 1 Basic
Flink Forward
 

Tendances (20)

Spark stream - Kafka
Spark stream - Kafka Spark stream - Kafka
Spark stream - Kafka
 
PyParis2017 / Tutorial transcript - Function-as-a-service : a pythonic perspe...
PyParis2017 / Tutorial transcript - Function-as-a-service : a pythonic perspe...PyParis2017 / Tutorial transcript - Function-as-a-service : a pythonic perspe...
PyParis2017 / Tutorial transcript - Function-as-a-service : a pythonic perspe...
 
Naresh
NareshNaresh
Naresh
 
0.5mln packets per second with Erlang
0.5mln packets per second with Erlang0.5mln packets per second with Erlang
0.5mln packets per second with Erlang
 
Stephan Ewen - Scaling to large State
Stephan Ewen - Scaling to large StateStephan Ewen - Scaling to large State
Stephan Ewen - Scaling to large State
 
Sync with async
Sync with  asyncSync with  async
Sync with async
 
Explore your prometheus data in grafana - Promcon 2018
Explore your prometheus data in grafana - Promcon 2018Explore your prometheus data in grafana - Promcon 2018
Explore your prometheus data in grafana - Promcon 2018
 
Runtime Bytecode Transformation for Smalltalk
Runtime Bytecode Transformation for SmalltalkRuntime Bytecode Transformation for Smalltalk
Runtime Bytecode Transformation for Smalltalk
 
Django debugging
Django debuggingDjango debugging
Django debugging
 
Nmap 9 truth "Nothing to say any more"
Nmap 9 truth "Nothing to say  any more"Nmap 9 truth "Nothing to say  any more"
Nmap 9 truth "Nothing to say any more"
 
Apache Flink Training: DataStream API Part 1 Basic
 Apache Flink Training: DataStream API Part 1 Basic Apache Flink Training: DataStream API Part 1 Basic
Apache Flink Training: DataStream API Part 1 Basic
 
Storing 16 Bytes at Scale
Storing 16 Bytes at ScaleStoring 16 Bytes at Scale
Storing 16 Bytes at Scale
 
Install
InstallInstall
Install
 
Our way of systems monitoring in application development
Our way of systems monitoring in application developmentOur way of systems monitoring in application development
Our way of systems monitoring in application development
 
AMC Minor Technical Issues
AMC Minor Technical IssuesAMC Minor Technical Issues
AMC Minor Technical Issues
 
Your data is in Prometheus, now what? (CurrencyFair Engineering Meetup, 2016)
Your data is in Prometheus, now what? (CurrencyFair Engineering Meetup, 2016)Your data is in Prometheus, now what? (CurrencyFair Engineering Meetup, 2016)
Your data is in Prometheus, now what? (CurrencyFair Engineering Meetup, 2016)
 
OASGraph LoopBack 4 Integration
OASGraph LoopBack 4 IntegrationOASGraph LoopBack 4 Integration
OASGraph LoopBack 4 Integration
 
Nmap
NmapNmap
Nmap
 
IPLOG? A beginner's IDS for the WIN!
IPLOG? A beginner's IDS for the WIN!IPLOG? A beginner's IDS for the WIN!
IPLOG? A beginner's IDS for the WIN!
 
Reactive Java (GeeCON 2014)
Reactive Java (GeeCON 2014)Reactive Java (GeeCON 2014)
Reactive Java (GeeCON 2014)
 

Similaire à Rails exception tracking with Graylog2 - RubyAndRails 2010 EU

Wireshark Lab Ethernet and ARP v7.0 Supplement to Comp.docx
Wireshark Lab Ethernet and ARP v7.0  Supplement to Comp.docxWireshark Lab Ethernet and ARP v7.0  Supplement to Comp.docx
Wireshark Lab Ethernet and ARP v7.0 Supplement to Comp.docx
ambersalomon88660
 
Redis深入浅出
Redis深入浅出Redis深入浅出
Redis深入浅出
ruoyi ruan
 
Node js presentation
Node js presentationNode js presentation
Node js presentation
martincabrera
 

Similaire à Rails exception tracking with Graylog2 - RubyAndRails 2010 EU (20)

Low Latency Logging with RabbitMQ (PHP London - 4th Sep 2014)
Low Latency Logging with RabbitMQ (PHP London - 4th Sep 2014)Low Latency Logging with RabbitMQ (PHP London - 4th Sep 2014)
Low Latency Logging with RabbitMQ (PHP London - 4th Sep 2014)
 
Low Latency Logging with RabbitMQ (Brno PHP, CZ - 20th Sep 2014)
Low Latency Logging with RabbitMQ (Brno PHP, CZ - 20th Sep 2014)Low Latency Logging with RabbitMQ (Brno PHP, CZ - 20th Sep 2014)
Low Latency Logging with RabbitMQ (Brno PHP, CZ - 20th Sep 2014)
 
Managing the logs of your (Rails) applications - Arrrrcamp 2011
Managing the logs of your (Rails) applications - Arrrrcamp 2011Managing the logs of your (Rails) applications - Arrrrcamp 2011
Managing the logs of your (Rails) applications - Arrrrcamp 2011
 
If you have a problem, if no one else can help... and if you can find them, m...
If you have a problem, if no one else can help... and if you can find them, m...If you have a problem, if no one else can help... and if you can find them, m...
If you have a problem, if no one else can help... and if you can find them, m...
 
Wireshark Lab Ethernet and ARP v7.0 Supplement to Comp.docx
Wireshark Lab Ethernet and ARP v7.0  Supplement to Comp.docxWireshark Lab Ethernet and ARP v7.0  Supplement to Comp.docx
Wireshark Lab Ethernet and ARP v7.0 Supplement to Comp.docx
 
Rails hosting
Rails hostingRails hosting
Rails hosting
 
Embed--Basic PERL XS
Embed--Basic PERL XSEmbed--Basic PERL XS
Embed--Basic PERL XS
 
Application Logging in the 21st century - 2014.key
Application Logging in the 21st century - 2014.keyApplication Logging in the 21st century - 2014.key
Application Logging in the 21st century - 2014.key
 
How Xslate Works
How Xslate WorksHow Xslate Works
How Xslate Works
 
Redis深入浅出
Redis深入浅出Redis深入浅出
Redis深入浅出
 
Pcapy and dpkt - tcpdump on steroids - Ran Leibman - DevOpsDays Tel Aviv 2018
Pcapy and dpkt - tcpdump on steroids - Ran Leibman - DevOpsDays Tel Aviv 2018Pcapy and dpkt - tcpdump on steroids - Ran Leibman - DevOpsDays Tel Aviv 2018
Pcapy and dpkt - tcpdump on steroids - Ran Leibman - DevOpsDays Tel Aviv 2018
 
JDO 2019: Kubernetes logging techniques with a touch of LogSense - Marcin Stożek
JDO 2019: Kubernetes logging techniques with a touch of LogSense - Marcin StożekJDO 2019: Kubernetes logging techniques with a touch of LogSense - Marcin Stożek
JDO 2019: Kubernetes logging techniques with a touch of LogSense - Marcin Stożek
 
Per aspera ad grid To the grid computing through difficulties
Per aspera ad grid To the grid computing through difficultiesPer aspera ad grid To the grid computing through difficulties
Per aspera ad grid To the grid computing through difficulties
 
Node js presentation
Node js presentationNode js presentation
Node js presentation
 
Os Wilhelm
Os WilhelmOs Wilhelm
Os Wilhelm
 
CAPI and OpenCAPI Hardware acceleration enablement
CAPI and OpenCAPI Hardware acceleration enablementCAPI and OpenCAPI Hardware acceleration enablement
CAPI and OpenCAPI Hardware acceleration enablement
 
D. Fast, Simple User-Space Network Functions with Snabb (RIPE 77)
D. Fast, Simple User-Space Network Functions with Snabb (RIPE 77)D. Fast, Simple User-Space Network Functions with Snabb (RIPE 77)
D. Fast, Simple User-Space Network Functions with Snabb (RIPE 77)
 
One-Liners to Rule Them All
One-Liners to Rule Them AllOne-Liners to Rule Them All
One-Liners to Rule Them All
 
Composer - Package Management for PHP. Silver Bullet?
Composer - Package Management for PHP. Silver Bullet?Composer - Package Management for PHP. Silver Bullet?
Composer - Package Management for PHP. Silver Bullet?
 
XMPP - Beyond IM
XMPP - Beyond IMXMPP - Beyond IM
XMPP - Beyond IM
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
[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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
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...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

Rails exception tracking with Graylog2 - RubyAndRails 2010 EU

  • 1. Rails exception tracking with Graylog2 Manage your logs in the dark and have lasers going and make it look like you're from space Lennart Koopmann RubyAndRails EU Amsterdam, 2010
  • 2. About me Lennart Koopmann 22 years old Living in Hamburg, working at Jimdo lennartkoopmann.net / @_lennart
  • 3. Log server with web interface.
  • 4. phpLogCon … let's not talk about that Graylog1: August 2009 Graylog2: August 2010
  • 5.  
  • 8. Graylog extended log format UDP - Max (GZIP) 8192 byte per message (Chunking is supported) Libraries for Ruby and PHP available
  • 9. { }
  • 10. { ' message ':'Exception: Something went wrong.' }
  • 11. { ' message ':'Exception: Something went wrong.', ' full_message ':'Stacktrace.Some env vars' }
  • 12. { ' message ':'Exception: Something went wrong.', ' full_message ':'Stacktrace.Some env vars', ' host ':'www19' }
  • 13. { ' message ':'Exception: Something went wrong.', ' full_message ':'Stacktrace.Some env vars', ' host ':'www19', ' file ':'/var/www/index.php' }
  • 14. { ' message ':'Exception: Something went wrong.', ' full_message ':'Stacktrace.Some env vars', ' host ':'www19', ' file ':'/var/www/index.php', ' line ':2638 }
  • 15. { ' message ':'Exception: Something went wrong.', ' full_message ':'Stacktrace.Some env vars', ' host ':'www19', ' file ':'/var/www/index.php', ' line ':2638, ' level ':1 }
  • 16. { ' message ':'Exception: Something went wrong.', ' full_message ':'Stacktrace.Some env vars', ' host ':'www19', ' file ':'/var/www/index.php', ' line ':2638, ' level ':1, ' something ':'foo' }
  • 17. { ' message ':'Exception: Something went wrong.', ' full_message ':'Stacktrace.Some env vars', ' host ':'www19', ' file ':'/var/www/index.php', ' line ':2638, ' level ':1, ' something ':'foo', ' something_else ':'bar' }
  • 20. Plain syslog Collect everything of your /var/log from all servers, aggregate, analyze and get a warning if something goes wrong
  • 21. GELF Embed it into the logging class of your application and trigger with every error. Include stacktrace and env vars in full message. Later filter by file:line to get statistics.
  • 22. Aggregate, analyze and get a warning if something goes wrong
  • 23. Notifications Currently only Nagios hook (rake task) – Triggered at too many messages in last X minutes
  • 24. Average page generation time Graylog1 / MySQL: ~12000ms
  • 25. Average page generation time Graylog1 / MySQL: ~12000ms Graylog2 / MongoDB: ~250ms
  • 26. Exception tracking with Rails Rack middleware available as gem
  • 27. lennart ~$ sudo gem install graylog2_exceptions Successfully installed gelf-0.9.1 Successfully installed graylog2_exceptions-0.5.3
  • 28. # config/environment.rb config.middleware.use " Graylog2Exceptions ", { :host => ' 127.0.0.1 ', :port => ' 12201 ', :local_app_name => ' mama ' }
  • 30. Incident management Define chained rules that explain an incident. Trigger several actions when incident occurs.
  • 31. Fine grained notifications Be informed via Email, XMPP, SMS by Graylog2 directly without Nagios hook
  • 34. Live demo. www.graylog2.org / @Graylog2 www.lennartkoopmann.net / @_lennart (Slides are on Slideshare)