aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2024-11-09 19:51:32 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2024-11-09 19:51:32 +0100
commit314f9bbaf49ad17cb6d418e4b7577a03c6024de6 (patch)
treef7f7fad2a177a4d931867cce637dd70548306d49
parent1294c718ea1757662fede1fee8a0775f671a9e00 (diff)
downloadinfra-314f9bbaf49ad17cb6d418e4b7577a03c6024de6.tar.gz
infra-314f9bbaf49ad17cb6d418e4b7577a03c6024de6.tar.bz2
infra-314f9bbaf49ad17cb6d418e4b7577a03c6024de6.tar.xz
infra-314f9bbaf49ad17cb6d418e4b7577a03c6024de6.zip
prometheus
-rw-r--r--terraform/hash-prometheus/prometheus.tf10
-rw-r--r--terraform/hash-prometheus/prometheus.yml2
2 files changed, 11 insertions, 1 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 5f74367..9c0ede7 100644
--- a/terraform/hash-prometheus/prometheus.yml
+++ b/terraform/hash-prometheus/prometheus.yml
@@ -29,7 +29,7 @@ scrape_configs:
- "hash.dn42.trygvis.io:9177"
- job_name: snmp_kv24_ap
- scrape_interval: 300s
+ scrape_interval: 60s
static_configs:
- targets:
- "192.168.10.20"