WIP: prometheus-ipmi-exporter #63
3 changed files with 28 additions and 0 deletions
|
@ -54,6 +54,9 @@
|
||||||
prometheus_targets:
|
prometheus_targets:
|
||||||
- targets: |
|
- targets: |
|
||||||
{{ groups['edc_pve'] + groups['edc_vm'] + groups['edc_server'] | list | sort }}
|
{{ groups['edc_pve'] + groups['edc_vm'] + groups['edc_server'] | list | sort }}
|
||||||
|
prometheus_ipmi_targets:
|
||||||
|
- targets: |
|
||||||
|
{{ groups['edc_pve'] + groups['edc_server'] | list | sort }}
|
||||||
prometheus_unifi_snmp_targets:
|
prometheus_unifi_snmp_targets:
|
||||||
- targets: "{{ groups['edc_unifi'] | list | sort }}"
|
- targets: "{{ groups['edc_unifi'] | list | sort }}"
|
||||||
roles:
|
roles:
|
||||||
|
|
|
@ -113,6 +113,13 @@
|
||||||
mode: 0644
|
mode: 0644
|
||||||
when: prometheus_pdu_snmp_targets is defined
|
when: prometheus_pdu_snmp_targets is defined
|
||||||
|
|
||||||
|
- name: Configure Prometheus ipmi targets monitoring
|
||||||
|
copy:
|
||||||
|
content: "{{ prometheus_ipmi_targets | to_nice_json }}\n"
|
||||||
|
dest: /etc/prometheus/targets_ipmi.json
|
||||||
|
mode: 0644
|
||||||
|
when: prometheus_ipmi_targets is defined
|
||||||
|
|
||||||
- name: Activate prometheus service
|
- name: Activate prometheus service
|
||||||
systemd:
|
systemd:
|
||||||
name: prometheus
|
name: prometheus
|
||||||
|
|
|
@ -140,4 +140,22 @@ scrape_configs:
|
||||||
- target_label: __address__
|
- target_label: __address__
|
||||||
replacement: 127.0.0.1:9116
|
replacement: 127.0.0.1:9116
|
||||||
|
|
||||||
|
- job_name: ipmi
|
||||||
|
file_sd_configs:
|
||||||
|
- files:
|
||||||
|
- '/etc/prometheus/targets_ipmi.json'
|
||||||
|
metrics_path: /metrics
|
||||||
|
params:
|
||||||
|
module: [default]
|
||||||
|
relabel_configs:
|
||||||
|
# Do not put :9290 in instance name, rather here
|
||||||
|
- source_labels: [__address__]
|
||||||
|
target_label: __param_target
|
||||||
|
- source_labels: [__param_target]
|
||||||
|
target_label: instance
|
||||||
|
- source_labels: [__param_target]
|
||||||
|
target_label: __address__
|
||||||
|
replacement: '$1:9290'
|
||||||
|
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|
Loading…
Reference in a new issue