summaryrefslogtreecommitdiffstats
path: root/krebs/2configs/shack/prometheus/server.nix
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2020-09-15 20:16:44 +0200
committerlassulus <lassulus@lassul.us>2020-09-15 20:16:44 +0200
commit624deaddd03101890d2974fc9340a26c00051bf3 (patch)
tree32b0f765be65385f092dff92ae09285a29a4845e /krebs/2configs/shack/prometheus/server.nix
parent91b7a2a58490a59d6090870a9db9eca8d11d9ab4 (diff)
parent57e6296ac4ca6b600f9e57b2c347f413096d09ed (diff)
Merge remote-tracking branch 'gum/master' into HEAD
Diffstat (limited to 'krebs/2configs/shack/prometheus/server.nix')
-rw-r--r--krebs/2configs/shack/prometheus/server.nix23
1 files changed, 9 insertions, 14 deletions
diff --git a/krebs/2configs/shack/prometheus/server.nix b/krebs/2configs/shack/prometheus/server.nix
index c088a3b08..9e4b4d1a7 100644
--- a/krebs/2configs/shack/prometheus/server.nix
+++ b/krebs/2configs/shack/prometheus/server.nix
@@ -1,6 +1,9 @@
{ pkgs, lib, config, ... }:
# from https://gist.github.com/globin/02496fd10a96a36f092a8e7ea0e6c7dd
{
+ imports = [
+ ./alert-rules.nix
+ ];
networking = {
firewall.allowedTCPPorts = [
9090 # prometheus
@@ -18,12 +21,6 @@
};
prometheus = {
enable = true;
- ruleFiles = lib.singleton (pkgs.writeText "prometheus-rules.yml" (builtins.toJSON {
- groups = lib.singleton {
- name = "mf-alerting-rules";
- rules = import ./alert-rules.nix { inherit lib; };
- };
- }));
scrapeConfigs = [
{
job_name = "node";
@@ -118,7 +115,10 @@
];
alertmanager = {
enable = true;
- listenAddress = "0.0.0.0";
+ listenAddress = "127.0.0.1";
+ webExternalUrl = "http://alert.prometheus.shack";
+ logLevel = "debug";
+
configuration = {
"global" = {
"smtp_smarthost" = "smtp.example.com:587";
@@ -134,15 +134,10 @@
"receivers" = [
{
"name" = "team-admins";
- "email_configs" = [
- {
- "to" = "devnull@example.com";
- "send_resolved" = true;
- }
- ];
+ "email_configs" = [ ];
"webhook_configs" = [
{
- "url" = "https://example.com/prometheus-alerts";
+ "url" = "http://localhost:16320";
"send_resolved" = true;
}
];