prometheus: use inovex/prometheus-libvirt-exporter
The Tinkoff/libvirt-exporter is archived. Latest release in December 2022. The inovex/prometheus-libvirt-exporter is an active fork that will most probably become a prometheus community exporter in the future [1]. Unfortunately this exporter is not 100% compatible with Tinkoff exporter that we are using currently [2]. [1]: https://github.com/prometheus-community/community/issues/50 [2]: https://github.com/inovex/prometheus-libvirt-exporter/issues/22 Change-Id: Icc8a3651d601ab45d448c9d252ca6155219d21cf
This commit is contained in:
parent
7613d35c02
commit
986293e9d4
@ -5,41 +5,15 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
|
|||||||
|
|
||||||
{% import "macros.j2" as macros with context %}
|
{% import "macros.j2" as macros with context %}
|
||||||
|
|
||||||
{{ macros.enable_extra_repos(['crb']) }}
|
|
||||||
|
|
||||||
{% block prometheus_libvirt_exporter_header %}{% endblock %}
|
{% block prometheus_libvirt_exporter_header %}{% endblock %}
|
||||||
|
|
||||||
{% if base_package_type == 'rpm' %}
|
|
||||||
{% set prometheus_libvirt_exporter_packages = [
|
|
||||||
'git',
|
|
||||||
'go',
|
|
||||||
'libvirt-devel',
|
|
||||||
] %}
|
|
||||||
{% elif base_package_type == 'deb' %}
|
|
||||||
{% set prometheus_libvirt_exporter_packages = [
|
|
||||||
'build-essential',
|
|
||||||
'git',
|
|
||||||
'golang-go',
|
|
||||||
'libvirt-dev',
|
|
||||||
'pkg-config',
|
|
||||||
] %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{{ macros.install_packages(prometheus_libvirt_exporter_packages | customizable("packages")) }}
|
{{ macros.install_packages(prometheus_libvirt_exporter_packages | customizable("packages")) }}
|
||||||
|
|
||||||
{% block prometheus_libvirt_exporter_version %}
|
|
||||||
ARG prometheus_libvirt_exporter_version=2.3.3
|
|
||||||
ARG prometheus_libvirt_exporter_path=github.com/Tinkoff/libvirt-exporter
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block prometheus_libvirt_exporter_install %}
|
{% block prometheus_libvirt_exporter_install %}
|
||||||
ENV GOPATH=/build
|
ADD prometheus-libvirt-exporter-archive /prometheus-libvirt-exporter-source
|
||||||
RUN go mod init libvirt-exporter \
|
|
||||||
&& cd ${GOPATH} \
|
RUN ln -s /prometheus-libvirt-exporter-source/* prometheus-libvirt-exporter \
|
||||||
&& go get -v ${prometheus_libvirt_exporter_path}@${prometheus_libvirt_exporter_version} \
|
&& cp /prometheus-libvirt-exporter/prometheus-libvirt-exporter /opt/libvirt-exporter
|
||||||
&& go build ${prometheus_libvirt_exporter_path} \
|
|
||||||
&& mv /build/libvirt-exporter /opt \
|
|
||||||
&& rm -rf /build
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -341,6 +341,17 @@ SOURCES = {
|
|||||||
'releases/download/v${version}/'
|
'releases/download/v${version}/'
|
||||||
'elasticsearch_exporter'
|
'elasticsearch_exporter'
|
||||||
'-${version}.linux-${debian_arch}.tar.gz')},
|
'-${version}.linux-${debian_arch}.tar.gz')},
|
||||||
|
'prometheus-libvirt-exporter': {
|
||||||
|
'version': '1.6.0',
|
||||||
|
'type': 'url',
|
||||||
|
'sha256': {
|
||||||
|
'amd64': '57f1e71ac5bd87f18a40b9089e9fb513dec44ced58328b3065879b279f967596', # noqa: E501
|
||||||
|
'arm64': '8f474fbb515caf19fda92c839eece761738138c7c676d12d10aa0b8c29b3ef9d'}, # noqa: E501
|
||||||
|
'location': ('https://github.com/'
|
||||||
|
'inovex/prometheus-libvirt-exporter/'
|
||||||
|
'releases/download/v${version}/'
|
||||||
|
'prometheus-libvirt-exporter'
|
||||||
|
'-${version}.linux-${debian_arch}.tar.gz')},
|
||||||
'prometheus-memcached-exporter': {
|
'prometheus-memcached-exporter': {
|
||||||
'version': '0.14.2',
|
'version': '0.14.2',
|
||||||
'type': 'url',
|
'type': 'url',
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Replace Tinkoff/libvirt-exporter with inovex/prometheus-libvirt-exporter.
|
||||||
|
The Tinkoff/libvirt-exporter repository is archived. Latest
|
||||||
|
release in December 2022. The inovex/prometheus-libvirt-exporter repository is an
|
||||||
|
active fork of zhangjianweibj/prometheus-libvirt-exporter that will become
|
||||||
|
`a Prometheus community exporter in the future <https: //github.com/prometheus-community/community/issues/50>`_.
|
Loading…
x
Reference in New Issue
Block a user