ATLAS Production Monitoring Tool Prototype
We aim to create a functional prototype of a Monitoring Tool based on Django, that would have this functionality as a starting point:
- Ability to browse tasks and jobs by their respective IDs
- Ability to check task consistency
One component of the project is a significantly updated Django/JSON demo recently presented in Atlas meetings, and the other is an adaptation of algorithms existing in command-line tools (P.Nevski).
In this prototype, we need to have access to the production database, as well as to the task request database. Multiple databases aren't supported in the stable Django release we currently use, 1.0.2. However, we chose this release to complete the current development cycle, since we need a stable and proven development environment (more recent versions have more experimental features and likely prone to bugs). We decided therefor to host a small web app that
provides access to the Task Definition database, and serve data as a web service based on the URL similar to
. In this approach, the "main" Django app would use curl or a similar tool to post a query on the satellite service. Note that due to default behavior of curl and its use of proxies, when running multiple Django instances locally on a development server, and they need to communicate with each other, you need to set:
setenv NO_PROXY localhost
There are two Django applications:
- prodmon - the "main" application that does queries in the production database and implements logic for consistency check. All the queries are done on Django object sets.
- taskdef - satellite application that currently only serves the parent task number based on the ID number of task being analysed
For development and testing, one needs to start these two on the same machine with commands as follows:
- in the taskdef directory,
python2.5 manage.py runserver 8001
- in the prodmon directory,
python2.5 manage.py runserver 8000
The former command is for taskdef
and its port number is hardcoded in the development version of prodmon
, so if one needs to change it, it has to be done in the code
We use jQuery to provide convenience for page design and functionality. This is used in particular to control visibility of page elements and automatic parsing of XML in the client, which we really prefer to do since some of the data in tables like ejobdegbig
is coded in this format and we don't want to load the server. The code for jQuery and its libraries is packaged with both applications.
The PYTHONPATH variable in each application should point to the Django installation hierarchy as well as to the path containing the application code
In the screenshot below, we display the upper part of the task browser. Either the task or job number can be specified for query. In latter case, the task consistency check will not be enabled. The "browse" button actuates simple browsing (with example of output shown), whereas the "check" button controls the consistency check for the task whose number was entered.
When the "Check" button is pressed, the prodmon
applications posts a request to taskdef
in order to determine the ID number of the parent task. Based on this, a consistency check is done on the elements of the task. The output in the first cut of the application was preserved in the form found in the command-line utility (Pavel Nevski)
- 25 May 2013