Prometheus Exporter Components for Scrapy & Gerapy
Project description
Gerapy Prometheus Exporter
This is a package for supporting Prometheus in Scrapy, also this package is a module in Gerapy.
And the source code is modified from https://github.com/rangertaha/scrapy-prometheus-exporter.
Installation
pip3 install gerapy-prometheus-exporter
Usage
Set it to settings.py:
EXTENSIONS = {
'gerapy_prometheus_exporter.extension.WebService': 500,
}
By default the extension is enabled. To disable the extension you need to set PROMETHEUS_EXPORTER_ENABLED
to False.
The web server will listen on a port specified in PROMETHEUS_EXPORTER_PORT
(by default, it will try to listen on port 9410)
The endpoint for accessing exported metrics is:
http://0.0.0.0:9410/metrics
Settings
These are the settings that control the metrics exporter:
PROMETHEUS_EXPORTER_ENABLED
Default: True
A boolean which specifies if the exporter will be enabled (provided its extension is also enabled).
PROMETHEUS_EXPORTER_PORT
Default: [6080]
The port to use for the web service. If set to None or 0, a dynamically assigned port is used.
PROMETHEUS_EXPORTER_HOST
Default: '0.0.0.0'
The interface the web service should listen on.
PROMETHEUS_EXPORTER_PATH
Default: 'metrics'
The url path to access exported metrics Example:
http://0.0.0.0:9410/metrics
PROMETHEUS_EXPORTER_UPDATE_INTERVAL
Default: 5
This extensions periodically collects stats for exporting. The interval in seconds between metrics updates can be controlled with this setting.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for gerapy-prometheus-exporter-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3946c7c0db4728ed509347417def91eee33f1fc3e8bed4b2bafbff11940156eb |
|
MD5 | 5d1c2a106b4d88357eb50d4aa1ce5cdf |
|
BLAKE2b-256 | dd19d1853b2522716dba97355661e08d1853c6f7218461f27fab2af4fff2dea6 |
Hashes for gerapy_prometheus_exporter-0.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd493e21c0fb0c89b42ca8cc5cde8efad35ccdb567fa1fd3d2171715c01ed194 |
|
MD5 | 10af685d0b854b024bc878fb20e74c40 |
|
BLAKE2b-256 | f4637cd4cfa5749c5e0c7080c6ed55d49673dcb35780d667d67fcc01d8fe6015 |