rfenkhuber/vdsm-prometheus

Project ID: 6631

Description

Go client for VDSM which exposes host and VM stats as prometheus metrics.

Full documentation is available at the github project page.

Installation Instructions

The easiest way is to install the RPMs from copr. After activating the vdsm-prometheus service the metrics are exposed at :8181/metrics.

CentOS

curl https://copr.fedorainfracloud.org/coprs/rfenkhuber/vdsm-prometheus/repo/epel-7/rfenkhuber-vdsm-prometheus-epel-7.repo > /etc/yum.repos.d/vdsm-prometheus.repo yum install vdsm-prometheus systemctl start vdsm-prometheus

Fedora

dnf copr enable rfenkhuber/vdsm-prometheus dnf install vdsm-prometheus systemctl start vdsm-prometheus

Firewall configuration

For iptables:

iptables -I INPUT -p tcp --dport 8181 -j ACCEPT

For firewalld:

firewall-cmd --zone=public --add-port=8181/tcp

Ansible

There exists an Ansible role to ease the installation of vdsm-prometheus on every oVirt managed host. Run

ansible-galaxy install rmohr.vdsm-prometheus

Now you can use the role in your playbooks. For instance to allow browsing the metrics without TLS run a playbook like this:

--- - hosts: vdsm roles: - { role: vdsm-prometheus, opts: "-no-verify -no-prom-auth" }

Disable TLS for Prometheus

When trying out Prometheus it can be handy to allow Prometheus to access the metrics without configuring a valid TLS certificate. To do this, either run vdsm-prometheus -no-verify -no-prom-auth directly or let systemd do the work for you:

Add the following to /etc/systemd/system/vdsm-prometheus.service.d/10-vdsm-prometheus.conf (create the directory or file if it does not exist):

[Service] Environment=VDSM_PROM_OPTS=-no-verify -no-prom-auth

Then restart the service:

systemctl daemon-reload systemctl restart vdsm-prometheus

vdsm-prometheus now still uses TLS when communicating with VDSM but Prometheus can access the metrics without authentication.

Verify that TLS is disabled by running curl localhost:8181/metrics on the VDSM host.

Active Releases

The following unofficial repositories are provided as-is by owner of this project. Contact the owner directly for bugs or issues (IE: not bugzilla).

Release Architectures Repo Download
EPEL 7 x86_64 (316)* EPEL 7 (2412 downloads)

* Total number of downloaded packages.