aboutsummaryrefslogtreecommitdiff
path: root/terraform/hash-prometheus
diff options
context:
space:
mode:
Diffstat (limited to 'terraform/hash-prometheus')
-rw-r--r--terraform/hash-prometheus/prometheus.tf10
-rw-r--r--terraform/hash-prometheus/prometheus.yml62
2 files changed, 72 insertions, 0 deletions
diff --git a/terraform/hash-prometheus/prometheus.tf b/terraform/hash-prometheus/prometheus.tf
index 4c77ce8..09df3ee 100644
--- a/terraform/hash-prometheus/prometheus.tf
+++ b/terraform/hash-prometheus/prometheus.tf
@@ -19,6 +19,15 @@ resource "docker_container" "prometheus" {
env = [
]
+ command = [
+#"/bin/prometheus",
+ "--config.file=/etc/prometheus/prometheus.yml",
+ "--storage.tsdb.path=/prometheus",
+ "--web.console.libraries=/usr/share/prometheus/console_libraries",
+ "--web.console.templates=/usr/share/prometheus/consoles",
+ "--storage.tsdb.retention.time=100y",
+ ]
+
networks_advanced {
name = data.docker_network.dn42.name
}
@@ -45,6 +54,7 @@ resource "docker_container" "prometheus" {
source = local.path
target = "/etc/prometheus"
type = "bind"
+ read_only = false
}
volumes {
diff --git a/terraform/hash-prometheus/prometheus.yml b/terraform/hash-prometheus/prometheus.yml
index b9e6e5a..9c0ede7 100644
--- a/terraform/hash-prometheus/prometheus.yml
+++ b/terraform/hash-prometheus/prometheus.yml
@@ -27,3 +27,65 @@ scrape_configs:
- targets:
- "conflatorio.dn42.trygvis.io:9177"
- "hash.dn42.trygvis.io:9177"
+
+ - job_name: snmp_kv24_ap
+ scrape_interval: 60s
+ static_configs:
+ - targets:
+ - "192.168.10.20"
+ - "192.168.10.21"
+ - "192.168.10.22"
+ - "192.168.10.23"
+ - "192.168.10.25"
+ - "192.168.10.26"
+ metrics_path: /snmp
+ params:
+ auth: [public_v2]
+ module:
+ - if_mib
+ - ubiquiti_unifi
+ relabel_configs:
+ - source_labels: [__address__]
+ target_label: __param_target
+ - source_labels: [__param_target]
+ target_label: instance
+ - target_label: __address__
+ replacement: "coregonus.dn42.trygvis.io:9116"
+
+ - job_name: snmp_kv24_sw
+ scrape_interval: 60s
+ static_configs:
+ - targets:
+ - "192.168.10.10"
+ - "192.168.10.11"
+ - "192.168.10.12"
+ metrics_path: /snmp
+ params:
+ auth: [public_v2]
+ module:
+ - if_mib
+ relabel_configs:
+ - source_labels: [__address__]
+ target_label: __param_target
+ - source_labels: [__param_target]
+ target_label: instance
+ - target_label: __address__
+ replacement: "coregonus.dn42.trygvis.io:9116"
+
+ - job_name: snmp_kv24_router
+ scrape_interval: 60s
+ static_configs:
+ - targets:
+ - "192.168.10.1"
+ metrics_path: /snmp
+ params:
+ auth: [public_v2]
+ module:
+ - if_mib
+ relabel_configs:
+ - source_labels: [__address__]
+ target_label: __param_target
+ - source_labels: [__param_target]
+ target_label: instance
+ - target_label: __address__
+ replacement: "coregonus.dn42.trygvis.io:9116"