This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

The apache-manager package helps to collect monitoring metrics about the Apache web server and kill worker processes that exceed resource thresholds. It works by parsing the plain text and HTML status pages generated by Apache’s mod_status module. It’s currently tested on Python 2.6, 2.7, 3.4 and PyPy.

Status

On the one hand the apache-manager package was developed based on quite a few years of experience interfacing with (and monitoring) the Apache web server using the interfaces provided by Apache itself (mod_status) as well as the Linux operating system interfaces (/proc).

On the other hand the Python package itself is quite new: it was developed between June and September of 2015.

Then again, I’m religious about test coverage, so there’s that :-).

Despite the complete package being covered by automated tests I’m not (yet) committing to backwards compatibility because I first want to run this package in a production (like) environment for some time, to get a feeling for how robust it is. I also need to evaluate how easy it is to integrate the current solution into monitoring systems (that was a goal, but I don’t always achieve my goals on the first attempt :-).

Installation

The apache-manager package is available on PyPI which means installation should be as simple as:

$ pip install apache-manager

There’s actually a multitude of ways to install Python packages (e.g. the per user site-packages directory, virtual environments or just installing system wide) and I have no intention of getting into that discussion here, so if this intimidates you then read up on your options before returning to these instructions ;-).

Usage

There are two ways to use the apache-manager package: As the command line program apache-manager and as a Python API. For details about the Python API please refer to the API documentation available on Read the Docs. The command line interface is described below.

Command line

Usage: apache-manager [OPTIONS]

Command line interface to monitor the Apache web server and kill worker processes that exceed resource thresholds. When no options are given the server metrics and memory usage of workers are printed to the terminal.

Supported options:

Option Description
-w, --watch This option causes the Apache manager to redraw the collected metrics once every 10 seconds in a “top” like interface until interrupted using “q” (for quite) or Control-C.
-a, --max-memory-active=SIZE Kill active Apache workers that are using more memory than specified by the SIZE argument. SIZE is expected to be a human readable memory size like 50K (50 kilobytes), 42M (42 megabytes), 2G (2 gigabytes), etc.
-i, --max-memory-idle=SIZE Kill Apache workers that are using more memory than specified by the SIZE argument (see --max-memory-active for acceptable values of SIZE).
-t, --max-ss, --max-time=TIMESPAN Kill Apache workers whose “time since the beginning of the most recent request” is greater than specified by the TIMESPAN argument. TIMESPAN is expected to be a human readable timespan like 2s (2 seconds), 3m (3 minutes), 5h (5 hours), 2d (2 days), etc.
-f, --data-file=PATH Change the pathname of the file where the Apache manager stores monitoring metrics after every run. Defaults to “/tmp/apache-manager.txt”.
-n, --dry-run, --simulate Don’t actually kill any Apache workers.
-v, --verbose Make more noise.
-q, --quiet Make less noise.
-h, --help Show this message and exit.

Contact

The latest version of apache-manager is available on PyPI and GitHub. The documentation is hosted on Read the Docs. For bug reports please create an issue on GitHub. If you have questions, suggestions, etc. feel free to send me an e-mail at peter@peterodding.com.

License

This software is licensed under the MIT license.

© 2016 Peter Odding.

Release History

Release History

0.6

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
apache-manager-0.6.tar.gz (23.8 kB) Copy SHA256 Checksum SHA256 Source May 27, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting