mirror of
https://github.com/ItsDrike/network-monitor.git
synced 2024-12-25 13:34:34 +00:00
add relabeling for better naming/context
This commit is contained in:
parent
47ceb88685
commit
db03c54c0d
|
@ -1,8 +1,8 @@
|
|||
- targets:
|
||||
- http://google.com
|
||||
- http://github.com
|
||||
- https://blackdata.xam.dk:5001
|
||||
- http://192.168.1.1
|
||||
- http://192.168.1.42
|
||||
- http://192.168.1.101
|
||||
- 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
|
||||
|
||||
|
|
|
@ -46,9 +46,23 @@ scrape_configs:
|
|||
- pinghosts.yaml
|
||||
relabel_configs:
|
||||
- source_labels: [__address__]
|
||||
target_label: __param_target
|
||||
- source_labels: [__param_target]
|
||||
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
|
||||
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__
|
||||
replacement: ping:9115 # The blackbox exporter's real hostname:port.
|
||||
|
||||
|
|
Loading…
Reference in a new issue