Skip to content

Instantly share code, notes, and snippets.

@chrismcfee
Created January 11, 2024 21:12
Show Gist options
  • Save chrismcfee/628512dbf6af83ca0a1ed82605af93bd to your computer and use it in GitHub Desktop.
Save chrismcfee/628512dbf6af83ca0a1ed82605af93bd to your computer and use it in GitHub Desktop.
prometheus.yml
global:
scrape_interval: 15s
evaluation_interval: 15s
external_labels:
monitor: 'docker-host-alpha'
rule_files:
- 'alert.rules'
- /core.rules
scrape_configs:
- job_name: 'prometheus'
scrape_interval: 5s
static_configs:
- targets: ['prometheus:9090']
- job_name: 'traefik'
metrics_path: /metrics
static_configs:
- targets: ['zignage-reverse-proxy-1:9002'] #have to put DNS target for this because docker not running on main IP address
- job_name: 'mongodb_exporter'
#metrics_path: '/scrape'
static_configs:
- targets: ['mongodb_exporter:17001']
#- job_name: 'node'
#scrape_interval: 5s
#static_configs:
# - targets: ['nodeexporter:9100']
- job_name: 'alertmanager'
static_configs:
- targets: ['alertmanager:9093']
- job_name: 'nodehost'
metrics_path: /metrics
scrape_interval: 3s
static_configs:
- targets: ['nodeexporterhost:9100']
- job_name: 'cadvisor'
scrape_interval: 5s
metrics_path: /metrics
static_configs:
- targets: ['cadvisor:8099']
- job_name: 'postgres'
static_configs:
- targets: ['postgres_exporter:9187']
#- job_name: 'meshcentralviapromblackbox'
# metrics_path: /probe
# params:
# module: [http_2xx] # Look for a HTTP 200 response.
# static_configs:
# - targets: ['https://mesh9.zignage.sobe.world:4430'] # Replace with your actual MeshCentral service URL and port.
# scrape_interval: 15s
# relabel_configs:
# - source_labels: [__address__]
# target_label: __param_target
# - source_labels: [__param_target]
# target_label: instance
# - target_label: __address__
# replacement: blackboxexporter:9115 # The Blackbox exporter's address.
- job_name: 'dnsblackbox'
metrics_path: /probe
params:
module: [dns_rp_mx]
static_configs:
- targets:
- 8.8.8.8
- 1.1.1.1
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: blackboxexporter2:9119 # The Blackbox exporter's address
- job_name: 'blackbox_ssl'
metrics_path: /probe
params:
module: [ssl_expiry] # Use the module defined in the Blackbox Exporter.
static_configs:
- targets:
- https://prometheus.console.zignage.com
- https://grafana.console.zignage.com
- https://alertmanager.console.zignage.com
# - https://something.zignage.com
# - https://mesh9.zignage.sobe.world:4430
# - https://traefik-10ui.zignage.sobe.world
# - https://prom11.zignage.sobe.world
# - https://graf9.zignage.sobe.world
# - https://alertmanager11.zignage.sobe.world
# - https://mender11.zignage.sobe.world
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: blackboxexporter3:9993 # Address of the Blackbox Exporter.
alerting:
alertmanagers:
- scheme: http
static_configs:
- targets:
- 'alertmanager:9093'
# - job_name: 'aspnetcore'
# scrape_interval: 10s
# static_configs:
# - targets: ['eventlog-proxy:5000', 'eventlog:5000']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment