{ "info": { "author": "Canonical JAAS Team", "author_email": "jaas@canonical.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Database", "Topic :: Software Development :: Build Tools" ], "description": "firestealer\n===========\n\nParse and filter metrics from `Prometheus `_ endpoints\nso that they can be visualized, stored into\n`InfluxDB `_, or used\nas `Juju charm `_ metrics.\n\nInstallation\n------------\n\nRun `pip install firestealer`. This will make the `fsteal` command available.\n\nCLI\n---\nPrint JSON formatted samples from a Prometehus endpoint::\n\n $ fsteal http://localhost:8000/metrics\n\nFilter metrics using a regular expression against the sample name::\n\n $ fsteal http://localhost:8000/metrics -m '^myservice(Downloads|Uploads)'\n\nStore samples into InfluxDB::\n\n $ fsteal localhost:8000/metrics influxdb://user:passwd@10.0.0.1:8086/mydb\n\nStore a subset of samples into InfluxDB::\n\n $ fsteal localhost:8000/metrics influxdb://user:passwd@10.0.0.1:8086/mydb -m '^myservice'\n\nIn the example above the InfluxDB connection info is provided using a\n`influxdb://$user:$passwd@$host:$port/$database` connection string.\n\nOnly print specific metrics values (useful when executing fsteal in order to\nretrieve charm metrics)::\n\n $ fsteal localhost:8000/metrics a-single-specific-key --format values-only\n\nAPI Usage\n---------\n\nAn API is exposed so that firestealer can be used as a library from Python\napplications. For instance, a charm could propagate metrics from Prometheus\nto Juju with the following snippet placed in the\n`collect-metrics `_\nhook::\n\n from firestealer import (\n add_metrics,\n retrieve_metrics,\n )\n\n url = 'https://localhost:8000/metrics'\n with open('metrics.yaml') as f:\n metrics = yaml.safe_load(f)\n samples = retrieve_metrics(url, metrics, noverify=True)\n add_metrics(samples)\n\nSimilarly, to write relevant samples to InfluxDB, the following snippet can be\nused::\n\n from firestealer import (\n retrieve_metrics,\n write_to_influx,\n )\n\n url = 'https://localhost:8000/metrics'\n with open('metrics.yaml') as f:\n metrics = yaml.safe_load(f)\n samples = retrieve_metrics(url, metrics)\n write_to_influx('user:passwd@1.2.3.4/dbname', samples)\n\nAPI Reference\n-------------\n\n**add_metrics(samples)**\n Add the given samples as metrics to Juju.\n\n This function assumes an add-metric executable to be present in the PATH.\n\n**retrieve_metrics(url, metrics, noverify=False)**\n Retrieve samples for the given metrics from the given Prometheus URL.\n\n Raise a firestealer.PrometheusError if the samples cannot be retrieved.\n\n Only return samples whose name is included in the given metrics object,\n which is a decoded metrics.yaml content. Samples are renamed based on the\n metrics provided.\n If noverify is True, then do not validate URL certificates.\n\n**retrieve_samples(url, regex='', prefix='', noverify=False)**\n Retrieve and return samples from the given Prometheus URL.\n\n Raise a firestealer.PrometheusError if the samples cannot be retrieved.\n\n Only return samples whose name matches the given regex.\n If a prefix is provided, include that in the resultimg sample names.\n If noverify is True, then do not validate URL certificates.\n\n**samples_to_points(samples)**\n Convert samples to InfluxDB points.\n\n Only samples with an actual value are included in the resulting list.\n\n**text_to_samples(text, regex='', prefix='')**\n Parse the given metrics text and return a sequence of samples.\n\n Only return samples whose name matches the given regex.\n If a prefix is provided, include that in the resultimg sample names.\n\n**write_to_influx(conn_string, samples)**\n Write the given samples to the InfluxDB at the given connection string.\n\n The connection string is in \"$user:$passwd@$host:$port/$database\" form.\n Raise a firestealer.InfluxError if the connection string is not well formed\n or when it is not possible to communicate with InfluxDB.\n\n**Sample** = namedtuple('Sample', ['name', 'tags', 'value'])\n A sample represents a sigle Prometheus key/value measurement.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/juju/firestealer", "keywords": "prometheus influxdb metrics charm cli", "license": "", "maintainer": "", "maintainer_email": "", "name": "firestealer", "package_url": "https://pypi.org/project/firestealer/", "platform": "", "project_url": "https://pypi.org/project/firestealer/", "project_urls": { "Homepage": "https://github.com/juju/firestealer" }, "release_url": "https://pypi.org/project/firestealer/0.5.0/", "requires_dist": [ "influxdb", "prometheus-client" ], "requires_python": "", "summary": "A command line tool for parsing Prometheus metrics", "version": "0.5.0" }, "last_serial": 3752104, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "12cc885e0f486c9dea347856645442a7", "sha256": "ba0c905c3c5f97df94e4147575de4554f2cc89bd8b8009d9316cc3c1ae650325" }, "downloads": -1, "filename": "firestealer-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "12cc885e0f486c9dea347856645442a7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8302, "upload_time": "2018-03-19T10:07:45", "url": "https://files.pythonhosted.org/packages/26/ed/faeaa0b880d7b3e68adf55ee66965281cc68b590387f0e358699dbdd7048/firestealer-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "01e7e9394f0e80dba3cd1568278fe052", "sha256": "65a44d7fd0f5e11bbf4c39f4678b13e6bf8158010d76a4cd286290fbfdcdb93d" }, "downloads": -1, "filename": "firestealer-0.1.0.tar.gz", "has_sig": false, "md5_digest": "01e7e9394f0e80dba3cd1568278fe052", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7776, "upload_time": "2018-03-19T10:07:46", "url": "https://files.pythonhosted.org/packages/45/06/2fd69452a7dbb44b6c718955d676067207c70c8f73e641500e9d8b640dd7/firestealer-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "c8691574f9b296193d23efc4f7ec1f5a", "sha256": "85a7faaa6b675126fc1a5cded0f13c86f14c155a6271d14fe054c7cc484fb3bb" }, "downloads": -1, "filename": "firestealer-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "c8691574f9b296193d23efc4f7ec1f5a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8438, "upload_time": "2018-03-19T14:35:21", "url": "https://files.pythonhosted.org/packages/ee/3f/18c9e2c49964f500ba9e80e307dbfea9bca9dd9e7e7525835c0f203d491a/firestealer-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "837778a7c49dc82f0bf8edf91a9f7596", "sha256": "ee10fcea151b2d37ee10818d37123381f108f5f4de140339ac97afd38ce0acca" }, "downloads": -1, "filename": "firestealer-0.2.0.tar.gz", "has_sig": false, "md5_digest": "837778a7c49dc82f0bf8edf91a9f7596", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7917, "upload_time": "2018-03-19T14:35:23", "url": "https://files.pythonhosted.org/packages/50/de/18df8d27258454eecbdedb5815c453ba483dc2d3bf02f87baafaf2a6748d/firestealer-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "93035f4698635d5797202c4e0abc02f8", "sha256": "161ac74dd69022bc29a0414333bcea7392935d23c431e2a6ac22f30c21d9573d" }, "downloads": -1, "filename": "firestealer-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "93035f4698635d5797202c4e0abc02f8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8138, "upload_time": "2018-04-04T15:50:46", "url": "https://files.pythonhosted.org/packages/d9/0f/924ecbbe030955f5eb8d258eb8ab5eaa62b9ad6bdc2225b086da7159315a/firestealer-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d95efa4abc0eb807a9dc7d62b3dce97e", "sha256": "e1b987268a248f83007f066160bb3aa4fd7d0c8a15d2d2a1ae255091a15ef65d" }, "downloads": -1, "filename": "firestealer-0.3.0.tar.gz", "has_sig": false, "md5_digest": "d95efa4abc0eb807a9dc7d62b3dce97e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8692, "upload_time": "2018-04-04T15:50:47", "url": "https://files.pythonhosted.org/packages/57/dc/64fe763b0e8c2f2c5d7f2fd24f5d12630e7013fbca8ba7a969ac450935cd/firestealer-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "459bda2497538dacc8e56338b4a3ceb0", "sha256": "fb4544d8c11421e767836a413e51cdc3bafb5fa8fe365a6c922ff81b854fdb8b" }, "downloads": -1, "filename": "firestealer-0.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "459bda2497538dacc8e56338b4a3ceb0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8129, "upload_time": "2018-04-05T08:14:18", "url": "https://files.pythonhosted.org/packages/aa/3e/d11646f0f59964b1e1c2c8d4473f74f1285b190425507aba00a7148f4ba3/firestealer-0.4.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5711424ce319fda9dbf9226252b0734d", "sha256": "5a77c827129348bf8bb320f1350db9a7c1b45c29c02b37f94bb730e0e65f6d79" }, "downloads": -1, "filename": "firestealer-0.4.0.tar.gz", "has_sig": false, "md5_digest": "5711424ce319fda9dbf9226252b0734d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8696, "upload_time": "2018-04-05T08:14:19", "url": "https://files.pythonhosted.org/packages/4b/e5/2438756cedcc0ab0a3b16eb4b1858c23e3eb5457a26f1d73f65335bd2c24/firestealer-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "b55e988b8dfa21faba0e54c3efb0cd20", "sha256": "b3593aa77742b8a5b511692515395b974c858f1e8a8b91fe11ced701a6f7db3d" }, "downloads": -1, "filename": "firestealer-0.4.1-py3-none-any.whl", "has_sig": false, "md5_digest": "b55e988b8dfa21faba0e54c3efb0cd20", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8273, "upload_time": "2018-04-05T13:38:34", "url": "https://files.pythonhosted.org/packages/af/f0/f6a143e494ed128a7818d57abc483086f1e2da1469c77d8da6c85d3e16f9/firestealer-0.4.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2b53ae99fbb711009c59bbc76efc59da", "sha256": "86b9ee9bd1e812c26a7620a89c3699ca55280d7c6bbbcf292d08089be5604490" }, "downloads": -1, "filename": "firestealer-0.4.1.tar.gz", "has_sig": false, "md5_digest": "2b53ae99fbb711009c59bbc76efc59da", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8821, "upload_time": "2018-04-05T13:38:35", "url": "https://files.pythonhosted.org/packages/9d/49/53af9edf622042969cf4db87c690d85d50c4823361766dd98915396a3df6/firestealer-0.4.1.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "643041efc200392532a88b66d9b837df", "sha256": "cb32566d7c9843470130c42e5de79b16e0b89604ed4ba08d87f3414b53bc794d" }, "downloads": -1, "filename": "firestealer-0.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "643041efc200392532a88b66d9b837df", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9058, "upload_time": "2018-04-10T13:20:02", "url": "https://files.pythonhosted.org/packages/27/b7/5cfbcdffe7628a3cd044f435e19b0e1d763deba6b544e40376e0cbd7efa4/firestealer-0.5.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c93b8afd2bbb965a85d68a1edfee62cb", "sha256": "608042ba4141cd66c485e939d97d1cb00b7e885edbf705fb865929b5aacbafb5" }, "downloads": -1, "filename": "firestealer-0.5.0.tar.gz", "has_sig": false, "md5_digest": "c93b8afd2bbb965a85d68a1edfee62cb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9386, "upload_time": "2018-04-10T13:20:03", "url": "https://files.pythonhosted.org/packages/9d/70/4f275586f76c042ae61f252f3436101feeabdd7f612d6072c941fc5a2dfb/firestealer-0.5.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "643041efc200392532a88b66d9b837df", "sha256": "cb32566d7c9843470130c42e5de79b16e0b89604ed4ba08d87f3414b53bc794d" }, "downloads": -1, "filename": "firestealer-0.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "643041efc200392532a88b66d9b837df", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9058, "upload_time": "2018-04-10T13:20:02", "url": "https://files.pythonhosted.org/packages/27/b7/5cfbcdffe7628a3cd044f435e19b0e1d763deba6b544e40376e0cbd7efa4/firestealer-0.5.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c93b8afd2bbb965a85d68a1edfee62cb", "sha256": "608042ba4141cd66c485e939d97d1cb00b7e885edbf705fb865929b5aacbafb5" }, "downloads": -1, "filename": "firestealer-0.5.0.tar.gz", "has_sig": false, "md5_digest": "c93b8afd2bbb965a85d68a1edfee62cb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9386, "upload_time": "2018-04-10T13:20:03", "url": "https://files.pythonhosted.org/packages/9d/70/4f275586f76c042ae61f252f3436101feeabdd7f612d6072c941fc5a2dfb/firestealer-0.5.0.tar.gz" } ] }