File tree Expand file tree Collapse file tree 2 files changed +49
-0
lines changed
docker/prometheus/prometheus-libvirt-exporter Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Original file line number Diff line number Diff line change
1
+ FROM {{ namespace }}/{{ infra_image_prefix }}prometheus-base:{{ tag }}
2
+ {% block labels %}
3
+ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
4
+ {% endblock %}
5
+
6
+ {% import "macros.j2" as macros with context %}
7
+
8
+ {% block prometheus_libvirt_exporter_header %}{% endblock %}
9
+
10
+ {% if base_package_type == 'rpm' %}
11
+ {% set prometheus_libvirt_exporter_packages = [
12
+ 'git' ,
13
+ 'go' ,
14
+ 'libvirt-devel' ,
15
+ ] %}
16
+ {% elif base_package_type == 'deb' %}
17
+ {% set prometheus_libvirt_exporter_packages = [
18
+ 'build-essential' ,
19
+ 'git' ,
20
+ 'golang-go' ,
21
+ 'libvirt-dev' ,
22
+ 'pkg-config' ,
23
+ ] %}
24
+ {% endif %}
25
+
26
+ {{ macros.install_packages(prometheus_libvirt_exporter_packages | customizable("packages")) }}
27
+
28
+ {% block prometheus_libvirt_exporter_version %}
29
+ ARG prometheus_libvirt_exporter_version=2.3.0
30
+ ARG prometheus_libvirt_exporter_path=github.com/AlexZzz/libvirt-exporter
31
+ {% endblock %}
32
+
33
+ {% block prometheus_libvirt_exporter_install %}
34
+ ENV GOPATH=/build
35
+ RUN go mod init libvirt-exporter \
36
+ && go get -v ${prometheus_libvirt_exporter_path}@${prometheus_libvirt_exporter_version} \
37
+ && mv /build/bin/libvirt-exporter /opt \
38
+ && rm -rf /build
39
+
40
+ {% endblock %}
41
+
42
+ {% block prometheus_libvirt_exporter_footer %}{% endblock %}
43
+ {% block footer %}{% endblock %}
44
+
45
+ USER root
Original file line number Diff line number Diff line change
1
+ ---
2
+ features :
3
+ - Added a container image for Prometheus libvirt exporter, to be used
4
+ for monitoring deployments which provide VMs with libvirt.
You can’t perform that action at this time.
0 commit comments