My favorites | Sign in
Project Logo
             
Search
for
Updated Apr 14, 2009 by austin.ok
Labels: Phase-Deploy, Phase-Implementation
ServerStatus  
Server status page and cron job. Socorro are you happy?

Introduction

The reporter has a server status page. There are web and cron components to this feature.

Web App

webapp-php aka the reporter has a url /status which will give you a "happy" page showing either happy|grumpy|deathly as a status. There is a list of current stats as well as several graphs of recent stats. Example: http://crash-stats.mozilla.com/status

DB Table

Statistics are stored in server_status which aggregate data from jobs and processors tables.

Data Definitions

id - primary key

date_recently_completed - timestamp for job most recently processed in jobs table

date_oldest_job_queued - timestamp for the oldest job which is incomplete

avg_process_sec - Average number of seconds (float) for jobs completed since last run or 0.0 in edge case where no jobs have been processed

avg_wait_sec- Average number of seconds (float) for jobs completed since last run or 0.0 in edge case where no jobs have been processed

waiting_job_count - Number of jobs incomplete in queue

processors_count - Number of processors running to process jobs

date_created - timestamp for this record being updated

Note - please keep this section in sync with serverstatus.py

Installation

  1. Setup DB by running the DDL SQL in
sql/server_status_sql.txt
  1. To install the cron job:
  2. Prepare serverstatusconfig.py

cp socorro/scripts/config/serverstatusconfig.py.dist socorro/scripts/config/serverstatusconfig.py

  1. Install a new cron job which runs every 5 minutes
socorro/scripts/startServerStatus.py
  1. Goto the status webpage
/status

Operations

These are run via cron every 5 minutes.


Sign in to add a comment
Hosted by Google Code