ofesseler / gluster_exporter

Gluster Exporter for Prometheus
Apache License 2.0
81 stars 57 forks source link

Add inode metrics #28

Closed mjtrangoni closed 6 years ago

mjtrangoni commented 6 years ago

Hi @ofesseler,

I added the inodesTotal and inodesFree metrics here. With inodeSize it seems to be a bug not reporting the real inode size with the --xml flag, and that is why I leave it commented for future investigations. This fixes #27.

About the Total and Free metrics, it turns out, that a Total metric should be a counter type and Free a gauge type for Prometheus. You can check this here gauge and counter. This fixes #25 partially.

See,

$ curl -s http://localhost:9189/metrics | promtool check metrics
gluster_brick_data_read counter metrics should have "_total" suffix
gluster_brick_data_written counter metrics should have "_total" suffix
gluster_brick_duration counter metrics should have "_total" suffix
gluster_brick_count non-histogram and non-summary metrics should not have "_count" suffix
gluster_brick_fop_hits counter metrics should have "_total" suffix
gluster_brick_fop_latency_avg counter metrics should have "_total" suffix
gluster_brick_fop_latency_max counter metrics should have "_total" suffix
gluster_brick_fop_latency_min counter metrics should have "_total" suffix
gluster_volumes_count non-histogram and non-summary metrics should not have "_count" suffix