add alloy to the z9 hosts and some cleanup
This commit is contained in:
parent
10388c8333
commit
37e6c4d8a2
6 changed files with 301 additions and 6 deletions
43
inventories/z9/group_vars/all.yaml
Normal file
43
inventories/z9/group_vars/all.yaml
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
alloy_config_default: |
|
||||
prometheus.remote_write "default" {
|
||||
endpoint {
|
||||
url = "https://metrics.hamburg.ccc.de/api/v1/write"
|
||||
basic_auth {
|
||||
username = "chaos"
|
||||
password = "{{ metrics__chaos_password }}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
prometheus.relabel "z9_common" {
|
||||
forward_to = [prometheus.remote_write.default.receiver]
|
||||
rule {
|
||||
target_label = "org"
|
||||
replacement = "ccchh"
|
||||
}
|
||||
rule {
|
||||
target_label = "site"
|
||||
replacement = "z9"
|
||||
}
|
||||
rule {
|
||||
source_labels = ["instance"]
|
||||
target_label = "instance"
|
||||
regex = "([^:]+)"
|
||||
replacement = "${1}.z9.ccchh.net"
|
||||
action = "replace"
|
||||
}
|
||||
}
|
||||
|
||||
logging {
|
||||
level = "info"
|
||||
}
|
||||
|
||||
prometheus.exporter.unix "local_system" {
|
||||
enable_collectors = ["systemd"]
|
||||
}
|
||||
|
||||
prometheus.scrape "scrape_metrics" {
|
||||
targets = prometheus.exporter.unix.local_system.targets
|
||||
forward_to = [prometheus.relabel.z9_common.receiver]
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue