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
File details
Details for the file gerapy-prometheus-exporter-0.1.0.tar.gz
.
File metadata
- Download URL: gerapy-prometheus-exporter-0.1.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.22.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c96fab07ad841d7bd0dbf02ce53cb4f6318a62f09daf6a2d3a038358041e2d36 |
|
MD5 | a334b58c4715a7405b079e77379463e3 |
|
BLAKE2b-256 | 9b4070440e8dbedece5718a94be43cc70126077b8b38d560e330a7d84246fc91 |
File details
Details for the file gerapy_prometheus_exporter-0.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: gerapy_prometheus_exporter-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.22.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c9f00055e5a33c6f9ca82a684c5dc505871fc679a0ecf9f5ece369995eaf2e2 |
|
MD5 | 0e8787d00c9fc2a5a4d45c19489add75 |
|
BLAKE2b-256 | 394e93d02233c928e3b223d13651ea4f957b30e4d1bd9f97133e9e0f4bcd3fa2 |