hosts/monitoring-3: add synapse monitoring
This commit is contained in:
30
hosts/monitoring-3/blackbox.nix
Normal file
30
hosts/monitoring-3/blackbox.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
services.prometheus.exporters.blackbox = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
configFile = pkgs.writeText "blackbox.yml" ''
|
||||
modules:
|
||||
icmp6:
|
||||
prober: icmp
|
||||
icmp:
|
||||
preferred_ip_protocol: ip6
|
||||
ip_protocol_fallback: false
|
||||
icmp4:
|
||||
prober: icmp
|
||||
icmp:
|
||||
preferred_ip_protocol: ip4
|
||||
ip_protocol_fallback: false
|
||||
synapse:
|
||||
prober: http
|
||||
http:
|
||||
valid_status_codes:
|
||||
- 200
|
||||
method: GET
|
||||
fail_if_not_ssl: true
|
||||
fail_if_body_not_matches_regexp:
|
||||
- "Synapse is running"
|
||||
'';
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user