Enable the node exporter textfile collector, which allows for collecting custom statistics in a simple way. https://github.com/prometheus/node_exporter#textfile-collector
62 lines
1.7 KiB
YAML
62 lines
1.7 KiB
YAML
# ansible_pull
|
|
# ansible_pull__age_private_key needs to be defined per host (probably HOST.sops.yaml).
|
|
ansible_pull__repo_url: https://git.hamburg.ccc.de/CCCHH/ansible-infra.git
|
|
ansible_pull__inventory: inventories/z9
|
|
ansible_pull__playbook: playbooks/maintenance.yaml
|
|
ansible_pull__timer_on_calendar: "*-*-* 07:00:00 Europe/Berlin"
|
|
ansible_pull__failure_notification_address: noc-notifications@lists.hamburg.ccc.de
|
|
ansible_pull__timer_randomized_delay_sec: 30min
|
|
|
|
# msmtp
|
|
# msmtp__smtp_password is defined in the all.sops.yaml.
|
|
msmtp__smtp_host: cow.hamburg.ccc.de
|
|
msmtp__smtp_port: 465
|
|
msmtp__smtp_tls_method: smtps
|
|
msmtp__smtp_user: machine@ccchh.net
|
|
msmtp__smtp_from: "{{ inventory_hostname }}@cchh.net"
|
|
|
|
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}.ccchh.net"
|
|
action = "replace"
|
|
}
|
|
}
|
|
|
|
logging {
|
|
level = "info"
|
|
}
|
|
|
|
prometheus.exporter.unix "local_system" {
|
|
enable_collectors = ["systemd", "textfile"]
|
|
textfile {
|
|
directory = "/var/lib/node_exporter_textfile/"
|
|
}
|
|
}
|
|
|
|
prometheus.scrape "scrape_metrics" {
|
|
targets = prometheus.exporter.unix.local_system.targets
|
|
forward_to = [prometheus.relabel.z9_common.receiver]
|
|
}
|