Commit aca3d47d authored by Jay Ta'ala's avatar Jay Ta'ala
Browse files

Docker compose (3) with Prometheus, Blackbox, and Grafana. Several custom ports exposed to host.

Also contains several dashboards for blackbox and node_exporter.
parents
modules:
http_2xx:
prober: http
http:
preferred_ip_protocol: "ip4"
http_post_2xx:
prober: http
http:
method: POST
tcp_connect:
prober: tcp
pop3s_banner:
prober: tcp
tcp:
query_response:
- expect: "^+OK"
tls: true
tls_config:
insecure_skip_verify: false
ssh_banner:
prober: tcp
tcp:
query_response:
- expect: "^SSH-2.0-"
irc_banner:
prober: tcp
tcp:
query_response:
- send: "NICK prober"
- send: "USER prober prober prober :prober"
- expect: "PING :([^ ]+)"
send: "PONG ${1}"
- expect: "^:[^ ]+ 001"
icmp:
prober: icmp
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
version: '3'
services:
prom:
image: prom/prometheus
container_name: prom
restart: always
environment:
- 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
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- prom-data:/prometheus
bbexp:
image: prom/blackbox-exporter
container_name: bbexp
restart: always
environment:
- config.file="/config.yml"
volumes:
- ./blackbox-exporter.yml:/config.yml
graf:
image: grafana/grafana
container_name: graf
restart: always
ports:
- 3000:3000
volumes:
- ./grafana.ini:/etc/grafana/grafana.ini
- graf-data:/var/lib/grafana
volumes:
prom-data:
graf-data:
[server]
domain = domain.example.com
[auth.anonymous]
enabled = true
# Organization name that should be used for unauthenticated users
org_name = example.com
# Role for unauthenticated users, other valid values are `Editor` and `Admin`
org_role = Viewer
# my global config
global:
#scrape_interval: 1m # Set the interval to scrape data. Default is every 1 minute.
#evaluation_interval: 1m # Set interval to evaluate rules. The default is every 1 minute.
#scrape_timeout: 10s # Set scrape timeout period. global default (10s).
# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets:
# - alertmanager:9093
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
# - "first_rules.yml"
# - "second_rules.yml"
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: 'prometheus'
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
static_configs:
- targets: ['localhost:9090']
- job_name: 'node_exporter'
scrape_interval: 5s
static_configs:
- targets: ['10.0.0.137:10091']
- job_name: 'blackbox'
scrape_timeout: 20s
metrics_path: /probe
params:
module: [http_2xx] # Look for a HTTP 200 response.
static_configs:
- targets:
- https://example.com
- https://startpage.com
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: bbexp:9115 # The blackbox exporter's real hostname:port.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment