= Prometheus exporter for Gluster Metrics
image:https://travis-ci.org/gluster/gluster-prometheus.svg?branch=master["Build Status", link="https://travis-ci.org/gluster/gluster-prometheus"]
These exporters will be run on all Gluster peers, So it makes sense to collect only local metrics and aggregate in Prometheus server when required.
== Install
mkdir -p $GOPATH/src/github.com/gluster cd $GOPATH/src/github.com/gluster git clone https://github.com/gluster/gluster-prometheus.git cd gluster-prometheus
./scripts/install-reqs.sh
== Usage
Run gluster-exporter
with default settings, glusterd is consumable
at http://localhost:9713/metrics
Systemd service uses following configuration file for global and collectors related configurations.
/etc/gluster-exporter/gluster-exporter.toml
[source,toml][globals] gluster-mgmt = "glusterd" glusterd-dir = "/var/lib/glusterd" gluster-binary-path = "gluster"
gd2-rest-endpoint = "http://127.0.0.1:24007" port = 9713 metrics-path = "/metrics" log-dir = "/var/log" log-file = "gluster-exporter.log" log-level = "info"
[collectors.gluster_ps] name = "gluster_ps" sync-interval = 5 disabled = false
To use gluster-exporter
without systemd,
== Metrics
List of supported metrics are documented link:docs/metrics.adoc[here].
== Adding New metrics
gluster-exporter
directory.prometheus.MustRegister(glusterCPUPercentage)