{"id":36687981,"url":"https://github.com/converged-computing/prometheus-flux","last_synced_at":"2026-01-12T11:16:31.946Z","repository":{"id":170777984,"uuid":"647017215","full_name":"converged-computing/prometheus-flux","owner":"converged-computing","description":"Export metrics about Flux for Prometheus","archived":false,"fork":false,"pushed_at":"2023-05-30T01:21:15.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-29T03:18:09.733Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/converged-computing.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":"COPYRIGHT","agents":null,"dco":null,"cla":null}},"created_at":"2023-05-29T22:04:46.000Z","updated_at":"2023-05-29T22:08:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"d4a4eb0f-f0b8-4003-aac5-5bff4c22d7fe","html_url":"https://github.com/converged-computing/prometheus-flux","commit_stats":null,"previous_names":["converged-computing/prometheus-flux"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/converged-computing/prometheus-flux","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/converged-computing%2Fprometheus-flux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/converged-computing%2Fprometheus-flux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/converged-computing%2Fprometheus-flux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/converged-computing%2Fprometheus-flux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/converged-computing","download_url":"https://codeload.github.com/converged-computing/prometheus-flux/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/converged-computing%2Fprometheus-flux/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T10:58:46.209Z","status":"ssl_error","status_checked_at":"2026-01-12T10:58:42.742Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-01-12T11:16:31.054Z","updated_at":"2026-01-12T11:16:31.941Z","avatar_url":"https://github.com/converged-computing.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Prometheus Flux\n\n\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n[![PyPI](https://img.shields.io/pypi/v/prometheus-flux)](https://pypi.org/project/prometheus-flux/)\n\nExport Prometheus metrics about Flux.\n\n🚧️ **under development** 🚧️\n\nThis tool is under development and is not ready for production use. It's fairly simple, so documentation\nis provided in this README.md. To see the package on pypi:\n\n - 📦️ [Pypi Package](https://pypi.org/project/prometheus-flux/) 📦️\n\n## Usage\n\n### Install\n\nYou can install from pypi or from source:\n\n```bash\n$ python -m venv env\n$ source env/bin/activate\n$ pip install prometheus-flux\n\n# or\n\n$ git clone https://github.com/converged-computing/prometheus-flux\n$ cd prometheus-flux\n$ pip install\n# you can also do \"pip install -e .\"\n```\n\nThis will install the executable to your path, which might be your local user bin:\n\n```bash\n$ which prometheus-flux\n/home/vscode/.local/bin/prometheus-flux\n```\n\nNote that the provided [.devcontainer](.devcontainer) includes an environment for VSCode where you have Flux\nand can install this and use ready to go!\n\n### Start\n\nYou'll want to be running in a Flux instance, as we need to connect to the broker handle.\n\n```bash\n$ flux start --test-size=4\n```\n\nAnd then start the server. This will use a default port and host (0.0.0.0:8080) that you can customize\nif desired.\n\n```bash\n$ prometheus-flux start\n\n# customize the port or host\n$ prometheus-flux start --port 9000 --host 127.0.0.1\n```\n\nAs an example, when Flux is running with no jobs (and default options are used) we can open\nthe browser to [http://localhost:8080/metrics/](http://localhost:8080/metrics) to see:\n\n```console\n# HELP flux_queue_state_counts Gauge for the counting job states in the queue.\n# TYPE flux_queue_state_counts gauge\nflux_queue_state_counts{state=\"INACTIVE\"} 2.0\n# HELP flux_node_cores_counts Gauge for the counting of cores in different states.\n# TYPE flux_node_cores_counts gauge\nflux_node_cores_counts{state=\"up\"} 16.0\nflux_node_cores_counts{state=\"free\"} 16.0\n# HELP flux_node_counts Total number of nodes in different states\n# TYPE flux_node_counts gauge\nflux_node_counts{state=\"up\"} 4.0\nflux_node_counts{state=\"free\"} 4.0\n```\n\nIf you run in `--verbose` mode you'll also see metrics for the server itself:\n\n```bash\n$ prometheus-flux start --verbose\n```\n\n\u003cdetails\u003e\n\n\u003csummary\u003eExample Prometheus Data Output\u003c/summary\u003e\n\n```\n# HELP python_gc_objects_collected_total Objects collected during gc\n# TYPE python_gc_objects_collected_total counter\npython_gc_objects_collected_total{generation=\"0\"} 452.0\npython_gc_objects_collected_total{generation=\"1\"} 43.0\npython_gc_objects_collected_total{generation=\"2\"} 0.0\n# HELP python_gc_objects_uncollectable_total Uncollectable objects found during GC\n# TYPE python_gc_objects_uncollectable_total counter\npython_gc_objects_uncollectable_total{generation=\"0\"} 0.0\npython_gc_objects_uncollectable_total{generation=\"1\"} 0.0\npython_gc_objects_uncollectable_total{generation=\"2\"} 0.0\n# HELP python_gc_collections_total Number of times this generation was collected\n# TYPE python_gc_collections_total counter\npython_gc_collections_total{generation=\"0\"} 85.0\npython_gc_collections_total{generation=\"1\"} 7.0\npython_gc_collections_total{generation=\"2\"} 0.0\n# HELP python_info Python platform information\n# TYPE python_info gauge\npython_info{implementation=\"CPython\",major=\"3\",minor=\"8\",patchlevel=\"10\",version=\"3.8.10\"} 1.0\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\nprocess_virtual_memory_bytes 1.24461056e+08\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\nprocess_resident_memory_bytes 3.4168832e+07\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\nprocess_start_time_seconds 1.68539579014e+09\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\nprocess_cpu_seconds_total 0.22\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\nprocess_open_fds 13.0\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\nprocess_max_fds 1.048576e+06\n# HELP flux_queue_state_counts Gauge for the counting job states in the queue.\n# TYPE flux_queue_state_counts gauge\nflux_queue_state_counts{state=\"INACTIVE\"} 2.0\n# HELP flux_node_cores_counts Gauge for the counting of cores in different states.\n# TYPE flux_node_cores_counts gauge\nflux_node_cores_counts{state=\"up\"} 16.0\nflux_node_cores_counts{state=\"free\"} 16.0\n# HELP flux_node_counts Total number of nodes in different states\n# TYPE flux_node_counts gauge\nflux_node_counts{state=\"up\"} 4.0\nflux_node_counts{state=\"free\"} 4.0\n```\n\n\u003c/details\u003e\n\nNote that we are testing this to help with an autoscaler for Kubernetes, meaning\nthe metrics will be used to determine if we should make a request to scale or shrink\na cluster.\n\n### Docker\n\nWe have a docker container, which you can customize for your use case, but it's more intended to\nbe a demo. You can either build it yourself, or use our build.\n\n```bash\n$ docker build -t promflux .\n$ docker run -it -p 8080:8080 promflux\n```\nor\n\n```bash\n$ docker run -it -p 8080:8080 ghcr.io/converged-computing/prometheus-flux\n```\n\nYou can then open up the browser at [http://localhost:8080/metrics/](http://localhost:8080/metrics) to see\nthe metrics!\n\n## 😁️ Contributors 😁️\n\nWe use the [all-contributors](https://github.com/all-contributors/all-contributors)\ntool to generate a contributors graphic below.\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://vsoch.github.io\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/814322?v=4?s=100\" width=\"100px;\" alt=\"Vanessasaurus\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eVanessasaurus\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/converged-computing/prometheus-flux/commits?author=vsoch\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\n## License\n\nHPCIC DevTools is distributed under the terms of the MIT license.\nAll new contributions must be made under this license.\n\nSee [LICENSE](https://github.com/converged-computing/prometheus-flux/blob/main/LICENSE),\n[COPYRIGHT](https://github.com/converged-computing/prometheus-flux/blob/main/COPYRIGHT), and\n[NOTICE](https://github.com/converged-computing/prometheus-flux/blob/main/NOTICE) for details.\n\nSPDX-License-Identifier: (MIT)\n\nLLNL-CODE- 842614\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconverged-computing%2Fprometheus-flux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconverged-computing%2Fprometheus-flux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconverged-computing%2Fprometheus-flux/lists"}