This commit is contained in:
parent
6824bf5e4f
commit
c620f0f86b
3 changed files with 80 additions and 3 deletions
|
@ -14,3 +14,77 @@ nginx__version_spec: ""
|
|||
nginx__configurations:
|
||||
- name: ntfy.hamburg.ccc.de
|
||||
content: "{{ lookup('ansible.builtin.file', 'resources/chaosknoten/ntfy/nginx/ntfy.hamburg.ccc.de.conf') }}"
|
||||
|
||||
alloy_config: |
|
||||
prometheus.remote_write "default" {
|
||||
endpoint {
|
||||
url = "https://metrics.hamburg.ccc.de/api/v1/write"
|
||||
basic_auth {
|
||||
username = "chaos"
|
||||
password = "{{ secret__metrics_chaos }}"
|
||||
}
|
||||
}
|
||||
}
|
||||
loki.write "default" {
|
||||
endpoint {
|
||||
url = "https://loki.hamburg.ccc.de/loki/api/v1/push"
|
||||
basic_auth {
|
||||
username = "chaos"
|
||||
password = "{{ secret__loki_chaos }}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
loki.relabel "journal" {
|
||||
forward_to = []
|
||||
|
||||
rule {
|
||||
source_labels = ["__journal__systemd_unit"]
|
||||
target_label = "systemd_unit"
|
||||
}
|
||||
rule {
|
||||
source_labels = ["__journal__hostname"]
|
||||
target_label = "instance"
|
||||
}
|
||||
rule {
|
||||
source_labels = ["__journal__transport"]
|
||||
target_label = "systemd_transport"
|
||||
}
|
||||
rule {
|
||||
source_labels = ["__journal_syslog_identifier"]
|
||||
target_label = "syslog_identifier"
|
||||
}
|
||||
rule {
|
||||
source_labels = ["__journal_priority_keyword"]
|
||||
target_label = "level"
|
||||
}
|
||||
}
|
||||
|
||||
loki.source.journal "read_journal" {
|
||||
forward_to = [loki.write.default.receiver]
|
||||
relabel_rules = loki.relabel.journal.rules
|
||||
format_as_json = true
|
||||
labels = {component = "loki.source.journal", org = "ccchh"}
|
||||
}
|
||||
|
||||
prometheus.exporter.unix "local_system" { }
|
||||
|
||||
prometheus.relabel "default" {
|
||||
forward_to = [prometheus.remote_write.default.receiver]
|
||||
rule {
|
||||
target_label = "org"
|
||||
replacement = "ccchh"
|
||||
}
|
||||
rule {
|
||||
source_labels = ["instance"]
|
||||
target_label = "host"
|
||||
regex = "([^:]+)"
|
||||
replacement = "${1}.hamburg.ccc.det"
|
||||
action = "replace"
|
||||
}
|
||||
}
|
||||
|
||||
prometheus.scrape "scrape_metrics" {
|
||||
targets = prometheus.exporter.unix.local_system.targets
|
||||
forward_to = [prometheus.relabel.default.receiver]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue