From 310162c24fef2f8f944d8f856fc4bce74bda81aa Mon Sep 17 00:00:00 2001 From: Grigory Shipunov Date: Thu, 4 May 2023 17:00:51 +0200 Subject: [PATCH] add node exporter to all deployment systems --- modules/TLMS/default.nix | 18 ++++++++++-------- modules/TLMS/node-exporter.nix | 14 ++++++++++++++ 2 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 modules/TLMS/node-exporter.nix diff --git a/modules/TLMS/default.nix b/modules/TLMS/default.nix index 845f828..f82c7d8 100644 --- a/modules/TLMS/default.nix +++ b/modules/TLMS/default.nix @@ -1,10 +1,12 @@ { - imports = [ - ./base.nix - ./binary-cache.nix - ./general-options.nix - ./json.nix - ./net.nix - ./wg.nix - ]; + imports = + [ + ./base.nix + ./binary-cache.nix + ./general-options.nix + ./json.nix + ./net.nix + ./wg.nix + ./node-exporter.nix + ]; } diff --git a/modules/TLMS/node-exporter.nix b/modules/TLMS/node-exporter.nix new file mode 100644 index 0000000..753cd53 --- /dev/null +++ b/modules/TLMS/node-exporter.nix @@ -0,0 +1,14 @@ +{ config, ... }: +{ + # metrics exporter + services.prometheus.exporters = { + node = { + enable = true; + port = 8119; + listenAddress = config.deployment-TLMS.net.wg.addr4; + enabledCollectors = [ + "systemd" + ]; + }; + }; +}