Prometheus pushgateway for LibreNMS
parent
ea6d1bfc09
commit
e662f8c97d
31
main.tf
31
main.tf
|
|
@ -250,6 +250,12 @@ server:
|
|||
hostname: prometheus.${var.domain_suffix}
|
||||
service:
|
||||
type: ClusterIP
|
||||
extraScrapeConfigs:
|
||||
- job_name: pushgateway
|
||||
scrape_interval: 300s
|
||||
honor_labels: true
|
||||
static_configs:
|
||||
- targets: ['${helm_release.prometheus_pushgw.name}-${helm_release.prometheus_pushgw.chart}.${helm_release.prometheus_pushgw.namespace}.svc.cluster.local:9091']
|
||||
alertmanager:
|
||||
service:
|
||||
type: ClusterIP
|
||||
|
|
@ -257,6 +263,29 @@ EOT
|
|||
]
|
||||
}
|
||||
|
||||
resource "helm_release" "prometheus_pushgw" {
|
||||
name = "prometheus-pushgw"
|
||||
namespace = var.prometheus_namespace
|
||||
repository = "https://prometheus-community.github.io/helm-charts"
|
||||
chart = "prometheus-pushgateway"
|
||||
create_namespace = true
|
||||
values = [
|
||||
<<EOT
|
||||
ingress:
|
||||
enabled: true
|
||||
hosts:
|
||||
- pushgw.${var.domain_suffix}
|
||||
tls:
|
||||
- secretName: pushgw-tls
|
||||
hosts:
|
||||
- pushgw.${var.domain_suffix}
|
||||
persistentVolume:
|
||||
enabled: true
|
||||
storageClass: ${var.storageclass}
|
||||
EOT
|
||||
]
|
||||
}
|
||||
|
||||
resource "helm_release" "influxdb" {
|
||||
name = "influxdb"
|
||||
namespace = var.influxdb_namespace
|
||||
|
|
@ -349,7 +378,7 @@ resource "helm_release" "grafana" {
|
|||
url: http://influxdb.${var.influxdb_namespace}.svc.cluster.local:8006
|
||||
- name: Prometheus
|
||||
type: prometheus
|
||||
url: http://prometheus.${var.prometheus_namespace}.svc.cluster.local
|
||||
url: http://prometheus-server.${var.prometheus_namespace}.svc.cluster.local
|
||||
global:
|
||||
storageClass: ${var.storageclass}
|
||||
ingress:
|
||||
|
|
|
|||
Loading…
Reference in New Issue