add proxmox exporter
This commit is contained in:
5
templates/conf/prometheus-proxmox-exporter.j2
Normal file
5
templates/conf/prometheus-proxmox-exporter.j2
Normal file
@ -0,0 +1,5 @@
|
||||
# {{ ansible_managed }}
|
||||
default:
|
||||
user: {{ prometheus_proxmox_exporter_user }}
|
||||
password: {{ prometheus_proxmox_exporter_password }}
|
||||
verify_ssl: {{ prometheus_proxmox_exporter_verify_ssl | default('false') }}
|
@ -387,3 +387,20 @@ scrape_configs:
|
||||
regex: '(.*):8082'
|
||||
replacement: '${1}'
|
||||
{% endif %}
|
||||
|
||||
{% if prometheus_pve_exporter_targets is defined %}
|
||||
# proxmox #
|
||||
- job_name: pve
|
||||
scrape_interval: 30s
|
||||
static_configs:
|
||||
- targets:
|
||||
{% for target in prometheus_pve_exporter_targets %}
|
||||
- {{ target }}:9221
|
||||
{% endfor %}
|
||||
metrics_path: /pve
|
||||
relabel_configs:
|
||||
- source_labels: [ __address__ ]
|
||||
target_label: instance
|
||||
regex: '(.*):9221'
|
||||
replacement: '${1}'
|
||||
{% endif %}
|
||||
|
11
templates/systemd/prometheus-proxmox-exporter.service.j2
Normal file
11
templates/systemd/prometheus-proxmox-exporter.service.j2
Normal file
@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Proxmox VE Prometheus Exporter
|
||||
After=network.target
|
||||
Wants=network.target
|
||||
|
||||
[Service]
|
||||
Restart=on-failure
|
||||
ExecStart=/usr/local/bin/pve_exporter /etc/default/prometheus-pve-exporter {{ prometheus_proxmox_exporter_port | default('9221') }} {{ prometheus_proxmox_exporter_node }}
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Reference in New Issue
Block a user