Compare commits

...

3 commits

8 changed files with 36 additions and 5 deletions

View file

@ -227,6 +227,7 @@ firewall__forward:
dst:
- sw
- ups
- bmc
protocols:
udp:
dport: 161

View file

@ -0,0 +1,13 @@
---
prometheus__scraping_ilo:
targets: "{{ groups.ilo }}"
address: 127.0.0.1:9116
path: /snmp
timeout: 180s
interval: 180s
params:
module:
- ilo
prometheus__rules_ilo: {}
...

View file

@ -10,6 +10,7 @@ prometheus__scraping:
kresd: "{{ prometheus__scraping_kresd }}"
bird: "{{ prometheus__scraping_bird }}"
quanta: "{{ prometheus__scraping_quanta }}"
ilo: "{{ prometheus__scraping_ilo }}"
snmp: "{{ prometheus__scraping_snmp }}"
eaton: "{{ prometheus__scraping_eaton }}"
@ -20,6 +21,7 @@ prometheus__rules:
node: "{{ prometheus__rules_node }}"
keepalived: "{{ prometheus__rules_keepalived }}"
quanta: "{{ prometheus__rules_quanta }}"
#ilo: "{{ prometheus__rules_ilo }}"
bird: "{{ prometheus__rules_bird }}"
#eaton: "{{ prometheus__rules_eaton }}"
...

View file

@ -3,7 +3,8 @@ prometheus__scraping_quanta:
targets: "{{ groups.quanta }}"
address: 127.0.0.1:9116
path: /snmp
timeout: 60s
timeout: 180s
interval: 180s
params:
module:
- quanta

View file

@ -0,0 +1,13 @@
---
prometheus_snmp__modules_ilo:
version: 3
auth:
security_level: authPriv
auth_protocol: SHA
username: aurore
password: "{{ vault_snmp_ilo_auth }}"
priv_protocol: AES
priv_password: "{{ vault_snmp_ilo_priv }}"
walk:
- sysUpTime
...

View file

@ -1,5 +1,6 @@
---
prometheus_snmp__modules:
quanta: "{{ prometheus_snmp__modules_quanta }}"
ilo: "{{ prometheus_snmp__modules_ilo }}"
eaton: "{{ prometheus_snmp__modules_eaton }}"
...

View file

@ -1,7 +1,7 @@
---
systemd_link__links:
adm0: 96:77:96:91:e3:6c
ovh0: 00:50:56:00:fd:c0
ovh0: 02:00:00:97:78:6d
ifupdown2__interfaces:
adm0:

View file

@ -9,9 +9,7 @@ class FilterModule:
def convert_jobs(config):
for name, job in config.items():
config = {
"job_name": name,
"static_configs": [
@ -28,8 +26,10 @@ def convert_jobs(config):
if "timeout" in job:
config["scrape_timeout"] = job["timeout"]
if "address" in job:
if "interval" in job:
config["scrape_interval"] = job["interval"]
if "address" in job:
try:
replacement = f"$1:{job['address']['port']}"
except Exception: