{ "info": { "author": "Graham Dumpleton", "author_email": "Graham.Dumpleton@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Internet :: WWW/HTTP :: WSGI", "Topic :: System :: Monitoring" ], "description": "==================\r\nMOD_WSGI (METRICS)\r\n==================\r\n\r\n**Note that this package is no longer being maintained at this point. At some\r\npoint it will be done over to use a different mechanism for visualising data so\r\nas not to depend on a separate service.**\r\n\r\nThe mod_wsgi-metrics package is an add on package for Apache/mod_wsgi. It\r\ngenerates metric information about the run time performance of Apache and\r\nmod_wsgi. At least mod_wsgi version 4.2.0 is required.\r\n\r\nIn this version, metrics collected cover the performance of the Apache web\r\nserver as a whole. In future versions additional metrics will be added\r\nwhich monitor aspects of mod_wsgi itself.\r\n\r\nAt the present time the package provides a plugin for the\r\n`New Relic Platform `_. This plugin is\r\ndistinct from New Relic's own Python agent for use in monitoring Python web\r\napplications. The plugin instead focuses on metrics specific to Apache and\r\nmod_wsgi. The information from these metrics can be used to help in tuning\r\nyour Apache/mod_wsgi installation for best performance.\r\n\r\nThe New Relic Platform is a free feature of New Relic and so in order to\r\nuse this plugin for Apache/mod_wsgi, you do not need to have a paid account\r\nfor New Relic.\r\n\r\nUsing the plugin with a mod_wsgi express installation\r\n-----------------------------------------------------\r\n\r\nWhen using `mod_wsgi express `_,\r\nthe plugin will be automatically started and will report data when using\r\nthe builtin support of mod_wsgi express for New Relic. See the mod_wsgi\r\nexpress documentation for more information on starting it with New Relic\r\nsupport enabled.\r\n\r\nUsing the plugin with a standard mod_wsgi installation\r\n------------------------------------------------------\r\n\r\nIf you have installed mod_wsgi as an Apache module direct into your Apache\r\ninstallation, or have installed an operating system binary package, and are\r\nconfiguring Apache manually to host your Python web application, additional\r\nsetup will be required to enable the plugin.\r\n\r\nThe steps for manually enabling the plugin are as follows:\r\n\r\n1. Create a Python script file called ``server-metrics.py``. In that file\r\nplace::\r\n\r\n import logging\r\n\r\n logging.basicConfig(level=logging.INFO,\r\n format='%(name)s (pid=%(process)d, level=%(levelname)s): %(message)s')\r\n\r\n from mod_wsgi.metrics.newrelic import Agent\r\n\r\n config_file = '/some/path/newrelic.ini'\r\n\r\n agent = Agent(config_file=config_file)\r\n agent.start()\r\n\r\nThis would normally be placed along side your Python web application code.\r\n\r\nThe ``config_file`` variable should be set to the location of the\r\n``newrelic.ini`` agent configuration file you created for use with the New\r\nRelic Python agent.\r\n\r\nAlternatively, you can set the New Relic license key and application name\r\nto report to within the Python script file::\r\n\r\n license_key = 'YOUR-NEW-RELIC-LICENSE-KEY'\r\n app_name = 'THE-APPLICATION-NAME-TO-REPORT-AGAINST'\r\n\r\n agent = Agent(app_name=app_name, license_key=license_key)\r\n agent.start()\r\n\r\nThis Python script file would normally be placed along side your Python web\r\napplication code.\r\n\r\n2. Ensure that the ``mod_status`` module is being loaded into Apache and that\r\n``ExtendedStatus`` is ``On``::\r\n\r\n LoadModule status_module modules/mod_status.so\r\n ExtendedStatus On\r\n\r\nThe exact way in which this needs to be done will differ between Apache\r\ninstallations, especially with Apache installations provided by a Linux\r\ndistribution. You should therefore look closely at how this is managed\r\nfor your Apache installation.\r\n\r\nNote that it is only necessary to load ``mod_status`` and enable\r\n``ExtendedStatus``. It is not necessary to expose the traditional\r\n``/server-status`` URL generally associated with the use of ``mod_status``\r\nas the plugin will not use that. Instead the plugin obtains the information\r\nfrom the ``mod_wsgi`` module. The ``mod_status`` module still has to be\r\nloaded though, otherwise Apache will not collect the information that is\r\nrequired.\r\n\r\n3. Create a dedicated mod_wsgi daemon process group using the\r\n``WSGIDaemonProcess`` directive. This should have only a single process and\r\na single thread. It should also enable visibility of internal server\r\nmetrics from mod_wsgi using the ``server-metrics`` option::\r\n\r\n WSGIDaemonProcess newrelic display-name=%{GROUP} \\\r\n processes=1 threads=1 server-metrics=On\r\n\r\nThis daemon process group should not be used to host your actual Python\r\nweb application.\r\n\r\n4. Specify that the ``server-metrics.py`` Python script file you created\r\nshould be loaded when Apache is (re)started using the ``WSGIImportScript``\r\ndirective::\r\n\r\n WSGIImportScript /some/path/server-metrics.py \\\r\n process-group=newrelic application-group=%{GLOBAL}\r\n\r\nThe path should match where you saved the ``server-metrics.py`` script.\r\nThe ``process-group`` option should match the name of the daemon process\r\ngroup created with using the ``WSGIDaemonProcess`` directive.\r\n\r\n4. Restart Apache. Within the New Relic UI you should automatically see\r\na new entry appear in the left hand navigation bar labelled 'mod_wsgi'. The\r\nreported data will then appear under the application name used.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.modwsgi.org/", "keywords": "", "license": "Apache License, Version 2.0", "maintainer": "Graham Dumpleton", "maintainer_email": "Graham.Dumpleton@gmail.com", "name": "mod_wsgi-metrics", "package_url": "https://pypi.org/project/mod_wsgi-metrics/", "platform": "", "project_url": "https://pypi.org/project/mod_wsgi-metrics/", "project_urls": { "Homepage": "http://www.modwsgi.org/" }, "release_url": "https://pypi.org/project/mod_wsgi-metrics/1.1.1/", "requires_dist": null, "requires_python": null, "summary": "Metrics package for Apache/mod_wsgi.", "version": "1.1.1" }, "last_serial": 1487457, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "26c9c48502802968abfb4f82c18d65bd", "sha256": "2075866823d8d7a6055d53d332896f34641af2007f2609db3bbb7eb568449c11" }, "downloads": -1, "filename": "mod_wsgi-metrics-1.0.0.tar.gz", "has_sig": false, "md5_digest": "26c9c48502802968abfb4f82c18d65bd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9572, "upload_time": "2014-06-08T08:46:20", "url": "https://files.pythonhosted.org/packages/45/7e/05fb9d70d3c258122569640acd33ad85c4fa9b42369d6ca8dc530a1231b3/mod_wsgi-metrics-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "099779706be6b247ddea6b4c1cd1a489", "sha256": "2a74d394851ba8f800928848ced6211bc508c9f6888390e14d3b015eb0bae227" }, "downloads": -1, "filename": "mod_wsgi-metrics-1.1.0.tar.gz", "has_sig": false, "md5_digest": "099779706be6b247ddea6b4c1cd1a489", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13591, "upload_time": "2014-06-17T06:28:18", "url": "https://files.pythonhosted.org/packages/c7/c9/230f499e51617fd2d91e798b599612c4649121c8c72867d5785da780119b/mod_wsgi-metrics-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "be59d86c0e398614478b9e8b2feffcf2", "sha256": "effad11e0d24a90d72eae74bba9f116ffb4d613db76be8927a9039071e06adee" }, "downloads": -1, "filename": "mod_wsgi-metrics-1.1.1.tar.gz", "has_sig": false, "md5_digest": "be59d86c0e398614478b9e8b2feffcf2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17430, "upload_time": "2014-12-24T01:12:21", "url": "https://files.pythonhosted.org/packages/f9/84/7efb663c952b1b42775d6ac11590ab51b5f4edc713a3815352971b95d78c/mod_wsgi-metrics-1.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "be59d86c0e398614478b9e8b2feffcf2", "sha256": "effad11e0d24a90d72eae74bba9f116ffb4d613db76be8927a9039071e06adee" }, "downloads": -1, "filename": "mod_wsgi-metrics-1.1.1.tar.gz", "has_sig": false, "md5_digest": "be59d86c0e398614478b9e8b2feffcf2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17430, "upload_time": "2014-12-24T01:12:21", "url": "https://files.pythonhosted.org/packages/f9/84/7efb663c952b1b42775d6ac11590ab51b5f4edc713a3815352971b95d78c/mod_wsgi-metrics-1.1.1.tar.gz" } ] }