项目作者: rajaSahil

项目描述 :
Logical Volume Manager (LVM) Exporter
高级语言: Go
项目地址: git://github.com/rajaSahil/lvm-exporter.git
创建时间: 2021-06-10T07:15:04Z
项目社区:https://github.com/rajaSahil/lvm-exporter

开源协议:Apache License 2.0

下载


lvm-exporter


This repository provides code for a Prometheus metrics exporter
for LVM. This exporter can be run as a seperate daemonset or as a sidecar container.

This exporter makes use of
prometheus-go-client, the official Go
client library for prometheus.

The following metrics/labels are being exported:

  1. lvm_lv_total_size{device="",lv_active="",lv_dm_path="",lv_full_name="",lv_name="",lv_path="",lv_uuid="",vg_name=""} TOTAL_SIZE
  2. lvm_vg_free_size{vg_name=""} FREE_SIZE
  3. lvm_vg_total_size{vg_name=""} TOTAL_SIZE

To publish container to Docker

  • Update DOCKER_REPO in deploy.env with you own dockerhub repo name.
  • Run make all in the top directory. It will:
    • Build the docker image with the binary and will publish it in your docker repo.

To deploy:

  • Run it as a daemonset or as a sidecar container.
    • Please visit examples for daemonset yamls and how to deploy it.

To run lvm-exporter as textfile-collector with node-exporter

  • The textfile collector is similar to the Pushgateway, in that it allows exporting of statistics from batch jobs.
    It can also be used to export static metrics, such as what role a machine has.
    The Pushgateway should be used for service-level metrics. The textfile module is for metrics that are tied to a machine.

  • To use it, set the —collector.textfile.directory flag on the node_exporter commandline. The collector will
    parse all files in that directory matching the glob *.prom using the text format.

  • To deploy lvm-textfile-collector with node-exporter: