From 65956ce96916639734e8f82968ce6c5370529656 Mon Sep 17 00:00:00 2001 From: Micah Anderson <micah@riseup.net> Date: Tue, 23 Mar 2021 08:48:33 -0400 Subject: [PATCH] Update references to new locations. --- docs/reference.md | 7 +++---- roles/float-infra-prometheus/README.md | 2 +- .../templates/rules/alerts_acme.conf.yml | 2 +- .../templates/rules/alerts_backup.conf.yml | 2 +- .../templates/rules/alerts_base.conf.yml | 2 +- .../templates/rules/alerts_cpu.conf.yml | 2 +- .../templates/rules/alerts_disk.conf.yml | 2 +- .../templates/rules/alerts_mtail.conf.yml | 2 +- .../templates/rules/alerts_mysql.conf.yml | 2 +- .../templates/rules/alerts_net.conf.yml | 2 +- .../templates/rules/alerts_nginx.conf.yml | 2 +- .../templates/rules/alerts_prometheus.conf.yml | 2 +- .../templates/rules/alerts_services.conf.yml | 2 +- .../templates/rules/alerts_ssl_probes.conf.yml | 2 +- .../templates/rules/alerts_syslog.conf.yml | 2 +- .../templates/rules/alerts_system_health.conf.yml | 2 +- .../templates/rules/alerts_systemd.conf.yml | 2 +- .../templates/rules/rules_acme.conf.yml | 2 +- .../templates/rules/rules_base.conf.yml | 2 +- .../templates/rules/rules_cpu.conf.yml | 2 +- .../templates/rules/rules_disk.conf.yml | 2 +- .../templates/rules/rules_elasticsearch.conf.yml | 2 +- .../templates/rules/rules_mysql.conf.yml | 2 +- .../templates/rules/rules_net.conf.yml | 2 +- .../templates/rules/rules_nginx.conf.yml | 2 +- .../templates/rules/rules_services.conf.yml | 2 +- .../templates/rules/rules_ssl_probes.conf.yml | 2 +- .../templates/rules/rules_syslog.conf.yml | 2 +- .../templates/rules/rules_systemd.conf.yml | 2 +- 29 files changed, 31 insertions(+), 32 deletions(-) diff --git a/docs/reference.md b/docs/reference.md index ff5160bc..72b75f63 100644 --- a/docs/reference.md +++ b/docs/reference.md @@ -1120,7 +1120,7 @@ all the XML and weird enterprise edge cases. / Apache2 modules. * [git.autistici.org/id/go-sso](https://git.autistici.org/id/go-sso) SSO server and SSO proxy implementation. -* [the sso-server role README](../roles/sso-server/README.md) has +* [the sso-server role README](../roles/float-infra-sso-server/README.md) has details about the Ansible configuration of SSO parameters. ### User-encrypted secrets @@ -1265,8 +1265,7 @@ Monitoring dashboards are provided by Grafana. A few alerting rules are provided by default in -[roles/prometheus/files/rules/](roles/prometheus/files/rules/). This -includes: +[roles/float-infra-prometheus/templates/rules/](roles/float-infra-prometheus/templates/rules/). This includes: * host-level alerts (high CPU usage, disk full, network errors...) * service failures (systemd services down, or crash-looping) @@ -1472,7 +1471,7 @@ indexes. Float uses the following index types: * *audit-\** for audit logs, which usually have a longer retention We use Elasticsearch index templates (in -roles/log-collector/templates/elasticsearch/templates) to optimize the +roles/float-infra-log-collector/templates/elasticsearch/templates) to optimize the schema a bit, disabling indexing on problematic fields, and setting sane replication options. diff --git a/roles/float-infra-prometheus/README.md b/roles/float-infra-prometheus/README.md index 2d70f4b6..fcfb3749 100644 --- a/roles/float-infra-prometheus/README.md +++ b/roles/float-infra-prometheus/README.md @@ -48,7 +48,7 @@ but it will still be active and functional (via *amtool*). A few alerting rules are provided by default in -[roles/prometheus/files/rules/](roles/prometheus/files/rules/). This +[roles/float-infra-prometheus/templates/rules/](roles/float-infra-prometheus/templates/rules/). This includes: * host-level alerts (high CPU usage, disk full, network errors...) diff --git a/roles/float-infra-prometheus/templates/rules/alerts_acme.conf.yml b/roles/float-infra-prometheus/templates/rules/alerts_acme.conf.yml index a6bdf74e..baa8ab55 100644 --- a/roles/float-infra-prometheus/templates/rules/alerts_acme.conf.yml +++ b/roles/float-infra-prometheus/templates/rules/alerts_acme.conf.yml @@ -1,5 +1,5 @@ groups: -- name: roles/prometheus/files/rules/alerts_acme.conf +- name: roles/float-infra-prometheus/templates/rules/alerts_acme.conf rules: - alert: CertMissing diff --git a/roles/float-infra-prometheus/templates/rules/alerts_backup.conf.yml b/roles/float-infra-prometheus/templates/rules/alerts_backup.conf.yml index 1937f766..429d90c5 100644 --- a/roles/float-infra-prometheus/templates/rules/alerts_backup.conf.yml +++ b/roles/float-infra-prometheus/templates/rules/alerts_backup.conf.yml @@ -1,5 +1,5 @@ groups: -- name: roles/prometheus/files/rules/alerts_backup.conf +- name: roles/float-infra-prometheus/template/rules/alerts_backup.conf rules: - alert: BackupFailed expr: backup_ok != 1 diff --git a/roles/float-infra-prometheus/templates/rules/alerts_base.conf.yml b/roles/float-infra-prometheus/templates/rules/alerts_base.conf.yml index e4a2061e..ab5bbb00 100644 --- a/roles/float-infra-prometheus/templates/rules/alerts_base.conf.yml +++ b/roles/float-infra-prometheus/templates/rules/alerts_base.conf.yml @@ -1,5 +1,5 @@ groups: -- name: roles/prometheus/files/rules/alerts_base.conf +- name: roles/float-infra-prometheus/templates/rules/alerts_base.conf rules: # HostUnreachable is used as a gate for most other host-based pages diff --git a/roles/float-infra-prometheus/templates/rules/alerts_cpu.conf.yml b/roles/float-infra-prometheus/templates/rules/alerts_cpu.conf.yml index 4a94bde6..ec1b3a5d 100644 --- a/roles/float-infra-prometheus/templates/rules/alerts_cpu.conf.yml +++ b/roles/float-infra-prometheus/templates/rules/alerts_cpu.conf.yml @@ -1,5 +1,5 @@ groups: -- name: roles/prometheus/files/rules/alerts_cpu.conf +- name: roles/float-infra-prometheus/templates/rules/alerts_cpu.conf rules: - alert: CPUUsageHigh expr: instance_utilization:rate5m > 0.96 diff --git a/roles/float-infra-prometheus/templates/rules/alerts_disk.conf.yml b/roles/float-infra-prometheus/templates/rules/alerts_disk.conf.yml index 1366f74d..41a20cde 100644 --- a/roles/float-infra-prometheus/templates/rules/alerts_disk.conf.yml +++ b/roles/float-infra-prometheus/templates/rules/alerts_disk.conf.yml @@ -1,5 +1,5 @@ groups: -- name: roles/prometheus/files/rules/alerts_disk.conf +- name: roles/float-infra-prometheus/template/rules/alerts_disk.conf rules: - alert: DiskWillFillIn4Hours expr: (predict_linear(node_filesystem_free_bytes[1h], 4 * 3600) < 0) and (node_filesystem_free_bytes / node_filesystem_size_bytes < 0.6) diff --git a/roles/float-infra-prometheus/templates/rules/alerts_mtail.conf.yml b/roles/float-infra-prometheus/templates/rules/alerts_mtail.conf.yml index e05b8e41..9c206116 100644 --- a/roles/float-infra-prometheus/templates/rules/alerts_mtail.conf.yml +++ b/roles/float-infra-prometheus/templates/rules/alerts_mtail.conf.yml @@ -1,5 +1,5 @@ groups: -- name: roles/prometheus/files/rules/alerts_mtail.conf +- name: roles/float-infra-prometheus/templates/rules/alerts_mtail.conf rules: - alert: MtailProgramErrors expr: delta(mtail_prog_load_errors_total[1h]) > 0 diff --git a/roles/float-infra-prometheus/templates/rules/alerts_mysql.conf.yml b/roles/float-infra-prometheus/templates/rules/alerts_mysql.conf.yml index 3b77e822..9521b6d6 100644 --- a/roles/float-infra-prometheus/templates/rules/alerts_mysql.conf.yml +++ b/roles/float-infra-prometheus/templates/rules/alerts_mysql.conf.yml @@ -1,5 +1,5 @@ groups: - - name: roles/prometheus/files/rules/alerts_mysql.conf + - name: roles/float-infra-prometheus/templates/rules/alerts_mysql.conf rules: - alert: MySQLReplicationBroken expr: mysql_slave_status_slave_io_running == 0 or mysql_slave_status_slave_sql_running == 0 diff --git a/roles/float-infra-prometheus/templates/rules/alerts_net.conf.yml b/roles/float-infra-prometheus/templates/rules/alerts_net.conf.yml index 22c0ef23..30683b6d 100644 --- a/roles/float-infra-prometheus/templates/rules/alerts_net.conf.yml +++ b/roles/float-infra-prometheus/templates/rules/alerts_net.conf.yml @@ -1,5 +1,5 @@ groups: -- name: roles/prometheus/files/rules/alerts_net.conf +- name: roles/float-infra-prometheus/templates/rules/alerts_net.conf rules: - alert: ConntrackTableFull expr: instance:conntrack_full:ratio > 0.9 diff --git a/roles/float-infra-prometheus/templates/rules/alerts_nginx.conf.yml b/roles/float-infra-prometheus/templates/rules/alerts_nginx.conf.yml index 7c927965..5c63354f 100644 --- a/roles/float-infra-prometheus/templates/rules/alerts_nginx.conf.yml +++ b/roles/float-infra-prometheus/templates/rules/alerts_nginx.conf.yml @@ -1,5 +1,5 @@ groups: -- name: roles/prometheus/files/rules/alerts_nginx.conf +- name: roles/float-infra-prometheus/templates/rules/alerts_nginx.conf rules: - alert: HTTPErrorRatioHigh diff --git a/roles/float-infra-prometheus/templates/rules/alerts_prometheus.conf.yml b/roles/float-infra-prometheus/templates/rules/alerts_prometheus.conf.yml index c7f539eb..3f1b7460 100644 --- a/roles/float-infra-prometheus/templates/rules/alerts_prometheus.conf.yml +++ b/roles/float-infra-prometheus/templates/rules/alerts_prometheus.conf.yml @@ -1,5 +1,5 @@ groups: -- name: roles/prometheus/files/rules/alerts_prometheus.conf +- name: roles/float-infra-prometheus/templates/rules/alerts_prometheus.conf rules: - alert: NodeExporterBroken diff --git a/roles/float-infra-prometheus/templates/rules/alerts_services.conf.yml b/roles/float-infra-prometheus/templates/rules/alerts_services.conf.yml index eb49748d..fc486f8c 100644 --- a/roles/float-infra-prometheus/templates/rules/alerts_services.conf.yml +++ b/roles/float-infra-prometheus/templates/rules/alerts_services.conf.yml @@ -1,5 +1,5 @@ groups: - - name: roles/prometheus/files/rules/alerts_services.conf + - name: roles/float-infra-prometheus/templates/rules/alerts_services.conf rules: - alert: ServiceAvailabilityTooLow expr: float_service:ok:ratio < 0.6 diff --git a/roles/float-infra-prometheus/templates/rules/alerts_ssl_probes.conf.yml b/roles/float-infra-prometheus/templates/rules/alerts_ssl_probes.conf.yml index ae326f85..41de5c73 100644 --- a/roles/float-infra-prometheus/templates/rules/alerts_ssl_probes.conf.yml +++ b/roles/float-infra-prometheus/templates/rules/alerts_ssl_probes.conf.yml @@ -1,5 +1,5 @@ groups: -- name: roles/prometheus/files/rules/alerts_ssl_probes.conf +- name: roles/float-infra-prometheus/templates/rules/alerts_ssl_probes.conf rules: - alert: SSLCertificateAboutToExpire expr: target:probe_ssl_cert_expiry:days < 10 diff --git a/roles/float-infra-prometheus/templates/rules/alerts_syslog.conf.yml b/roles/float-infra-prometheus/templates/rules/alerts_syslog.conf.yml index 8f239c79..7bd61974 100644 --- a/roles/float-infra-prometheus/templates/rules/alerts_syslog.conf.yml +++ b/roles/float-infra-prometheus/templates/rules/alerts_syslog.conf.yml @@ -1,5 +1,5 @@ groups: - - name: roles/prometheus/files/rules/alerts_syslog.conf + - name: roles/float-infra-prometheus/templates/rules/alerts_syslog.conf rules: - alert: SyslogDroppingLogs expr: rsyslog_queue_discarded:rate5m{job="rsyslog-collector"} > 0.04 diff --git a/roles/float-infra-prometheus/templates/rules/alerts_system_health.conf.yml b/roles/float-infra-prometheus/templates/rules/alerts_system_health.conf.yml index a8424bef..b29f9030 100644 --- a/roles/float-infra-prometheus/templates/rules/alerts_system_health.conf.yml +++ b/roles/float-infra-prometheus/templates/rules/alerts_system_health.conf.yml @@ -1,5 +1,5 @@ groups: -- name: roles/prometheus/files/rules/alerts_system_health.conf +- name: roles/float-infra-prometheus/templates/rules/alerts_system_health.conf rules: - alert: DiskUnhealthy expr: smartmon_device_smart_healthy < 1 diff --git a/roles/float-infra-prometheus/templates/rules/alerts_systemd.conf.yml b/roles/float-infra-prometheus/templates/rules/alerts_systemd.conf.yml index a22faee7..4a9cdacf 100644 --- a/roles/float-infra-prometheus/templates/rules/alerts_systemd.conf.yml +++ b/roles/float-infra-prometheus/templates/rules/alerts_systemd.conf.yml @@ -1,5 +1,5 @@ groups: -- name: roles/prometheus/files/rules/alerts_systemd.conf +- name: roles/float-infra-prometheus/templates/rules/alerts_systemd.conf rules: - alert: SystemdUnitFailed expr: node_systemd_unit_state{state="failed"} > 0 diff --git a/roles/float-infra-prometheus/templates/rules/rules_acme.conf.yml b/roles/float-infra-prometheus/templates/rules/rules_acme.conf.yml index 13792587..58da6827 100644 --- a/roles/float-infra-prometheus/templates/rules/rules_acme.conf.yml +++ b/roles/float-infra-prometheus/templates/rules/rules_acme.conf.yml @@ -1,5 +1,5 @@ groups: -- name: roles/prometheus/files/rules/rules_acme.conf +- name: roles/float-infra-prometheus/templates/rules/rules_acme.conf rules: - record: cn:cert_ok expr: max(cert_ok) by (cn) diff --git a/roles/float-infra-prometheus/templates/rules/rules_base.conf.yml b/roles/float-infra-prometheus/templates/rules/rules_base.conf.yml index cd3b4ab3..1dd30827 100644 --- a/roles/float-infra-prometheus/templates/rules/rules_base.conf.yml +++ b/roles/float-infra-prometheus/templates/rules/rules_base.conf.yml @@ -1,5 +1,5 @@ groups: - - name: roles/prometheus/files/rules/rules_base.conf + - name: roles/float-infra-prometheus/templates/rules/rules_base.conf rules: - record: job:up:count expr: count(up) by (job) diff --git a/roles/float-infra-prometheus/templates/rules/rules_cpu.conf.yml b/roles/float-infra-prometheus/templates/rules/rules_cpu.conf.yml index 3d8f45ca..4c29f336 100644 --- a/roles/float-infra-prometheus/templates/rules/rules_cpu.conf.yml +++ b/roles/float-infra-prometheus/templates/rules/rules_cpu.conf.yml @@ -1,5 +1,5 @@ groups: -- name: roles/prometheus/files/rules/rules_cpu.conf +- name: roles/float-infra-prometheus/templates/rules/rules_cpu.conf rules: - record: instance:node_cpus:count expr: count(node_cpu_seconds_total{mode="idle"}) by (host, instance) diff --git a/roles/float-infra-prometheus/templates/rules/rules_disk.conf.yml b/roles/float-infra-prometheus/templates/rules/rules_disk.conf.yml index d7e5cc04..73d168de 100644 --- a/roles/float-infra-prometheus/templates/rules/rules_disk.conf.yml +++ b/roles/float-infra-prometheus/templates/rules/rules_disk.conf.yml @@ -1,5 +1,5 @@ groups: -- name: roles/prometheus/files/rules/rules_disk.conf +- name: roles/float-infra-prometheus/templates/rules/rules_disk.conf rules: - record: instance:node_disk_writes_completed_total:irate1m expr: sum(irate(node_disk_writes_completed_total{device=~"([vs]d|nvme).*"}[1m])) WITHOUT (device) diff --git a/roles/float-infra-prometheus/templates/rules/rules_elasticsearch.conf.yml b/roles/float-infra-prometheus/templates/rules/rules_elasticsearch.conf.yml index 9da07ba5..6d939be0 100644 --- a/roles/float-infra-prometheus/templates/rules/rules_elasticsearch.conf.yml +++ b/roles/float-infra-prometheus/templates/rules/rules_elasticsearch.conf.yml @@ -1,5 +1,5 @@ groups: - - name: roles/prometheus/files/rules/rules_elasticsearch.conf + - name: roles/float-infra-prometheus/templates/rules/rules_elasticsearch.conf rules: - record: elasticsearch_filesystem_data_used_percent expr: 100 * (elasticsearch_filesystem_data_size_bytes - elasticsearch_filesystem_data_free_bytes) / elasticsearch_filesystem_data_size_bytes diff --git a/roles/float-infra-prometheus/templates/rules/rules_mysql.conf.yml b/roles/float-infra-prometheus/templates/rules/rules_mysql.conf.yml index 37bd767f..48cb1734 100644 --- a/roles/float-infra-prometheus/templates/rules/rules_mysql.conf.yml +++ b/roles/float-infra-prometheus/templates/rules/rules_mysql.conf.yml @@ -1,5 +1,5 @@ groups: - - name: roles/prometheus/files/rules/rules_mysql.conf + - name: roles/float-infra-prometheus/templates/rules/rules_mysql.conf rules: - record: mysql_slave_lag_seconds expr: mysql_slave_status_seconds_behind_master - mysql_slave_status_sql_delay diff --git a/roles/float-infra-prometheus/templates/rules/rules_net.conf.yml b/roles/float-infra-prometheus/templates/rules/rules_net.conf.yml index 03e3a64c..ba32532b 100644 --- a/roles/float-infra-prometheus/templates/rules/rules_net.conf.yml +++ b/roles/float-infra-prometheus/templates/rules/rules_net.conf.yml @@ -1,5 +1,5 @@ groups: -- name: roles/prometheus/files/rules/rules_net.conf +- name: roles/float-infra-prometheus/templates/rules/rules_net.conf rules: - record: instance:conntrack_full:ratio expr: node_nf_conntrack_entries / node_nf_conntrack_entries_limit diff --git a/roles/float-infra-prometheus/templates/rules/rules_nginx.conf.yml b/roles/float-infra-prometheus/templates/rules/rules_nginx.conf.yml index 022edbff..5eaee6b2 100644 --- a/roles/float-infra-prometheus/templates/rules/rules_nginx.conf.yml +++ b/roles/float-infra-prometheus/templates/rules/rules_nginx.conf.yml @@ -1,5 +1,5 @@ groups: -- name: roles/prometheus/files/rules/rules_nginx.conf +- name: roles/float-infra-prometheus/templates/rules/rules_nginx.conf rules: - record: host:nginx_http_requests_total:rate5m expr: sum(rate(nginx_http_requests[5m])) by (host, vhost) diff --git a/roles/float-infra-prometheus/templates/rules/rules_services.conf.yml b/roles/float-infra-prometheus/templates/rules/rules_services.conf.yml index 553f00c7..abe03a8e 100644 --- a/roles/float-infra-prometheus/templates/rules/rules_services.conf.yml +++ b/roles/float-infra-prometheus/templates/rules/rules_services.conf.yml @@ -1,5 +1,5 @@ groups: - - name: roles/prometheus/files/rules/rules_services.conf + - name: roles/float-infra-prometheus/templates/rules/rules_services.conf rules: - record: job:total:count expr: count(up) by (job) diff --git a/roles/float-infra-prometheus/templates/rules/rules_ssl_probes.conf.yml b/roles/float-infra-prometheus/templates/rules/rules_ssl_probes.conf.yml index 4db3107a..1997eb1f 100644 --- a/roles/float-infra-prometheus/templates/rules/rules_ssl_probes.conf.yml +++ b/roles/float-infra-prometheus/templates/rules/rules_ssl_probes.conf.yml @@ -1,5 +1,5 @@ groups: - - name: roles/prometheus/files/rules/rules_ssl_probes.conf + - name: roles/float-infra-prometheus/templates/rules/rules_ssl_probes.conf rules: - record: target:probe_ssl_cert_expiry:days expr: ((min(probe_ssl_earliest_cert_expiry) by (probe,target)) - time()) / 86400 diff --git a/roles/float-infra-prometheus/templates/rules/rules_syslog.conf.yml b/roles/float-infra-prometheus/templates/rules/rules_syslog.conf.yml index 6e16ceaa..57b8ec80 100644 --- a/roles/float-infra-prometheus/templates/rules/rules_syslog.conf.yml +++ b/roles/float-infra-prometheus/templates/rules/rules_syslog.conf.yml @@ -1,5 +1,5 @@ groups: - - name: roles/prometheus/files/rules/rules_syslog.conf + - name: roles/float-infra-prometheus/templates/rules/rules_syslog.conf rules: - record: rsyslog_action_failed:rate5m expr: rate(rsyslog_action_failed[5m]) diff --git a/roles/float-infra-prometheus/templates/rules/rules_systemd.conf.yml b/roles/float-infra-prometheus/templates/rules/rules_systemd.conf.yml index 0e7c4902..2aee5c53 100644 --- a/roles/float-infra-prometheus/templates/rules/rules_systemd.conf.yml +++ b/roles/float-infra-prometheus/templates/rules/rules_systemd.conf.yml @@ -1,5 +1,5 @@ groups: -- name: roles/prometheus/files/rules/rules_systemd.conf +- name: roles/float-infra-prometheus/templates/rules/rules_systemd.conf rules: - record: instance:systemd_unit_restarts:delta10m expr: delta(systemd_unit_restarts[10m]) -- GitLab