Name | faktory-prometheus-exporter JSON |
Version |
0.2.0
JSON |
| download |
home_page | None |
Summary | Faktory metrics exporter for Prometheus, written in Python |
upload_time | 2024-07-01 15:56:19 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | MIT License Copyright (c) 2024 Prospect by A2EI Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
faktory
prometheus
metrics
|
VCS |
|
bugtrack_url |
|
requirements |
annotated-types
click
pebble
prometheus-client
pydantic
pydantic-core
pyfaktory
rfc3339-validator
six
typing-extensions
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# faktory-prometheus-exporter
![PyPI - Version](https://img.shields.io/pypi/v/faktory-prometheus-exporter)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/faktory-prometheus-exporter)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/prospect-server/faktory-prometheus-exporter/main.svg)](https://results.pre-commit.ci/latest/github/prospect-server/faktory-prometheus-exporter/main)
> A Faktory Exporter written in Python for Prometheus.
---
## In a nutshell
The *faktory_exporter* is a simple server that scrapes a configured
[Faktory](https://github.com/contribsys/faktory)
instance for stats by issuing the "INFO" command and exports them via string message
for [Prometheus](https://prometheus.io/docs/introduction/overview/) consumption.
## Usage
### Arguments
The URL used to scrape info from faktory is by default `tcp://:@localhost:7419`, but
can be overwritten by using the `--faktory_url` arg or by specifying a `FAKTORY_URL`
environment variable.
The app will by default run in interactive mode, printing the metrics and exiting. You
can activate the daemon mode by adding `--daemonize` or by specifying a
`DAEMONIZE_EXPORTER` environment variable. The activated daemon will by default run on
port *7423* but this can be changed by specifying `--port=` or by defining the `PORT`
environment variable.
### Install with pip
Fastest way is simply running (preferably in a python env):
```
pip install faktory-prometheus-exporter
faktory-prometheus-exporter [--faktory_url='tcp://:[password]@localhost:7419'] [--help]
```
### Develop using uv or pip-compile
The requirements format are the ones defined by `pip-compile`, from
[pip-tools](https://github.com/jazzband/pip-tools).
You may also equally use `uv pip compile` from [uv](https://github.com/astral-sh/uv).
```
uv pip compile requirements.in -o requirements.txt
uv pip compile requirements-dev.in -o requirements-dev.txt
```
Then you can either install locally to use the CLI or to run the python function:
```
uv pip install -e .
faktory-prometheus-exporter [--faktory_url='tcp://:[password]@localhost:7419']
python faktory_prometheus_exporter.py
```
### Build and use as docker container
You may use the Dockerfile and run something like the following. Make sure that the
exporter is in the same network than faktory, i.e. with `docker-compose`.
```
docker build -t faktory-prometheus-exporter:latest .
docker run -d [--rm] faktory-prometheus-exporter:latest [--faktory_url='tcp://:[password]@localhost:7419']
```
### Inspiration / prior work
Inspired by [this Faktory Exporter](https://github.com/lukasmalkmus/faktory_exporter/)
written in go, but only partially maintained and not working out of the box when we
needed it, so we built our own one.
Raw data
{
"_id": null,
"home_page": null,
"name": "faktory-prometheus-exporter",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "faktory, prometheus, metrics",
"author": null,
"author_email": "Matthieu Rigal <matthieu.rigal@a2ei.org>",
"download_url": "https://files.pythonhosted.org/packages/34/33/d8616544c858bbb40cbf1f557da5a1de49a9327d7a187de74fe9669566de/faktory_prometheus_exporter-0.2.0.tar.gz",
"platform": null,
"description": "# faktory-prometheus-exporter\n\n![PyPI - Version](https://img.shields.io/pypi/v/faktory-prometheus-exporter)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/faktory-prometheus-exporter)\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/prospect-server/faktory-prometheus-exporter/main.svg)](https://results.pre-commit.ci/latest/github/prospect-server/faktory-prometheus-exporter/main)\n\n\n> A Faktory Exporter written in Python for Prometheus.\n\n---\n\n## In a nutshell\n\nThe *faktory_exporter* is a simple server that scrapes a configured\n[Faktory](https://github.com/contribsys/faktory)\ninstance for stats by issuing the \"INFO\" command and exports them via string message\nfor [Prometheus](https://prometheus.io/docs/introduction/overview/) consumption.\n\n## Usage\n\n### Arguments\n\nThe URL used to scrape info from faktory is by default `tcp://:@localhost:7419`, but\ncan be overwritten by using the `--faktory_url` arg or by specifying a `FAKTORY_URL`\nenvironment variable.\n\nThe app will by default run in interactive mode, printing the metrics and exiting. You\ncan activate the daemon mode by adding `--daemonize` or by specifying a \n`DAEMONIZE_EXPORTER` environment variable. The activated daemon will by default run on\nport *7423* but this can be changed by specifying `--port=` or by defining the `PORT`\nenvironment variable.\n\n### Install with pip\n\nFastest way is simply running (preferably in a python env):\n```\npip install faktory-prometheus-exporter\nfaktory-prometheus-exporter [--faktory_url='tcp://:[password]@localhost:7419'] [--help]\n```\n\n### Develop using uv or pip-compile\n\nThe requirements format are the ones defined by `pip-compile`, from\n[pip-tools](https://github.com/jazzband/pip-tools).\nYou may also equally use `uv pip compile` from [uv](https://github.com/astral-sh/uv).\n\n```\nuv pip compile requirements.in -o requirements.txt\nuv pip compile requirements-dev.in -o requirements-dev.txt\n```\n\nThen you can either install locally to use the CLI or to run the python function:\n\n```\nuv pip install -e .\nfaktory-prometheus-exporter [--faktory_url='tcp://:[password]@localhost:7419']\npython faktory_prometheus_exporter.py\n```\n\n### Build and use as docker container\n\nYou may use the Dockerfile and run something like the following. Make sure that the\nexporter is in the same network than faktory, i.e. with `docker-compose`.\n\n```\ndocker build -t faktory-prometheus-exporter:latest .\ndocker run -d [--rm] faktory-prometheus-exporter:latest [--faktory_url='tcp://:[password]@localhost:7419']\n```\n\n### Inspiration / prior work\n\nInspired by [this Faktory Exporter](https://github.com/lukasmalkmus/faktory_exporter/)\nwritten in go, but only partially maintained and not working out of the box when we\nneeded it, so we built our own one.\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 Prospect by A2EI Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "Faktory metrics exporter for Prometheus, written in Python",
"version": "0.2.0",
"project_urls": {
"Gitlab Mirror": "https://gitlab.com/prospect-energy/faktory-prometheus-exporter",
"PyPI": "https://pypi.org/project/faktory-prometheus-exporter/",
"Repository": "https://github.com/prospect-server/faktory-prometheus-exporter"
},
"split_keywords": [
"faktory",
" prometheus",
" metrics"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2fb999fc75e2ed8e0bd220629827262c4665d81eaaaab2f0f0bb71860e361b4f",
"md5": "8dab5a5466aa24f7268e4ab0c39bb5c8",
"sha256": "3e71111d9d5ac0abc39c4bc3d8585389632b28e6bb2da9c41654616f1bb83990"
},
"downloads": -1,
"filename": "faktory_prometheus_exporter-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8dab5a5466aa24f7268e4ab0c39bb5c8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 6130,
"upload_time": "2024-07-01T15:56:18",
"upload_time_iso_8601": "2024-07-01T15:56:18.469627Z",
"url": "https://files.pythonhosted.org/packages/2f/b9/99fc75e2ed8e0bd220629827262c4665d81eaaaab2f0f0bb71860e361b4f/faktory_prometheus_exporter-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3433d8616544c858bbb40cbf1f557da5a1de49a9327d7a187de74fe9669566de",
"md5": "21e7db7d54115674ea8e5582715f6500",
"sha256": "eae5aac0a42dc63f8d8a8b73ae7199d574bdd2c1172697f29a05e2121a550e2b"
},
"downloads": -1,
"filename": "faktory_prometheus_exporter-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "21e7db7d54115674ea8e5582715f6500",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 7269,
"upload_time": "2024-07-01T15:56:19",
"upload_time_iso_8601": "2024-07-01T15:56:19.416781Z",
"url": "https://files.pythonhosted.org/packages/34/33/d8616544c858bbb40cbf1f557da5a1de49a9327d7a187de74fe9669566de/faktory_prometheus_exporter-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-01 15:56:19",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "prospect-server",
"github_project": "faktory-prometheus-exporter",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "annotated-types",
"specs": [
[
"==",
"0.7.0"
]
]
},
{
"name": "click",
"specs": [
[
"==",
"8.1.7"
]
]
},
{
"name": "pebble",
"specs": [
[
"==",
"5.0.7"
]
]
},
{
"name": "prometheus-client",
"specs": [
[
"==",
"0.20.0"
]
]
},
{
"name": "pydantic",
"specs": [
[
"==",
"2.7.4"
]
]
},
{
"name": "pydantic-core",
"specs": [
[
"==",
"2.18.4"
]
]
},
{
"name": "pyfaktory",
"specs": [
[
"==",
"0.2.3"
]
]
},
{
"name": "rfc3339-validator",
"specs": [
[
"==",
"0.1.4"
]
]
},
{
"name": "six",
"specs": [
[
"==",
"1.16.0"
]
]
},
{
"name": "typing-extensions",
"specs": [
[
"==",
"4.12.2"
]
]
}
],
"lcname": "faktory-prometheus-exporter"
}