{"id":50385114,"url":"https://github.com/stackhpc/stackhpc-monasca-agent-plugins","last_synced_at":"2026-05-30T14:30:59.528Z","repository":{"id":47054120,"uuid":"114911228","full_name":"stackhpc/stackhpc-monasca-agent-plugins","owner":"stackhpc","description":"A collection Monasca Agent plugins for gathering metrics","archived":false,"fork":false,"pushed_at":"2021-10-25T13:16:53.000Z","size":115,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-04-14T22:50:22.797Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stackhpc.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-20T17:00:10.000Z","updated_at":"2021-10-25T13:16:56.000Z","dependencies_parsed_at":"2022-09-15T05:40:46.171Z","dependency_job_id":null,"html_url":"https://github.com/stackhpc/stackhpc-monasca-agent-plugins","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/stackhpc/stackhpc-monasca-agent-plugins","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackhpc%2Fstackhpc-monasca-agent-plugins","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackhpc%2Fstackhpc-monasca-agent-plugins/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackhpc%2Fstackhpc-monasca-agent-plugins/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackhpc%2Fstackhpc-monasca-agent-plugins/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stackhpc","download_url":"https://codeload.github.com/stackhpc/stackhpc-monasca-agent-plugins/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackhpc%2Fstackhpc-monasca-agent-plugins/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33696681,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-30T14:30:59.360Z","updated_at":"2026-05-30T14:30:59.521Z","avatar_url":"https://github.com/stackhpc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"**************************************************\nThis project is no longer under active development\n**************************************************\n\n==============================\nStackHPC Monasca-Agent plugins\n==============================\n\n.. image:: https://travis-ci.org/stackhpc/stackhpc-monasca-agent-plugins.svg?branch=master\n   :target: https://travis-ci.org/stackhpc/stackhpc-monasca-agent-plugins\n\nA collection of Monasca-Agent plugins to gather metrics. This repo functions as an\nincubator, with the ultimate aim to merge any effective plugins into the Monasca-Agent.\n\nIncludes:\n\n* Slurm (proof-of-concept)\n* nVidia GPUs\n* Prometheus (proof-of-concept)\n\n-----------------\nPrometheus plugin\n-----------------\n\nThis is an experimental plugin which extends the capability of the existing\nPrometheus plugin to make it more useful. The following configuration\noptions are supported:\n\nmetric_endpoint\n===============\n\nThe Prometheus endpoint to scrape.\n\nExample:\n\n.. code-block:: yaml\n\n    metric_endpoint: \"http://ceph-host:9283/metrics\"\n\nremove_hostname\n===============\n\nStrip the hostname from each metric. This is useful when scraping an endpoint\nwhich exposes metrics not specific to a host. For example, RabbitMQ queue\nlengths, of Ceph cluster health.\n\nExample:\n\n.. code-block:: yaml\n\n    remove_hostname: true\n\ndefault_dimensions\n==================\n\nA dict of dimensions to include with all metrics scraped from the specified\nendpoint.\n\nExample:\n\n.. code-block:: yaml\n\n    default_dimensions:\n      cluster_tag: production\n\ncounters_to_rates\n=================\n\nAutomatically convert counters to rates. This works by buffering counters\nlocally and then computing the derivative with respect to time when the\nbuffer is flushed to the Monasca API. When enabled, this setting uses the\nPrometheus metric type to automatically generate new rate metrics from\ncounters. The counter metrics are still posted to the API unless they\nare not included in the ``whitelist``. The rate metrics are named after\nthe counters by appending ``_rate`` to the end of the metric name. Note that\nthe Prometheus convention is to append ``_total`` to all counters, so a\ncounter named ``ceph_osd_op_w`` will become ``ceph_osd_op_w_total_rate``\nwhen converted to a rate.\n\nExample:\n\n.. code-block:: yaml\n\n    counters_to_rates: True\n\nDefaults to ``True``.\n\nwhitelist\n=========\n\nA whitelist of regexes used to determine which metrics are posted to the\nMonasca API. Many Prometheus endpoints generate vast quantities of data,\nso this can be a useful way to cut back on the number of metrics posted to\nthe Monasca API to improve performance.\n\nExample:\n\n.. code-block:: yaml\n\n    whitelist:\n      - ceph_cluster_total_used_bytes\n      - ceph_cluster_total_bytes\n      - ceph_osd_op.*\n\nLabel whitelist\n===============\n\nA whitelist of labels can be provided to reduce the number of unique time\nseries created in Monasca. This is useful for exporters such as cAdvisor which\nproduce many highly variable labels attached to each metric, of which some may\nnot even be valid dimensions in Monasca.\n\nExample:\n\n.. code-block:: yaml\n\n    label_whitelist:\n      - name\n      - state\n      - hostname\n      - interface\n\nderived_metrics\n===============\n\nA dict of metrics to derive from existing metrics. Supported operations\nare ``divide``, ``sum`` and ``counter``.\n\ndivide\n^^^^^^\n\nThe ``divide`` operation divides two metric series by each other. It enforces\nthat the dimensions of the metrics match, to reduce the chance of an\nunphysical result. For example, in a ceph cluster with two OSDs, the\nfollowing metrics may exist:\n\n.. code-block::\n\n    ['ceph_osd_total_bytes', 'dimensions': {'osd': 1}, 'value': '1234',\n     'ceph_osd_total_bytes', 'dimensions': {'osd': 2}, 'value': '4567']\n\n    ['ceph_osd_total_used_bytes', 'dimensions': {'osd': 1}, 'value': '891',\n     'ceph_osd_total_used_bytes', 'dimensions': {'osd': 2}, 'value': '111']\n\nTo calculate the fractional amount of space used on each OSD you must\ndivide ``ceph_osd_total_used_bytes`` by ``ceph_osd_total_bytes`` for ``osd: 1``\nand again for ``osd: 2``. The plugin does this by hashing the dimensions for\neach metric and using the hash to find the equivalent metric. If the two\nmetric series do not have common sets of dimensions the operation will\ncurrently fail.\n\n.. code-block::\n\n    derived_metrics:\n      ceph_cluster_usage:\n        x: ceph_cluster_total_used_bytes\n        y: ceph_cluster_total_bytes\n        op: divide\n\nsum\n^^^\n\nThe ``sum`` operation sums all metrics in a series as a function of a specified\ndimension. For example, by specifying the ``osd`` dimension the total space used\non all OSDs could be computed from the following metrics:\n\n.. code-block::\n\n    ['ceph_osd_total_used_bytes', 'dimensions': {'osd': 1}, 'value': '891',\n     'ceph_osd_total_used_bytes', 'dimensions': {'osd': 2}, 'value': '111']\n\nIf additional dimensions are present, these must remain the same for all\nmetrics in the calculation. For example, it is not currently possible to\ncreate a ``sum`` on this hypothetical metric series:\n\n.. code-block::\n\n    ['ceph_osd_total_used_bytes', 'dimensions': {'osd': 1, 'cluster: 'A'}, 'value': '891',\n     'ceph_osd_total_used_bytes', 'dimensions': {'osd': 1, 'cluster: 'B'}, 'value': '111']\n\nExample:\n\n.. code-block::\n\n    derived_metrics:\n      ceph_osd_in_sum:\n        series: ceph_osd_in\n        key: ceph_daemon\n        op: sum\n\ncounter\n^^^^^^^\n\nIn many cases you will want to use ``counters_to_rates`` to automatically\ncreate counters from rates. As such this setting is enabled by default.\nHowever, sometimes Prometheus metrics may not be marked as counters\ncorrectly, or you may wish to calculate the rate of change of a gauge, or\neven of an existing rate.\n\nTo minimise user configuration, any metric ending with ``_total`` which is not\nmarked as a counter will be converted automatically to a rate when\n``counters_to_rates`` is ``True``. This is because, by Prometheus convention,\nany metric ending with ``_total`` should be a counter. In this case the metric\nname will be appended with ``_rate`` to create the name of the new series,\nand the original series will remain.\n\nFor metrics which do not end in ``_total`` and/or are not marked as\ncounters it may still be useful to convert the series to a rate. For\nexample, the rate of change of remaining capacity would be a useful\nderivative of a gauge on a Ceph cluster. In this case you can use\nthe ``counter`` operation to generate a rate from an arbitrary metric.\nThe new metric assumes the name specified by the configuration key. For\nexample in this case, a series of metrics called\n``ceph_pool_wr_bytes_total_rate`` would be created from the metric series\n``ceph_pool_wr_bytes``.\n\nExample:\n\n.. code-block::\n\n    derived_metrics:\n      ceph_pool_wr_bytes_total:\n        series: ceph_pool_wr_bytes\n        op: counter\n\nNote that this requires ``counters_to_rates`` to be enabled, which is the\ndefault, and if the same name is used for the existing series, the existing\nseries will be converted to a rate in situ, overwriting the existing counter.\n\nFull example configuration\n==========================\n\n.. code-block::\n\n    init_config:\n      timeout: 10\n    instances:\n      - metric_endpoint: 'http://ceph-node:9283/metrics'\n\tremove_hostname: true\n\tdefault_dimensions:\n\t  cluster_tag: production\n        counters_to_rates: True\n        whitelist:\n          - ceph_cluster_total_used_bytes\n          - ceph_cluster_total_bytes\n          - ceph_osd_op.*\n\tderived_metrics: |\n\t  ceph_cluster_usage:\n\t    x: ceph_cluster_total_used_bytes\n\t    y: ceph_cluster_total_bytes\n\t    op: divide\n\t  ceph_osd_in_sum:\n\t    series: ceph_osd_in\n\t    key: ceph_daemon\n\t    op: sum\n\t  ceph_pool_wr_bytes_total:\n\t    series: ceph_pool_wr_bytes\n\t    op: counter\n\t  ceph_pool_rd_bytes_total:\n\t    series: ceph_pool_rd_bytes\n\t    op: counter\n\nNote that more than one endpoint can be monitored by adding additional\nentries on the ``instances`` list.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackhpc%2Fstackhpc-monasca-agent-plugins","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstackhpc%2Fstackhpc-monasca-agent-plugins","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackhpc%2Fstackhpc-monasca-agent-plugins/lists"}