Metadata-Version: 2.1
Name: uwsgi-prometheus
Version: 0.0.1
Summary: uWSGI stats exporter for Prometheus
Home-page: https://github.com/GlobalRadio/uwsgi-prometheus
Author: Chris Graham
Author-email: chris.graham@global.com
License: MIT
Description: # uWSGI Prometheus
        
        A uWSGI stats exporter for Prometheus that integrates directly into an existing uWSGI app
        
        # Installation
        
        Install using `pip`:
        
            pip install uwsgi-prometheus
        
        Enable the http stats endpoint in your uWSGI config: 
        
        [https://uwsgi-docs.readthedocs.io/en/latest/StatsServer.html](https://uwsgi-docs.readthedocs.io/en/latest/StatsServer.html)
        
        Add the following in your `uwsgi.py`:
        
            from prometheus_client.core import REGISTRY
            from uwsgi_prometheus.collectors import UWSGIStatsCollector
        
            REGISTRY.register(UWSGIStatsCollector())
        
        The following stats will then be added to your existing metrics endpoint:
        
        - **uwsgi_listen_queue_requests** - Number of requests in the uWSGI listen queue
        - **uwsgi_request_total** - Total number of uWSGI requests across all workers  
        - **uwsgi_harakiris_total** - Total number of harakiris across all workers  
        
        # Configuration
        
        A few configuration options are available on the collector:
        
        - **stats_url** - The URL that uWSGI is exposing stats on `Default: http://127.0.0.1:1717`
        - **timeout** - The timeout for fetching stats `Default: 2`
        - **prefix** - A prefix for the exported metrics (An underscore is automatically added if specified) `Default: ''`
        
        ```
        REGISTRY.register(UWSGIStatsCollector(
            stats_url='http://127.0.0.1:1717',
            timeout=2,
            prefix=''
        ))
        ```
        
Platform: UNKNOWN
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*
Description-Content-Type: text/markdown
