{"id":23465763,"url":"https://github.com/natrontech/flexporter","last_synced_at":"2025-04-12T16:55:10.009Z","repository":{"id":260280700,"uuid":"861709132","full_name":"natrontech/flexporter","owner":"natrontech","description":"A prometheus exporter to gather consumption insights of Natron Flex stacks.","archived":false,"fork":false,"pushed_at":"2025-01-02T14:32:15.000Z","size":57,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-01-02T15:28:42.880Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/natrontech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-23T11:39:52.000Z","updated_at":"2025-01-02T14:31:09.000Z","dependencies_parsed_at":"2024-10-30T14:44:42.955Z","dependency_job_id":"ecc7f27b-1ba0-494e-8ab8-6af36ec6ae5d","html_url":"https://github.com/natrontech/flexporter","commit_stats":null,"previous_names":["natrontech/flexporter"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natrontech%2Fflexporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natrontech%2Fflexporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natrontech%2Fflexporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natrontech%2Fflexporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/natrontech","download_url":"https://codeload.github.com/natrontech/flexporter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239081736,"owners_count":19578355,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-12-24T11:36:39.090Z","updated_at":"2025-02-16T03:19:24.676Z","avatar_url":"https://github.com/natrontech.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flexporter\n\nA Prometheus exporter to gather consumption insights of Proxmox-based private clouds by customer.\n\n## Environment Variables\n\n| Variable                 | Description                    | Default            |\n| ------------------------ | ------------------------------ | ------------------ |\n| `PROXMOX_ENDPOINT`       | The URL of the Proxmox API     | `10.10.10.10:8006` |\n| `PROXMOX_USER`           | The Proxmox username           | `root@pam`         |\n| `PROXMOX_PASSWORD`       | The Proxmox password           | `password`         |\n| `PROXMOX_VERIFY_SSL`     | Verify SSL certificate         | `true`             |\n| `PROXMOX_BACKUP_STORAGE` | The name of the backup storage | `local`            |\n\n## Running the Exporter\n\n1. Set the environment variables or use the defaults.\n2. Run the Docker container:\n\n```bash\ndocker build -t flexporter .\ndocker run -p 8000:8000 flexporter\n```\n\nThe exporter will be available at `http://localhost:8000`.\n\n## Metrics\n\nThe following metrics are exported:\n\n```shell\n# HELP flexporter_vm_count Number of VMs\n# TYPE flexporter_vm_count gauge\nflexporter_vm_count{pool=\"pool_name}\n# HELP flexporter_vm_cpu_cores CPU cores\n# TYPE flexporter_vm_cpu_cores gauge\nflexporter_vm_cpu_cores{id=\"vm_id\",name=\"vm_name\",pool=\"pool_name\"}\n# HELP flexporter_vm_vcpus VM vCPUs\n# TYPE flexporter_vm_vcpus gauge\nflexporter_vm_vcpus{id=\"vm_id\",name=\"vm_name\",pool=\"pool_name\"}\n# HELP flexporter_vm_memory_gb VM memory in GB\n# TYPE flexporter_vm_memory_gb gauge\nflexporter_vm_memory_gb{id=\"vm_id\",name=\"vm_name\",pool=\"pool_name\"}\n# HELP flexporter_vm_total_disk_gb VM disk in GB\n# TYPE flexporter_vm_total_disk_gb gauge\nflexporter_vm_total_disk_gb{id=\"vm_id\",name=\"vm_name\",pool=\"pool_name\"}\n# HELP flexporter_vm_total_backup_gb VM backup in GB\n# TYPE flexporter_vm_total_backup_gb gauge\nflexporter_vm_total_backup_gb{id=\"vm_id\",name=\"vm_name\",pool=\"pool_name\"}\n# HELP flexporter_vm_running VM running status\n# TYPE flexporter_vm_running gauge\nflexporter_vm_running{id=\"vm_id\",name=\"vm_name\",pool=\"pool_name\"}\n# HELP flexporter_vm_info VM info\n# TYPE flexporter_vm_info gauge\nflexporter_vm_info{id=\"vm_id\",name=\"vm_name\",pool=\"pool_name\",ip=\"vm_ip\",os_type=\"vm_os_type\",tags=\"vm_tags\"}\n# HELP flexporter_cluster_tags Unique tags used across the cluster\n# TYPE flexporter_cluster_tags gauge\nflexporter_cluster_tags{tag=\"tag_name\"}\n```\n\n## Extending the Exporter\n\nTo add new metrics:\n1. Update the `MetricsCollector` class in `src/metrics_collector.py`.\n2. Add new Gauge metrics in the `PrometheusExporter` class in `src/prometheus_exporter.py`.\n3. Update the `update_metrics` method in `src/prometheus_exporter.py` to set the new metrics.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatrontech%2Fflexporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnatrontech%2Fflexporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatrontech%2Fflexporter/lists"}