{ "info": { "author": "Anthony Byrne", "author_email": "abyrne@redhat.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 3.7" ], "description": "# telemeter-reporter\nPython tool for generating SLA compliance reports based on [Telemeter](https://github.com/openshift/telemeter/) data.\n\nFor the original prototype script, see the `notebook` directory.\n\n## Installation\nInstall with `pip` (Python 3 only)\n```\npip3 install telemeter-reporter\n```\n\n## Usage\n### Configuration\nConfiguration is provided via a YAML file (and in certain cases, environmental variables). The command line \ntool checks three locations (in order) for a config file:\n 1. `TELEMETER_REPORTER_CONFIG` environment variable\n 2. argument to the `--config` or `-c` flag\n 3. `~/.telemeter_reporter.yml`\n\nA sample config file is provided (`reporter_confg.yml.tmpl`). An explanation of each key is below. All keys are required\nunless otherwise noted.\n- `css`: provide a Cascading Style Sheet here to be injected into HTML-formatted reports (optional)\n- `html`: provide HTML here to override the built-in template. Any instances of `${title}`, `${style}`, `${table}`, or \n`${footer}` will be replaced by (respectively) the report title, raw CSS (either the built-in stylesheet or the value of\n`css` from above), the HTML table displaying the results, or a footer showing when the report was generated and how long\nit took (optional)\n- `api.telemeter.url`: URL to any service providing a Prometheus-compatible API\n- `api.telemeter.token`: Log-in token for the Telemeter API (i.e. OAuth) **(can be left out if `TELEMETER_TOKEN` env-var is set)**\n- `api.uhc.url`: URL for the UHC HTTP API\n- `api.uhc.public_key`: Public key for verifying the authenticity of the provided JWT (can be left out to disable token \nverification, but this is not recommended. Red Hat's public key is provided in the sample config file)\n- `api.uhc.token`: \"Offline access\" JWT token for UHC API **(can be left out if `UHC_TOKEN` env-var is set)**\n- `clusters`: provide a list of UHC queries as strings here. Each the cluster IDs returned by each query will be \nreported on **(can be overridden with the `--uhc-query` flag)**\n- `global_vars`: provide a list of strings/ints/floats here to make them available as global variables to each rule. For\nexample, providing `- foo: \"bar\"` here will replace any instance of `${foo}` in each rule query with `bar`. At a minimum,\nyou should provide a `duration` variable (in days) here **(can be overridden with the `--override` flag)**\n- `rules`: provide a list of SLI rules to evaluate (see below). You can also define local variables here, such as `rules[i].foo`,\nthat will be inserted into that rule's query in the place of selectors like `${foo}` (similarly to `global_vars`)\n - `rules[i].name`: a human-readable name for the rule\n - `rules[i].description`: a human-readable description for the rule (optional, only shown in HTML tooltips)\n - `rules[i].goal`: the target-value for the query result. Usually a percentage represented as a float between 0 and 1.0\n - `rules[i].query`: a valid PromQL query that returns the current value of the SLI (which will be compared to the goal).\nAny instance of `${sel}` will be replaced with `_id=`. You may also use global variables (see `global_vars`\nabove)\n\n\n### Command line tool\n```\n$ telemeter-reporter -h\nusage: telemeter-reporter [-h] [-c PATH] [-f FMT] [-u QUERY] [-t TITLE]\n [-i TIME] [-b] [-a] [-n] [-m] [-p] [-l LEVEL]\n [-o VARS]\n output\n\nTool for generating reports on SLA/SLO compliance using Telemeter-LTS data\n\npositional arguments:\n output Destination path for the generated report (- = stdout)\n\noptional arguments:\n -h, --help show this help message and exit\n -c PATH, --config PATH\n Path to YAML file containing configuration data.\n Default: ~/.telemeter_reporter.yml\n -f FMT, --format FMT Format for the report. Can be provided multiple times\n (see --auto-ext). Options: ['simple', 'plain', 'html',\n 'csv', 'grid', 'fancy_grid', 'github', 'jira',\n 'latex']. Default: simple\n -u QUERY, --uhc-query QUERY\n Report on all clusters returned by this query to the\n UHC API\n -t TITLE, --title TITLE\n Optional title for HTML reports\n -i TIME, --time TIME Generate a report at a certain point in the past.\n Strings like '2 weeks ago', 'last Monday', 'yesterday\n at 8pm', or 'October 1, 2018' are all acceptable\n -b, --no-browser Don't open the resulting report in a web browser (if\n HTML report is selected)\n -a, --auto-ext Automatically append a file extension onto the\n provided output path. Enabled by default when --format\n is used multiple times. Has no effect when output =\n stdout.\n -n, --no-duration-adjust\n Disable automatic duration adjustment. By default, any\n user-defined 'duration' global query var is overridden\n with the cluster age if duration > cluster age.\n Clusters triggering this adjustment will have an\n asterisk appended to their name. This flag will\n disable this behavior.\n -m, --minify Minify HTML output\n -p, --parents Same behavior as mkdir's --parents option. Creates\n parent directories in the output path if necessary.\n -l LEVEL, --log LEVEL\n Set the verbosity/logging level. Options: ['critical',\n 'error', 'warning', 'info', 'debug']\n -o VARS, --override VARS\n Override global variables set in the configuration\n file. Provide a valid Python dict string, e.g.\n \"{'duration': 28}\"\n```\nNote: the `-u` parameter overrides any `clusters` list provided in a config file.\n\n### Examples\n#### Simple 28-day report\n```\n$ telemeter-reporter -f simple -o \"{'duration':28}\"\n Cluster CtrlPlane CtrlPlane CtrlPlane CtrlPlane CtrlPlane CtrlPlane\n General General API API etcd etcd\n Goal Perf. Goal Perf. Goal Perf.\n-------------- ----------- ----------- ----------- ----------- ----------- -----------\ntest-cluster-1 99.500% 100.00% 99.900% 99.999% 99.900% 95.982% \ntest-cluster-2 99.500% 100.00% 99.900% 99.999% 99.900% 95.992% \n```\n#### Output to GitHub-Flavored Markdown file\n```\n$ telemeter-reporter -f github output.md\n```\n`output.md` Contents:\n\n| Cluster | CtrlPlane General Goal | CtrlPlane General Perf. | CtrlPlane API Goal | CtrlPlane API Perf. | CtrlPlane etcd Goal | CtrlPlane etcd Perf. | CtrlPlane Latency Goal | CtrlPlane Latency Perf. | Registry General Goal | Registry General Perf. | Compute General Goal | Compute General Perf. | Compute Resiliency Goal | Compute Resiliency Perf. | Support Monitoring Goal | Support Monitoring Perf. |\n|----------------|--------------------------|---------------------------|----------------------|-----------------------|-----------------------|------------------------|--------------------------|---------------------------|-------------------------|--------------------------|------------------------|-------------------------|---------------------------|----------------------------|---------------------------|----------------------------|\n| osd-v4stg-aws | 99.500% | 100.00% | 99.900% | 99.999% | 99.900% | 95.982% | 99.500% | 100.00% | 99.000% | 95.982% | 99.500% | 100.00% | 99.000% | 100.00% | 99.990% | 100.00% |\n| osd-v4prod-aws | 99.500% | 100.00% | 99.900% | 99.999% | 99.900% | 95.992% | 99.500% | 100.00% | 99.000% | 95.942% | 99.500% | 98.800% | 99.000% | 98.353% | 99.990% | 100.00% |\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/abyrne55/telemeter-reporter", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "telemeter-reporter", "package_url": "https://pypi.org/project/telemeter-reporter/", "platform": "", "project_url": "https://pypi.org/project/telemeter-reporter/", "project_urls": { "Homepage": "https://github.com/abyrne55/telemeter-reporter" }, "release_url": "https://pypi.org/project/telemeter-reporter/0.1.3.1/", "requires_dist": [ "PyYAML (>=5.1.1)", "certifi (>=2019.6.16)", "requests (>=2.22.0)", "PyJWT[crypto] (>=1.7.1)", "prometheus-api-client (>=0.0.2b4)", "tabulate (>=0.8.3)", "typing (>=3.7.4)", "htmlmin (>=0.1.12)", "dateparser (>=0.7.1)" ], "requires_python": "", "summary": "A tool for generating compliance reports based on Telemeter data.", "version": "0.1.3.1" }, "last_serial": 5715412, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "01db91f1676349f095dcd67d9f6248fb", "sha256": "1914e9eca05b22733075b4cb2afed3a796b8c483d499798f508b4a90f048f9b2" }, "downloads": -1, "filename": "telemeter_reporter-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "01db91f1676349f095dcd67d9f6248fb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14379, "upload_time": "2019-07-30T20:16:17", "url": "https://files.pythonhosted.org/packages/a1/29/0e4b9a9e7277adebdb3840c7c75ec8d1c99d6b5f5de7eabc0b618fb9c548/telemeter_reporter-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "661b06ef6c0cad5337a35fd07f8e7961", "sha256": "a401476fd2d1f12ca3bb64ced7b2c12855a66e6b76b1ad5d7fea42bd93b0e822" }, "downloads": -1, "filename": "telemeter-reporter-0.1.1.tar.gz", "has_sig": false, "md5_digest": "661b06ef6c0cad5337a35fd07f8e7961", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9894, "upload_time": "2019-07-30T20:16:19", "url": "https://files.pythonhosted.org/packages/fe/af/8d3f8bb259bd235ebe53e85625b510442e611c609227c9c9305ba2f07d29/telemeter-reporter-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "99f66808ddcc876b6958c5e8cb2c8735", "sha256": "5e13ed9b3412f887f33903ba1fea09b0936854e5fea2b0d17b02c7a4af570a6e" }, "downloads": -1, "filename": "telemeter_reporter-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "99f66808ddcc876b6958c5e8cb2c8735", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16039, "upload_time": "2019-08-19T14:35:48", "url": "https://files.pythonhosted.org/packages/61/7c/ba77355dea1dd6b29b084c56c29818a7de1c1c70d3e6b0adda99f2e16181/telemeter_reporter-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0123fdb5aaea8b117caf896f349c7884", "sha256": "13236ead77d7c3824063353cc2539161fa8889017ece8572a59ebb26fe625d06" }, "downloads": -1, "filename": "telemeter-reporter-0.1.2.tar.gz", "has_sig": false, "md5_digest": "0123fdb5aaea8b117caf896f349c7884", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12414, "upload_time": "2019-08-19T14:35:51", "url": "https://files.pythonhosted.org/packages/c7/0a/fe6545575fa24fab7609697fd93e74e9a7744d28b9f6e81b1d0db860d2ba/telemeter-reporter-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "e010b201ce52f9c0cc941ebe87325b5e", "sha256": "eb72e82d90526837ceb2b10ba3557ea69f535f12866a26cb2f7499eea3c7b6f4" }, "downloads": -1, "filename": "telemeter_reporter-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "e010b201ce52f9c0cc941ebe87325b5e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 18675, "upload_time": "2019-08-21T20:18:31", "url": "https://files.pythonhosted.org/packages/8d/42/4333bfd4c133331527329c9980cf049c4239eb8f9bfd4af1ad8e61034df6/telemeter_reporter-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "01e81d7503b27162426d2e34135b6803", "sha256": "fdb4214fa6ef768e53b3c9e3b2379eeb15147e73785b6c3e629eebbdc52dae86" }, "downloads": -1, "filename": "telemeter-reporter-0.1.3.tar.gz", "has_sig": false, "md5_digest": "01e81d7503b27162426d2e34135b6803", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15564, "upload_time": "2019-08-21T20:18:34", "url": "https://files.pythonhosted.org/packages/92/e7/74a7df60f625dd5a0bc785412cb98abc6fdb73d9aaf59311340dc5a7c533/telemeter-reporter-0.1.3.tar.gz" } ], "0.1.3.1": [ { "comment_text": "", "digests": { "md5": "7ea5ee911f2dfc6a71ec928877e4a743", "sha256": "f1310228eb1ffd1b18e4449b55c3a89109202d26f2e6c2023b437d5894197e18" }, "downloads": -1, "filename": "telemeter_reporter-0.1.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "7ea5ee911f2dfc6a71ec928877e4a743", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 18668, "upload_time": "2019-08-22T13:59:52", "url": "https://files.pythonhosted.org/packages/e8/e8/86fbbe6cd036a659015f79131c0e1e0cd4bca2bf1ef427c96fa8101453e8/telemeter_reporter-0.1.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6afdfd9feb69b8ea19a4f35d3d25df7c", "sha256": "fa2afe60f81549523b1cb28e322c25aa29f07dd4ed4d9c49d99a288bed9718c2" }, "downloads": -1, "filename": "telemeter-reporter-0.1.3.1.tar.gz", "has_sig": false, "md5_digest": "6afdfd9feb69b8ea19a4f35d3d25df7c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15505, "upload_time": "2019-08-22T13:59:57", "url": "https://files.pythonhosted.org/packages/76/e6/990514ccdd24bbec5cfe9f97daff0bbe83a91336bc293a2afeaa44a276eb/telemeter-reporter-0.1.3.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7ea5ee911f2dfc6a71ec928877e4a743", "sha256": "f1310228eb1ffd1b18e4449b55c3a89109202d26f2e6c2023b437d5894197e18" }, "downloads": -1, "filename": "telemeter_reporter-0.1.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "7ea5ee911f2dfc6a71ec928877e4a743", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 18668, "upload_time": "2019-08-22T13:59:52", "url": "https://files.pythonhosted.org/packages/e8/e8/86fbbe6cd036a659015f79131c0e1e0cd4bca2bf1ef427c96fa8101453e8/telemeter_reporter-0.1.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6afdfd9feb69b8ea19a4f35d3d25df7c", "sha256": "fa2afe60f81549523b1cb28e322c25aa29f07dd4ed4d9c49d99a288bed9718c2" }, "downloads": -1, "filename": "telemeter-reporter-0.1.3.1.tar.gz", "has_sig": false, "md5_digest": "6afdfd9feb69b8ea19a4f35d3d25df7c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15505, "upload_time": "2019-08-22T13:59:57", "url": "https://files.pythonhosted.org/packages/76/e6/990514ccdd24bbec5cfe9f97daff0bbe83a91336bc293a2afeaa44a276eb/telemeter-reporter-0.1.3.1.tar.gz" } ] }