Giter Club home page Giter Club logo

alphagov.govuk-cdn-logs-monitor's Introduction

CDN log monitor

This project is archived and no longer run on GOV.UK as per RFC-93

Monitor the Content Delivery Network (CDN) logs for GOV.UK to find problems with the site. In particular, look for cases where a URL which has been returning a success status changes to returning an error status.

Technical documentation

This application has two parts:

  • A process which follows incoming logs from the CDN, sending reports to statsd and logstash about overall traffic patterns and problems with pages which are known to have worked in the past.
  • A process which runs nightly to count up accesses for each hour for each combination of path, HTTP method, resulting HTTP status, and CDN backend used to serve the request.

The processing of historical logs is split into several stages, to ensure that only the necessary additional processing is done each day. Details of these stages are in the documentation.

Testing

Run the unit tests with rspec:

bundle exec rspec

Dependencies

  • statsd-ruby - ruby gem, to update 404 metrics

Running

GOVUK_PROCESSED_DATA_DIR=processed_data_directory GOVUK_CDN_LOG_DIR=log_directory bundle exec ruby ./scripts/monitor_logs.rb

  • Streams data from the current CDN log and compares it against the list of known good pages on GOV.UK.
  • Sends statsd events about traffic levels (status codes, and CDN backends used).
  • Sends statsd events and logstash events about accesses to pages which are in the list of known good urls, but which have 4xx or 5xx status codes.

GOVUK_PROCESSED_DATA_DIR=processed_data_directory GOVUK_CDN_LOG_DIR=log_directory bundle exec ruby ./scripts/process_completed_logs.rb

  • Counts entries in all the existing logs which haven't yet been processed.
  • Updates the list of known good urls.
  • Designed to be run nightly.

alphagov.govuk-cdn-logs-monitor's People

Contributors

barrucadu avatar bishboria avatar h-lame avatar kevindew avatar mattbostock avatar rboulton avatar rjw1 avatar surminus avatar thomasleese avatar tijmenb avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.