{"id":25000557,"url":"https://github.com/gluster/gluster-prometheus","last_synced_at":"2025-04-12T08:52:20.792Z","repository":{"id":29622706,"uuid":"117634855","full_name":"gluster/gluster-prometheus","owner":"gluster","description":"Gluster monitoring using Prometheus","archived":false,"fork":false,"pushed_at":"2022-03-04T12:14:03.000Z","size":231,"stargazers_count":122,"open_issues_count":53,"forks_count":71,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-04-12T08:52:19.049Z","etag":null,"topics":["gluster","prometheus-exporter"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gluster.png","metadata":{"files":{"readme":"README.adoc","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":"2018-01-16T05:19:59.000Z","updated_at":"2025-03-03T08:09:38.000Z","dependencies_parsed_at":"2022-08-25T12:40:40.894Z","dependency_job_id":null,"html_url":"https://github.com/gluster/gluster-prometheus","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gluster%2Fgluster-prometheus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gluster%2Fgluster-prometheus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gluster%2Fgluster-prometheus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gluster%2Fgluster-prometheus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gluster","download_url":"https://codeload.github.com/gluster/gluster-prometheus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248543883,"owners_count":21121838,"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":["gluster","prometheus-exporter"],"created_at":"2025-02-04T19:35:45.600Z","updated_at":"2025-04-12T08:52:20.759Z","avatar_url":"https://github.com/gluster.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Prometheus exporter for Gluster Metrics\n\nimage:https://travis-ci.org/gluster/gluster-prometheus.svg?branch=master[\"Build Status\", link=\"https://travis-ci.org/gluster/gluster-prometheus\"]\n\nThese exporters will be run on all Gluster peers, So it makes sense to\ncollect only local metrics and aggregate in Prometheus server when\nrequired.\n\n== Install\n\n----\nmkdir -p $GOPATH/src/github.com/gluster\ncd $GOPATH/src/github.com/gluster\ngit clone https://github.com/gluster/gluster-prometheus.git\ncd gluster-prometheus\n\n# Install the required dependancies.\n# Hint: assumes that GOPATH and PATH are already configured.\n./scripts/install-reqs.sh\n\nPREFIX=/usr make\nPREFIX=/usr make install\n----\n\n== Usage\n\nRun `gluster-exporter` with default settings, glusterd is consumable\nat http://localhost:9713/metrics\n\n----\nsystemctl enable gluster-exporter\nsystemctl start gluster-exporter\n----\n\nSystemd service uses following configuration file for global and\ncollectors related configurations.\n\n.`/etc/gluster-exporter/gluster-exporter.toml`\n[source,toml]\n----\n[globals]\ngluster-mgmt = \"glusterd\"\nglusterd-dir = \"/var/lib/glusterd\"\ngluster-binary-path = \"gluster\"\n# If you want to connect to a remote gd1 host, set the variable gd1-remote-host\n# However, using a remote host restrict the gluster cli to read-only commands\n# The following collectors won't work in remote mode : gluster_volume_counts, gluster_volume_profile \n#gd1-remote-host = \"localhost\"\ngd2-rest-endpoint = \"http://127.0.0.1:24007\"\nport = 9713\nmetrics-path = \"/metrics\"\nlog-dir = \"/var/log\"\nlog-file = \"gluster-exporter.log\"\nlog-level = \"info\"\n\n[collectors.gluster_ps]\nname = \"gluster_ps\"\nsync-interval = 5\ndisabled = false\n\n[collectors.gluster_brick]\nname = \"gluster_brick\"\nsync-interval = 5\ndisabled = false\n----\n\nTo use `gluster-exporter` without systemd,\n\n----\ngluster-exporter --config=/etc/gluster-exporter/gluster-exporter.toml\n----\n\n== Metrics\n\nList of supported metrics are documented link:docs/metrics.adoc[here].\n\n== Adding New metrics\n\n* Add new file under `gluster-exporter` directory.\n* Define Metrics depending on the type of\n  Metric(https://prometheus.io/docs/concepts/metric_types/)\n  For example, \"Gauge\" Metrics type\n\n[source,go]\n----\nglusterCPUPercentage = prometheus.NewGaugeVec(\n    prometheus.GaugeOpts{\n        Namespace: \"gluster\",\n        Name:      \"cpu_percentage\",\n        Help:      \"CPU Percentage used by Gluster processes\",\n    },\n    []string{\"volume\", \"peerid\", \"brick_path\"},\n)\n----\n\n* Implement the function to gather data, and register to gather data\n  in required interval\n\n[source,go]\n----\nprometheus.MustRegister(glusterCPUPercentage)\n\nregisterMetric(\"gluster_brick\", brickUtilization)\n----\n\n* Add an entry in /etc/gluster-exporter/gluster-exporter.toml\n\n[source,toml]\n----\n[collectors.gluster_ps]\nname = \"gluster_ps\"\nsync-interval = 5\ndisabled = false\n----\n\n* Thats it! Exporter will run these registered metrics.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgluster%2Fgluster-prometheus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgluster%2Fgluster-prometheus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgluster%2Fgluster-prometheus/lists"}