Full update

This commit is contained in:
ItsDrike 2021-07-05 15:52:48 +02:00
parent b7ebadaafb
commit da62c947ca
No known key found for this signature in database
GPG key ID: B5F6B41F708C3ADD
10 changed files with 652 additions and 693 deletions

View file

@ -1,8 +1,3 @@
- targets: # url;humanname;routing;switch
- http://google.com;google.com;external;internetbox
- http://github.com;github.com;external;internetbox
- https://blackdata.xam.dk:5001;blackdata.xam.dk;external;internetbox
- http://192.168.1.1;internetbox;local;internetbox
- http://192.168.1.42;blackdata;local;orbirouter-attic
- http://192.168.1.101;orbirouter;local;orbirouter
- targets: # url;humanname;routing;switch
- http://google.com/;google.com
- https://github.com/;github.com

View file

@ -1,40 +1,25 @@
# my global config
global:
scrape_interval: 15s # By default, scrape targets every 15 seconds.
evaluation_interval: 15s # By default, scrape targets every 15 seconds.
# scrape_timeout is set to the global default (10s).
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
scrape_interval: 15s
evaluation_interval: 15s
scrape_timeout: 10s
external_labels:
monitor: 'Alertmanager'
monitor: 'Alertmanager'
# Load and evaluate rules in this file every 'evaluation_interval' seconds.
rule_files:
- 'alert.rules'
# - "first.rules"
# - "second.rules"
- 'alert.rules'
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
- job_name: 'prometheus'
# Override the global default and scrape targets from this job every 5 seconds.
scrape_interval: 5s
static_configs:
- targets: ['localhost:9090']
- targets: ['localhost:9090']
- job_name: 'speedtest'
metrics_path: /metrics
scrape_interval: 15m
scrape_timeout: 60s # running speedtest needs time to complete
scrape_interval: 10m # TODO: Make this ~60m, we don't need that many
scrape_timeout: 60s # running speedtest needs time to complete
static_configs:
- targets: ['speedtest:9696']
- targets: ['speedtest:9798']
- job_name: 'ping'
metrics_path: /probe
@ -43,24 +28,16 @@ scrape_configs:
module: [http_2xx] # Look for a HTTP 200 response.
file_sd_configs:
- files:
- pinghosts.yaml
- pinghosts.yaml
relabel_configs:
- source_labels: [__address__]
regex: '(.*);(.*);(.*);(.*)' #first is the url, thus unique for instance
regex: '(.*);(.*)' # first is the url, thus unique for instance
target_label: instance
replacement: $1
- source_labels: [__address__]
regex: '(.*);(.*);(.*);(.*)' #second is humanname to use in charts
regex: '(.*);(.*)' # second is humanname to use in charts
target_label: humanname
replacement: $2
- source_labels: [__address__]
regex: '(.*);(.*);(.*);(.*)' #third state whether this is testing external or internal network
target_label: routing
replacement: $3
- source_labels: [__address__]
regex: '(.*);(.*);(.*);(.*)' #fourth is which switch/router the device is connected to.
target_label: switching
replacement: $4
- source_labels: [instance]
target_label: __param_target
- target_label: __address__
@ -68,9 +45,4 @@ scrape_configs:
- job_name: 'nodeexp'
static_configs:
- targets: ['nodeexp:9100']
- job_name: 'sonos'
static_configs:
- targets: ['192.168.1.42:1915']
- targets: ['nodeexp:9100']