diff options
Diffstat (limited to 'modules/by-name')
83 files changed, 0 insertions, 33497 deletions
diff --git a/modules/by-name/an/anubis/module.nix b/modules/by-name/an/anubis/module.nix deleted file mode 100644 index 4e70e4f..0000000 --- a/modules/by-name/an/anubis/module.nix +++ /dev/null @@ -1,94 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.vhack.anubis; - - anubisInstances = - lib.mapAttrs (domain: conf: { - settings = { - TARGET = conf.target; - BIND = "/run/anubis/anubis-${domain}/anubis.sock"; - METRICS_BIND = "/run/anubis/anubis-${domain}/anubis-metrics.sock"; - }; - }) - cfg.instances; - - nginxVirtualHosts = lib.mapAttrs' (domain: conf: - lib.nameValuePair domain { - locations."/" = { - proxyPass = "http://unix:${config.services.anubis.instances."${domain}".settings.BIND}"; - - recommendedProxySettings = true; - proxyWebsockets = true; - }; - - enableACME = true; - forceSSL = true; - }) - cfg.instances; -in { - options.vhack.anubis.instances = lib.mkOption { - description = '' - Protect this reverse proxy with anubis. - - The attr key is the subdomain, the value the config. - ''; - - type = lib.types.attrsOf (lib.types.submodule { - options = { - target = lib.mkOption { - description = "nginx `proxyPass` target"; - type = lib.types.str; - example = "http://127.0.0.1:8080"; - }; - }; - config = {}; - }); - - default = {}; - - example = lib.literalExample '' - { - target = "http://127.0.0.1:$${toString config.servies.<name>.port}"; - } - ''; - }; - - config = { - users = { - users.nginx.extraGroups = [ - config.services.anubis.defaultOptions.group - ]; - - users.anubis = { - uid = config.vhack.constants.ids.uids.anubis; - group = "anubis"; - }; - groups.anubis.gid = config.vhack.constants.ids.gids.anubis; - }; - - vhack.nginx = lib.mkIf (cfg.instances != {}) { - enable = true; - }; - - services = { - anubis = { - defaultOptions.settings.COOKIE_DYNAMIC_DOMAIN = true; - instances = anubisInstances; - }; - - nginx = { - enable = true; - - recommendedTlsSettings = true; - recommendedOptimisation = true; - recommendedGzipSettings = true; - recommendedProxySettings = true; - - virtualHosts = nginxVirtualHosts; - }; - }; - }; -} diff --git a/modules/by-name/at/atuin-sync/module.nix b/modules/by-name/at/atuin-sync/module.nix deleted file mode 100644 index 4295697..0000000 --- a/modules/by-name/at/atuin-sync/module.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.vhack.atuin-sync; -in { - options.vhack.atuin-sync = { - enable = lib.mkEnableOption "atuin (turtle) sync server"; - - fqdn = lib.mkOption { - description = "The fully qualified domain name of this instance."; - type = lib.types.str; - example = "atuin-sync.atuin.sh"; - }; - }; - - config = lib.mkIf cfg.enable { - vhack.nginx.enable = true; - - vhack.anubis.instances."${cfg.fqdn}".target = "http://127.0.0.1:${toString config.services.turtle.port}"; - - services = { - turtle = { - enable = true; - host = "127.0.0.1"; - - database.createLocally = true; - }; - }; - }; -} diff --git a/modules/by-name/ba/backup/module.nix b/modules/by-name/ba/backup/module.nix deleted file mode 100644 index 856a1c3..0000000 --- a/modules/by-name/ba/backup/module.nix +++ /dev/null @@ -1,91 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: let - cfg = config.vhack.backup; - snapshots = "/srv/snapshots"; - postgresUser = "postgres"; -in { - options.vhack.backup = { - enable = lib.mkEnableOption "backups with restic"; - user = lib.mkOption { - type = lib.types.str; - description = "The storagebox-user to use"; - example = "u384702-sub2"; - }; - privateSshKey = lib.mkOption { - type = lib.types.path; - description = "The age-encrypted ssh-key, passed to agenix"; - }; - privatePassword = lib.mkOption { - type = lib.types.path; - description = "The age-encrypted restic password, passed to agenix"; - }; - }; - config = lib.mkIf cfg.enable { - vhack.persist.directories = [ - { - directory = "/root/.ssh"; - user = "root"; - group = "root"; - mode = "0700"; - } - ]; - age.secrets = { - resticpass = { - file = cfg.privatePassword; - mode = "0700"; - owner = "root"; - group = "root"; - }; - resticssh = { - file = cfg.privateSshKey; - mode = "0700"; - owner = "root"; - group = "root"; - }; - }; - services.restic.backups = { - storagebox = { - initialize = true; - backupPrepareCommand = '' - ${pkgs.sudo}/bin/sudo -u ${postgresUser} ${pkgs.postgresql}/bin/pg_dumpall --clean --if-exists --quote-all-identifiers > /srv/db_backup.sql - - [ -d /srv/snapshots ] || ${pkgs.btrfs-progs}/bin/btrfs subvolume create /srv/snapshots; - [ -d /srv/snapshots/srv ] && ${pkgs.btrfs-progs}/bin/btrfs subvolume delete /srv/snapshots/srv; - ${pkgs.btrfs-progs}/bin/btrfs subvolume snapshot -r /srv /srv/snapshots/srv; - - # dump() { - # # compression: - # # pg_dump -F t -v "$1" | xz -z -9 -e -T0 > "db_$1.tar.xz" - # pg_dump -v "$1" > "db_$1.tar.xz" - # } - # # List all databases, and dump each of them in its own file - # # psql --list --csv | while read -r line; do echo "$line" | grep ','; done | while IFS=, read -r name _; do echo "$name"; done | sed '1d' | while read -r db_name; do dump "$db_name"; done - ''; - paths = [ - snapshots - ]; - exclude = [ - ".snapshots" - "/var/lib/postgresql" # included in the db dump - ]; - extraBackupArgs = [ - "--verbose" # spam log - ]; - passwordFile = config.age.secrets.resticpass.path; - extraOptions = [ - "rclone.program='ssh -p 23 ${cfg.user}@${cfg.user}.your-storagebox.de -i ${config.age.secrets.resticssh.path}'" - ]; - repository = "rclone: "; # There is only one repository served - timerConfig = { - Requires = "network-online.target"; - OnCalendar = "daily"; - Persistent = true; - }; - }; - }; - }; -} diff --git a/modules/by-name/co/constants/module.nix b/modules/by-name/co/constants/module.nix deleted file mode 100644 index 9127488..0000000 --- a/modules/by-name/co/constants/module.nix +++ /dev/null @@ -1,114 +0,0 @@ -# This file is inspired by the `nixos/modules/misc/ids.nix` -# file in nixpkgs. -{ - lib, - config, - ... -}: { - options.vhack.constants = { - ids.uids = lib.mkOption { - internal = true; - description = '' - The user IDs used in the vhack.eu nixos config. - ''; - type = lib.types.attrsOf (lib.types.ints.between 0 400); - }; - ids.gids = lib.mkOption { - internal = true; - description = '' - The group IDs used in the vhack.eu nixos config. - ''; - type = lib.types.attrsOf (lib.types.ints.between 0 400); - }; - }; - - config.vhack.constants = { - ids.uids = { - # Keep this sorted with `!sort --numeric-sort --key=2 --field-separator="="` - systemd-coredump = 151; # GROUP - opendkim = 221; - mautrix-whatsapp = 222; - etebase-server = 223; - matrix-synapse = 224; - rspamd = 225; - knot-resolver = 226; - peertube = 231; - redis-mastodon = 232; - redis-peertube = 233; - redis-rspamd = 234; - redis-stalwart-mail = 235; - mastodon = 236; - stalwart-mail = 238; - acme = 328; - dhcpcd = 329; - nscd = 330; - sshd = 331; - systemd-oom = 332; - resolvconf = 333; # GROUP - nix-sync = 334; - nextcloud = 335; - redis-nextcloud = 336; - taskchampion = 337; - stalwart-mail-certificates = 338; # GROUP - sharkey = 339; - redis-sharkey = 340; - grocy = 341; - anubis = 342; - postfix-tlspol = 343; - rocie = 344; - fluent-bit = 345; - loki = 346; - grafana = 347; - node-exporter = 348; - smartctl-exporter-access = 349; - - # As per the NixOS file, the uids should not be greater or equal to 400; - }; - ids.gids = let - inherit (config.vhack.constants.ids) uids; - in { - # Please add your groups to the users and inherit them here. - # This avoids having an user/group id mismatch. - inherit - (uids) - acme - anubis - dhcpcd - etebase-server - knot-resolver - mastodon - matrix-synapse - mautrix-whatsapp - nextcloud - nix-sync - nscd - opendkim - peertube - postfix-tlspol - redis-mastodon - redis-nextcloud - redis-peertube - redis-rspamd - redis-stalwart-mail - rspamd - sshd - stalwart-mail - systemd-oom - sharkey - redis-sharkey - grocy - systemd-coredump # matches systemd-coredump user - resolvconf # This group is not matched to an user? - stalwart-mail-certificates # This group is used to connect nginx and stalwart-mail - rocie - fluent-bit - loki - grafana - node-exporter - smartctl-exporter-access - ; - - # The gid should match the uid. Thus should not be >= 400; - }; - }; -} diff --git a/modules/by-name/co/coredump/module.nix b/modules/by-name/co/coredump/module.nix deleted file mode 100644 index ce28ed9..0000000 --- a/modules/by-name/co/coredump/module.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.vhack.systemd.coredump; -in { - options.vhack.systemd.coredump = { - # NOTE(@bpeetz): Enabled by default, because that is what NixOS also does. <2024-12-25> - enable = (lib.mkEnableOption "oomd") // {default = true;}; - }; - - config = lib.mkIf cfg.enable { - users = { - groups.systemd-coredump.gid = config.vhack.constants.ids.gids.systemd-coredump; - }; - }; -} diff --git a/modules/by-name/dh/dhcpcd/module.nix b/modules/by-name/dh/dhcpcd/module.nix deleted file mode 100644 index 0e35af3..0000000 --- a/modules/by-name/dh/dhcpcd/module.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.vhack.dhcpcd; -in { - options.vhack.dhcpcd = { - enable = (lib.mkEnableOption "dhcpcd") // {default = config.networking.dhcpcd.enable;}; - }; - - config = lib.mkIf cfg.enable { - users = { - users.dhcpcd.uid = config.vhack.constants.ids.uids.dhcpcd; - groups.dhcpcd.gid = config.vhack.constants.ids.gids.dhcpcd; - }; - }; -} diff --git a/modules/by-name/di/disko/module.nix b/modules/by-name/di/disko/module.nix deleted file mode 100644 index b4fc3c8..0000000 --- a/modules/by-name/di/disko/module.nix +++ /dev/null @@ -1,78 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.vhack.disko; - - defaultMountOptions = ["compress-force=zstd:15" "noatime"]; -in { - options.vhack.disko = { - enable = lib.mkEnableOption "disk configuration via disko"; - - disk = lib.mkOption { - type = lib.types.path; - example = "/dev/disk/by-id/ata-WDC_WD10SDRW-11A0XS0_WD-WXP2A901KJN5"; - description = "Path to the main disk"; - }; - }; - - config = lib.mkIf cfg.enable { - disko.devices = { - disk.main = { - type = "disk"; - device = cfg.disk; - - content = { - type = "gpt"; - partitions = { - boot = { - size = "1M"; - type = "EF02"; # for grub MBR - }; - root = { - size = "100%"; - content = { - type = "btrfs"; - extraArgs = ["-f" "--label nixos"]; # f: Override existing partitions - - subvolumes = { - "/nix" = { - mountpoint = "/nix"; - mountOptions = defaultMountOptions; - }; - "/srv" = { - mountpoint = "/srv"; - mountOptions = defaultMountOptions; - }; - "/srv/.snapshots" = { - mountpoint = "/srv/.snapshots"; - mountOptions = defaultMountOptions; - }; - "/boot" = { - mountpoint = "/boot"; - mountOptions = defaultMountOptions; - }; - }; - }; - }; - }; - }; - }; - - nodev."/" = { - fsType = "tmpfs"; - mountOptions = ["defaults" "size=6G" "mode=755"]; - }; - }; - - fileSystems = { - "/srv" = { - neededForBoot = true; - }; - "/boot" = { - neededForBoot = true; - }; - }; - }; -} diff --git a/modules/by-name/dn/dns/dns/default.nix b/modules/by-name/dn/dns/dns/default.nix deleted file mode 100644 index 4ce07d8..0000000 --- a/modules/by-name/dn/dns/dns/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -# -# SPDX-FileCopyrightText: 2019 Kirill Elagin <https://kir.elagin.me/> -# -# SPDX-License-Identifier: MPL-2.0 or MIT -# -{lib}: let - util = import ./util {inherit lib;}; - types = import ./types {inherit lib util;}; -in { - inherit - types - ; -} diff --git a/modules/by-name/dn/dns/dns/types/default.nix b/modules/by-name/dn/dns/dns/types/default.nix deleted file mode 100644 index ece315f..0000000 --- a/modules/by-name/dn/dns/dns/types/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -# -# SPDX-FileCopyrightText: 2019 Kirill Elagin <https://kir.elagin.me/> -# -# SPDX-License-Identifier: MPL-2.0 or MIT -# -{ - lib, - util, -}: let - simple = {types = import ./simple.nix {inherit lib;};}; -in { - record = import ./record.nix {inherit lib util;}; - records = import ./records {inherit lib util simple;}; - - zone = import ./zone.nix {inherit lib util simple;}; -} diff --git a/modules/by-name/dn/dns/dns/types/record.nix b/modules/by-name/dn/dns/dns/types/record.nix deleted file mode 100644 index e992bf9..0000000 --- a/modules/by-name/dn/dns/dns/types/record.nix +++ /dev/null @@ -1,75 +0,0 @@ -# -# SPDX-FileCopyrightText: 2019 Kirill Elagin <https://kir.elagin.me/> -# SPDX-FileCopyrightText: 2021 Naïm Favier <n@monade.li> -# -# SPDX-License-Identifier: MPL-2.0 or MIT -# -{lib, ...}: let - inherit (lib) hasSuffix isString mkOption removeSuffix types; - - recordType = rsubt: let - submodule = types.submodule { - options = - { - class = mkOption { - type = types.enum ["IN"]; - default = "IN"; - example = "IN"; - description = "Resource record class. Only IN is supported"; - }; - ttl = mkOption { - type = types.nullOr types.ints.unsigned; # TODO: u32 - default = null; - example = 300; - description = "Record caching duration (in seconds)"; - }; - } - // rsubt.options; - }; - in - ( - if rsubt ? fromString - then types.either types.str - else lib.id - ) - submodule; - - # name == "@" : use unqualified domain name - writeRecord = name: rsubt: data: let - data' = - if isString data && rsubt ? fromString - then - # add default values for the record type - (recordType rsubt).merge [] [ - { - file = ""; - value = rsubt.fromString data; - } - ] - else data; - name' = let - fname = rsubt.nameFixup or (n: _: n) name data'; - in - if name == "@" - then name - else if (hasSuffix ".@" name) - then removeSuffix ".@" fname - else "${fname}."; - inherit (rsubt) rtype; - in - lib.concatStringsSep " " (with data'; - [ - name' - ] - ++ lib.optionals (ttl != null) [ - (toString ttl) - ] - ++ [ - class - rtype - (rsubt.dataToString data') - ]); -in { - inherit recordType; - inherit writeRecord; -} diff --git a/modules/by-name/dn/dns/dns/types/records/A.nix b/modules/by-name/dn/dns/dns/types/records/A.nix deleted file mode 100644 index 296943e..0000000 --- a/modules/by-name/dn/dns/dns/types/records/A.nix +++ /dev/null @@ -1,19 +0,0 @@ -# -# SPDX-FileCopyrightText: 2019 Kirill Elagin <https://kir.elagin.me/> -# -# SPDX-License-Identifier: MPL-2.0 or MIT -# -{lib, ...}: let - inherit (lib) mkOption types; -in { - rtype = "A"; - options = { - address = mkOption { - type = types.str; - example = "26.3.0.103"; - description = "IP address of the host"; - }; - }; - dataToString = {address, ...}: address; - fromString = address: {inherit address;}; -} diff --git a/modules/by-name/dn/dns/dns/types/records/AAAA.nix b/modules/by-name/dn/dns/dns/types/records/AAAA.nix deleted file mode 100644 index 4717176..0000000 --- a/modules/by-name/dn/dns/dns/types/records/AAAA.nix +++ /dev/null @@ -1,19 +0,0 @@ -# -# SPDX-FileCopyrightText: 2019 Kirill Elagin <https://kir.elagin.me/> -# -# SPDX-License-Identifier: MPL-2.0 or MIT -# -{lib, ...}: let - inherit (lib) mkOption types; -in { - rtype = "AAAA"; - options = { - address = mkOption { - type = types.str; - example = "4321:0:1:2:3:4:567:89ab"; - description = "IPv6 address of the host"; - }; - }; - dataToString = {address, ...}: address; - fromString = address: {inherit address;}; -} diff --git a/modules/by-name/dn/dns/dns/types/records/CAA.nix b/modules/by-name/dn/dns/dns/types/records/CAA.nix deleted file mode 100644 index 4b40510..0000000 --- a/modules/by-name/dn/dns/dns/types/records/CAA.nix +++ /dev/null @@ -1,42 +0,0 @@ -# -# SPDX-FileCopyrightText: 2019 Kirill Elagin <https://kir.elagin.me/> -# -# SPDX-License-Identifier: MPL-2.0 or MIT -# -# RFC 8659 -{lib, ...}: let - inherit (lib) mkOption types; -in { - rtype = "CAA"; - options = { - issuerCritical = mkOption { - type = types.bool; - example = true; - description = '' - If set to '1', indicates that the corresponding property tag - MUST be understood if the semantics of the CAA record are to be - correctly interpreted by an issuer - ''; - }; - tag = mkOption { - type = types.enum ["issue" "issuewild" "iodef"]; - example = "issue"; - description = "One of the defined property tags"; - }; - value = mkOption { - type = types.str; # section 4.1.1: not limited in length - example = "ca.example.net"; - description = "Value of the property"; - }; - }; - dataToString = { - issuerCritical, - tag, - value, - ... - }: ''${ - if issuerCritical - then "128" - else "0" - } ${tag} "${value}"''; -} diff --git a/modules/by-name/dn/dns/dns/types/records/CNAME.nix b/modules/by-name/dn/dns/dns/types/records/CNAME.nix deleted file mode 100644 index 095b078..0000000 --- a/modules/by-name/dn/dns/dns/types/records/CNAME.nix +++ /dev/null @@ -1,27 +0,0 @@ -# -# SPDX-FileCopyrightText: 2019 Kirill Elagin <https://kir.elagin.me/> -# -# SPDX-License-Identifier: MPL-2.0 or MIT -# -# RFC 1035, 3.3.1 -{ - lib, - simple, - ... -}: let - inherit (lib) mkOption; -in { - rtype = "CNAME"; - options = { - cname = mkOption { - type = simple.types.domain-name; - example = "www.test.com"; - description = '' - A <domain-name> which specifies the canonical or primary name - for the owner. The owner name is an alias. - ''; - }; - }; - dataToString = {cname, ...}: "${cname}"; - fromString = cname: {inherit cname;}; -} diff --git a/modules/by-name/dn/dns/dns/types/records/DKIM.nix b/modules/by-name/dn/dns/dns/types/records/DKIM.nix deleted file mode 100644 index 31b2f67..0000000 --- a/modules/by-name/dn/dns/dns/types/records/DKIM.nix +++ /dev/null @@ -1,75 +0,0 @@ -# -# SPDX-FileCopyrightText: 2020 Kirill Elagin <https://kir.elagin.me/> -# -# SPDX-License-Identifier: MPL-2.0 or MIT -# -# This is a “fake” record type, not actually part of DNS. -# It gets compiled down to a TXT record. -# RFC 6376 -{ - lib, - util, - ... -}: let - inherit (lib) mkOption types; -in rec { - rtype = "TXT"; - options = { - selector = mkOption { - type = types.str; - example = "mail"; - description = "DKIM selector name"; - }; - h = mkOption { - type = types.listOf types.str; - default = []; - example = ["sha1" "sha256"]; - description = "Acceptable hash algorithms. Empty means all of them"; - apply = lib.concatStringsSep ":"; - }; - k = mkOption { - type = types.nullOr types.str; - default = "rsa"; - example = "rsa"; - description = "Key type"; - }; - n = mkOption { - type = types.str; - default = ""; - example = "Just any kind of arbitrary notes."; - description = "Notes that might be of interest to a human"; - }; - p = mkOption { - type = types.str; - example = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDwIRP/UC3SBsEmGqZ9ZJW3/DkMoGeLnQg1fWn7/zYtIxN2SnFCjxOCKG9v3b4jYfcTNh5ijSsq631uBItLa7od+v/RtdC2UzJ1lWT947qR+Rcac2gbto/NMqJ0fzfVjH4OuKhitdY9tf6mcwGjaNBcWToIMmPSPDdQPNUYckcQ2QIDAQAB"; - description = "Public-key data (base64)"; - }; - s = mkOption { - type = types.listOf (types.enum ["*" "email"]); - default = ["*"]; - example = ["email"]; - description = "Service Type"; - apply = lib.concatStringsSep ":"; - }; - t = mkOption { - type = types.listOf (types.enum ["y" "s"]); - default = []; - example = ["y"]; - description = "Flags"; - apply = lib.concatStringsSep ":"; - }; - }; - dataToString = data: let - items = - ["v=DKIM1"] - ++ lib.pipe data [ - (builtins.intersectAttrs options) # remove garbage list `_module` - (lib.filterAttrs (_k: v: v != null && v != "")) - (lib.filterAttrs (k: _v: k != "selector")) - (lib.mapAttrsToList (k: v: "${k}=${v}")) - ]; - result = lib.concatStringsSep "; " items + ";"; - in - util.writeCharacterString result; - nameFixup = name: self: "${self.selector}._domainkey.${name}"; -} diff --git a/modules/by-name/dn/dns/dns/types/records/DMARC.nix b/modules/by-name/dn/dns/dns/types/records/DMARC.nix deleted file mode 100644 index 0f10f2c..0000000 --- a/modules/by-name/dn/dns/dns/types/records/DMARC.nix +++ /dev/null @@ -1,108 +0,0 @@ -# -# SPDX-FileCopyrightText: 2020 Kirill Elagin <https://kir.elagin.me/> -# -# SPDX-License-Identifier: MPL-2.0 or MIT -# -# This is a “fake” record type, not actually part of DNS. -# It gets compiled down to a TXT record. -# RFC 7489 -{ - lib, - util, - ... -}: let - inherit (lib) mkOption types; -in rec { - rtype = "TXT"; - options = { - adkim = mkOption { - type = types.enum ["relaxed" "strict"]; - default = "relaxed"; - example = "strict"; - description = "DKIM Identifier Alignment mode"; - apply = builtins.substring 0 1; - }; - aspf = mkOption { - type = types.enum ["relaxed" "strict"]; - default = "relaxed"; - example = "strict"; - description = "SPF Identifier Alignment mode"; - apply = builtins.substring 0 1; - }; - fo = mkOption { - type = types.listOf (types.enum ["0" "1" "d" "s"]); - default = ["0"]; - example = ["0" "1" "s"]; - description = "Failure reporting options"; - apply = lib.concatStringsSep ":"; - }; - p = mkOption { - type = types.enum ["none" "quarantine" "reject"]; - example = "quarantine"; - description = "Requested Mail Receiver policy"; - }; - pct = mkOption { - type = types.ints.between 0 100; - default = 100; - example = 30; - description = "Percentage of messages to which the DMARC policy is to be applied"; - apply = builtins.toString; - }; - rf = mkOption { - type = types.listOf (types.enum ["afrf"]); - default = ["afrf"]; - example = ["afrf"]; - description = "Format to be used for message-specific failure reports"; - apply = lib.concatStringsSep ":"; - }; - ri = mkOption { - type = types.ints.unsigned; # FIXME: u32 - default = 86400; - example = 12345; - description = "Interval requested between aggregate reports"; - apply = builtins.toString; - }; - rua = mkOption { - type = types.oneOf [types.str (types.listOf types.str)]; - default = []; - example = "mailto:dmarc+rua@example.com"; - description = "Addresses to which aggregate feedback is to be sent"; - apply = val: - # FIXME: need to encode commas in URIs - if builtins.isList val - then lib.concatStringsSep "," val - else val; - }; - ruf = mkOption { - type = types.listOf types.str; - default = []; - example = ["mailto:dmarc+ruf@example.com" "mailto:another+ruf@example.com"]; - description = "Addresses to which message-specific failure information is to be reported"; - apply = val: - # FIXME: need to encode commas in URIs - if builtins.isList val - then lib.concatStringsSep "," val - else val; - }; - sp = mkOption { - type = types.nullOr (types.enum ["none" "quarantine" "reject"]); - default = null; - example = "quarantine"; - description = "Requested Mail Receiver policy for all subdomains"; - }; - }; - dataToString = data: let - # The specification could be more clear on this, but `v` and `p` MUST - # be the first two tags in the record. - items = - ["v=DMARC1; p=${data.p}"] - ++ lib.pipe data [ - (builtins.intersectAttrs options) # remove garbage list `_module` - (lib.filterAttrs (k: v: v != null && v != "" && k != "p")) - (lib.mapAttrsToList (k: v: "${k}=${v}")) - ]; - result = lib.concatStringsSep "; " items + ";"; - in - util.writeCharacterString result; - nameFixup = name: _self: "_dmarc.${name}"; -} diff --git a/modules/by-name/dn/dns/dns/types/records/DNAME.nix b/modules/by-name/dn/dns/dns/types/records/DNAME.nix deleted file mode 100644 index 042ce95..0000000 --- a/modules/by-name/dn/dns/dns/types/records/DNAME.nix +++ /dev/null @@ -1,15 +0,0 @@ -# RFC 6672 -{lib, ...}: let - inherit (lib) dns mkOption; -in { - rtype = "DNAME"; - options = { - dname = mkOption { - type = dns.types.domain-name; - example = "www.test.com"; - description = "A <domain-name> which provides redirection from a part of the DNS name tree to another part of the DNS name tree"; - }; - }; - dataToString = {dname, ...}: "${dname}"; - fromString = dname: {inherit dname;}; -} diff --git a/modules/by-name/dn/dns/dns/types/records/DNSKEY.nix b/modules/by-name/dn/dns/dns/types/records/DNSKEY.nix deleted file mode 100644 index 86ce3a1..0000000 --- a/modules/by-name/dn/dns/dns/types/records/DNSKEY.nix +++ /dev/null @@ -1,63 +0,0 @@ -# SPDX-FileCopyrightText: 2020 Aluísio Augusto Silva Gonçalves <https://aasg.name> -# -# SPDX-License-Identifier: MPL-2.0 or MIT -# RFC 4034, 2 -{lib, ...}: let - inherit (builtins) isInt split; - inherit (lib) concatStrings flatten mkOption types; - - dnssecOptions = import ./dnssec.nix {inherit lib;}; - inherit (dnssecOptions) mkDNSSECAlgorithmOption; -in { - rtype = "DNSKEY"; - options = { - flags = mkOption { - description = "Flags pertaining to this RR."; - type = types.either types.ints.u16 (types.submodule { - options = { - zoneSigningKey = mkOption { - description = "Whether this RR holds a zone signing key (ZSK)."; - type = types.bool; - default = false; - }; - secureEntryPoint = mkOption { - type = types.bool; - description = '' - Whether this RR holds a secure entry point. - In general, this means the key is a key-signing key (KSK), as opposed to a zone-signing key. - ''; - default = false; - }; - }; - }); - apply = value: - if isInt value - then value - else - ( - if value.zoneSigningKey - then 256 - else 0 - ) - + ( - if value.secureEntryPoint - then 1 - else 0 - ); - }; - algorithm = mkDNSSECAlgorithmOption { - description = "Algorithm of the key referenced by this RR."; - }; - publicKey = mkOption { - type = types.str; - description = "Base64-encoded public key."; - apply = value: concatStrings (flatten (split "[[:space:]]" value)); - }; - }; - dataToString = { - flags, - algorithm, - publicKey, - ... - }: "${toString flags} 3 ${toString algorithm} ${publicKey}"; -} diff --git a/modules/by-name/dn/dns/dns/types/records/DS.nix b/modules/by-name/dn/dns/dns/types/records/DS.nix deleted file mode 100644 index 76fac9a..0000000 --- a/modules/by-name/dn/dns/dns/types/records/DS.nix +++ /dev/null @@ -1,48 +0,0 @@ -# SPDX-FileCopyrightText: 2020 Aluísio Augusto Silva Gonçalves <https://aasg.name> -# -# SPDX-License-Identifier: MPL-2.0 or MIT -# RFC 4034, 5 -{lib, ...}: let - inherit (lib) mkOption types; - - dnssecOptions = import ./dnssec.nix {inherit lib;}; - inherit (dnssecOptions) mkRegisteredNumberOption mkDNSSECAlgorithmOption; - - mkDSDigestTypeOption = args: - mkRegisteredNumberOption { - registryName = "Delegation Signer (DS) Resource Record (RR) Type Digest Algorithms"; - numberType = types.ints.u8; - # These mnemonics are unofficial, unlike the DNSSEC algorithm ones. - mnemonics = { - "sha-1" = 1; - "sha-256" = 2; - "gost" = 3; - "sha-384" = 4; - }; - }; -in { - rtype = "DS"; - options = { - keyTag = mkOption { - description = "Tag computed over the DNSKEY referenced by this RR to identify it."; - type = types.ints.u16; - }; - algorithm = mkDNSSECAlgorithmOption { - description = "Algorithm of the key referenced by this RR."; - }; - digestType = mkDSDigestTypeOption { - description = "Type of the digest given in the `digest` attribute."; - }; - digest = mkOption { - description = "Digest of the DNSKEY referenced by this RR."; - type = types.strMatching "[[:xdigit:]]+"; - }; - }; - dataToString = { - keyTag, - algorithm, - digestType, - digest, - ... - }: "${toString keyTag} ${toString algorithm} ${toString digestType} ${digest}"; -} diff --git a/modules/by-name/dn/dns/dns/types/records/HTTPS.nix b/modules/by-name/dn/dns/dns/types/records/HTTPS.nix deleted file mode 100644 index 6e2ef3d..0000000 --- a/modules/by-name/dn/dns/dns/types/records/HTTPS.nix +++ /dev/null @@ -1,5 +0,0 @@ -args: -import ./SVCB.nix args -// { - rtype = "HTTPS"; -} diff --git a/modules/by-name/dn/dns/dns/types/records/MTA-STS.nix b/modules/by-name/dn/dns/dns/types/records/MTA-STS.nix deleted file mode 100644 index 030490e..0000000 --- a/modules/by-name/dn/dns/dns/types/records/MTA-STS.nix +++ /dev/null @@ -1,42 +0,0 @@ -# -# SPDX-FileCopyrightText: 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> -# -# SPDX-License-Identifier: MPL-2.0 or MIT -# -# This is a “fake” record type, not actually part of DNS. -# It gets compiled down to a TXT record. -# RFC 8461 -{ - lib, - util, - ... -}: let - inherit (lib) mkOption types; -in rec { - rtype = "TXT"; - options = { - id = mkOption { - type = types.str; - example = "20160831085700Z"; - description = '' - A short string used to track policy updates. This string MUST - uniquely identify a given instance of a policy, such that senders - can determine when the policy has been updated by comparing to the - "id" of a previously seen policy. There is no implied ordering of - "id" fields between revisions. - ''; - }; - }; - dataToString = data: let - items = - ["v=STSv1"] - ++ lib.pipe data [ - (builtins.intersectAttrs options) # remove garbage list `_module` - (lib.filterAttrs (k: v: v != null && v != "")) - (lib.mapAttrsToList (k: v: "${k}=${v}")) - ]; - result = lib.concatStringsSep "; " items + ";"; - in - util.writeCharacterString result; - nameFixup = name: _self: "_mta-sts.${name}"; -} diff --git a/modules/by-name/dn/dns/dns/types/records/MX.nix b/modules/by-name/dn/dns/dns/types/records/MX.nix deleted file mode 100644 index c25b89c..0000000 --- a/modules/by-name/dn/dns/dns/types/records/MX.nix +++ /dev/null @@ -1,32 +0,0 @@ -# -# SPDX-FileCopyrightText: 2019 Kirill Elagin <https://kir.elagin.me/> -# -# SPDX-License-Identifier: MPL-2.0 or MIT -# -# RFC 1035, 3.3.9 -{ - lib, - simple, - ... -}: let - inherit (lib) mkOption types; -in { - rtype = "MX"; - options = { - preference = mkOption { - type = types.ints.u16; - example = 10; - description = "The preference given to this RR among others at the same owner. Lower values are preferred"; - }; - exchange = mkOption { - type = simple.types.domain-name; - example = "smtp.example.com."; - description = "A <domain-name> which specifies a host willing to act as a mail exchange for the owner name"; - }; - }; - dataToString = { - preference, - exchange, - ... - }: "${toString preference} ${exchange}"; -} diff --git a/modules/by-name/dn/dns/dns/types/records/NS.nix b/modules/by-name/dn/dns/dns/types/records/NS.nix deleted file mode 100644 index ea60a91..0000000 --- a/modules/by-name/dn/dns/dns/types/records/NS.nix +++ /dev/null @@ -1,24 +0,0 @@ -# -# SPDX-FileCopyrightText: 2019 Kirill Elagin <https://kir.elagin.me/> -# -# SPDX-License-Identifier: MPL-2.0 or MIT -# -# RFC 1035, 3.3.11 -{ - lib, - simple, - ... -}: let - inherit (lib) mkOption; -in { - rtype = "NS"; - options = { - nsdname = mkOption { - type = simple.types.domain-name; - example = "ns2.example.com"; - description = "A <domain-name> which specifies a host which should be authoritative for the specified class and domain"; - }; - }; - dataToString = {nsdname, ...}: "${nsdname}"; - fromString = nsdname: {inherit nsdname;}; -} diff --git a/modules/by-name/dn/dns/dns/types/records/OPENPGPKEY.nix b/modules/by-name/dn/dns/dns/types/records/OPENPGPKEY.nix deleted file mode 100644 index 1f39cb9..0000000 --- a/modules/by-name/dn/dns/dns/types/records/OPENPGPKEY.nix +++ /dev/null @@ -1,18 +0,0 @@ -# RFC7929 -{ - lib, - util, - ... -}: let - inherit (lib) mkOption types; -in { - rtype = "OPENPGPKEY"; - options = { - data = mkOption { - type = types.str; - }; - }; - - dataToString = {data, ...}: util.writeCharacterString data; - fromString = data: {inherit data;}; -} diff --git a/modules/by-name/dn/dns/dns/types/records/PTR.nix b/modules/by-name/dn/dns/dns/types/records/PTR.nix deleted file mode 100644 index 075f82e..0000000 --- a/modules/by-name/dn/dns/dns/types/records/PTR.nix +++ /dev/null @@ -1,92 +0,0 @@ -# -# SPDX-FileCopyrightText: 2019 Kirill Elagin <https://kir.elagin.me/> -# -# SPDX-License-Identifier: MPL-2.0 or MIT -# -# RFC 1035, 3.3.12 -{ - lib, - simple, - ... -}: let - inherit (lib) mkOption; - - inherit (lib.strings) stringToCharacters splitString; - - reverseIpv4 = input: - builtins.concatStringsSep "." (lib.lists.reverseList (splitString "." - input)); - - reverseIpv6 = input: let - split = splitString ":" input; - elementLength = builtins.length split; - - reverseString = string: - builtins.concatStringsSep "" (lib.lists.reverseList - (stringToCharacters string)); - in - reverseString (builtins.concatStringsSep "." (stringToCharacters (builtins.concatStringsSep - "" (builtins.map ( - part: let - c = stringToCharacters part; - in - if builtins.length c == 4 - then - # valid part - part - else if builtins.length c < 4 && builtins.length c > 0 - then - # leading zeros were elided - (builtins.concatStringsSep "" ( - builtins.map builtins.toString ( - builtins.genList (_: 0) (4 - (builtins.length c)) - ) - )) - + part - else if builtins.length c == 0 - then - # Multiple full blocks were elided. Only one of these can be in an - # IPv6 address, as such we can simply add (8 - (elementLength - 1)) `0000` - # blocks. We need to substract one from `elementLength` because - # this empty part is included in the `elementLength`. - builtins.concatStringsSep "" (builtins.genList (_: "0000") (8 - (elementLength - 1))) - else builtins.throw "Impossible" - ) - split)))); -in { - rtype = "PTR"; - options = { - name = mkOption { - type = simple.types.domain-name; - example = "mail2.server.com"; - description = "The <domain-name> which is defined by the IP."; - }; - ip = { - v4 = mkOption { - type = lib.types.nullOr lib.types.str; - example = "192.168.1.4"; - description = "The IPv4 address of the host."; - default = null; - apply = v: - if v != null - then reverseIpv4 v - else v; - }; - v6 = mkOption { - type = lib.types.nullOr lib.types.str; - example = "192.168.1.4"; - description = "The IPv6 address of the host."; - default = null; - apply = v: - if v != null - then reverseIpv6 v - else v; - }; - }; - }; - dataToString = {name, ...}: "${name}."; - nameFixup = name: self: - if self.ip.v6 == null - then "${self.ip.v4}.in-addr.arpa" - else "${self.ip.v6}.ip6.arpa"; -} diff --git a/modules/by-name/dn/dns/dns/types/records/SOA.nix b/modules/by-name/dn/dns/dns/types/records/SOA.nix deleted file mode 100644 index db7436e..0000000 --- a/modules/by-name/dn/dns/dns/types/records/SOA.nix +++ /dev/null @@ -1,65 +0,0 @@ -# -# SPDX-FileCopyrightText: 2019 Kirill Elagin <https://kir.elagin.me/> -# -# SPDX-License-Identifier: MPL-2.0 or MIT -# -# RFC 1035, 3.3.13 -{ - lib, - simple, - ... -}: let - inherit (lib) concatStringsSep removeSuffix replaceStrings; - inherit (lib) mkOption types; -in { - rtype = "SOA"; - options = { - nameServer = mkOption { - type = simple.types.domain-name; - example = "ns1.example.com"; - description = "The <domain-name> of the name server that was the original or primary source of data for this zone. Don't forget the dot at the end!"; - }; - adminEmail = mkOption { - type = simple.types.domain-name; - example = "admin@example.com"; - description = "An email address of the person responsible for this zone. (Note: in traditional zone files you are supposed to put a dot instead of `@` in your address; you can use `@` with this module and it is recommended to do so. Also don't put the dot at the end!)"; - apply = s: replaceStrings ["@"] ["."] (removeSuffix "." s); - }; - serial = mkOption { - type = types.ints.unsigned; # TODO: u32 - example = 20; - description = "Version number of the original copy of the zone"; - }; - refresh = mkOption { - type = types.ints.unsigned; # TODO: u32 - default = 24 * 60 * 60; - example = 7200; - description = "Time interval before the zone should be refreshed"; - }; - retry = mkOption { - type = types.ints.unsigned; # TODO: u32 - default = 10 * 60; - example = 600; - description = "Time interval that should elapse before a failed refresh should be retried"; - }; - expire = mkOption { - type = types.ints.unsigned; # TODO: u32 - default = 10 * 24 * 60 * 60; - example = 3600000; - description = "Time value that specifies the upper limit on the time interval that can elapse before the zone is no longer authoritative"; - }; - minimum = mkOption { - type = types.ints.unsigned; # TODO: u32 - default = 60; - example = 60; - description = "Minimum TTL field that should be exported with any RR from this zone"; - }; - }; - dataToString = data @ { - nameServer, - adminEmail, - ... - }: let - numbers = map toString (with data; [serial refresh retry expire minimum]); - in "${nameServer} ${adminEmail}. (${concatStringsSep " " numbers})"; -} diff --git a/modules/by-name/dn/dns/dns/types/records/SRV.nix b/modules/by-name/dn/dns/dns/types/records/SRV.nix deleted file mode 100644 index 5f558ed..0000000 --- a/modules/by-name/dn/dns/dns/types/records/SRV.nix +++ /dev/null @@ -1,51 +0,0 @@ -# -# SPDX-FileCopyrightText: 2019 Kirill Elagin <https://kir.elagin.me/> -# -# SPDX-License-Identifier: MPL-2.0 or MIT -# -# RFC 2782 -{ - lib, - simple, - ... -}: let - inherit (lib) mkOption types; -in { - rtype = "SRV"; - options = { - service = mkOption { - type = types.str; - example = "foobar"; - description = "The symbolic name of the desired service. Do not add the underscore!"; - }; - proto = mkOption { - type = types.str; - example = "tcp"; - description = "The symbolic name of the desired protocol. Do not add the underscore!"; - }; - priority = mkOption { - type = types.ints.u16; - default = 0; - example = 0; - description = "The priority of this target host"; - }; - weight = mkOption { - type = types.ints.u16; - default = 100; - example = 20; - description = "The weight field specifies a relative weight for entries with the same priority. Larger weights SHOULD be given a proportionately higher probability of being selected"; - }; - port = mkOption { - type = types.ints.u16; - example = 9; - description = "The port on this target host of this service"; - }; - target = mkOption { - type = simple.types.domain-name; - example = ""; - description = "The domain name of the target host"; - }; - }; - dataToString = data: with data; "${toString priority} ${toString weight} ${toString port} ${target}"; - nameFixup = name: self: "_${self.service}._${self.proto}.${name}"; -} diff --git a/modules/by-name/dn/dns/dns/types/records/SSHFP.nix b/modules/by-name/dn/dns/dns/types/records/SSHFP.nix deleted file mode 100644 index 1409860..0000000 --- a/modules/by-name/dn/dns/dns/types/records/SSHFP.nix +++ /dev/null @@ -1,39 +0,0 @@ -# RFC 4255 -{lib, ...}: let - inherit (lib) mkOption types; - inherit (builtins) attrNames; - algorithm = { - "rsa" = 1; - "dsa" = 2; - "ecdsa" = 3; # RFC 6594 - "ed25519" = 4; # RFC 7479 / RFC 8709 - "ed448" = 6; # RFC 8709 - }; - mode = { - "sha1" = 1; - "sha256" = 2; # RFC 6594 - }; -in { - rtype = "SSHFP"; - options = { - algorithm = mkOption { - example = "ed25519"; - type = types.enum (attrNames algorithm); - apply = value: algorithm.${value}; - }; - fingerprintType = mkOption { - example = "sha256"; - type = types.enum (attrNames mode); - apply = value: mode.${value}; - }; - fingerprint = mkOption { - type = types.str; - }; - }; - dataToString = { - algorithm, - fingerprintType, - fingerprint, - ... - }: "${toString algorithm} ${toString fingerprintType} ${fingerprint}"; -} diff --git a/modules/by-name/dn/dns/dns/types/records/SVCB.nix b/modules/by-name/dn/dns/dns/types/records/SVCB.nix deleted file mode 100644 index 62cbc3d..0000000 --- a/modules/by-name/dn/dns/dns/types/records/SVCB.nix +++ /dev/null @@ -1,100 +0,0 @@ -# rfc9460 -{lib, ...}: let - inherit - (lib) - concatStringsSep - filter - isInt - isList - mapAttrsToList - mkOption - types - ; - - mkSvcParams = params: - concatStringsSep " " ( - filter (s: s != "") ( - mapAttrsToList ( - name: value: - if value - then name - else if isList value - then "${name}=${concatStringsSep "," value}" - else if isInt value - then "${name}=${builtins.toString value}" - else "" - ) - params - ) - ); -in { - rtype = "SVCB"; - options = { - svcPriority = mkOption { - example = 1; - type = types.ints.u16; - }; - targetName = mkOption { - example = "."; - type = types.str; - }; - mandatory = mkOption { - example = ["ipv4hint"]; - default = null; - type = types.nullOr (types.nonEmptyListOf types.str); - }; - alpn = mkOption { - example = ["h2"]; - default = null; - type = types.nullOr (types.nonEmptyListOf types.str); - }; - no-default-alpn = mkOption { - example = true; - default = false; - type = types.bool; - }; - port = mkOption { - example = 443; - default = null; - type = types.nullOr types.port; - }; - ipv4hint = mkOption { - example = ["127.0.0.1"]; - default = null; - type = types.nullOr (types.nonEmptyListOf types.str); - }; - ipv6hint = mkOption { - example = ["::1"]; - default = null; - type = types.nullOr (types.nonEmptyListOf types.str); - }; - ech = mkOption { - type = types.nullOr types.str; - default = null; - }; - }; - dataToString = { - svcPriority, - targetName, - mandatory ? null, - alpn ? null, - no-default-alpn ? null, - port ? null, - ipv4hint ? null, - ipv6hint ? null, - ech ? null, - ... - }: "${toString svcPriority} ${targetName} ${ - mkSvcParams { - inherit - alpn - ech - ipv4hint - ipv6hint - mandatory - no-default-alpn - port - ; - } - }"; -} diff --git a/modules/by-name/dn/dns/dns/types/records/TLSA.nix b/modules/by-name/dn/dns/dns/types/records/TLSA.nix deleted file mode 100644 index d92a29b..0000000 --- a/modules/by-name/dn/dns/dns/types/records/TLSA.nix +++ /dev/null @@ -1,50 +0,0 @@ -# RFC 6698 -{lib, ...}: let - inherit (lib) mkOption types; - inherit (builtins) attrNames; - - certUsage = { - "pkix-ta" = 0; - "pkix-ee" = 1; - "dane-ta" = 2; - "dane-ee" = 3; - }; - selectors = { - "cert" = 0; - "spki" = 1; - }; - match = { - "exact" = 0; - "sha256" = 1; - "sha512" = 2; - }; -in { - rtype = "TLSA"; - options = { - certUsage = mkOption { - example = "dane-ee"; - type = types.enum (attrNames certUsage); - apply = value: certUsage.${value}; - }; - selector = mkOption { - example = "spki"; - type = types.enum (attrNames selectors); - apply = value: selectors.${value}; - }; - matchingType = mkOption { - example = "sha256"; - type = types.enum (attrNames match); - apply = value: match.${value}; - }; - certificate = mkOption { - type = types.str; - }; - }; - dataToString = { - certUsage, - selector, - matchingType, - certificate, - ... - }: "${toString certUsage} ${toString selector} ${toString matchingType} ${certificate}"; -} diff --git a/modules/by-name/dn/dns/dns/types/records/TXT.nix b/modules/by-name/dn/dns/dns/types/records/TXT.nix deleted file mode 100644 index d605ce8..0000000 --- a/modules/by-name/dn/dns/dns/types/records/TXT.nix +++ /dev/null @@ -1,24 +0,0 @@ -# -# SPDX-FileCopyrightText: 2019 Kirill Elagin <https://kir.elagin.me/> -# -# SPDX-License-Identifier: MPL-2.0 or MIT -# -# RFC 1035, 3.3.14 -{ - lib, - util, - ... -}: let - inherit (lib) mkOption types; -in { - rtype = "TXT"; - options = { - data = mkOption { - type = types.str; - example = "favorite drink=orange juice"; - description = "Arbitrary information"; - }; - }; - dataToString = {data, ...}: util.writeCharacterString data; - fromString = data: {inherit data;}; -} diff --git a/modules/by-name/dn/dns/dns/types/records/default.nix b/modules/by-name/dn/dns/dns/types/records/default.nix deleted file mode 100644 index 76a86cd..0000000 --- a/modules/by-name/dn/dns/dns/types/records/default.nix +++ /dev/null @@ -1,43 +0,0 @@ -# -# SPDX-FileCopyrightText: 2019 Kirill Elagin <https://kir.elagin.me/> -# -# SPDX-License-Identifier: MPL-2.0 or MIT -# -{ - lib, - util, - simple, -}: let - inherit (lib.attrsets) genAttrs; - - types = [ - "A" - "AAAA" - "CAA" - "CNAME" - "DNAME" - "MX" - "NS" - "SOA" - "SRV" - "TXT" - "PTR" - - # DNSSEC types - "DNSKEY" - "DS" - - # DANE types - "SSHFP" - "TLSA" - "OPENPGPKEY" - "SVCB" - "HTTPS" - - # Pseudo types - "DKIM" - "DMARC" - "MTA-STS" - ]; -in - genAttrs types (t: import (./. + "/${t}.nix") {inherit lib simple util;}) diff --git a/modules/by-name/dn/dns/dns/types/records/dnssec.nix b/modules/by-name/dn/dns/dns/types/records/dnssec.nix deleted file mode 100644 index 648f676..0000000 --- a/modules/by-name/dn/dns/dns/types/records/dnssec.nix +++ /dev/null @@ -1,48 +0,0 @@ -# SPDX-FileCopyrightText: 2020 Aluísio Augusto Silva Gonçalves <https://aasg.name> -# -# SPDX-License-Identifier: MPL-2.0 or MIT -{lib}: let - inherit (builtins) attrNames isInt removeAttrs; - inherit (lib) mkOption types; -in rec { - mkRegisteredNumberOption = { - registryName, - numberType, - mnemonics, - } @ args: - mkOption - { - type = - types.either numberType (types.enum (attrNames mnemonics)) - // { - name = "registeredNumber"; - description = "number in IANA registry '${registryName}'"; - }; - apply = value: - if isInt value - then value - else mnemonics.${value}; - } - // removeAttrs args ["registryName" "numberType" "mnemonics"]; - - mkDNSSECAlgorithmOption = args: - mkRegisteredNumberOption { - registryName = "Domain Name System Security (DNSSEC) Algorithm Numbers"; - numberType = types.ints.u8; - mnemonics = { - "dsa" = 3; - "rsasha1" = 5; - "dsa-nsec3-sha1" = 6; - "rsasha1-nsec3-sha1" = 7; - "rsasha256" = 8; - "rsasha512" = 10; - "ecc-gost" = 12; - "ecdsap256sha256" = 13; - "ecdsap384sha384" = 14; - "ed25519" = 15; - "ed448" = 16; - "privatedns" = 253; - "privateoid" = 254; - }; - }; -} diff --git a/modules/by-name/dn/dns/dns/types/simple.nix b/modules/by-name/dn/dns/dns/types/simple.nix deleted file mode 100644 index fece2c9..0000000 --- a/modules/by-name/dn/dns/dns/types/simple.nix +++ /dev/null @@ -1,9 +0,0 @@ -# SPDX-FileCopyrightText: 2021 Kirill Elagin <https://kir.elagin.me/> -# -# SPDX-License-Identifier: MPL-2.0 or MIT -{lib}: let - inherit (builtins) stringLength; -in { - # RFC 1035, 3.1 - domain-name = lib.types.addCheck lib.types.str (s: stringLength s <= 255); -} diff --git a/modules/by-name/dn/dns/dns/types/zone.nix b/modules/by-name/dn/dns/dns/types/zone.nix deleted file mode 100644 index 44ccb15..0000000 --- a/modules/by-name/dn/dns/dns/types/zone.nix +++ /dev/null @@ -1,119 +0,0 @@ -# -# SPDX-FileCopyrightText: 2019 Kirill Elagin <https://kir.elagin.me/> -# SPDX-FileCopyrightText: 2021 Naïm Favier <n@monade.li> -# -# SPDX-License-Identifier: MPL-2.0 or MIT -# -{ - lib, - util, - simple, -}: let - inherit (builtins) filter removeAttrs; - inherit - (lib) - concatMapStringsSep - concatStringsSep - mapAttrs - mapAttrsToList - optionalString - ; - inherit (lib) mkOption literalExample types; - - inherit (import ./record.nix {inherit lib;}) recordType writeRecord; - - rsubtypes = import ./records {inherit lib util simple;}; - rsubtypes' = removeAttrs rsubtypes ["SOA"]; - - subzoneOptions = - { - subdomains = mkOption { - type = types.attrsOf subzone; - default = {}; - example = { - www = { - A = [{address = "1.1.1.1";}]; - }; - staging = { - A = [{address = "1.0.0.1";}]; - }; - }; - description = "Records for subdomains of the domain"; - }; - } - // mapAttrs (n: t: - mkOption { - type = types.listOf (recordType t); - default = []; - # example = [ t.example ]; # TODO: any way to auto-generate an example for submodule? - description = "List of ${n} records for this zone/subzone"; - }) - rsubtypes'; - - subzone = types.submodule { - options = subzoneOptions; - }; - - writeSubzone = name: zone: let - groupToString = pseudo: subt: - concatMapStringsSep "\n" (writeRecord name subt) zone."${pseudo}"; - groups = mapAttrsToList groupToString rsubtypes'; - groups' = filter (s: s != "") groups; - - writeSubzone' = subname: writeSubzone "${subname}.${name}"; - sub = concatStringsSep "\n\n" (mapAttrsToList writeSubzone' zone.subdomains); - in - concatStringsSep "\n\n" groups' - + optionalString (sub != "") ("\n\n" + sub); - zone = types.submodule ({name, ...}: { - options = - { - useOrigin = mkOption { - type = types.bool; - default = false; - description = "Wether to use $ORIGIN and unqualified name or fqdn when exporting the zone."; - }; - - TTL = mkOption { - type = types.ints.unsigned; - default = 24 * 60 * 60; - example = literalExample "60 * 60"; - description = "Default record caching duration. Sets the $TTL variable"; - }; - SOA = mkOption rec { - type = recordType rsubtypes.SOA; - example = - { - ttl = 24 * 60 * 60; - } - // type.example; - description = "SOA record"; - }; - } - // subzoneOptions; - }); - renderToString = name: { - useOrigin, - TTL, - SOA, - ... - } @ zone: - if useOrigin - then '' - $ORIGIN ${name}. - $TTL ${toString TTL} - - ${writeRecord "@" rsubtypes.SOA SOA} - - ${writeSubzone "@" zone} - '' - else '' - $TTL ${toString TTL} - - ${writeRecord name rsubtypes.SOA SOA} - - ${writeSubzone name zone} - ''; -in { - inherit zone subzone renderToString; -} diff --git a/modules/by-name/dn/dns/dns/util/default.nix b/modules/by-name/dn/dns/dns/util/default.nix deleted file mode 100644 index 59e661d..0000000 --- a/modules/by-name/dn/dns/dns/util/default.nix +++ /dev/null @@ -1,76 +0,0 @@ -# SPDX-FileCopyrightText: 2021 Kirill Elagin <https://kir.elagin.me/> -# -# SPDX-License-Identifier: MPL-2.0 or MIT -{lib}: let - inherit - (builtins) - concatStringsSep - genList - stringLength - substring - ; - inherit - (lib.strings) - concatMapStrings - concatMapStringsSep - fixedWidthString - splitString - stringToCharacters - ; - inherit (lib.lists) filter reverseList; - - /* - Split a string into byte chunks, such that each output String is less then or equal to - `n` bytes. - - # Type - - splitInGroupsOf :: Integer -> String -> [String] - - # Arguments - - n - : The number of bytes to put into each String. - - s - : The String to split. - */ - splitInGroupsOf = n: s: let - groupCount = (stringLength s - 1) / n + 1; - in - genList (i: substring (i * n) n s) groupCount; - - # : str -> str - # Prepares a Nix string to be written to a zone file as a character-string - # literal: breaks it into chunks of 255 (per RFC 1035, 3.3) and encloses - # each chunk in quotation marks. - writeCharacterString = s: - if stringLength s <= 255 - then ''"${s}"'' - else concatMapStringsSep " " (x: ''"${x}"'') (splitInGroupsOf 255 s); - - # : str -> str, with length 4 (zeros are padded to the left) - align4Bytes = fixedWidthString 4 "0"; - - # : int -> str -> str - # Expands "" to 4n zeros and aligns the rest on 4 bytes - align4BytesOrExpand = n: v: - if v == "" - then (fixedWidthString (4 * n) "0" "") - else align4Bytes v; - - # : str -> [ str ] - # Returns the record of the ipv6 as a list - mkRecordAux = v6: let - splitted = splitString ":" v6; - n = 8 - builtins.length (filter (x: x != "") splitted); - in - stringToCharacters (concatMapStrings (align4BytesOrExpand n) splitted); - - # : str -> str - # Returns the reversed record of the ipv6 - mkReverseRecord = v6: - concatStringsSep "." (reverseList (mkRecordAux v6)) + ".ip6.arpa"; -in { - inherit writeCharacterString mkReverseRecord; -} diff --git a/modules/by-name/dn/dns/module.nix b/modules/by-name/dn/dns/module.nix deleted file mode 100644 index 8f4ad37..0000000 --- a/modules/by-name/dn/dns/module.nix +++ /dev/null @@ -1,86 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.vhack.dns; - - zones = - builtins.mapAttrs (name: value: { - data = - dns.types.zone.renderToString name value; - }) - cfg.zones; - - dns = import ./dns {inherit lib;}; - - ports = let - parsePorts = listeners: let - splitAddress = addr: lib.splitString "@" addr; - - extractPort = addr: let - split = splitAddress addr; - in - lib.toInt ( - if (builtins.length split) == 2 - then builtins.elemAt split 1 - else "53" - ); - in - builtins.map extractPort listeners; - in - lib.unique (parsePorts cfg.interfaces); -in { - options.vhack.dns = { - enable = lib.mkEnableOption "custom dns server"; - - openFirewall = lib.mkOption { - type = lib.types.bool; - default = false; - description = '' - Open the following ports: - TCP (${lib.concatStringsSep ", " (map toString ports)}) - UDP (${lib.concatStringsSep ", " (map toString ports)}) - ''; - }; - - interfaces = lib.mkOption { - type = lib.types.listOf lib.types.str; - description = '' - A list of the interfaces to bind to. To select the port add `@` to the end of the - interface. The default port is 53. - ''; - example = [ - "192.168.1.3" - "2001:db8:1::3" - ]; - }; - - zones = lib.mkOption { - type = lib.types.attrsOf dns.types.zone.zone; - description = "DNS zones"; - }; - }; - - config = lib.mkIf cfg.enable { - services.nsd = { - enable = true; - verbosity = 4; - inherit (cfg) interfaces; - inherit zones; - }; - - networking.firewall.allowedUDPPorts = lib.mkIf cfg.openFirewall ports; - networking.firewall.allowedTCPPorts = lib.mkIf cfg.openFirewall ports; - - systemd.services.nsd = { - requires = [ - "network-online.target" - ]; - after = [ - "network.target" - "network-online.target" - ]; - }; - }; -} diff --git a/modules/by-name/et/etesync/module.nix b/modules/by-name/et/etesync/module.nix deleted file mode 100644 index 4dc8575..0000000 --- a/modules/by-name/et/etesync/module.nix +++ /dev/null @@ -1,70 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.vhack.etesync; -in { - options.vhack.etesync = { - enable = lib.mkEnableOption '' - a secure, end-to-end encrypted, and privacy respecting sync for your contacts, calendars, tasks and notes. - ''; - secretFile = lib.mkOption { - type = lib.types.path; - description = "The age encrypted globale etebase secretfile passed to agenix"; - }; - }; - - config = lib.mkIf cfg.enable { - services.etebase-server = { - enable = true; - port = 8001; - settings = { - global.secret_file = "${config.age.secrets.etebase-server.path}"; - allowed_hosts = { - allowed_host1 = "etebase.vhack.eu"; - allowed_host2 = "dav.vhack.eu"; - }; - }; - }; - - age.secrets.etebase-server = { - file = cfg.secretFile; - mode = "700"; - owner = "etebase-server"; - group = "etebase-server"; - }; - - vhack.persist.directories = [ - { - directory = "/var/lib/etebase-server"; - user = "etebase-server"; - group = "etebase-server"; - mode = "0700"; - } - ]; - - services.nginx = { - virtualHosts = { - "etebase.vhack.eu" = { - locations = { - # TODO: Maybe fix permissions to use pregenerated static files which would - # improve performance. - #"/static" = { - # root = config.services.etebase-server.settings.global.static_root; - #}; - }; - serverAliases = [ - "dav.vhack.eu" - ]; - }; - }; - }; - vhack.anubis.instances."etebase.vhack.eu".target = "http://127.0.0.1:${builtins.toString config.services.etebase-server.port}"; - - users = { - users.etebase-server.uid = config.vhack.constants.ids.uids.etebase-server; - groups.etebase-server.gid = config.vhack.constants.ids.gids.etebase-server; - }; - }; -} diff --git a/modules/by-name/fa/fail2ban/module.nix b/modules/by-name/fa/fail2ban/module.nix deleted file mode 100644 index c619ef9..0000000 --- a/modules/by-name/fa/fail2ban/module.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.vhack.fail2ban; -in { - options.vhack.fail2ban = { - enable = lib.mkEnableOption "fail2ban"; - }; - - config = lib.mkIf cfg.enable { - vhack.persist.directories = [ - { - directory = "/var/lib/fail2ban"; - # TODO: Fail2ban should probably run under a dedicated `fail2ban` user. <2024-12-25> - user = "root"; - group = "root"; - mode = "0700"; - } - ]; - - services.fail2ban = { - enable = true; - maxretry = 7; # ban after 7 failures - daemonSettings = { - Definition = { - logtarget = "SYSLOG"; - socket = "/run/fail2ban/fail2ban.sock"; - pidfile = "/run/fail2ban/fail2ban.pid"; - dbfile = "/var/lib/fail2ban/db.sqlite3"; - }; - }; - bantime-increment = { - enable = true; - rndtime = "8m"; - overalljails = true; - multipliers = "2 4 16 128 256"; - maxtime = "72h"; - }; - jails = { - dovecot = '' - # block IPs which failed to log-in - # aggressive mode add blocking for aborted connections - enabled = true - filter = dovecot[mode=aggressive] - maxretry = 2 - ''; - postfix = '' - enabled = true - filter = postfix[mode=aggressive] - findtime = 600 - maxretry = 3 - ''; - }; - }; - }; -} diff --git a/modules/by-name/ga/gallery/module.nix b/modules/by-name/ga/gallery/module.nix deleted file mode 100644 index a5237e6..0000000 --- a/modules/by-name/ga/gallery/module.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.sils.gallery; -in { - options.sils.gallery = { - enable = lib.mkEnableOption "a stateful static gallery site"; - domain = lib.mkOption { - type = lib.types.str; - }; - }; - config = lib.mkIf cfg.enable { - vhack.nginx.enable = true; - services.nginx.virtualHosts."${cfg.domain}" = { - forceSSL = true; - enableACME = true; - root = "/srv/${cfg.domain}"; - }; - }; -} diff --git a/modules/by-name/gi/git-back/module.nix b/modules/by-name/gi/git-back/module.nix deleted file mode 100644 index 90be345..0000000 --- a/modules/by-name/gi/git-back/module.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.vhack.git-back; -in { - options.vhack.git-back = { - enable = lib.mkEnableOption "Back integration into git-server"; - - domain = lib.mkOption { - type = lib.types.str; - description = "The domain where to deploy back"; - }; - }; - - config = lib.mkIf cfg.enable { - # vhack.back = { - # enable = true; - # - # user = "git"; - # group = "git"; - # - # settings = { - # scan_path = "${config.services.gitolite.dataDir}/repositories"; - # project_list = "${config.services.gitolite.dataDir}/projects.list"; - # root_url = "https://${cfg.domain}"; - # }; - # }; - # - # vhack.anubis.instances."${cfg.domain}".target = "http://127.0.0.1:8000"; - }; -} diff --git a/modules/by-name/gi/git-server/css.nix b/modules/by-name/gi/git-server/css.nix deleted file mode 100644 index 7d0ad06..0000000 --- a/modules/by-name/gi/git-server/css.nix +++ /dev/null @@ -1,119 +0,0 @@ -{ - cgitPkg, - pkgs, -}: let - /* - Adapted from `https://git.qyliss.net/nixlib/sys/atuin.nix`, originally distributed under - the MIT license. - */ - cgitCss = - pkgs.runCommand "cgit-extra.css" { - licenseHeader = '' - /* - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License v2 as published - * by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * See <https://www.gnu.org/licenses/>. - */ - - ''; - - # Adapted from - # <https://git.causal.agency/src/plain/www/git.causal.agency/custom.css>, - # distributed as a Larger Work under a Secondary License, - # as permitted by the terms of the - # Mozilla Public License Version 2.0. - extraCss = '' - * { line-height: 1.25em; } - - article { - font-family: sans-serif; - max-width: 70ch; - margin-left: auto; - margin-right: auto; - } - - div#cgit { - margin: auto; - font-family: monospace; - -moz-tab-size: 4; - tab-size: 4; - display: table; - } - - div#cgit table#header { - margin-left: auto; - margin-right: auto; - } - div#cgit table#header td.logo { - display: none; - } - div#cgit table#header td.main { - font-size: 1em; - font-weight: bold; - } - div#cgit table#header td.sub { - border-top: none; - } - div#cgit table.tabs { - margin-left: auto; - margin-right: auto; - border-bottom: none; - } - div#cgit div.content { - border-bottom: none; - min-width: 108ch; - } - div#cgit div.content div#summary { - display: table; - margin-left: auto; - margin-right: auto; - } - div#cgit div.notes { - border: none; - background: transparent; - padding: 0; - } - div#cgit table.list { - margin-left: auto; - margin-right: auto; - } - div#cgit table.list th a { - color: inherit; - } - div#cgit table.list tr:nth-child(even) { - background: inherit; - } - div#cgit table.list tr:hover { - background: inherit; - } - div#cgit table.list tr.nohover-highlight:hover:nth-child(even) { - background: inherit; - } - div#cgit div.footer { - font-size: 1em; - margin-top: 0; - } - - div#cgit table.blob td.linenumbers:nth-last-child(3) { - display: none; - } - - div#cgit table.blob td.linenumbers a:target { - color: goldenrod; - text-decoration: underline; - outline: none; - } - ''; - passAsFile = ["licenseHeader" "extraCss"]; - } '' - cat $licenseHeaderPath ${cgitPkg}/cgit/cgit.css $extraCssPath > $out - ''; -in - cgitCss diff --git a/modules/by-name/gi/git-server/module.nix b/modules/by-name/gi/git-server/module.nix deleted file mode 100644 index 3e2c848..0000000 --- a/modules/by-name/gi/git-server/module.nix +++ /dev/null @@ -1,193 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - cfg = config.vhack.git-server; - - cgitCss = import ./css.nix { - inherit pkgs; - cgitPkg = config.services.cgit."${cfg.domain}".package; - }; -in { - options.vhack.git-server = { - enable = lib.mkEnableOption '' - a lightweight git-server, realised with cgit and gitolite. - ''; - - domain = lib.mkOption { - type = lib.types.str; - default = "git.vhack.eu"; - description = '' - The domain this git instance will run under. - ''; - }; - - gitolite = { - adminPubkey = lib.mkOption { - description = '' - The initial key to use for gitolite. This will only be used for the initial - clone of the `gitolite-admin` repository. - ''; - type = lib.types.str; - default = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAe4o1PM6VasT3KZNl5NYvgkkBrPOg36dqsywd10FztS openpgp:0x21D20D6A"; - }; - }; - }; - - config = lib.mkIf cfg.enable { - programs.git = { - enable = true; - config = { - init = { - defaultBranch = "main"; - }; - }; - }; - - # Needed for the nginx proxy and the virtual host - vhack = { - nginx.enable = true; - persist.directories = [ - { - directory = "/var/lib/gitolite"; - user = "git"; - group = "git"; - mode = "0755"; - } - ]; - }; - - services = { - gitolite = { - inherit (cfg.gitolite) adminPubkey; - enable = true; - dataDir = "/var/lib/gitolite"; - user = "git"; - group = "git"; - extraGitoliteRc = '' - $RC{UMASK} = 0027; # Enable group access, important for cgit. - - # Enable modifing git variables (for cgit.owner and such things) - # These must be enable in the gitolite-admin repo (option user-configs = ...) - push( @{$RC{ENABLE}}, 'config' ); - push( @{$RC{ENABLE}}, 'git-config' ); - - push( @{$RC{ENABLE}}, 'expand-deny-messages' ); - push( @{$RC{ENABLE}}, 'Motd' ); - - push( @{$RC{ENABLE}}, 'cgit' ); - ''; - }; - - cgit."${cfg.domain}" = { - enable = true; - package = pkgs.cgit; - scanPath = "${config.services.gitolite.dataDir}/repositories"; - user = "git"; - group = "git"; - - # Don't bypass `cgit` when performing a http only clone. - # This is slightly slower, but we don't need to worry about the access - # restrictions also being by-passed. - gitHttpBackend.enable = false; - - settings = { - branch-sort = "age"; - - # Allow users to download a repo checkout with these compression formats - snapshots = ["tar.gz" "zip"]; - # The template used to generate the clone url for https clone. - clone-url = [ - "https://${cfg.domain}/$CGIT_REPO_URL" - "ssh://git@${cfg.domain}/$CGIT_REPO_URL" - ]; - enable-http-clone = true; - - # TODO: We might want to add an logo and readme here <2024-07-31> - # logo = "<url>"; - # root-readme = "/some/readme/file" - root-desc = "The cgit instance of ${cfg.domain}!"; - root-title = "${ - lib.strings.toUpper (builtins.substring 0 1 cfg.domain) + builtins.substring 1 (builtins.stringLength cfg.domain) cfg.domain - } cgit instace"; - - # Set the default maximum statistics period. Valid values are "week", - # "month", "quarter" and "year". - max-stats = "week"; - - readme = [ - ":README.md" - ":readme.md" - ":README.mkd" - ":readme.mkd" - ":README.rst" - ":readme.rst" - ":README.html" - ":readme.html" - ":README.htm" - ":readme.htm" - ":README.txt" - ":readme.txt" - ":README" - ":readme" - ":INSTALL.md" - ":install.md" - ":INSTALL.mkd" - ":install.mkd" - ":INSTALL.rst" - ":install.rst" - ":INSTALL.html" - ":install.html" - ":INSTALL.htm" - ":install.htm" - ":INSTALL.txt" - ":install.txt" - ":INSTALL" - ":install" - ]; - - enable-blame = true; - enable-commit-graph = true; - enable-subject-links = true; - enable-follow-links = true; - enable-index-links = true; - enable-index-owner = true; - - # NOTE: This allows cgit to take configuration from the bare git repositories: - # All `repo.<key>` can be set by setting `cgit.<key>` in the git config. E.g.: - # setting the owner (i.e. `repo.owner`) would be done by setting the - # `cgit.owner` config. All repo options are outline in the cgitrc (5) man page. - enable-git-config = true; - - # Remove the `.git` suffix from scanned repositories (this must be set _before_ `scan-path`) - remove-suffix = true; - - css = "/custom_cgit.css"; - - # This is a number of path elements to treat as section. - # `-1` means that we treat the last element as name, all others as sections - section-from-path = -1; - - project-list = "${config.services.gitolite.dataDir}/projects.list"; - - # TODO: We might want to use the kernel.org `libravatar.lua` email-filter <2024-07-31> - source-filter = "${config.services.cgit."${cfg.domain}".package}/lib/cgit/filters/syntax-highlighting.py"; - about-filter = "${config.services.cgit."${cfg.domain}".package}/lib/cgit/filters/about-formatting.sh"; - }; - }; - - nginx.virtualHosts."${cfg.domain}" = { - enableACME = true; - forceSSL = true; - - locations = { - "= /custom_cgit.css" = { - alias = cgitCss.outPath; - }; - }; - }; - }; - }; -} diff --git a/modules/by-name/gr/grocy/module.nix b/modules/by-name/gr/grocy/module.nix deleted file mode 100644 index 28107f2..0000000 --- a/modules/by-name/gr/grocy/module.nix +++ /dev/null @@ -1,51 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.vhack.grocy; - data = "/var/lib/grocy"; -in { - options.vhack.grocy = { - enable = lib.mkEnableOption "grocy"; - - domain = lib.mkOption { - type = lib.types.str; - description = "FQDN for the grocy instance."; - }; - }; - - config = lib.mkIf cfg.enable { - services.grocy = { - enable = true; - - hostName = cfg.domain; - dataDir = data; - - settings = { - currency = "EUR"; - culture = "sv_SE"; - calendar.firstDayOfWeek = 1; - }; - }; - - vhack.persist.directories = [ - { - directory = data; - user = "grocy"; - group = "grocy"; - mode = "0700"; - } - ]; - - users = { - groups.grocy = { - gid = config.vhack.constants.ids.gids.grocy; - }; - users.grocy = { - extraGroups = ["grocy"]; - uid = config.vhack.constants.ids.uids.grocy; - }; - }; - }; -} diff --git a/modules/by-name/im/impermanence/module.nix b/modules/by-name/im/impermanence/module.nix deleted file mode 100644 index 1c916e2..0000000 --- a/modules/by-name/im/impermanence/module.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.vhack.persist; -in { - options.vhack.persist = { - enable = lib.mkEnableOption "impermanence"; - - directories = lib.mkOption { - description = "The list of directories to persist"; - type = lib.types.listOf (lib.types.coercedTo lib.types.str (d: {directory = d;}) (lib.types.attrsOf lib.types.anything)); - }; - }; - - config = lib.mkIf cfg.enable { - environment.persistence."/srv" = { - hideMounts = true; - directories = - [ - "/etc/nixos" - ] - ++ cfg.directories; - files = [ - "/etc/machine-id" - ]; - }; - }; -} diff --git a/modules/by-name/in/invidious-router/module.nix b/modules/by-name/in/invidious-router/module.nix deleted file mode 100644 index 750f852..0000000 --- a/modules/by-name/in/invidious-router/module.nix +++ /dev/null @@ -1,70 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - cfg = config.vhack.invidious-router; -in { - options.vhack.invidious-router = { - enable = lib.mkEnableOption "invidious-router"; - domain = lib.mkOption { - type = lib.types.str; - description = "The domain invidious-router should be served on"; - }; - extraDomains = lib.mkOption { - type = lib.types.listOf lib.types.str; - default = []; - description = "Addtional domains invidious-router should be served on"; - }; - }; - config = lib.mkIf cfg.enable { - services.invidious-router = { - enable = true; - package = pkgs.invidious-router; - settings = { - app = { - listen = "127.0.0.1:8050"; - enable_youtube_fallback = false; - reload_instance_list_interval = "60s"; - not_available_message = '' - No available invidious instance found! - [link]View this video on YouTube[/link], a proprietary - platform that collects and uses your data without respecting - your privacy. - ''; - }; - api = { - enabled = true; - url = "https://api.invidious.io/instances.json"; - filter_regions = false; - allowed_regions = [ - "AT" - "DE" - "CH" - ]; - }; - healthcheck = { - path = "/watch?v=uSvJaYxRoB4"; - allowed_status_codes = [ - 200 - ]; - timeout = "1s"; - interval = "10s"; - filter_by_response_time = { - enabled = true; - qty_of_top_results = 4; - }; - minimum_ratio = 0.2; - remove_no_ratio = false; - text_not_present = "YouTube is currently trying to block Invidious instances"; - }; - }; - nginx = { - enable = true; - inherit (cfg) domain extraDomains; - }; - }; - vhack.nginx.enable = true; - }; -} diff --git a/modules/by-name/ma/mail/module.nix b/modules/by-name/ma/mail/module.nix deleted file mode 100644 index 768eb33..0000000 --- a/modules/by-name/ma/mail/module.nix +++ /dev/null @@ -1,167 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.vhack.mail; - all_admins = [ - "sils@vhack.eu" - "soispha@vhack.eu" - "nightingale@vhack.eu" - ]; -in { - options.vhack.mail = { - enable = lib.mkEnableOption "sophisticated mail setup with simple-nixos-mailserver"; - fqdn = lib.mkOption { - type = lib.types.str; - description = "The fqdn mailserver should be served on."; - }; - }; - - config = lib.mkIf cfg.enable { - vhack.persist.directories = [ - { - directory = "/var/lib/mail/backup"; - user = "virtualMail"; - group = "virtualMail"; - mode = "0700"; - } - { - directory = "/var/lib/mail/vmail"; - user = "virtualMail"; - group = "virtualMail"; - mode = "0700"; - } - { - directory = "/var/lib/mail/dkim"; - user = "opendkim"; - group = "opendkim"; - mode = "0700"; - } - { - directory = "/var/lib/postfix/data"; - user = "postfix"; - group = "postfix"; - mode = "0700"; - } - { - directory = "/var/lib/postfix/queue"; - user = "postfix"; - group = "postfix"; - mode = "0700"; - } - { - directory = "/var/lib/rspamd"; - user = "rspamd"; - group = "rspamd"; - mode = "0700"; - } - ]; - - vhack.nginx.enable = true; - security.acme.certs = { - "${cfg.fqdn}" = { - domain = cfg.fqdn; - }; - }; - - mailserver = { - enable = true; - inherit (cfg) fqdn; - - stateVersion = 5; - - aliases = { - "abuse@vhack.eu" = all_admins; - "postmaster@vhack.eu" = all_admins; - "admin@vhack.eu" = all_admins; - }; - - storage = { - directoryLayout = "fs"; - path = "/var/lib/mail/vmail"; - }; - - dkim.keyDirectory = "/var/lib/mail/dkim"; - backup.snapshotRoot = "/var/lib/mail/backup"; - - enableImap = false; - enableImapSsl = true; - enablePop3 = false; - enablePop3Ssl = true; - # SMTP - enableSubmission = false; - enableSubmissionSsl = true; - openFirewall = true; - - # Reference the existing ACME configuration created by nginx - x509.useACMEHost = cfg.fqdn; - - domains = [ - "vhack.eu" - - "s-schoeffel.de" - "b-peetz.de" - - "sils.li" - "nightingale.sils.li" - "sils.sils.li" - ]; - - accounts = { - "sils@vhack.eu" = { - hashedPassword = "$2b$05$RW/Svgk7iGxvP5W7ZwUZ1e.a3fj4fteevb2MtfFYYD0d1DQ17y9Fm"; - }; - "soispha@vhack.eu" = { - hashedPassword = "$2b$05$XX36sJuHNbTFvi8DFldscOeQBHahluSkiUqD9QGzQaET7NJusSuQW"; - }; - - "benedikt.peetz@b-peetz.de" = { - hashedPassword = "$2b$05$MfET8utot2OolPZNASqoDe4VXNoG2chnEWhdfQ2E92mit0TvI2gBy"; - aliases = ["@b-peetz.de"]; - }; - "silas.schoeffel@s-schoeffel.de" = { - hashedPassword = "$2b$05$Qb8rl7ncpCcTbsSdsduJBuOITp8RTD6sfOTjuxJsVtD9vjAYY9n8e"; - aliases = ["@s-schoeffel.de"]; - }; - - "nightingale@vhack.eu" = { - hashedPassword = "$2b$05$nDKVVq1EktKXWqGFhnOLP.plLovXFyvWSuptK9GIkxA5DScKFx6YS"; - aliases = [ - "@nightingale.sils.li" - ]; - }; - "sils@sils.li" = { - hashedPassword = "$2b$05$Ebzh2ZhuWkz1p4tqJ172IejNZg10FtCxPDY4k6umYrpirXg7ezIRq"; - aliases = [ - "@sils.sils.li" - "@sils.li" - ]; - }; - - # Mail-Account used by hosted software - "mastodon@vhack.eu" = { - hashedPassword = "$2b$05$pSby3x2p3cHg0FyAE8IiJ.nYUqtAIR10JA8HNpHwMAiLXqc.ltSK."; - }; - "peertube@vhack.eu" = { - hashedPassword = "$y$j9T$hyWQ8Awd2Xrc6qsK.2hwE1$LxACfaeW.yHGbkQL95dWtID9.zXL/aMwT6lp.yU/0g0"; - }; - }; - }; - - users = { - users = { - knot-resolver.uid = config.vhack.constants.ids.uids.knot-resolver; - redis-rspamd.uid = config.vhack.constants.ids.uids.redis-rspamd; - rspamd.uid = config.vhack.constants.ids.uids.rspamd; - postfix-tlspol.uid = config.vhack.constants.ids.uids.postfix-tlspol; - }; - groups = { - knot-resolver.gid = lib.mkForce config.vhack.constants.ids.gids.knot-resolver; - redis-rspamd.gid = config.vhack.constants.ids.gids.redis-rspamd; - rspamd.gid = config.vhack.constants.ids.gids.rspamd; - postfix-tlspol.gid = config.vhack.constants.ids.gids.postfix-tlspol; - }; - }; - }; -} diff --git a/modules/by-name/ma/mastodon/module.nix b/modules/by-name/ma/mastodon/module.nix deleted file mode 100644 index 84f3ec8..0000000 --- a/modules/by-name/ma/mastodon/module.nix +++ /dev/null @@ -1,128 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: let - emailAddress = "mastodon@vhack.eu"; - applyPatches = pkg: - pkg.overrideAttrs (attrs: { - patches = (attrs.patches or []) ++ [./patches/0001-feat-treewide-Increase-character-limit-to-5000-in-me.patch]; - }); - cfg = config.vhack.mastodon; -in { - options.vhack.mastodon = { - enable = lib.mkEnableOption "a mastodon instance"; - domain = lib.mkOption { - type = lib.types.str; - description = "The Domain mastodon should be served on"; - example = "mastodon.vhack.eu"; - }; - enableTLD = lib.mkEnableOption "using the tld as handle, configured via - webfinger (note: this requires the tld to point to the same server as domain)"; - tld = lib.mkOption { - type = lib.types.nullOr lib.types.str; - default = null; - example = "vhack.eu"; - }; - mailPwFile = lib.mkOption { - type = lib.types.path; - description = "The age encrypted mail password file passed to agenix"; - }; - }; - config = lib.mkIf cfg.enable { - age.secrets.mastodonMail = { - file = cfg.mailPwFile; - mode = "700"; - owner = "mastodon"; - group = "mastodon"; - }; - - vhack = { - persist.directories = [ - { - directory = "/var/lib/mastodon"; - user = "mastodon"; - group = "mastodon"; - mode = "0700"; - } - ]; - - postgresql.enable = true; - - nginx.enable = true; - }; - - services.mastodon = { - enable = true; - - package = applyPatches pkgs.mastodon; - - # Unstable Mastodon package, used if - # security updates aren't backported. - #package = applyPatches pkgsUnstable.mastodon; - - localDomain = - if cfg.enableTLD - then cfg.tld - else cfg.domain; - smtp = { - authenticate = true; - createLocally = false; - fromAddress = emailAddress; - user = emailAddress; - host = "mail.foss-syndicate.org"; - passwordFile = config.age.secrets.mastodonMail.path; - }; - streamingProcesses = 3; # Number of Cores - 1 - extraConfig = { - WEB_DOMAIN = cfg.domain; - EMAIL_DOMAIN_ALLOWLIST = "vhack.eu|sils.li"; - }; - }; - - services.nginx = { - enable = true; - recommendedProxySettings = true; # required for redirections to work - virtualHosts = { - "${cfg.domain}" = { - root = "${config.services.mastodon.package}/public/"; - # mastodon only supports https, but you can override this if you offload tls elsewhere. - forceSSL = true; - enableACME = true; - - locations = { - "/system/".alias = "/var/lib/mastodon/public-system/"; - "/".tryFiles = "$uri @proxy"; - "@proxy" = { - proxyPass = "http://unix:/run/mastodon-web/web.socket"; - proxyWebsockets = true; - }; - "/api/v1/streaming/" = { - proxyPass = "http://unix:/run/mastodon-streaming/streaming.socket"; - proxyWebsockets = true; - }; - }; - }; - "${cfg.tld}" = - if cfg.enableTLD - then { - locations."/.well-known/webfinger".return = "301 https://${cfg.domain}$request_uri"; - } - else {}; - }; - }; - - users = { - users.mastodon.uid = config.vhack.constants.ids.uids.mastodon; - users.redis-mastodon.uid = config.vhack.constants.ids.uids.redis-mastodon; - groups.redis-mastodon.gid = config.vhack.constants.ids.gids.redis-mastodon; - groups.mastodon = { - gid = config.vhack.constants.ids.gids.mastodon; - members = [ - config.services.nginx.user - ]; - }; - }; - }; -} diff --git a/modules/by-name/ma/mastodon/patches/0001-feat-treewide-Increase-character-limit-to-5000-in-me.patch b/modules/by-name/ma/mastodon/patches/0001-feat-treewide-Increase-character-limit-to-5000-in-me.patch deleted file mode 100644 index 870492a..0000000 --- a/modules/by-name/ma/mastodon/patches/0001-feat-treewide-Increase-character-limit-to-5000-in-me.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 265bc7b12ab8229225b13565a361051b9e120792 Mon Sep 17 00:00:00 2001 -From: Benedikt Peetz <benedikt.peetz@b-peetz.de> -Date: Tue, 7 Jul 2026 11:34:50 +0200 -Subject: [PATCH] feat(treewide): Increase character limit to 5000 in messages - -The default of 500 was just not enough. ---- - .../features/compose/containers/compose_form_container.js | 2 +- - app/validators/status_length_validator.rb | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/app/javascript/mastodon/features/compose/containers/compose_form_container.js b/app/javascript/mastodon/features/compose/containers/compose_form_container.js -index c5cffff10d..2172a0ad8f 100644 ---- a/app/javascript/mastodon/features/compose/containers/compose_form_container.js -+++ b/app/javascript/mastodon/features/compose/containers/compose_form_container.js -@@ -58,7 +58,7 @@ const mapStateToProps = state => ({ - && !state.getIn(['settings', 'dismissed_banners', PRIVATE_QUOTE_MODAL_ID]), - isInReply: state.getIn(['compose', 'in_reply_to']) !== null, - lang: state.getIn(['compose', 'language']), -- maxChars: state.getIn(['server', 'server', 'item', 'configuration', 'statuses', 'max_characters'], 500), -+ maxChars: state.getIn(['server', 'server', 'item', 'configuration', 'statuses', 'max_characters'], 5000), - }); - - const mapDispatchToProps = (dispatch, props) => ({ -diff --git a/app/validators/status_length_validator.rb b/app/validators/status_length_validator.rb -index 575aaf1869..ecefca6fe9 100644 ---- a/app/validators/status_length_validator.rb -+++ b/app/validators/status_length_validator.rb -@@ -1,7 +1,7 @@ - # frozen_string_literal: true - - class StatusLengthValidator < ActiveModel::Validator -- MAX_CHARS = 500 -+ MAX_CHARS = 5000 - URL_PLACEHOLDER_CHARS = 23 - URL_PLACEHOLDER = 'x' * 23 - --- -2.54.0 - diff --git a/modules/by-name/ma/matrix/module.nix b/modules/by-name/ma/matrix/module.nix deleted file mode 100644 index 39631ef..0000000 --- a/modules/by-name/ma/matrix/module.nix +++ /dev/null @@ -1,181 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.vhack.matrix; - clientConfig."m.homeserver".base_url = "https://${cfg.fqdn}"; - serverConfig."m.server" = "${cfg.fqdn}:443"; - mkWellKnown = data: '' - add_header Content-Type application/json; - add_header Access-Control-Allow-Origin *; - return 200 '${builtins.toJSON data}'; - ''; -in { - options.vhack.matrix = { - enable = lib.mkEnableOption "matrix setup based on synapse"; - fqdn = lib.mkOption { - type = lib.types.str; - description = "The FQDN on which matrix-synapse should be served."; - example = "matrix.vhack.eu"; - }; - url = lib.mkOption { - type = lib.types.str; - description = "The url the matrix-server should be known under."; - }; - sharedSecretFile = lib.mkOption { - type = lib.types.path; - description = "The age encrypted shared secret file for synapse, passed to agenix"; - }; - }; - - config = lib.mkIf cfg.enable { - age.secrets.matrix-synapse_registration_shared_secret = { - file = cfg.sharedSecretFile; - mode = "700"; - owner = "matrix-synapse"; - group = "matrix-synapse"; - }; - networking.firewall.allowedTCPPorts = [80 443]; - - vhack = { - persist.directories = [ - { - directory = "/var/lib/matrix"; - user = "matrix-synapse"; - group = "matrix-synapse"; - mode = "0700"; - } - { - directory = "/var/lib/mautrix-whatsapp"; - user = "mautrix-whatsapp"; - group = "matrix-synapse"; - mode = "0750"; - } - ]; - - postgresql.enable = true; - nginx.enable = true; - }; - - systemd = { - tmpfiles.rules = [ - "d /etc/matrix 0755 matrix-synapse matrix-synapse" - ]; - # TODO: Do we still need this? <2025-12-18> - # The `$PSQL` env var seemed to go away between the 25.05 -> 25.11 update - # services.postgresql.postStart = '' - # $PSQL -tAc "ALTER ROLE \"matrix-synapse\" WITH PASSWORD 'synapse';" - # $PSQL -tAc "ALTER ROLE \"mautrix-whatsapp\" WITH PASSWORD 'whatsapp';" - # ''; - }; - - services = { - postgresql = { - enable = true; - ensureUsers = [ - { - name = "matrix-synapse"; - ensureDBOwnership = true; - } - { - name = "mautrix-whatsapp"; - ensureDBOwnership = true; - } - ]; - ensureDatabases = [ - "matrix-synapse" - "mautrix-whatsapp" - ]; - }; - - nginx = { - enable = true; - recommendedTlsSettings = true; - recommendedOptimisation = true; - recommendedGzipSettings = true; - recommendedProxySettings = true; - virtualHosts = { - "${cfg.url}" = { - enableACME = true; - forceSSL = true; - locations = { - "/.well-known/matrix/server".extraConfig = mkWellKnown serverConfig; - "/.well-known/matrix/client".extraConfig = mkWellKnown clientConfig; - }; - }; - "${cfg.fqdn}" = { - enableACME = true; - forceSSL = true; - locations = { - "/".return = "404"; - "/_matrix".proxyPass = "http://[::1]:8008"; - "/_synapse/client".proxyPass = "http://[::1]:8008"; - }; - }; - }; - }; - - mautrix-whatsapp = { - # FIXME(@bpeetz): This was disabled because `mautrix-whatsapp` dependends on libolm. - # Re-enable it, when this has changed. <2024-09-06> - enable = false; - settings = { - appservice = { - database = { - type = "postgres"; - uri = "postgres:///mautrix-whatsapp?host=/run/postgresql"; - }; - whatsapp = { - # TODO: See https://github.com/tulir/whatsmeow/blob/efc632c008604016ddde63bfcfca8de4e5304da9/binary/proto/def.proto#L43-L64 for a list. - # This also determines the WhatsApp icon - browser_name = "unknown"; - }; - }; - homeserver.address = "https://${cfg.fqdn}"; - bridge.permissions = { - "@soispha:vhack.eu" = "admin"; - "@sils:vhack.eu" = "admin"; - "@nightingale:vhack.eu" = "admin"; - }; - }; - }; - - matrix-synapse = { - enable = true; - dataDir = "/var/lib/matrix"; - configFile = "/etc/matrix/matrix.conf"; - settings = { - media_store_path = "/var/lib/matrix/media_store"; - registration_shared_secret_path = "${config.age.secrets.matrix-synapse_registration_shared_secret.path}"; - server_name = cfg.url; - listeners = [ - { - port = 8008; - bind_addresses = ["::1"]; - type = "http"; - tls = false; - x_forwarded = true; - resources = [ - { - names = ["client" "federation"]; - compress = true; - } - ]; - } - ]; - }; - }; - }; - users = { - users = { - matrix-synapse.uid = config.vhack.constants.ids.uids.matrix-synapse; - mautrix-whatsapp = { - uid = config.vhack.constants.ids.uids.mautrix-whatsapp; - group = "matrix-synapse"; - }; - }; - groups.matrix-synapse.gid = config.vhack.constants.ids.gids.matrix-synapse; - }; - }; -} diff --git a/modules/by-name/mi/miniflux/module.nix b/modules/by-name/mi/miniflux/module.nix deleted file mode 100644 index 0075bca..0000000 --- a/modules/by-name/mi/miniflux/module.nix +++ /dev/null @@ -1,55 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.vhack.miniflux; -in { - options.vhack.miniflux = { - enable = lib.mkEnableOption "miniflux, an simple web rss reading software"; - domain = lib.mkOption { - type = lib.types.str; - description = "The primary domain miniflux should be served on"; - }; - extraDomains = lib.mkOption { - type = lib.types.listOf lib.types.str; - description = "Additional domains to serve miniflux on"; - default = []; - }; - adminCredentialsFile = lib.mkOption { - type = lib.types.path; - description = "The age encrypted admin credentials file passed to agenix"; - }; - }; - config = lib.mkIf cfg.enable { - age.secrets = { - minifluxAdmin = { - file = cfg.adminCredentialsFile; - mode = "700"; - owner = "root"; - group = "root"; - }; - }; - services.miniflux = { - enable = true; - config = { - LISTEN_ADDR = "127.0.0.1:5892"; - }; - adminCredentialsFile = config.age.secrets.minifluxAdmin.path; - }; - - vhack = { - nginx.enable = true; - postgresql.enable = true; - }; - services.nginx = { - virtualHosts.${cfg.domain} = { - locations."/".proxyPass = "http://${config.services.miniflux.config.LISTEN_ADDR}"; - - enableACME = true; - forceSSL = true; - serverAliases = cfg.extraDomains; - }; - }; - }; -} diff --git a/modules/by-name/mo/monitoring/components/grafana.nix b/modules/by-name/mo/monitoring/components/grafana.nix deleted file mode 100644 index 6fe5b70..0000000 --- a/modules/by-name/mo/monitoring/components/grafana.nix +++ /dev/null @@ -1,309 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - cfg = config.vhack.monitoring.grafana; -in { - options.vhack.monitoring.grafana = { - enable = lib.mkEnableOption "grafana"; - - orgId = lib.mkOption { - type = lib.types.int; - description = "Org ID where all vhack related config will be stored."; - default = 1; - }; - - contactPoints = lib.mkOption { - type = lib.types.listOf lib.types.str; - description = "List of email addresses to send alerts to"; - default = []; - }; - - dashboards = lib.mkOption { - type = lib.types.listOf lib.types.path; - description = "dashboards to provision under 'Vhack' folder."; - default = []; - }; - - fqdn = lib.mkOption { - type = lib.types.str; - description = "Domain under which Grafana will be served."; - example = "grafana.example.org"; - }; - - adminPassword = lib.mkOption { - type = lib.types.path; - description = "The age-encrypted initial admin password; passed to agenix"; - }; - - secretKey = lib.mkOption { - type = lib.types.path; - description = "The age-encrypted secret key, used for signing; passed to agenix"; - }; - - port = lib.mkOption { - type = lib.types.port; - description = "Port where Grafana listens to HTTP requests."; - default = 3000; - }; - - debugLog = lib.mkOption { - type = lib.types.bool; - description = "Set to true to enable debug logging of the infrastructure serving Grafana."; - default = false; - example = true; - }; - - smtp = lib.mkOption { - description = "SMTP options."; - default = null; - type = lib.types.nullOr ( - lib.types.submodule { - options = { - from_address = lib.mkOption { - type = lib.types.str; - description = "SMTP address from which the emails originate."; - example = "vaultwarden@mydomain.com"; - }; - from_name = lib.mkOption { - type = lib.types.str; - description = "SMTP name from which the emails originate."; - default = "Grafana"; - }; - host = lib.mkOption { - type = lib.types.str; - description = "SMTP host to send the emails to."; - }; - port = lib.mkOption { - type = lib.types.port; - description = "SMTP port to send the emails to."; - default = 25; - }; - username = lib.mkOption { - type = lib.types.str; - description = "Username to connect to the SMTP host."; - }; - passwordFile = lib.mkOption { - type = lib.types.str; - description = "File containing the password to connect to the SMTP host."; - }; - }; - } - ); - }; - }; - - config = lib.mkIf cfg.enable { - assertions = [ - { - assertion = builtins.length cfg.contactPoints > 0; - message = "Must have at least one contact point for alerting"; - } - ]; - - age.secrets = { - grafanaInitialAdminPw = { - file = cfg.adminPassword; - mode = "0700"; - owner = "grafana"; - group = "grafana"; - }; - grafanaSecretKey = { - file = cfg.secretKey; - mode = "0700"; - owner = "grafana"; - group = "grafana"; - }; - }; - - users = { - groups = { - grafana = { - gid = config.vhack.constants.ids.gids.grafana; - }; - }; - users = { - grafana = { - isSystemUser = true; - group = "grafana"; - uid = lib.mkForce config.vhack.constants.ids.uids.grafana; - }; - }; - }; - - vhack = { - postgresql.enable = true; - - persist.directories = [ - { - directory = "/var/lib/grafana/"; - user = "grafana"; - group = "grafana"; - mode = "0700"; - } - ]; - - monitoring.grafana.dashboards = [ - ../dashboards/node_exporter.json - ../dashboards/performance.json - ../dashboards/scraping_jobs.json - ../dashboards/systemd_exporter.json - ]; - - anubis.instances."${cfg.fqdn}".target = "http://${config.services.grafana.settings.server.http_addr}:${toString cfg.port}"; - }; - - services = { - postgresql = { - ensureUsers = [ - { - name = "grafana"; - ensureDBOwnership = true; - } - ]; - ensureDatabases = [ - "grafana" - ]; - }; - - grafana = { - enable = true; - - settings = { - database = { - host = "/run/postgresql"; - user = "grafana"; - name = "grafana"; - type = "postgres"; - }; - - security = { - secret_key = "$__file{${config.age.secrets.grafanaSecretKey.path}}"; - - disable_initial_admin_creation = false; - admin_password = "$__file{${config.age.secrets.grafanaInitialAdminPw.path}}"; - }; - - server = { - http_addr = "127.0.0.1"; - http_port = cfg.port; - domain = cfg.fqdn; - root_url = "https://${cfg.fqdn}"; - router_logging = cfg.debugLog; - }; - - smtp = lib.mkIf (!(isNull cfg.smtp)) { - enabled = true; - inherit (cfg.smtp) from_address from_name; - host = "${cfg.smtp.host}:${toString cfg.smtp.port}"; - user = cfg.smtp.username; - password = "$__file{${cfg.smtp.passwordFile}}"; - }; - }; - - provision = { - dashboards.settings = lib.mkIf (cfg.dashboards != []) { - apiVersion = 1; - providers = [ - { - folder = "Vhack"; - options.path = pkgs.symlinkJoin { - name = "dashboards"; - paths = map (p: pkgs.runCommand "dashoard" {} "mkdir $out; cp ${p} $out") cfg.dashboards; - }; - allowUiUpdates = true; - disableDeletion = true; - } - ]; - }; - datasources.settings = { - apiVersion = 1; - datasources = [ - { - inherit (cfg) orgId; - name = "Prometheus"; - type = "prometheus"; - url = "http://127.0.0.1:${toString config.services.prometheus.port}"; - uid = "df80f9f5-97d7-4112-91d8-72f523a02b09"; - isDefault = true; - version = 1; - } - { - inherit (cfg) orgId; - name = "Loki"; - type = "loki"; - url = "http://127.0.0.1:${toString config.services.loki.configuration.server.http_listen_port}"; - uid = "cd6cc53e-840c-484d-85f7-96fede324006"; - version = 1; - } - ]; - deleteDatasources = [ - { - inherit (cfg) orgId; - name = "Prometheus"; - } - { - inherit (cfg) orgId; - name = "Loki"; - } - ]; - }; - alerting = { - contactPoints.settings = { - apiVersion = 1; - contactPoints = [ - { - inherit (cfg) orgId; - name = "grafana-default-email"; - receivers = lib.optionals ((builtins.length cfg.contactPoints) > 0) [ - { - uid = "sysadmin"; - type = "email"; - settings.addresses = lib.concatStringsSep ";" cfg.contactPoints; - } - ]; - } - ]; - }; - policies.settings = { - apiVersion = 1; - policies = [ - { - inherit (cfg) orgId; - receiver = "grafana-default-email"; - group_by = [ - "grafana_folder" - "alertname" - ]; - group_wait = "30s"; - group_interval = "5m"; - repeat_interval = "4h"; - } - ]; - # resetPolicies seems to happen after setting the above policies, effectively rolling back - # any updates. - }; - rules.settings = let - rules = builtins.fromJSON (builtins.readFile ../rules.json); - in { - apiVersion = 1; - groups = [ - { - inherit (cfg) orgId; - name = "SysAdmin"; - folder = "Vhack"; - interval = "10m"; - inherit rules; - } - ]; - # deleteRules seems to happen after creating the above rules, effectively rolling back - # any updates. - }; - }; - }; - }; - }; - }; -} diff --git a/modules/by-name/mo/monitoring/components/loki.nix b/modules/by-name/mo/monitoring/components/loki.nix deleted file mode 100644 index 149e577..0000000 --- a/modules/by-name/mo/monitoring/components/loki.nix +++ /dev/null @@ -1,170 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - cfg = config.vhack.monitoring.loki; -in { - options.vhack.monitoring.loki = { - enable = lib.mkEnableOption "loki"; - - port = lib.mkOption { - type = lib.types.port; - description = "Port where Loki listens to HTTP requests."; - default = 3002; - }; - }; - - config = lib.mkIf cfg.enable { - vhack = { - persist.directories = [ - { - directory = "/var/lib/loki"; - user = "loki"; - group = "loki"; - mode = "0700"; - } - { - directory = "/var/lib/fluent-bit"; - user = "fluent-bit"; - group = "fluent-bit"; - mode = "0700"; - } - ]; - }; - - users = { - groups = { - fluent-bit = { - gid = config.vhack.constants.ids.gids.fluent-bit; - }; - loki = { - gid = config.vhack.constants.ids.gids.loki; - }; - }; - users = { - fluent-bit = { - isSystemUser = true; - group = "fluent-bit"; - uid = config.vhack.constants.ids.uids.fluent-bit; - }; - loki = { - isSystemUser = true; - group = "loki"; - uid = config.vhack.constants.ids.uids.loki; - }; - }; - }; - - # I decided to switch to fluent-bit because it can be tested locally https://docs.fluentbit.io/manual/local-testing/logging-pipeline - systemd.services.fluent-bit = { - serviceConfig = { - StateDirectory = "fluent-bit"; - User = "fluent-bit"; - Group = "fluent-bit"; - DynamicUser = lib.mkForce false; - }; - }; - services = { - fluent-bit = { - enable = true; - settings = { - service = { - flush = 1; - log_level = "info"; - http_server = "true"; - http_listen = "127.0.0.1"; - http_port = 9080; - grace = 30; - }; - - pipeline = { - inputs = [ - { - name = "systemd"; - - # The asterisk appends the _SYSTEMD_UNIT to the prefix. - tag = "systemd.*"; - - # Read logs from this systemd journal directory. - path = "/var/log/journal"; - - # Database file to keep track of the journald cursor. - db = "/var/lib/fluent-bit/systemd.db"; - - # Start reading new entries. Skip entries already stored in journald. - read_from_tail = true; - - # Max entries to lookback on start. - max_entries = 10000; - } - ]; - - outputs = [ - { - name = "loki"; - - match = "systemd.*"; - - host = "localhost"; - port = config.services.loki.configuration.server.http_listen_port; - - labels = lib.concatMapAttrsStringSep ", " (n: v: "${n}=${v}") { - job = "systemd-journal"; - inherit (config.vhack.monitoring.grafana) fqdn; - hostname = config.networking.hostName; - }; - - label_keys = "$unit"; - } - ]; - }; - }; - graceLimit = "1m"; - }; - - loki = { - enable = true; - dataDir = "/var/lib/loki"; - package = pkgs.grafana-loki; - configuration = { - auth_enabled = false; - - server.http_listen_port = cfg.port; - - common = { - ring = { - instance_addr = "127.0.0.1"; - kvstore = { - store = "inmemory"; - }; - }; - - replication_factor = 1; - path_prefix = "/tmp/loki"; - }; - - schema_config = { - configs = [ - { - from = "2020-05-15"; - store = "tsdb"; - object_store = "filesystem"; - schema = "v13"; - index = { - prefix = "index_"; - period = "24h"; - }; - } - ]; - }; - - storage_config = { - filesystem.directory = "/tmp/loki/chunks"; - }; - }; - }; - }; - }; -} diff --git a/modules/by-name/mo/monitoring/components/perses.nix b/modules/by-name/mo/monitoring/components/perses.nix deleted file mode 100644 index b0f1ab6..0000000 --- a/modules/by-name/mo/monitoring/components/perses.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - cfg = config.vhack.monitoring.perses; -in { - options.vhack.monitoring.perses = { - enable = lib.mkEnableOption "perses"; - }; - config = lib.mkIf cfg.enable { - services.perses = { - enable = true; - }; - }; -} diff --git a/modules/by-name/mo/monitoring/components/prometheus.nix b/modules/by-name/mo/monitoring/components/prometheus.nix deleted file mode 100644 index ca947d3..0000000 --- a/modules/by-name/mo/monitoring/components/prometheus.nix +++ /dev/null @@ -1,272 +0,0 @@ -{ - lib, - config, - nixLib, - ... -}: let - cfg = config.vhack.monitoring.prometheus; - - commonLabels = { - hostname = config.networking.hostName; - }; - - prom_cfg = config.services.prometheus; -in { - options.vhack.monitoring.prometheus = { - enable = lib.mkEnableOption "prometheus"; - - port = lib.mkOption { - type = lib.types.port; - description = "Port where Prometheus listens to HTTP requests."; - default = 3001; - }; - - remoteWriteReceiver = lib.mkOption { - example = "https://prometheus.server2.vhack.eu"; - type = lib.types.nullOr lib.types.str; - default = null; - description = '' - If not null, this prometheus server will be exposed via a reverse proxy and allow - other prometheus servers to write metrics to it. - ''; - }; - remoteWriteTo = lib.mkOption { - example = "https://prometheus.server3.vhack.eu"; - type = lib.types.nullOr (lib.types.submodule { - options = { - port = lib.mkOption { - type = lib.types.nullOr lib.types.port; - default = null; - }; - url = lib.mkOption { - type = lib.types.str; - }; - }; - }); - default = null; - description = '' - If not null, this prometheus server will run in agent mode, writing all recived - metrics to the specified remote prometheus server. - ''; - }; - - sources = lib.mkOption { - type = lib.types.listOf (lib.types.submodule { - options = { - name = lib.mkOption { - type = lib.types.str; - }; - target = lib.mkOption { - type = lib.types.str; - description = "The target url to scrape from."; - }; - extra = lib.mkOption { - type = lib.types.attrsOf lib.types.anything; - }; - }; - }); - }; - }; - - config = lib.mkIf cfg.enable { - vhack = { - nginx.enable = true; - - persist.directories = [ - { - directory = "/var/lib/prometheus2"; - user = "prometheus"; - group = "prometheus"; - mode = "0700"; - } - ]; - - monitoring.prometheus.sources = [ - { - name = "node"; - target = "127.0.0.1:${toString prom_cfg.exporters.node.port}"; - } - { - name = "prometheus_internal"; - target = "127.0.0.1:${toString prom_cfg.port}"; - } - { - name = "systemd"; - target = "127.0.0.1:${toString prom_cfg.exporters.systemd.port}"; - } - ]; - }; - - services.nginx = lib.mkIf (cfg.remoteWriteReceiver != null) { - virtualHosts.${cfg.remoteWriteReceiver} = { - locations."/" = { - proxyPass = "http://127.0.0.1:${toString cfg.port}/api/v1/write"; - - recommendedProxySettings = true; - proxyWebsockets = true; - }; - - enableACME = true; - forceSSL = true; - }; - }; - - users = { - groups = { - node-exporter.gid = config.vhack.constants.ids.gids.node-exporter; - }; - users = { - node-exporter = { - isSystemUser = true; - group = "node-exporter"; - uid = config.vhack.constants.ids.uids.node-exporter; - }; - }; - }; - - services = { - prometheus = { - enable = true; - inherit (cfg) port; - - globalConfig = { - scrape_interval = "15s"; - }; - remoteWrite = lib.optionals (cfg.remoteWriteTo != null) [ - { - url = let - port = - if (cfg.remoteWriteTo.port != null) - then ":${toString cfg.remoteWriteTo.port}" - else ""; - in "${cfg.remoteWriteTo.url}${port}"; - # TODO: Needs RFC42 for prometheus <2026-07-19> - # protobuf_message = "io.prometheus.write.v2.Request"; - } - ]; - - enableAgentMode = cfg.remoteWriteTo != null; - extraFlags = lib.mkMerge [ - ( - lib.mkIf (cfg.remoteWriteReceiver != null) [ - "--web.enable-remote-write-receiver" - # "--web.remote-write-receiver.accepted-protobuf-messages=io.prometheus.write.v2.Request" - ] - ) - ]; - - scrapeConfigs = builtins.map (attr: - nixLib.warnMerge { - job_name = attr.name; - static_configs = [ - { - targets = [attr.target]; - labels = commonLabels; - } - ]; - } - attr.extra "prometheus scrapeConfig '${attr.name}'") - cfg.sources; - # ++ (lib.optional (builtins.length (lib.attrNames config.services.redis.servers) > 0) { - # job_name = "redis"; - # static_configs = [ - # { - # targets = ["127.0.0.1:${toString config.services.prometheus.exporters.redis.port}"]; - # } - # ]; - # }) ++ (lib.optional (builtins.length (lib.attrNames config.services.openvpn.servers) > 0) { - # job_name = "openvpn"; - # static_configs = [ - # { - # targets = ["127.0.0.1:${toString config.services.prometheus.exporters.openvpn.port}"]; - # } - # ]; - # }) - # ++ (lib.optional config.services.dnsmasq.enable { - # job_name = "dnsmasq"; - # static_configs = [ - # { - # targets = ["127.0.0.1:${toString config.services.prometheus.exporters.dnsmasq.port}"]; - # labels = commonLabels; - # } - # ]; - # }); - - exporters = { - node = { - enable = true; - # https://github.com/prometheus/node_exporter#collectors - enabledCollectors = [ - "arp" - "cpu" - "cpufreq" - "diskstats" - "dmi" - "edac" - "entropy" - "filefd" - "filesystem" - "hwmon" - "loadavg" - "meminfo" - "netclass" - "netdev" - "netstat" - "nvme" - "os" - "pressure" - "rapl" - "schedstat" - "stat" - "thermal_zone" - "time" - "uname" - "vmstat" - "zfs" - - # Disabled by default - "cgroups" - "drm" - "ethtool" - "logind" - "wifi" - ]; - port = 9112; - listenAddress = "127.0.0.1"; - }; - # services.prometheus.exporters.redis = lib.mkIf (builtins.length (lib.attrNames config.services.redis.servers) > 0) { - # enable = true; - # port = 9119; - # listenAddress = "127.0.0.1"; - # }; - # services.prometheus.exporters.openvpn = lib.mkIf (builtins.length (lib.attrNames config.services.openvpn.servers) > 0) { - # enable = true; - # port = 9121; - # listenAddress = "127.0.0.1"; - # statusPaths = lib.mapAttrsToList (name: _config: "/tmp/openvpn/${name}.status") config.services.openvpn.servers; - # }; - # dnsmasq = lib.mkIf config.services.dnsmasq.enable { - # enable = true; - # port = 9211; - # listenAddress = "127.0.0.1"; - # }; - systemd = { - enable = true; - port = 9116; - listenAddress = "127.0.0.1"; - extraFlags = [ - "--log.level=info" - "--web.disable-exporter-metrics" - # "--systemd.collector.enable-resolved" - "--systemd.collector.enable-restart-count" - # "--systemd.collector.enable-file-descriptor-size" - "--systemd.collector.enable-ip-accounting" - "--systemd.collector.unit-include=\".+\"" - "--systemd.collector.unit-exclude=\".+\\\\.(device)\"" - ]; - }; - }; - }; - }; - }; -} diff --git a/modules/by-name/mo/monitoring/components/scrutiny.nix b/modules/by-name/mo/monitoring/components/scrutiny.nix deleted file mode 100644 index adb515e..0000000 --- a/modules/by-name/mo/monitoring/components/scrutiny.nix +++ /dev/null @@ -1,100 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: let - cfg = config.vhack.monitoring.scrutiny; -in { - options.vhack.monitoring.scrutiny = { - enable = lib.mkEnableOption "scrutiny service"; - }; - - # We don't currently _care_ about the health of the hardware, because hetzner does - # this for us (nor can we care, because it's not exposed in the VPS) - config = lib.mkIf false { - vhack.monitoring = { - prometheus.sources = [ - { - name = "scrutiny"; - extra.metrics_path = "/api/metrics"; - target = "127.0.0.1:${toString config.services.scrutiny.settings.web.listen.port}"; - } - { - name = "smartctl"; - target = "127.0.0.1:${toString config.services.prometheus.exporters.smartctl.port}"; - } - ]; - grafana.dashboards = [ - ../dashboards/Health.json - ]; - }; - - users = { - groups = { - smartctl-exporter-access.gid = config.vhack.constants.ids.gids.smartctl-exporter-access; - }; - users = { - smartctl-exporter-access = { - isSystemUser = true; - group = "smartctl-exporter-access"; - uid = config.vhack.constants.ids.uids.smartctl-exporter-access; - }; - }; - }; - - services = { - scrutiny = { - enable = true; - - openFirewall = false; - - # This src includes Prometheus metrics exporter. - package = pkgs.scrutiny.overrideAttrs { - src = pkgs.fetchFromGitHub { - owner = "ibizaman"; - repo = "scrutiny"; - rev = "74faf06f77df83f29e7e1806cd88b2fafc0bbb82"; - hash = "sha256-r0AVWL+E046xHxitwMPfRNTOpjuOk+W6tB41YgmLTPg="; - }; - - vendorHash = "sha256-kAlnlWnBMFCdgdak5L5hRquRtyLi5MTmDa/kxwqPs4E="; - }; - - settings = { - web = { - metrics.enabled = true; # Enables Prometheus exporter - listenHost = "127.0.0.1"; - }; - }; - - collector = { - enable = true; - }; - }; - prometheus = { - exporters.smartctl = { - enable = true; - port = 9115; - listenAddress = "127.0.0.1"; - }; - }; - }; - - # nixpkgs.overlays = [ - # (final: prev: { - # prometheus-systemd-exporter = prev.prometheus-systemd-exporter.overrideAttrs { - # src = final.fetchFromGitHub { - # owner = "ibizaman"; - # repo = prev.prometheus-systemd-exporter.pname; - # # rev = "v${prev.prometheus-systemd-exporter.version}"; - # rev = "next_timer"; - # sha256 = "sha256-jzkh/616tsJbNxFtZ0xbdBQc16TMIYr9QOkPaeQw8xA="; - # }; - # - # vendorHash = "sha256-4hsQ1417jLNOAqGkfCkzrmEtYR4YLLW2j0CiJtPg6GI="; - # }; - # }) - # ]; - }; -} diff --git a/modules/by-name/mo/monitoring/dashboards/node_exporter.json b/modules/by-name/mo/monitoring/dashboards/node_exporter.json deleted file mode 100644 index 1666125..0000000 --- a/modules/by-name/mo/monitoring/dashboards/node_exporter.json +++ /dev/null @@ -1,21817 +0,0 @@ -{ - "apiVersion": "dashboard.grafana.app/v2", - "kind": "Dashboard", - "metadata": { - "name": "rYdddlPWk", - "namespace": "default", - "uid": "b3cd6890-d44d-45c4-8b59-b822bf2ff401", - "resourceVersion": "1784467637439232", - "generation": 1, - "creationTimestamp": "2026-07-19T13:27:17Z", - "labels": { - "grafana.app/deprecatedInternalID": "2674631701774336" - }, - "annotations": { - "grafana.app/createdBy": "user:dfsj9uc3855oga", - "grafana.app/folder": "", - "grafana.app/saved-from-ui": "Grafana v13.0.3 (NA)" - } - }, - "spec": { - "annotations": [ - { - "kind": "AnnotationQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "datasource", - "version": "v0", - "datasource": { - "name": "grafana" - }, - "spec": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - } - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "builtIn": true, - "legacyOptions": { - "type": "dashboard" - } - } - } - ], - "cursorSync": "Crosshair", - "editable": true, - "elements": { - "panel-104": { - "kind": "Panel", - "spec": { - "id": 104, - "title": "TCP Errors", - "description": "Tracks various TCP error and congestion-related events, including retransmissions, timeouts, dropped connections, and buffer issues", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_netstat_TcpExt_ListenOverflows{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "Listen Overflows", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_netstat_TcpExt_ListenDrops{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "Listen Drops", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_netstat_TcpExt_TCPSynRetrans{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "SYN Retransmits", - "range": true, - "step": 240 - } - }, - "refId": "C", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_netstat_Tcp_RetransSegs{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "interval": "", - "legendFormat": "Segment Retransmits", - "range": true - } - }, - "refId": "D", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_netstat_Tcp_InErrs{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "interval": "", - "legendFormat": "Receive Errors", - "range": true - } - }, - "refId": "E", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_netstat_Tcp_OutRsts{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "interval": "", - "legendFormat": "RST Sent", - "range": true - } - }, - "refId": "F", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_netstat_TcpExt_TCPRcvQDrop{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "interval": "", - "legendFormat": "Receive Queue Drops", - "range": true - } - }, - "refId": "G", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_netstat_TcpExt_TCPOFOQueue{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "interval": "", - "legendFormat": "Out-of-order Queued", - "range": true - } - }, - "refId": "H", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_netstat_TcpExt_TCPTimeouts{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "interval": "", - "legendFormat": "TCP Timeouts", - "range": true - } - }, - "refId": "I", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "pps", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-109": { - "kind": "Panel", - "spec": { - "id": 109, - "title": "UDP Errors", - "description": "Rate of UDP and UDPLite datagram delivery errors, including missing listeners, buffer overflows, and protocol-specific issues", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_netstat_Udp_InErrors{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "UDP Rx in Errors", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_netstat_Udp_NoPorts{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "UDP No Listener", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_netstat_UdpLite_InErrors{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "interval": "", - "legendFormat": "UDPLite Rx in Errors", - "range": true - } - }, - "refId": "C", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_netstat_Udp_RcvbufErrors{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "UDP Rx in Buffer Errors", - "range": true, - "step": 240 - } - }, - "refId": "D", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_netstat_Udp_SndbufErrors{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "UDP Tx out Buffer Errors", - "range": true, - "step": 240 - } - }, - "refId": "E", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "pps", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-115": { - "kind": "Panel", - "spec": { - "id": 115, - "title": "ICMP In / Out", - "description": "Number of ICMP messages sent and received per second, including error and control messages", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_netstat_Icmp_InMsgs{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "ICMP Rx in", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_netstat_Icmp_OutMsgs{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "ICMP Tx out", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "pps", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "out (-) / in (+)", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*out.*/" - }, - "properties": [ - { - "id": "custom.transform", - "value": "negative-Y" - } - ] - } - ] - } - } - } - } - }, - "panel-124": { - "kind": "Panel", - "spec": { - "id": 124, - "title": "Sockstat UDP", - "description": "Number of UDP and UDPLite sockets currently in use", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_sockstat_UDPLITE_inuse{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "UDPLite - In-Use Sockets", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_sockstat_UDP_inuse{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "UDP - In-Use Sockets", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "width": 300 - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-125": { - "kind": "Panel", - "spec": { - "id": 125, - "title": "Sockstat FRAG / RAW", - "description": "Number of FRAG and RAW sockets currently in use. RAW sockets are used for custom protocols or tools like ping; FRAG sockets are used internally for IP packet defragmentation", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_sockstat_FRAG_inuse{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "FRAG - In-Use Sockets", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_sockstat_RAW_inuse{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "RAW - In-Use Sockets", - "range": true, - "step": 240 - } - }, - "refId": "C", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "width": 300 - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-126": { - "kind": "Panel", - "spec": { - "id": 126, - "title": "Sockstat Used", - "description": "Total number of sockets currently in use across all protocols (TCP, UDP, UNIX, etc.), as reported by /proc/net/sockstat", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_sockstat_sockets_used{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "Total sockets", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "width": 300 - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-127": { - "kind": "Panel", - "spec": { - "id": 127, - "title": "Disk I/O Utilization", - "description": "Percentage of time the disk was actively processing I/O operations", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_disk_io_time_seconds_total{instance=\"$node\",job=\"$job\",device=~\"[a-z]+|nvme[0-9]+n[0-9]+|mmcblk[0-9]+\"} [$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "{{device}}", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "percentunit", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 40, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-128": { - "kind": "Panel", - "spec": { - "id": 128, - "title": "Memory DirectMap", - "description": "How much memory is directly mapped in the kernel using different page sizes (4K, 2M, 1G). Helps monitor large page utilization in the direct map region", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_DirectMap1G_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "DirectMap 1G – Memory mapped with 1GB pages", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_DirectMap2M_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "DirectMap 2M – Memory mapped with 2MB pages", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_DirectMap4k_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "DirectMap 4K – Memory mapped with 4KB pages", - "range": true, - "step": 240 - } - }, - "refId": "C", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "bytes", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-129": { - "kind": "Panel", - "spec": { - "id": 129, - "title": "Memory Anonymous", - "description": "Memory used by anonymous pages (not backed by files), including standard and huge page allocations. Includes heap, stack, and memory-mapped anonymous regions", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_AnonHugePages_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "AnonHugePages – Anonymous memory using HugePages", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_AnonPages_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "AnonPages – Anonymous memory (non-file-backed)", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "bytes", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-130": { - "kind": "Panel", - "spec": { - "id": 130, - "title": "Memory Writeback and Dirty", - "description": "Memory currently dirty (modified but not yet written to disk), being actively written back, or held by writeback buffers. High dirty or writeback memory may indicate disk I/O pressure or delayed flushing", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_Writeback_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "Writeback – Memory currently being flushed to disk", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_WritebackTmp_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "WritebackTmp – FUSE temporary writeback buffers", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_Dirty_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "Dirty – Memory marked dirty (pending write to disk)", - "range": true, - "step": 240 - } - }, - "refId": "C", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_NFS_Unstable_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "NFS Unstable – Pages sent to NFS server, awaiting storage commit", - "range": true, - "step": 240 - } - }, - "refId": "D", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "bytes", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-131": { - "kind": "Panel", - "spec": { - "id": 131, - "title": "Memory Slab", - "description": "Kernel slab memory usage, separated into reclaimable and non-reclaimable categories. Reclaimable memory can be freed under memory pressure (e.g., caches), while unreclaimable memory is locked by the kernel for core functions", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_SUnreclaim_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "SUnreclaim – Non-reclaimable slab memory (kernel objects)", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_SReclaimable_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "SReclaimable – Potentially reclaimable slab memory (e.g., inode cache)", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "bytes", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-133": { - "kind": "Panel", - "spec": { - "id": 133, - "title": "Disk R/W Merged", - "description": "Number of read and write requests merged per second that were queued to the device", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_disk_reads_merged_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "legendFormat": "{{device}} - Read", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_disk_writes_merged_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "legendFormat": "{{device}} - Write", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "iops", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "read (–) / write (+)", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*Read.*/" - }, - "properties": [ - { - "id": "custom.transform", - "value": "negative-Y" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/sda.*/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "orange", - "mode": "fixed" - } - } - ] - } - ] - } - } - } - } - }, - "panel-135": { - "kind": "Panel", - "spec": { - "id": 135, - "title": "Memory Committed", - "description": "Displays committed memory usage versus the system's commit limit. Exceeding the limit is allowed under Linux overcommit policies but may increase OOM risks under high load", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_Committed_AS_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "Committed_AS – Memory promised to processes (not necessarily used)", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_CommitLimit_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "CommitLimit - Max allowable committed memory", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "width": 350 - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "bytes", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*CommitLimit - *./" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#BF1B00", - "mode": "fixed" - } - }, - { - "id": "custom.fillOpacity", - "value": 0 - } - ] - } - ] - } - } - } - } - }, - "panel-136": { - "kind": "Panel", - "spec": { - "id": 136, - "title": "Memory LRU Active / Inactive (%)", - "description": "Proportion of memory pages in the kernel's active and inactive LRU lists relative to total RAM. Active pages have been recently used, while inactive pages are less recently accessed but still resident in memory", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "(node_memory_Inactive_bytes{instance=\"$node\",job=\"$job\"}) \n/ \n(node_memory_MemTotal_bytes{instance=\"$node\",job=\"$job\"})", - "format": "time_series", - "legendFormat": "Inactive – Less recently used memory, more likely to be reclaimed", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "(node_memory_Active_bytes{instance=\"$node\",job=\"$job\"}) \n/ \n(node_memory_MemTotal_bytes{instance=\"$node\",job=\"$job\"})\n", - "format": "time_series", - "legendFormat": "Active – Recently used memory, retained unless under pressure", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "width": 350 - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "percentunit", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*Active.*/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "green", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*Inactive.*/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-blue", - "mode": "fixed" - } - } - ] - } - ] - } - } - } - } - }, - "panel-137": { - "kind": "Panel", - "spec": { - "id": 137, - "title": "Memory Unevictable and MLocked", - "description": "Memory that is locked in RAM and cannot be swapped out. Includes both kernel-unevictable memory and user-level memory locked with mlock()", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_Unevictable_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "Unevictable – Kernel-pinned memory (not swappable)", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_Mlocked_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "Mlocked – Application-locked memory via mlock()", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "width": 350 - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "bytes", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-138": { - "kind": "Panel", - "spec": { - "id": 138, - "title": "Memory Shared and Mapped", - "description": "Memory used for mapped files (such as libraries) and shared memory (shmem and tmpfs), including variants backed by huge pages", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_Mapped_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "Mapped – Memory mapped from files (e.g., libraries, mmap)", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_Shmem_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "Shmem – Shared memory used by processes and tmpfs", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_ShmemHugePages_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "ShmemHugePages – Shared memory (shmem/tmpfs) allocated with HugePages", - "range": true, - "step": 240 - } - }, - "refId": "C", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_ShmemPmdMapped_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "PMD Mapped – Shmem/tmpfs backed by Transparent HugePages (PMD)", - "range": true, - "step": 240 - } - }, - "refId": "D", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "width": 350 - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "bytes", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-14": { - "kind": "Panel", - "spec": { - "id": 14, - "title": "CPU Cores", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "exemplar": false, - "expr": "count(count(node_cpu_seconds_total{instance=\"$node\",job=\"$job\"}) by (cpu))", - "instant": true, - "legendFormat": "__auto", - "range": false - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": { - "maxDataPoints": 100 - } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "stat", - "version": "11.6.1", - "spec": { - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "mappings": [ - { - "type": "special", - "options": { - "match": "null", - "result": { - "text": "N/A" - } - } - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "thresholds" - } - }, - "overrides": [] - } - } - } - } - }, - "panel-140": { - "kind": "Panel", - "spec": { - "id": 140, - "title": "Memory HugePages", - "description": "Displays HugePages memory usage in bytes, including allocated, free, reserved, and surplus memory. All values are calculated based on the number of huge pages multiplied by their configured size", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "(node_memory_HugePages_Total{instance=\"$node\",job=\"$job\"} - node_memory_HugePages_Free{instance=\"$node\",job=\"$job\"}) * node_memory_Hugepagesize_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "HugePages Used – Currently allocated", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_HugePages_Rsvd{instance=\"$node\",job=\"$job\"} * node_memory_Hugepagesize_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "HugePages Reserved – Promised but unused", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_HugePages_Surp{instance=\"$node\",job=\"$job\"} * node_memory_Hugepagesize_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "HugePages Surplus – Dynamic pool extension", - "range": true, - "step": 240 - } - }, - "refId": "C", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_HugePages_Total{instance=\"$node\",job=\"$job\"} * node_memory_Hugepagesize_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "HugePages Total – Reserved memory", - "range": true, - "step": 240 - } - }, - "refId": "D", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "bytes", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-141": { - "kind": "Panel", - "spec": { - "id": 141, - "title": "Network Traffic Compressed", - "description": "Rate of compressed network packets received and transmitted per interface. These are common in low-bandwidth or special interfaces like PPP or SLIP", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_network_receive_compressed_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "legendFormat": "{{device}} - Rx in", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_network_transmit_compressed_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "legendFormat": "{{device}} - Tx out", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "width": 300 - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "pps", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "out (-) / in (+)", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*out.*/" - }, - "properties": [ - { - "id": "custom.transform", - "value": "negative-Y" - } - ] - } - ] - } - } - } - } - }, - "panel-142": { - "kind": "Panel", - "spec": { - "id": 142, - "title": "Network Traffic Errors", - "description": "Rate of packet-level errors for each network interface. Receive errors may indicate physical or driver issues; transmit errors may reflect collisions or hardware faults", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_network_receive_errs_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "legendFormat": "{{device}} - Rx in", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_network_transmit_errs_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "legendFormat": "{{device}} - Tx out", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "width": 300 - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "pps", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "out (-) / in (+)", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*out.*/" - }, - "properties": [ - { - "id": "custom.transform", - "value": "negative-Y" - } - ] - } - ] - } - } - } - } - }, - "panel-143": { - "kind": "Panel", - "spec": { - "id": 143, - "title": "Network Traffic Drop", - "description": "Rate of dropped packets per network interface. Receive drops can indicate buffer overflow or driver issues; transmit drops may result from outbound congestion or queuing limits", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_network_receive_drop_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "legendFormat": "{{device}} - Rx in", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_network_transmit_drop_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "legendFormat": "{{device}} - Tx out", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "width": 300 - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "pps", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "out (-) / in (+)", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*out.*/" - }, - "properties": [ - { - "id": "custom.transform", - "value": "negative-Y" - } - ] - } - ] - } - } - } - } - }, - "panel-144": { - "kind": "Panel", - "spec": { - "id": 144, - "title": "Network Traffic Fifo", - "description": "Tracks FIFO buffer overrun errors on network interfaces. These occur when incoming or outgoing packets are dropped due to queue or buffer overflows, often indicating congestion or hardware limits", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_network_receive_fifo_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "legendFormat": "{{device}} - Rx in", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_network_transmit_fifo_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "legendFormat": "{{device}} - Tx out", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "width": 300 - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "pps", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "out (-) / in (+)", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*out.*/" - }, - "properties": [ - { - "id": "custom.transform", - "value": "negative-Y" - } - ] - } - ] - } - } - } - } - }, - "panel-145": { - "kind": "Panel", - "spec": { - "id": 145, - "title": "Network Traffic Frame", - "description": "Rate of frame errors on received packets, typically caused by physical layer issues such as bad cables, duplex mismatches, or hardware problems", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_network_receive_frame_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "legendFormat": "{{device}} - Rx in", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "width": 300 - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "pps", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-146": { - "kind": "Panel", - "spec": { - "id": 146, - "title": "Network Traffic Multicast", - "description": "Rate of incoming multicast packets received per network interface. Multicast is used by protocols such as mDNS, SSDP, and some streaming or cluster services", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_network_receive_multicast_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "legendFormat": "{{device}} - Rx in", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "width": 300 - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "pps", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-148": { - "kind": "Panel", - "spec": { - "id": 148, - "title": "Processes Forks", - "description": "Rate of new processes being created on the system (forks/sec).", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_forks_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "legendFormat": "Process Forks per second", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "ops", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-149": { - "kind": "Panel", - "spec": { - "id": 149, - "title": "Exporter Processes Memory", - "description": "Tracks the memory usage of the process exposing this metric (e.g., node_exporter), including current virtual memory and maximum virtual memory limit", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "process_virtual_memory_bytes{instance=\"$node\",job=\"$job\"}", - "interval": "", - "legendFormat": "Virtual Memory", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "process_virtual_memory_max_bytes{instance=\"$node\",job=\"$job\"}", - "interval": "", - "legendFormat": "Virtual Memory Limit", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "bytes", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Virtual Memory Limit" - }, - "properties": [ - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "custom.lineStyle", - "value": { - "dash": [ - 10, - 10 - ], - "fill": "dash" - } - }, - { - "id": "color", - "value": { - "fixedColor": "dark-red", - "mode": "fixed" - } - } - ] - }, - { - "__systemRef": "hideSeriesFrom", - "matcher": { - "id": "byNames", - "options": { - "mode": "exclude", - "names": [ - "Virtual Memory" - ], - "prefix": "All except:", - "readOnly": true - } - }, - "properties": [ - { - "id": "custom.hideFrom", - "value": { - "legend": false, - "tooltip": true, - "viz": true - } - } - ] - } - ] - } - } - } - } - }, - "panel-15": { - "kind": "Panel", - "spec": { - "id": 15, - "title": "Uptime", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "exemplar": false, - "expr": "node_time_seconds{instance=\"$node\",job=\"$job\"} - node_boot_time_seconds{instance=\"$node\",job=\"$job\"}", - "instant": true, - "range": false, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": { - "maxDataPoints": 100 - } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "stat", - "version": "11.6.1", - "spec": { - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "fieldConfig": { - "defaults": { - "unit": "s", - "decimals": 1, - "mappings": [ - { - "type": "special", - "options": { - "match": "null", - "result": { - "text": "N/A" - } - } - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "thresholds" - } - }, - "overrides": [] - } - } - } - } - }, - "panel-151": { - "kind": "Panel", - "spec": { - "id": 151, - "title": "Entropy", - "description": "Number of bits of entropy currently available to the system's random number generators (e.g., /dev/random). Low values may indicate that random number generation could block or degrade performance of cryptographic operations", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_entropy_available_bits{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "Entropy available", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_entropy_pool_size_bits{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "Entropy pool max", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "decbits", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Entropy pool max" - }, - "properties": [ - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "custom.lineStyle", - "value": { - "dash": [ - 10, - 10 - ], - "fill": "dash" - } - }, - { - "id": "color", - "value": { - "fixedColor": "dark-red", - "mode": "fixed" - } - } - ] - } - ] - } - } - } - } - }, - "panel-152": { - "kind": "Panel", - "spec": { - "id": 152, - "title": "Disk Space Used Basic", - "description": "Percentage of filesystem space used for each mounted device", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "((node_filesystem_size_bytes{instance=\"$node\", job=\"$job\", device!~'rootfs'} - node_filesystem_avail_bytes{instance=\"$node\", job=\"$job\", device!~'rootfs'}) / node_filesystem_size_bytes{instance=\"$node\", job=\"$job\", device!~'rootfs'}) * 100", - "format": "time_series", - "legendFormat": "{{mountpoint}}", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "percent", - "min": 0, - "max": 100, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 40, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-154": { - "kind": "Panel", - "spec": { - "id": 154, - "title": "Root FS Used", - "description": "Used Root FS", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "exemplar": false, - "expr": "(\n (node_filesystem_size_bytes{instance=\"$node\", job=\"$job\", mountpoint=\"/\", fstype!=\"rootfs\"}\n - node_filesystem_avail_bytes{instance=\"$node\", job=\"$job\", mountpoint=\"/\", fstype!=\"rootfs\"})\n / node_filesystem_size_bytes{instance=\"$node\", job=\"$job\", mountpoint=\"/\", fstype!=\"rootfs\"}\n) * 100\n", - "format": "time_series", - "instant": true, - "range": false, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "gauge", - "version": "11.6.1", - "spec": { - "options": { - "minVizHeight": 75, - "minVizWidth": 75, - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true, - "sizing": "auto" - }, - "fieldConfig": { - "defaults": { - "unit": "percent", - "decimals": 1, - "min": 0, - "max": 100, - "mappings": [ - { - "type": "special", - "options": { - "match": "null", - "result": { - "text": "N/A" - } - } - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "rgba(50, 172, 45, 0.97)" - }, - { - "value": 80, - "color": "rgba(237, 129, 40, 0.89)" - }, - { - "value": 90, - "color": "rgba(245, 54, 54, 0.9)" - } - ] - }, - "color": { - "mode": "thresholds" - } - }, - "overrides": [] - } - } - } - } - }, - "panel-155": { - "kind": "Panel", - "spec": { - "id": 155, - "title": "Sys Load", - "description": "System load over all CPU cores together", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "exemplar": false, - "expr": "scalar(node_load1{instance=\"$node\",job=\"$job\"}) * 100 / count(count(node_cpu_seconds_total{instance=\"$node\",job=\"$job\"}) by (cpu))", - "format": "time_series", - "instant": true, - "range": false, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "gauge", - "version": "11.6.1", - "spec": { - "options": { - "minVizHeight": 75, - "minVizWidth": 75, - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true, - "sizing": "auto" - }, - "fieldConfig": { - "defaults": { - "unit": "percent", - "decimals": 1, - "min": 0, - "max": 100, - "mappings": [ - { - "type": "special", - "options": { - "match": "null", - "result": { - "text": "N/A" - } - } - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "rgba(50, 172, 45, 0.97)" - }, - { - "value": 85, - "color": "rgba(237, 129, 40, 0.89)" - }, - { - "value": 95, - "color": "rgba(245, 54, 54, 0.9)" - } - ] - }, - "color": { - "mode": "thresholds" - } - }, - "overrides": [] - } - } - } - } - }, - "panel-156": { - "kind": "Panel", - "spec": { - "id": 156, - "title": "Filesystem Used", - "description": "Disk usage (used = total - available) per mountpoint", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_filesystem_size_bytes{instance=\"$node\",job=\"$job\",device!~'rootfs'} - node_filesystem_avail_bytes{instance=\"$node\",job=\"$job\",device!~'rootfs'}", - "format": "time_series", - "legendFormat": "{{mountpoint}}", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "bytes", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-157": { - "kind": "Panel", - "spec": { - "id": 157, - "title": "Node Exporter Scrape", - "description": "Shows whether each Node Exporter collector scraped successfully (1 = success, 0 = failure), and whether the textfile collector returned an error.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_scrape_collector_success{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "{{collector}}", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "1 - node_textfile_scrape_error{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "textfile", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "bargauge", - "version": "11.6.1", - "spec": { - "options": { - "displayMode": "basic", - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "maxVizHeight": 300, - "minVizHeight": 16, - "minVizWidth": 8, - "namePlacement": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showUnfilled": true, - "sizing": "auto", - "valueMode": "color" - }, - "fieldConfig": { - "defaults": { - "unit": "bool", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 0, - "color": "dark-red" - }, - { - "value": 1, - "color": "green" - } - ] - }, - "color": { - "mode": "thresholds" - } - }, - "overrides": [] - } - } - } - } - }, - "panel-158": { - "kind": "Panel", - "spec": { - "id": 158, - "title": "Hardware Temperature Monitor", - "description": "Monitors hardware sensor temperatures and critical thresholds as exposed by Linux hwmon. Includes CPU, GPU, and motherboard sensors where available", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_hwmon_temp_celsius{instance=\"$node\",job=\"$job\"} * on(chip) group_left(chip_name) node_hwmon_chip_names{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "{{ chip_name }} {{ sensor }}", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "expr": "node_hwmon_temp_crit_alarm_celsius{instance=\"$node\",job=\"$job\"} * on(chip) group_left(chip_name) node_hwmon_chip_names{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "{{ chip_name }} {{ sensor }} Critical Alarm", - "step": 240 - } - }, - "refId": "B", - "hidden": true - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_hwmon_temp_crit_celsius{instance=\"$node\",job=\"$job\"} * on(chip) group_left(chip_name) node_hwmon_chip_names{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "{{ chip_name }} {{ sensor }} Critical", - "range": true, - "step": 240 - } - }, - "refId": "C", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "expr": "node_hwmon_temp_crit_hyst_celsius{instance=\"$node\",job=\"$job\"} * on(chip) group_left(chip_name) node_hwmon_chip_names{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "{{ chip_name }} {{ sensor }} Critical Hysteresis", - "step": 240 - } - }, - "refId": "D", - "hidden": true - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "expr": "node_hwmon_temp_max_celsius{instance=\"$node\",job=\"$job\"} * on(chip) group_left(chip_name) node_hwmon_chip_names{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "{{ chip_name }} {{ sensor }} Max", - "step": 240 - } - }, - "refId": "E", - "hidden": true - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "celsius", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*Critical.*/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#E24D42", - "mode": "fixed" - } - }, - { - "id": "custom.fillOpacity", - "value": 0 - } - ] - } - ] - } - } - } - } - }, - "panel-16": { - "kind": "Panel", - "spec": { - "id": 16, - "title": "RAM Used", - "description": "Real RAM usage excluding cache and reclaimable memory", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "exemplar": false, - "expr": "clamp_min((1 - (node_memory_MemAvailable_bytes{instance=\"$node\", job=\"$job\"} / node_memory_MemTotal_bytes{instance=\"$node\", job=\"$job\"})) * 100, 0)", - "format": "time_series", - "instant": true, - "range": false, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "gauge", - "version": "11.6.1", - "spec": { - "options": { - "minVizHeight": 75, - "minVizWidth": 75, - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true, - "sizing": "auto" - }, - "fieldConfig": { - "defaults": { - "unit": "percent", - "decimals": 1, - "min": 0, - "max": 100, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "rgba(50, 172, 45, 0.97)" - }, - { - "value": 80, - "color": "rgba(237, 129, 40, 0.89)" - }, - { - "value": 90, - "color": "rgba(245, 54, 54, 0.9)" - } - ] - }, - "color": { - "mode": "thresholds" - } - }, - "overrides": [] - } - } - } - } - }, - "panel-160": { - "kind": "Panel", - "spec": { - "id": 160, - "title": "Memory Kernel / CPU / IO", - "description": "Tracks kernel memory used for CPU-local structures, per-thread stacks, and bounce buffers used for I/O on DMA-limited devices. These areas are typically small but critical for low-level operations", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_KernelStack_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "KernelStack – Kernel stack memory (per-thread, non-reclaimable)", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_Percpu_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "PerCPU – Dynamically allocated per-CPU memory (used by kernel modules)", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_Bounce_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "Bounce Memory – I/O buffer for DMA-limited devices", - "range": true, - "step": 240 - } - }, - "refId": "C", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "width": 350 - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "bytes", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-168": { - "kind": "Panel", - "spec": { - "id": 168, - "title": "Time Synchronized Status", - "description": "Shows whether the system clock is synchronized to a reliable time source, and the current frequency correction ratio applied by the kernel to maintain synchronization", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_timex_sync_status{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "Sync status (1 = ok)", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_timex_frequency_adjustment_ratio{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "Frequency Adjustment", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_timex_tick_seconds{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "Tick Interval", - "range": true, - "step": 240 - } - }, - "refId": "C", - "hidden": true - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_timex_tai_offset_seconds{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "TAI Offset", - "range": true, - "step": 240 - } - }, - "refId": "D", - "hidden": true - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-175": { - "kind": "Panel", - "spec": { - "id": 175, - "title": "Memory Page Faults", - "description": "Rate of memory page faults, split into total, major (disk-backed), and derived minor (non-disk) faults. High major fault rates may indicate memory pressure or insufficient RAM", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_vmstat_pgfault{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "legendFormat": "Pgfault - Page major and minor fault ops", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_vmstat_pgmajfault{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "legendFormat": "Pgmajfault - Major page fault ops", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_vmstat_pgfault{instance=\"$node\",job=\"$job\"}[$__rate_interval]) - rate(node_vmstat_pgmajfault{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "legendFormat": "Pgminfault - Minor page fault ops", - "range": true, - "step": 240 - } - }, - "refId": "C", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "width": 350 - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "ops", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Pgfault - Page major and minor fault ops" - }, - "properties": [ - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "custom.stacking", - "value": { - "group": false, - "mode": "none" - } - }, - { - "id": "custom.lineStyle", - "value": { - "dash": [ - 10, - 10 - ], - "fill": "dash" - } - }, - { - "id": "color", - "value": { - "fixedColor": "dark-red", - "mode": "fixed" - } - } - ] - } - ] - } - } - } - } - }, - "panel-176": { - "kind": "Panel", - "spec": { - "id": 176, - "title": "Memory Pages In / Out", - "description": "Rate of memory pages being read from or written to disk (page-in and page-out operations). High page-out may indicate memory pressure or swapping activity", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_vmstat_pgpgin{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "legendFormat": "Pagesin - Page in ops", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_vmstat_pgpgout{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "legendFormat": "Pagesout - Page out ops", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "ops", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "out (-) / in (+)", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*out.*/" - }, - "properties": [ - { - "id": "custom.transform", - "value": "negative-Y" - } - ] - } - ] - } - } - } - } - }, - "panel-18": { - "kind": "Panel", - "spec": { - "id": 18, - "title": "SWAP Total", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "exemplar": false, - "expr": "node_memory_SwapTotal_bytes{instance=\"$node\",job=\"$job\"}", - "instant": true, - "range": false, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": { - "maxDataPoints": 100 - } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "stat", - "version": "11.6.1", - "spec": { - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "fieldConfig": { - "defaults": { - "unit": "bytes", - "decimals": 0, - "mappings": [ - { - "type": "special", - "options": { - "match": "null", - "result": { - "text": "N/A" - } - } - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "thresholds" - } - }, - "overrides": [] - } - } - } - } - }, - "panel-191": { - "kind": "Panel", - "spec": { - "id": 191, - "title": "Memory LRU Active / Inactive Detail", - "description": "Breakdown of memory pages in the kernel's active and inactive LRU lists, separated by anonymous (heap, tmpfs) and file-backed (caches, mmap) pages.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_Inactive_file_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "Inactive_file - File-backed memory on inactive LRU list", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_Inactive_anon_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "Inactive_anon – Anonymous memory on inactive LRU (incl. tmpfs & swap cache)", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_Active_file_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "Active_file - File-backed memory on active LRU list", - "range": true, - "step": 240 - } - }, - "refId": "C", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_Active_anon_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "Active_anon – Anonymous memory on active LRU (incl. tmpfs & swap cache)", - "range": true, - "step": 240 - } - }, - "refId": "D", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "width": 350 - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "bytes", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-20": { - "kind": "Panel", - "spec": { - "id": 20, - "title": "CPU Busy", - "description": "Overall CPU busy percentage (averaged across all cores)", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "exemplar": false, - "expr": "100 * (1 - avg(rate(node_cpu_seconds_total{mode=\"idle\",instance=\"$node\",job=\"$job\"}[$__rate_interval])))", - "instant": true, - "legendFormat": "", - "range": false, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "gauge", - "version": "11.6.1", - "spec": { - "options": { - "minVizHeight": 75, - "minVizWidth": 75, - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true, - "sizing": "auto" - }, - "fieldConfig": { - "defaults": { - "unit": "percent", - "decimals": 1, - "min": 0, - "max": 100, - "mappings": [ - { - "type": "special", - "options": { - "match": "null", - "result": { - "text": "N/A" - } - } - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "rgba(50, 172, 45, 0.97)" - }, - { - "value": 85, - "color": "rgba(237, 129, 40, 0.89)" - }, - { - "value": 95, - "color": "rgba(245, 54, 54, 0.9)" - } - ] - }, - "color": { - "mode": "thresholds" - } - }, - "overrides": [] - } - } - } - } - }, - "panel-21": { - "kind": "Panel", - "spec": { - "id": 21, - "title": "SWAP Used", - "description": "Percentage of swap space currently used by the system", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "exemplar": false, - "expr": "(node_memory_SwapTotal_bytes{instance=\"$node\",job=\"$job\"} > bool 0) * ((node_memory_SwapTotal_bytes{instance=\"$node\",job=\"$job\"} - node_memory_SwapFree_bytes{instance=\"$node\",job=\"$job\"}) / (node_memory_SwapTotal_bytes{instance=\"$node\",job=\"$job\"})) * 100", - "instant": true, - "range": false, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "gauge", - "version": "11.6.1", - "spec": { - "options": { - "minVizHeight": 75, - "minVizWidth": 75, - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true, - "sizing": "auto" - }, - "fieldConfig": { - "defaults": { - "unit": "percent", - "decimals": 1, - "min": 0, - "max": 100, - "mappings": [ - { - "type": "special", - "options": { - "match": "null", - "result": { - "text": "N/A" - } - } - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "rgba(50, 172, 45, 0.97)" - }, - { - "value": 10, - "color": "rgba(237, 129, 40, 0.89)" - }, - { - "value": 25, - "color": "rgba(245, 54, 54, 0.9)" - } - ] - }, - "color": { - "mode": "thresholds" - } - }, - "overrides": [] - } - } - } - } - }, - "panel-219": { - "kind": "Panel", - "spec": { - "id": 219, - "title": "File Nodes Size", - "description": "Number of file nodes (inodes) available per mounted filesystem. Reflects maximum file capacity regardless of disk size", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_filesystem_files{instance=\"$node\",job=\"$job\",device!~'rootfs'}", - "format": "time_series", - "legendFormat": "{{mountpoint}}", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-22": { - "kind": "Panel", - "spec": { - "id": 22, - "title": "Memory Pages Swap In / Out", - "description": "Rate at which memory pages are being swapped in from or out to disk. High swap-out activity may indicate memory pressure", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_vmstat_pswpin{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "legendFormat": "Pswpin - Pages swapped in", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_vmstat_pswpout{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "legendFormat": "Pswpout - Pages swapped out", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "ops", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "out (-) / in (+)", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*out.*/" - }, - "properties": [ - { - "id": "custom.transform", - "value": "negative-Y" - } - ] - } - ] - } - } - } - } - }, - "panel-220": { - "kind": "Panel", - "spec": { - "id": 220, - "title": "Sockstat Memory Size", - "description": "Kernel memory used by TCP, UDP, and IP fragmentation buffers", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_sockstat_TCP_mem_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "TCP", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_sockstat_UDP_mem_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "UDP", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_sockstat_FRAG_memory{instance=\"$node\",job=\"$job\"}", - "interval": "", - "legendFormat": "Fragmentation", - "range": true - } - }, - "refId": "C", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "width": 300 - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "bytes", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-221": { - "kind": "Panel", - "spec": { - "id": 221, - "title": "Netstat IP In / Out Octets", - "description": "Rate of octets sent and received at the IP layer, as reported by /proc/net/netstat", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_netstat_IpExt_InOctets{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "IP Rx in", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_netstat_IpExt_OutOctets{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "legendFormat": "IP Tx out", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "width": 300 - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "Bps", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "out (-) / in (+)", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*out.*/" - }, - "properties": [ - { - "id": "custom.transform", - "value": "negative-Y" - } - ] - } - ] - } - } - } - } - }, - "panel-229": { - "kind": "Panel", - "spec": { - "id": 229, - "title": "Disk IOps", - "description": "Disk I/O operations per second for each device", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_disk_reads_completed_total{instance=\"$node\",job=\"$job\",device=~\"[a-z]+|nvme[0-9]+n[0-9]+|mmcblk[0-9]+\"}[$__rate_interval])", - "legendFormat": "{{device}} - Read", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_disk_writes_completed_total{instance=\"$node\",job=\"$job\",device=~\"[a-z]+|nvme[0-9]+n[0-9]+|mmcblk[0-9]+\"}[$__rate_interval])", - "legendFormat": "{{device}} - Write", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "iops", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "read (-) / write (+)", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*Read.*/" - }, - "properties": [ - { - "id": "custom.transform", - "value": "negative-Y" - } - ] - } - ] - } - } - } - } - }, - "panel-23": { - "kind": "Panel", - "spec": { - "id": 23, - "title": "RootFS Total", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "exemplar": false, - "expr": "node_filesystem_size_bytes{instance=\"$node\",job=\"$job\",mountpoint=\"/\",fstype!=\"rootfs\"}", - "format": "time_series", - "instant": true, - "range": false, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": { - "maxDataPoints": 100 - } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "stat", - "version": "11.6.1", - "spec": { - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "fieldConfig": { - "defaults": { - "unit": "bytes", - "decimals": 0, - "mappings": [ - { - "type": "special", - "options": { - "match": "null", - "result": { - "text": "N/A" - } - } - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "rgba(50, 172, 45, 0.97)" - }, - { - "value": 70, - "color": "rgba(237, 129, 40, 0.89)" - }, - { - "value": 90, - "color": "rgba(245, 54, 54, 0.9)" - } - ] - }, - "color": { - "mode": "thresholds" - } - }, - "overrides": [] - } - } - } - } - }, - "panel-230": { - "kind": "Panel", - "spec": { - "id": 230, - "title": "ARP Entries", - "description": "Number of ARP entries per interface. Useful for detecting excessive ARP traffic or table growth due to scanning or misconfiguration", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_arp_entries{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "{{ device }} ARP Table", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-231": { - "kind": "Panel", - "spec": { - "id": 231, - "title": "Network Traffic Carrier Errors", - "description": "Rate of carrier errors during transmission. These typically indicate physical layer issues like faulty cabling or duplex mismatches", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_network_transmit_carrier_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "legendFormat": "{{device}} - Tx out", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "width": 300 - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "pps", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-232": { - "kind": "Panel", - "spec": { - "id": 232, - "title": "Network Traffic Collision", - "description": "Rate of packet collisions detected during transmission. Mostly relevant on half-duplex or legacy Ethernet networks", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_network_transmit_colls_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "legendFormat": "{{device}} - Tx out", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "width": 300 - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "pps", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*out.*/" - }, - "properties": [ - { - "id": "custom.transform", - "value": "negative-Y" - } - ] - } - ] - } - } - } - } - }, - "panel-24": { - "kind": "Panel", - "spec": { - "id": 24, - "title": "Memory", - "description": "Breakdown of physical memory and swap usage. Hardware-detected memory errors are also displayed", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_MemTotal_bytes{instance=\"$node\",job=\"$job\"} - node_memory_MemFree_bytes{instance=\"$node\",job=\"$job\"} - node_memory_Buffers_bytes{instance=\"$node\",job=\"$job\"} - node_memory_Cached_bytes{instance=\"$node\",job=\"$job\"} - node_memory_Slab_bytes{instance=\"$node\",job=\"$job\"} - node_memory_PageTables_bytes{instance=\"$node\",job=\"$job\"} - node_memory_SwapCached_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "Apps - Memory used by user-space applications", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_PageTables_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "PageTables - Memory used to map between virtual and physical memory addresses", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_SwapCached_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "SwapCache - Memory that keeps track of pages that have been fetched from swap but not yet been modified", - "range": true, - "step": 240 - } - }, - "refId": "C", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_Slab_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "Slab - Memory used by the kernel to cache data structures for its own use (caches like inode, dentry, etc)", - "range": true, - "step": 240 - } - }, - "refId": "D", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_Cached_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "Cache - Parked file data (file content) cache", - "range": true, - "step": 240 - } - }, - "refId": "E", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_Buffers_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "Buffers - Block device (e.g. harddisk) cache", - "range": true, - "step": 240 - } - }, - "refId": "F", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_MemFree_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "Unused - Free memory unassigned", - "range": true, - "step": 240 - } - }, - "refId": "G", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "(node_memory_SwapTotal_bytes{instance=\"$node\",job=\"$job\"} - node_memory_SwapFree_bytes{instance=\"$node\",job=\"$job\"})", - "format": "time_series", - "legendFormat": "Swap - Swap space used", - "range": true, - "step": 240 - } - }, - "refId": "H", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_HardwareCorrupted_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "Hardware Corrupted - Amount of RAM that the kernel identified as corrupted / not working", - "range": true, - "step": 240 - } - }, - "refId": "I", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "width": 350 - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "bytes", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 40, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Apps" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#629E51", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Buffers" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#614D93", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Cache" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#6D1F62", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Free" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#0A437C", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Hardware Corrupted - Amount of RAM that the kernel identified as corrupted / not working" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#CFFAFF", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "PageTables" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#0A50A1", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Slab" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#806EB7", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Swap" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#BF1B00", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Unused" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#EAB839", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Unused - Free memory unassigned" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#052B51", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*Hardware Corrupted - *./" - }, - "properties": [ - { - "id": "custom.stacking", - "value": { - "group": false, - "mode": "normal" - } - } - ] - } - ] - } - } - } - } - }, - "panel-259": { - "kind": "Panel", - "spec": { - "id": 259, - "title": "IRQ Detail", - "description": "Breaks down hardware interrupts by type and device. Useful for diagnosing IRQ load on network, disk, or CPU interfaces. Requires --collector.interrupts to be enabled in node_exporter", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_interrupts_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "{{ type }} - {{ info }}", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "ops", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-260": { - "kind": "Panel", - "spec": { - "id": 260, - "title": "Time Synchronized Drift", - "description": "Tracks the system clock's estimated and maximum error, as well as its offset from the reference clock (e.g., via NTP). Useful for detecting synchronization drift", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_timex_estimated_error_seconds{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "Estimated error", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_timex_offset_seconds{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "Offset local vs reference", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_timex_maxerror_seconds{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "Maximum error", - "range": true, - "step": 240 - } - }, - "refId": "C", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "s", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-28": { - "kind": "Panel", - "spec": { - "id": 28, - "title": "File Descriptor", - "description": "Number of file descriptors currently allocated system-wide versus the system limit. Important for detecting descriptor exhaustion risks", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_filefd_maximum{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "Max open files", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_filefd_allocated{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "Open files", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*Max.*/" - }, - "properties": [ - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "custom.lineStyle", - "value": { - "dash": [ - 10, - 10 - ], - "fill": "dash" - } - }, - { - "id": "color", - "value": { - "fixedColor": "dark-red", - "mode": "fixed" - } - } - ] - } - ] - } - } - } - } - }, - "panel-280": { - "kind": "Panel", - "spec": { - "id": 280, - "title": "Speed", - "description": "Maximum speed of each network interface as reported by the operating system. This is a static hardware capability, not current throughput", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_network_speed_bytes{instance=\"$node\",job=\"$job\"} * 8", - "format": "time_series", - "legendFormat": "{{ device }}", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "bargauge", - "version": "11.6.1", - "spec": { - "options": { - "displayMode": "basic", - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "maxVizHeight": 30, - "minVizHeight": 16, - "minVizWidth": 8, - "namePlacement": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showUnfilled": true, - "sizing": "manual", - "valueMode": "color" - }, - "fieldConfig": { - "defaults": { - "unit": "bps", - "decimals": 0, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "thresholds" - }, - "fieldMinMax": false - }, - "overrides": [] - } - } - } - } - }, - "panel-288": { - "kind": "Panel", - "spec": { - "id": 288, - "title": "MTU", - "description": "MTU (Maximum Transmission Unit) in bytes for each network interface. Affects packet size and transmission efficiency", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_network_mtu_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "{{ device }}", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "bargauge", - "version": "11.6.1", - "spec": { - "options": { - "displayMode": "basic", - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "maxVizHeight": 30, - "minVizHeight": 16, - "minVizWidth": 8, - "namePlacement": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showUnfilled": true, - "sizing": "manual", - "valueMode": "color" - }, - "fieldConfig": { - "defaults": { - "unit": "none", - "decimals": 0, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "thresholds" - } - }, - "overrides": [] - } - } - } - } - }, - "panel-290": { - "kind": "Panel", - "spec": { - "id": 290, - "title": "Softnet Packets", - "description": "Packets processed and dropped by the softnet network stack per CPU. Drops may indicate CPU saturation or network driver limitations", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_softnet_processed_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "CPU {{cpu}} - Processed", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_softnet_dropped_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "CPU {{cpu}} - Dropped", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "width": 300 - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "pps", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "drop (-) / process (+)", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*Dropped.*/" - }, - "properties": [ - { - "id": "custom.transform", - "value": "negative-Y" - } - ] - } - ] - } - } - } - } - }, - "panel-291": { - "kind": "Panel", - "spec": { - "id": 291, - "title": "Time PLL Adjust", - "description": "NTP phase-locked loop (PLL) time constant used by the kernel to control time adjustments. Lower values mean faster correction but less stability", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_timex_loop_time_constant{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "PLL Time Constant", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-297": { - "kind": "Panel", - "spec": { - "id": 297, - "title": "Systemd Sockets Accepted", - "description": "Rate of accepted connections per second for each systemd socket", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_systemd_socket_accepted_connections_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "{{ name }}", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "eps", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-298": { - "kind": "Panel", - "spec": { - "id": 298, - "title": "Systemd Units State", - "description": "Current number of systemd units in each operational state, such as active, failed, inactive, or transitioning", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_systemd_units{instance=\"$node\",job=\"$job\",state=\"activating\"}", - "format": "time_series", - "interval": "", - "legendFormat": "Activating", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_systemd_units{instance=\"$node\",job=\"$job\",state=\"active\"}", - "format": "time_series", - "interval": "", - "legendFormat": "Active", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_systemd_units{instance=\"$node\",job=\"$job\",state=\"deactivating\"}", - "format": "time_series", - "interval": "", - "legendFormat": "Deactivating", - "range": true, - "step": 240 - } - }, - "refId": "C", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_systemd_units{instance=\"$node\",job=\"$job\",state=\"failed\"}", - "format": "time_series", - "interval": "", - "legendFormat": "Failed", - "range": true, - "step": 240 - } - }, - "refId": "D", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_systemd_units{instance=\"$node\",job=\"$job\",state=\"inactive\"}", - "format": "time_series", - "interval": "", - "legendFormat": "Inactive", - "range": true, - "step": 240 - } - }, - "refId": "E", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Failed" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#F2495C", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Active" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#73BF69", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Activating" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#C8F2C2", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Deactivating" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "orange", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Inactive" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-blue", - "mode": "fixed" - } - } - ] - } - ] - } - } - } - } - }, - "panel-299": { - "kind": "Panel", - "spec": { - "id": 299, - "title": "TCP In / Out", - "description": "Rate of TCP segments sent and received per second, including data and control segments", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_netstat_Tcp_InSegs{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "instant": false, - "interval": "", - "legendFormat": "TCP Rx in", - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_netstat_Tcp_OutSegs{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "TCP Tx out", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "pps", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "out (-) / in (+)", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*out.*/" - }, - "properties": [ - { - "id": "custom.transform", - "value": "negative-Y" - } - ] - } - ] - } - } - } - } - }, - "panel-3": { - "kind": "Panel", - "spec": { - "id": 3, - "title": "CPU", - "description": "CPU time usage split by state, normalized across all CPU cores", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "sum(rate(node_cpu_seconds_total{mode=\"system\",instance=\"$node\",job=\"$job\"}[$__rate_interval])) / scalar(count(count(node_cpu_seconds_total{instance=\"$node\",job=\"$job\"}) by (cpu)))", - "format": "time_series", - "interval": "", - "legendFormat": "System - Processes executing in kernel mode", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "sum(rate(node_cpu_seconds_total{mode=\"user\",instance=\"$node\",job=\"$job\"}[$__rate_interval])) / scalar(count(count(node_cpu_seconds_total{instance=\"$node\",job=\"$job\"}) by (cpu)))", - "format": "time_series", - "legendFormat": "User - Normal processes executing in user mode", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "sum(rate(node_cpu_seconds_total{mode=\"nice\",instance=\"$node\",job=\"$job\"}[$__rate_interval])) / scalar(count(count(node_cpu_seconds_total{instance=\"$node\",job=\"$job\"}) by (cpu)))", - "format": "time_series", - "legendFormat": "Nice - Niced processes executing in user mode", - "range": true, - "step": 240 - } - }, - "refId": "C", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "sum(rate(node_cpu_seconds_total{mode=\"iowait\",instance=\"$node\",job=\"$job\"}[$__rate_interval])) / scalar(count(count(node_cpu_seconds_total{instance=\"$node\",job=\"$job\"}) by (cpu)))", - "format": "time_series", - "legendFormat": "Iowait - Waiting for I/O to complete", - "range": true, - "step": 240 - } - }, - "refId": "D", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "sum(rate(node_cpu_seconds_total{mode=\"irq\",instance=\"$node\",job=\"$job\"}[$__rate_interval])) / scalar(count(count(node_cpu_seconds_total{instance=\"$node\",job=\"$job\"}) by (cpu)))", - "format": "time_series", - "legendFormat": "Irq - Servicing interrupts", - "range": true, - "step": 240 - } - }, - "refId": "E", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "sum(rate(node_cpu_seconds_total{mode=\"softirq\",instance=\"$node\",job=\"$job\"}[$__rate_interval])) / scalar(count(count(node_cpu_seconds_total{instance=\"$node\",job=\"$job\"}) by (cpu)))", - "format": "time_series", - "legendFormat": "Softirq - Servicing softirqs", - "range": true, - "step": 240 - } - }, - "refId": "F", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "sum(rate(node_cpu_seconds_total{mode=\"steal\",instance=\"$node\",job=\"$job\"}[$__rate_interval])) / scalar(count(count(node_cpu_seconds_total{instance=\"$node\",job=\"$job\"}) by (cpu)))", - "format": "time_series", - "legendFormat": "Steal - Time spent in other operating systems when running in a virtualized environment", - "range": true, - "step": 240 - } - }, - "refId": "G", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "sum(rate(node_cpu_seconds_total{mode=\"idle\",instance=\"$node\",job=\"$job\"}[$__rate_interval])) / scalar(count(count(node_cpu_seconds_total{instance=\"$node\",job=\"$job\"}) by (cpu)))", - "format": "time_series", - "legendFormat": "Idle - Waiting for something to happen", - "range": true, - "step": 240 - } - }, - "refId": "H", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "sum by(instance) (rate(node_cpu_guest_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])) / on(instance) group_left sum by (instance)((rate(node_cpu_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval]))) > 0", - "format": "time_series", - "legendFormat": "Guest CPU usage", - "range": true, - "step": 240 - } - }, - "refId": "I", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "width": 250 - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "desc" - } - }, - "fieldConfig": { - "defaults": { - "unit": "percentunit", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 70, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "smooth", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "percent" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Idle - Waiting for something to happen" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#052B51", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Iowait - Waiting for I/O to complete" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#EAB839", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Irq - Servicing interrupts" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#BF1B00", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Nice - Niced processes executing in user mode" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#C15C17", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Softirq - Servicing softirqs" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#E24D42", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Steal - Time spent in other operating systems when running in a virtualized environment" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#FCE2DE", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "System - Processes executing in kernel mode" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#508642", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "User - Normal processes executing in user mode" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#5195CE", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Guest CPU usage" - }, - "properties": [ - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "custom.lineStyle", - "value": { - "dash": [ - 10, - 10 - ], - "fill": "dash" - } - }, - { - "id": "custom.stacking", - "value": { - "group": "A", - "mode": "none" - } - } - ] - } - ] - } - } - } - } - }, - "panel-300": { - "kind": "Panel", - "spec": { - "id": 300, - "title": "Cooling Device Utilization", - "description": "Shows how hard each cooling device (fan/throttle) is working relative to its maximum capacity", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "(node_cooling_device_max_state{instance=\"$node\",job=\"$job\"} > bool 0) * (100 * node_cooling_device_cur_state{instance=\"$node\",job=\"$job\"} / node_cooling_device_max_state{instance=\"$node\",job=\"$job\"})", - "format": "time_series", - "interval": "", - "legendFormat": "{{name}} - {{type}}", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "percent", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*Max.*/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#EF843C", - "mode": "fixed" - } - }, - { - "id": "custom.fillOpacity", - "value": 0 - } - ] - } - ] - } - } - } - } - }, - "panel-301": { - "kind": "Panel", - "spec": { - "id": 301, - "title": "Disk Ops Discards / Flush", - "description": "Per-second rate of discard (TRIM) and flush (write cache) operations. Useful for monitoring low-level disk activity on SSDs and advanced storage", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_disk_discards_completed_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "interval": "", - "legendFormat": "{{device}} - Discards completed", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_disk_discards_merged_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "interval": "", - "legendFormat": "{{device}} - Discards merged", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_disk_flush_requests_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "interval": "", - "legendFormat": "{{device}} - Flush", - "range": true, - "step": 240 - } - }, - "refId": "C", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "ops", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/sda.*/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "orange", - "mode": "fixed" - } - } - ] - } - ] - } - } - } - } - }, - "panel-302": { - "kind": "Panel", - "spec": { - "id": 302, - "title": "Power Supply", - "description": "Shows the online status of power supplies (e.g., AC, battery). A value of 1-Yes indicates the power supply is active/online", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_power_supply_online{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "{{ power_supply }} online", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "bool_yes_no", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-305": { - "kind": "Panel", - "spec": { - "id": 305, - "title": "CPU Saturation per Core", - "description": "Shows CPU saturation per core, calculated as the proportion of time spent waiting to run relative to total time demanded (running + waiting).", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_schedstat_running_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "CPU {{ cpu }} - Running", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": true - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_schedstat_waiting_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "CPU {{cpu}} - Waiting Queue", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": true - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "((rate(node_schedstat_running_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval]) + rate(node_schedstat_waiting_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])) > bool 0) * (rate(node_schedstat_waiting_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval]) / (rate(node_schedstat_running_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval]) + rate(node_schedstat_waiting_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])))", - "format": "time_series", - "interval": "", - "legendFormat": "CPU {{cpu}}", - "range": true, - "step": 240 - } - }, - "refId": "C", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "percentunit", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*waiting.*/" - }, - "properties": [ - { - "id": "custom.transform", - "value": "negative-Y" - } - ] - } - ] - } - } - } - } - }, - "panel-306": { - "kind": "Panel", - "spec": { - "id": 306, - "title": "CPU Schedule Timeslices", - "description": "Rate of scheduling timeslices executed per CPU. Reflects how frequently the scheduler switches tasks on each core", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_schedstat_timeslices_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "CPU {{ cpu }}", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "ops", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-307": { - "kind": "Panel", - "spec": { - "id": 307, - "title": "OOM Killer", - "description": "Rate of Out-of-Memory (OOM) kill events. A non-zero value indicates the kernel has terminated one or more processes due to memory exhaustion", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_vmstat_oom_kill{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "OOM Kills", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "ops", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "OOM Kills" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-red", - "mode": "fixed" - } - } - ] - } - ] - } - } - } - } - }, - "panel-308": { - "kind": "Panel", - "spec": { - "id": 308, - "title": "Exporter Process CPU Usage", - "description": "Rate of CPU time used by the process exposing this metric (user + system mode)", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(process_cpu_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "Process CPU Usage", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "percentunit", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-309": { - "kind": "Panel", - "spec": { - "id": 309, - "title": "Network Operational Status", - "description": "Operational and physical link status of each network interface. Values are Yes for 'up' or link present, and No for 'down' or no carrier.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_network_up{operstate=\"up\",instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "{{interface}} - Operational state UP", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": true - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_network_carrier{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "instant": false, - "legendFormat": "{{device}} - Physical link" - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "width": 300 - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "bool_yes_no", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-310": { - "kind": "Panel", - "spec": { - "id": 310, - "title": "Softnet Out of Quota", - "description": "How often the kernel was unable to process all packets in the softnet queue before time ran out. Frequent squeezes may indicate CPU contention or driver inefficiency", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_softnet_times_squeezed_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "CPU {{cpu}} - Times Squeezed", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "width": 300 - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "eps", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-313": { - "kind": "Panel", - "spec": { - "id": 313, - "title": "PIDs Number and Limit", - "description": "Number of active PIDs on the system and the configured maximum allowed. Useful for detecting PID exhaustion risk. Requires --collector.processes in node_exporter", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_processes_pids{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "Number of PIDs", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_processes_max_processes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "PIDs limit", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "PIDs limit" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#F2495C", - "mode": "fixed" - } - }, - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "custom.lineStyle", - "value": { - "dash": [ - 10, - 10 - ], - "fill": "dash" - } - } - ] - } - ] - } - } - } - } - }, - "panel-314": { - "kind": "Panel", - "spec": { - "id": 314, - "title": "Threads Number and Limit", - "description": "Number of active threads on the system and the configured thread limit. Useful for monitoring thread pressure. Requires --collector.processes in node_exporter", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_processes_threads{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "Allocated threads", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_processes_max_threads{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "Threads limit", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Threads limit" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#F2495C", - "mode": "fixed" - } - }, - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "custom.lineStyle", - "value": { - "dash": [ - 10, - 10 - ], - "fill": "dash" - } - } - ] - } - ] - } - } - } - } - }, - "panel-315": { - "kind": "Panel", - "spec": { - "id": 315, - "title": "Processes Detailed States", - "description": "Current number of processes in each state (e.g., running, sleeping, zombie). Requires --collector.processes to be enabled in node_exporter", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_processes_state{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "{{ state }}", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "D" - }, - "properties": [ - { - "id": "displayName", - "value": "Uninterruptible Sleeping" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "I" - }, - "properties": [ - { - "id": "displayName", - "value": "Idle Kernel Thread" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "R" - }, - "properties": [ - { - "id": "displayName", - "value": "Running" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "S" - }, - "properties": [ - { - "id": "displayName", - "value": "Interruptible Sleeping" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "T" - }, - "properties": [ - { - "id": "displayName", - "value": "Stopped" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "X" - }, - "properties": [ - { - "id": "displayName", - "value": "Dead" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Z" - }, - "properties": [ - { - "id": "displayName", - "value": "Zombie" - } - ] - } - ] - } - } - } - } - }, - "panel-320": { - "kind": "Panel", - "spec": { - "id": 320, - "title": "TCP Stat Persistent", - "description": "Number of TCP sockets in key connection states. Requires the --collector.tcpstat flag on node_exporter", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_tcp_connection_states{state=\"established\",instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "Established", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_tcp_connection_states{state=\"fin_wait2\",instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "FIN_WAIT2", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_tcp_connection_states{state=\"listen\",instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "Listen", - "range": true, - "step": 240 - } - }, - "refId": "C", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_tcp_connection_states{state=\"time_wait\",instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "TIME_WAIT", - "range": true, - "step": 240 - } - }, - "refId": "D", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_tcp_connection_states{state=\"close_wait\", instance=\"$node\", job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "CLOSE_WAIT", - "range": true, - "step": 240 - } - }, - "refId": "E", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "noValue": "0", - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-321": { - "kind": "Panel", - "spec": { - "id": 321, - "title": "CPU Frequency Scaling", - "description": "Real-time CPU frequency scaling per core, including average minimum and maximum allowed scaling frequencies", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_cpu_scaling_frequency_hertz{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "CPU {{ cpu }}", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "avg(node_cpu_scaling_frequency_max_hertz{instance=\"$node\",job=\"$job\"})", - "format": "time_series", - "interval": "", - "legendFormat": "Max", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "avg(node_cpu_scaling_frequency_min_hertz{instance=\"$node\",job=\"$job\"})", - "format": "time_series", - "interval": "", - "legendFormat": "Min", - "range": true, - "step": 240 - } - }, - "refId": "C", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "desc" - } - }, - "fieldConfig": { - "defaults": { - "unit": "hertz", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Max" - }, - "properties": [ - { - "id": "custom.lineStyle", - "value": { - "dash": [ - 10, - 10 - ], - "fill": "dash" - } - }, - { - "id": "color", - "value": { - "fixedColor": "dark-red", - "mode": "fixed" - } - }, - { - "id": "custom.hideFrom", - "value": { - "legend": true, - "tooltip": false, - "viz": false - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Min" - }, - "properties": [ - { - "id": "custom.lineStyle", - "value": { - "dash": [ - 10, - 10 - ], - "fill": "dash" - } - }, - { - "id": "color", - "value": { - "fixedColor": "blue", - "mode": "fixed" - } - }, - { - "id": "custom.hideFrom", - "value": { - "legend": true, - "tooltip": false, - "viz": false - } - } - ] - } - ] - } - } - } - } - }, - "panel-322": { - "kind": "Panel", - "spec": { - "id": 322, - "title": "Pressure Stall Information", - "description": "How often tasks experience CPU, memory, or I/O delays. 'Some' indicates partial slowdown; 'Full' indicates all tasks are stalled. Based on Linux PSI metrics:\nhttps://docs.kernel.org/accounting/psi.html", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_pressure_cpu_waiting_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "legendFormat": "CPU - Some", - "range": true, - "step": 240 - } - }, - "refId": "CPU some", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_pressure_memory_waiting_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "legendFormat": "Memory - Some", - "range": true, - "step": 240 - } - }, - "refId": "Memory some", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_pressure_memory_stalled_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "legendFormat": "Memory - Full", - "range": true, - "step": 240 - } - }, - "refId": "Memory full", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_pressure_io_waiting_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "legendFormat": "I/O - Some", - "range": true, - "step": 240 - } - }, - "refId": "I/O some", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_pressure_io_stalled_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "legendFormat": "I/O - Full", - "range": true, - "step": 240 - } - }, - "refId": "I/O full", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_pressure_irq_stalled_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "legendFormat": "IRQ - Full", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "percentunit", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "some (-) / full (+)", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*Some.*/" - }, - "properties": [ - { - "id": "custom.fillOpacity", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*Some.*/" - }, - "properties": [ - { - "id": "custom.transform", - "value": "negative-Y" - } - ] - } - ] - } - } - } - } - }, - "panel-323": { - "kind": "Panel", - "spec": { - "id": 323, - "title": "Pressure", - "description": "Resource pressure via PSI", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "exemplar": false, - "expr": "rate(node_pressure_cpu_waiting_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "instant": true, - "legendFormat": "CPU", - "range": false, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "exemplar": false, - "expr": "rate(node_pressure_memory_waiting_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "instant": true, - "legendFormat": "Mem", - "range": false, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "exemplar": false, - "expr": "rate(node_pressure_io_waiting_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "instant": true, - "legendFormat": "I/O", - "range": false, - "step": 240 - } - }, - "refId": "C", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "exemplar": false, - "expr": "rate(node_pressure_irq_stalled_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "instant": true, - "legendFormat": "Irq", - "range": false, - "step": 240 - } - }, - "refId": "D", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "bargauge", - "version": "11.6.1", - "spec": { - "options": { - "displayMode": "basic", - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showUnfilled": true, - "sizing": "auto", - "text": {}, - "valueMode": "color" - }, - "fieldConfig": { - "defaults": { - "unit": "percentunit", - "decimals": 1, - "min": 0, - "max": 1, - "thresholds": { - "mode": "percentage", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 70, - "color": "dark-yellow" - }, - { - "value": 90, - "color": "dark-red" - } - ] - }, - "color": { - "mode": "thresholds" - } - }, - "overrides": [] - } - } - } - } - }, - "panel-325": { - "kind": "Panel", - "spec": { - "id": 325, - "title": "Hardware Fan Speed", - "description": "Displays the current fan speeds (RPM) from hardware sensors via the hwmon interface", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_hwmon_fan_rpm{instance=\"$node\",job=\"$job\"} * on(chip) group_left(chip_name) node_hwmon_chip_names{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "{{ chip_name }} {{ sensor }}", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_hwmon_fan_min_rpm{instance=\"$node\",job=\"$job\"} * on(chip) group_left(chip_name) node_hwmon_chip_names{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "{{ chip_name }} {{ sensor }} rpm min", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": true - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "rotrpm", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-326": { - "kind": "Panel", - "spec": { - "id": 326, - "title": "Disk Sectors Discarded Successfully", - "description": "Shows how many disk sectors are discarded (TRIMed) per second. Useful for monitoring SSD behavior and storage efficiency", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_disk_discarded_sectors_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "interval": "", - "legendFormat": "{{device}}", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/sda.*/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "orange", - "mode": "fixed" - } - } - ] - } - ] - } - } - } - } - }, - "panel-327": { - "kind": "Panel", - "spec": { - "id": 327, - "title": "Network Traffic NoHandler", - "description": "Rate of received packets that could not be processed due to missing protocol or handler in the kernel. May indicate unsupported traffic or misconfiguration", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_network_receive_nohandler_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "legendFormat": "{{device}} - Rx in", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "width": 300 - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "pps", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-33": { - "kind": "Panel", - "spec": { - "id": 33, - "title": "Disk Read/Write Data", - "description": "Number of bytes read from or written to the device per second", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_disk_read_bytes_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "legendFormat": "{{device}} - Read", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "exemplar": false, - "expr": "rate(node_disk_written_bytes_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "instant": false, - "legendFormat": "{{device}} - Write", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "Bps", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "read (–) / write (+)", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*Read.*/" - }, - "properties": [ - { - "id": "custom.transform", - "value": "negative-Y" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/sda.*/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "orange", - "mode": "fixed" - } - } - ] - } - ] - } - } - } - } - }, - "panel-330": { - "kind": "Panel", - "spec": { - "id": 330, - "title": "Softnet RPS", - "description": "Tracks the number of packets processed or dropped by Receive Packet Steering (RPS), a mechanism to distribute packet processing across CPUs", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_softnet_received_rps_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "CPU {{cpu}} - Processed", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_softnet_flow_limit_count_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "CPU {{cpu}} - Dropped", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "width": 300 - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "pps", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*Dropped.*/" - }, - "properties": [ - { - "id": "custom.transform", - "value": "negative-Y" - }, - { - "id": "color", - "value": { - "fixedColor": "dark-red", - "mode": "fixed" - } - } - ] - } - ] - } - } - } - } - }, - "panel-331": { - "kind": "Panel", - "spec": { - "id": 331, - "title": "Systemd Sockets Current", - "description": "Current number of active connections per systemd socket, as reported by the Node Exporter systemd collector", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_systemd_socket_current_connections{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "{{ name }}", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-332": { - "kind": "Panel", - "spec": { - "id": 332, - "title": "Systemd Sockets Refused", - "description": "Rate of systemd socket connection refusals per second, typically due to service unavailability or backlog overflow", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_systemd_socket_refused_connections_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "{{ name }}", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "eps", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-333": { - "kind": "Panel", - "spec": { - "id": 333, - "title": "PPS Frequency / Stability", - "description": "Displays the PPS signal's frequency offset and stability (jitter) in hertz. Useful for monitoring high-precision time sources like GPS or atomic clocks", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_timex_pps_frequency_hertz{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "PPS Frequency Offset", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_timex_pps_stability_hertz{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "PPS Frequency Stability", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "hertz", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-334": { - "kind": "Panel", - "spec": { - "id": 334, - "title": "PPS Time Accuracy", - "description": "Tracks PPS signal timing jitter and shift compared to system clock", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_timex_pps_jitter_seconds{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "PPS Jitter", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_timex_pps_shift_seconds{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "PPS Shift", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "s", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-335": { - "kind": "Panel", - "spec": { - "id": 335, - "title": "PPS Sync Events", - "description": "Rate of PPS synchronization diagnostics including calibration events, jitter violations, errors, and frequency stability exceedances", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_timex_pps_calibration_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "PPS Calibrations/sec", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_timex_pps_error_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "PPS Errors/sec", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_timex_pps_stability_exceeded_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "PPS Stability Exceeded/sec", - "range": true, - "step": 240 - } - }, - "refId": "C", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_timex_pps_jitter_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "PPS Jitter Events/sec", - "range": true, - "step": 240 - } - }, - "refId": "D", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "ops", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-336": { - "kind": "Panel", - "spec": { - "id": 336, - "title": "TCP/UDP Kernel Buffer Memory Pages", - "description": "TCP/UDP socket memory usage in kernel (in pages)", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_sockstat_TCP_mem{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "TCP", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_sockstat_UDP_mem{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "UDP", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "width": 300 - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-337": { - "kind": "Panel", - "spec": { - "id": 337, - "title": "UDP Queue", - "description": "Number of UDP packets currently queued in the receive (RX) and transmit (TX) buffers. A growing queue may indicate a bottleneck", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_udp_queues{instance=\"$node\",job=\"$job\",ip=\"v4\",queue=\"rx\"}", - "format": "time_series", - "interval": "", - "legendFormat": "UDP Rx in Queue", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_udp_queues{instance=\"$node\",job=\"$job\",ip=\"v4\",queue=\"tx\"}", - "format": "time_series", - "interval": "", - "legendFormat": "UDP Tx out Queue", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-338": { - "kind": "Panel", - "spec": { - "id": 338, - "title": "Network Saturation", - "description": "Network interface utilization as a percentage of its maximum capacity", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "(node_network_speed_bytes{instance=\"$node\",job=\"$job\"} > bool 0) * (rate(node_network_receive_bytes_total{instance=\"$node\",job=\"$job\"}[$__rate_interval]) / node_network_speed_bytes{instance=\"$node\",job=\"$job\"})", - "format": "time_series", - "legendFormat": "{{device}} - Rx in", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "(node_network_speed_bytes{instance=\"$node\",job=\"$job\"} > bool 0) * (rate(node_network_transmit_bytes_total{instance=\"$node\",job=\"$job\"}[$__rate_interval]) / node_network_speed_bytes{instance=\"$node\",job=\"$job\"})", - "format": "time_series", - "legendFormat": "{{device}} - Tx out", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "percentunit", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "out (-) / in (+)", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 40, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*out.*/" - }, - "properties": [ - { - "id": "custom.transform", - "value": "negative-Y" - } - ] - } - ] - } - } - } - } - }, - "panel-339": { - "kind": "Panel", - "spec": { - "id": 339, - "title": "Sockstat Average Socket Memory", - "description": "Average memory used per socket (TCP/UDP). Helps tune net.ipv4.tcp_rmem / tcp_wmem", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "(node_sockstat_TCP_inuse{instance=\"$node\",job=\"$job\"} > bool 0) * (node_sockstat_TCP_mem_bytes{instance=\"$node\",job=\"$job\"} / node_sockstat_TCP_inuse{instance=\"$node\",job=\"$job\"})", - "format": "time_series", - "interval": "", - "legendFormat": "TCP", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "(node_sockstat_UDP_inuse{instance=\"$node\",job=\"$job\"} > bool 0) * (node_sockstat_UDP_mem_bytes{instance=\"$node\",job=\"$job\"} / node_sockstat_UDP_inuse{instance=\"$node\",job=\"$job\"})", - "format": "time_series", - "interval": "", - "legendFormat": "UDP", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "width": 300 - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "bytes", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-34": { - "kind": "Panel", - "spec": { - "id": 34, - "title": "Instantaneous Queue Size", - "description": "Number of in-progress I/O requests at the time of sampling (active requests in the disk queue)", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_disk_io_now{instance=\"$node\",job=\"$job\"}", - "interval": "", - "legendFormat": "{{device}}", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "none", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/sda.*/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "orange", - "mode": "fixed" - } - } - ] - } - ] - } - } - } - } - }, - "panel-340": { - "kind": "Panel", - "spec": { - "id": 340, - "title": "TCP Socket Queue", - "description": "TCP socket queue sizes. High rx_queued_bytes indicates application not reading fast enough. High tx_queued_bytes indicates network congestion or slow receiver", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_tcp_connection_states{state=\"rx_queued_bytes\",instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "RX Queued (waiting to be read)", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_tcp_connection_states{state=\"tx_queued_bytes\",instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "TX Queued (waiting to be sent)", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "bytes", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-341": { - "kind": "Panel", - "spec": { - "id": 341, - "title": "TCP Stat Transient", - "description": "Transient TCP connection states. These are typically short-lived during connection establishment and teardown", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_tcp_connection_states{state=\"syn_sent\",instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "SYN_SENT", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_tcp_connection_states{state=\"syn_recv\",instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "SYN_RECV", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_tcp_connection_states{state=\"fin_wait1\",instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "FIN_WAIT1", - "range": true, - "step": 240 - } - }, - "refId": "C", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_tcp_connection_states{state=\"close\",instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "CLOSE", - "range": true, - "step": 240 - } - }, - "refId": "D", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_tcp_connection_states{state=\"last_ack\",instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "LAST_ACK", - "range": true, - "step": 240 - } - }, - "refId": "E", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_tcp_connection_states{state=\"closing\",instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "CLOSING", - "range": true, - "step": 240 - } - }, - "refId": "F", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "noValue": "0", - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-35": { - "kind": "Panel", - "spec": { - "id": 35, - "title": "Average Queue Size", - "description": "Average queue length of the requests that were issued to the device", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_disk_io_time_weighted_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "interval": "", - "legendFormat": "{{device}}", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "none", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/sda_*/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#7EB26D", - "mode": "fixed" - } - } - ] - } - ] - } - } - } - } - }, - "panel-36": { - "kind": "Panel", - "spec": { - "id": 36, - "title": "Time Spent Doing I/Os", - "description": "Percentage of time the disk spent actively processing I/O operations, including general I/O, discards (TRIM), and write cache flushes", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_disk_io_time_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "interval": "", - "legendFormat": "{{device}} - General IO", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_disk_discard_time_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "interval": "", - "legendFormat": "{{device}} - Discard/TRIM", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_disk_flush_requests_time_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "interval": "", - "legendFormat": "{{device}} - Flush (write cache)", - "range": true, - "step": 240 - } - }, - "refId": "C", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "percentunit", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/sda.*/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "orange", - "mode": "fixed" - } - } - ] - } - ] - } - } - } - } - }, - "panel-37": { - "kind": "Panel", - "spec": { - "id": 37, - "title": "Disk Average Wait Time", - "description": "Average time for requests issued to the device to be served. This includes the time spent by the requests in queue and the time spent servicing them.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "(rate(node_disk_reads_completed_total{instance=\"$node\",job=\"$job\"}[$__rate_interval]) > bool 0) * (rate(node_disk_read_time_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval]) / rate(node_disk_reads_completed_total{instance=\"$node\",job=\"$job\"}[$__rate_interval]))", - "interval": "", - "legendFormat": "{{device}} - Read", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "(rate(node_disk_writes_completed_total{instance=\"$node\",job=\"$job\"}[$__rate_interval]) > bool 0) * (rate(node_disk_write_time_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval]) / rate(node_disk_writes_completed_total{instance=\"$node\",job=\"$job\"}[$__rate_interval]))", - "interval": "", - "legendFormat": "{{device}} - Write", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "s", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "read (–) / write (+)", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*Read.*/" - }, - "properties": [ - { - "id": "custom.transform", - "value": "negative-Y" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/sda.*/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "orange", - "mode": "fixed" - } - } - ] - } - ] - } - } - } - } - }, - "panel-40": { - "kind": "Panel", - "spec": { - "id": 40, - "title": "Node Exporter Scrape Time", - "description": "Duration of each individual collector executed during a Node Exporter scrape. Useful for identifying slow or failing collectors", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_scrape_collector_duration_seconds{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "{{collector}}", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "s", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-41": { - "kind": "Panel", - "spec": { - "id": 41, - "title": "File Nodes Free", - "description": "Number of free file nodes (inodes) available per mounted filesystem. A low count may prevent file creation even if disk space is available", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_filesystem_files_free{instance=\"$node\",job=\"$job\",device!~'rootfs'}", - "format": "time_series", - "legendFormat": "{{mountpoint}}", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-42": { - "kind": "Panel", - "spec": { - "id": 42, - "title": "Disk Throughput", - "description": "Disk I/O throughput per device", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_disk_read_bytes_total{instance=\"$node\",job=\"$job\",device=~\"[a-z]+|nvme[0-9]+n[0-9]+|mmcblk[0-9]+\"}[$__rate_interval])", - "format": "time_series", - "legendFormat": "{{device}} - Read", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_disk_written_bytes_total{instance=\"$node\",job=\"$job\",device=~\"[a-z]+|nvme[0-9]+n[0-9]+|mmcblk[0-9]+\"}[$__rate_interval])", - "format": "time_series", - "legendFormat": "{{device}} - Write", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "Bps", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "read (-) / write (+)", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 40, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*Read.*/" - }, - "properties": [ - { - "id": "custom.transform", - "value": "negative-Y" - } - ] - } - ] - } - } - } - } - }, - "panel-43": { - "kind": "Panel", - "spec": { - "id": 43, - "title": "Filesystem Space Available", - "description": "Amount of available disk space per mounted filesystem, excluding rootfs. Based on block availability to non-root users", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_filesystem_avail_bytes{instance=\"$node\",job=\"$job\",device!~'rootfs'}", - "format": "time_series", - "legendFormat": "{{mountpoint}}", - "metric": "", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_filesystem_free_bytes{instance=\"$node\",job=\"$job\",device!~'rootfs'}", - "format": "time_series", - "legendFormat": "{{mountpoint}} - Free", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": true - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_filesystem_size_bytes{instance=\"$node\",job=\"$job\",device!~'rootfs'}", - "format": "time_series", - "legendFormat": "{{mountpoint}} - Size", - "range": true, - "step": 240 - } - }, - "refId": "C", - "hidden": true - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "bytes", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-44": { - "kind": "Panel", - "spec": { - "id": 44, - "title": "Filesystem in ReadOnly / Error", - "description": "Indicates filesystems mounted in read-only mode or reporting device-level I/O errors.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_filesystem_readonly{instance=\"$node\",job=\"$job\",device!~'rootfs'}", - "format": "time_series", - "legendFormat": "{{mountpoint}} - ReadOnly", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_filesystem_device_error{instance=\"$node\",job=\"$job\",device!~'rootfs',fstype!~'tmpfs'}", - "format": "time_series", - "interval": "", - "legendFormat": "{{mountpoint}} - Device error", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "bool_yes_no", - "min": 0, - "max": 1, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-50": { - "kind": "Panel", - "spec": { - "id": 50, - "title": "ICMP Errors", - "description": "Rate of incoming ICMP messages that contained protocol-specific errors, such as bad checksums or invalid lengths", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_netstat_Icmp_InErrors{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "ICMP Rx In", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "pps", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-55": { - "kind": "Panel", - "spec": { - "id": 55, - "title": "UDP In / Out", - "description": "Rate of UDP datagrams sent and received per second, based on /proc/net/netstat", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_netstat_Udp_InDatagrams{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "UDP Rx in", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_netstat_Udp_OutDatagrams{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "UDP Tx out", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "pps", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "out (-) / in (+)", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*out.*/" - }, - "properties": [ - { - "id": "custom.transform", - "value": "negative-Y" - } - ] - } - ] - } - } - } - } - }, - "panel-60": { - "kind": "Panel", - "spec": { - "id": 60, - "title": "Network Traffic by Packets", - "description": "Number of network packets received and transmitted per second, by interface.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_network_receive_packets_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "{{device}} - Rx in", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_network_transmit_packets_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "{{device}} - Tx out", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "width": 300 - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "pps", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "out (-) / in (+)", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*out.*/" - }, - "properties": [ - { - "id": "custom.transform", - "value": "negative-Y" - } - ] - } - ] - } - } - } - } - }, - "panel-61": { - "kind": "Panel", - "spec": { - "id": 61, - "title": "NF Conntrack", - "description": "Current and maximum connection tracking entries used by Netfilter (nf_conntrack). High usage approaching the limit may cause packet drops or connection issues", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_nf_conntrack_entries{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "NF conntrack entries", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_nf_conntrack_entries_limit{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "NF conntrack limit", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "NF conntrack limit" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-red", - "mode": "fixed" - } - }, - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "custom.lineStyle", - "value": { - "dash": [ - 10, - 10 - ], - "fill": "dash" - } - } - ] - } - ] - } - } - } - } - }, - "panel-62": { - "kind": "Panel", - "spec": { - "id": 62, - "title": "Processes Status", - "description": "Processes currently in runnable or blocked states. Helps identify CPU contention or I/O wait bottlenecks.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_procs_blocked{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "Blocked (I/O Wait)", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_procs_running{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "Runnable (Ready for CPU)", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-63": { - "kind": "Panel", - "spec": { - "id": 63, - "title": "Sockstat TCP", - "description": "Tracks TCP socket usage and memory per node", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_sockstat_TCP_alloc{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "Allocated Sockets", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_sockstat_TCP_inuse{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "In-Use Sockets", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_sockstat_TCP_orphan{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "Orphaned Sockets", - "range": true, - "step": 240 - } - }, - "refId": "C", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_sockstat_TCP_tw{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "TIME_WAIT Sockets", - "range": true, - "step": 240 - } - }, - "refId": "D", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "width": 300 - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-64": { - "kind": "Panel", - "spec": { - "id": 64, - "title": "Exporter File Descriptor Usage", - "description": "Number of file descriptors used by the exporter process versus its configured limit", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "process_max_fds{instance=\"$node\",job=\"$job\"}", - "interval": "", - "legendFormat": "Maximum open file descriptors", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "process_open_fds{instance=\"$node\",job=\"$job\"}", - "interval": "", - "legendFormat": "Open file descriptors", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*Max.*/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#890F02", - "mode": "fixed" - } - }, - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "custom.lineStyle", - "value": { - "dash": [ - 10, - 10 - ], - "fill": "dash" - } - } - ] - }, - { - "__systemRef": "hideSeriesFrom", - "matcher": { - "id": "byNames", - "options": { - "mode": "exclude", - "names": [ - "Open file descriptors" - ], - "prefix": "All except:", - "readOnly": true - } - }, - "properties": [ - { - "id": "custom.hideFrom", - "value": { - "legend": false, - "tooltip": true, - "viz": true - } - } - ] - } - ] - } - } - } - } - }, - "panel-7": { - "kind": "Panel", - "spec": { - "id": 7, - "title": "System Load", - "description": "System load average over 1, 5, and 15 minutes. Reflects the number of active or waiting processes. Values above CPU core count may indicate overload", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_load1{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "Load 1m", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_load5{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "Load 5m", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_load15{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "Load 15m", - "range": true, - "step": 240 - } - }, - "refId": "C", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "count(count(node_cpu_seconds_total{instance=\"$node\",job=\"$job\"}) by (cpu))", - "format": "time_series", - "legendFormat": "CPU Core Count", - "range": true, - "step": 240 - } - }, - "refId": "D", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "CPU Core Count" - }, - "properties": [ - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "custom.lineStyle", - "value": { - "dash": [ - 10, - 10 - ], - "fill": "dash" - } - }, - { - "id": "color", - "value": { - "fixedColor": "dark-red", - "mode": "fixed" - } - } - ] - } - ] - } - } - } - } - }, - "panel-70": { - "kind": "Panel", - "spec": { - "id": 70, - "title": "Memory Vmalloc", - "description": "Usage of the kernel's vmalloc area, which provides virtual memory allocations for kernel modules and drivers. Includes total, used, and largest free block sizes", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_VmallocChunk_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "Vmalloc Free Chunk – Largest available block in vmalloc area", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_VmallocTotal_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "Vmalloc Total – Total size of the vmalloc memory area", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_VmallocUsed_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "Vmalloc Used – Portion of vmalloc area currently in use", - "range": true, - "step": 240 - } - }, - "refId": "C", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "bytes", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*Total.*/" - }, - "properties": [ - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "custom.lineStyle", - "value": { - "dash": [ - 10, - 10 - ], - "fill": "dash" - } - }, - { - "id": "color", - "value": { - "fixedColor": "dark-red", - "mode": "fixed" - } - } - ] - } - ] - } - } - } - } - }, - "panel-74": { - "kind": "Panel", - "spec": { - "id": 74, - "title": "Network Traffic Basic", - "description": "Per-interface network traffic (receive and transmit) in bits per second", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_network_receive_bytes_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])*8", - "format": "time_series", - "legendFormat": "Rx {{device}}", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_network_transmit_bytes_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])*8", - "format": "time_series", - "legendFormat": "Tx {{device}}", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "bps", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 40, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*Tx.*/" - }, - "properties": [ - { - "id": "custom.transform", - "value": "negative-Y" - } - ] - } - ] - } - } - } - } - }, - "panel-75": { - "kind": "Panel", - "spec": { - "id": 75, - "title": "RAM Total", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "exemplar": false, - "expr": "node_memory_MemTotal_bytes{instance=\"$node\",job=\"$job\"}", - "instant": true, - "range": false, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": { - "maxDataPoints": 100 - } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "stat", - "version": "11.6.1", - "spec": { - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "fieldConfig": { - "defaults": { - "unit": "bytes", - "decimals": 0, - "mappings": [ - { - "type": "special", - "options": { - "match": "null", - "result": { - "text": "N/A" - } - } - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "thresholds" - } - }, - "overrides": [] - } - } - } - } - }, - "panel-77": { - "kind": "Panel", - "spec": { - "id": 77, - "title": "CPU Basic", - "description": "CPU time spent busy vs idle, split by activity type", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "exemplar": false, - "expr": "avg(rate(node_cpu_seconds_total{instance=\"$node\",job=\"$job\", mode=\"system\"}[$__rate_interval]))", - "format": "time_series", - "instant": false, - "legendFormat": "Busy System", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "avg(rate(node_cpu_seconds_total{instance=\"$node\",job=\"$job\", mode=\"user\"}[$__rate_interval]))", - "format": "time_series", - "legendFormat": "Busy User", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "avg(rate(node_cpu_seconds_total{instance=\"$node\",job=\"$job\", mode=\"iowait\"}[$__rate_interval]))", - "format": "time_series", - "legendFormat": "Busy Iowait", - "range": true, - "step": 240 - } - }, - "refId": "C", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "avg(sum without(mode) (rate(node_cpu_seconds_total{instance=\"$node\",job=\"$job\", mode=~\".*irq\"}[$__rate_interval])))", - "format": "time_series", - "legendFormat": "Busy IRQs", - "range": true, - "step": 240 - } - }, - "refId": "D", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "avg(sum without (mode) (rate(node_cpu_seconds_total{instance=\"$node\",job=\"$job\", mode!='idle',mode!='user',mode!='system',mode!='iowait',mode!='irq',mode!='softirq'}[$__rate_interval])))", - "format": "time_series", - "legendFormat": "Busy Other", - "range": true, - "step": 240 - } - }, - "refId": "E", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "avg(rate(node_cpu_seconds_total{instance=\"$node\",job=\"$job\", mode=\"idle\"}[$__rate_interval]))", - "format": "time_series", - "legendFormat": "Idle", - "range": true, - "step": 240 - } - }, - "refId": "F", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true, - "width": 250 - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "desc" - } - }, - "fieldConfig": { - "defaults": { - "unit": "percentunit", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 40, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "smooth", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "percent" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Busy Iowait" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#890F02", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Idle" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#052B51", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Busy System" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#EAB839", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Busy User" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#0A437C", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Busy Other" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#6D1F62", - "mode": "fixed" - } - } - ] - } - ] - } - } - } - } - }, - "panel-78": { - "kind": "Panel", - "spec": { - "id": 78, - "title": "Memory Basic", - "description": "RAM and swap usage overview, including caches", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_MemTotal_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "Total", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_MemTotal_bytes{instance=\"$node\",job=\"$job\"} - node_memory_MemFree_bytes{instance=\"$node\",job=\"$job\"} - (node_memory_Cached_bytes{instance=\"$node\",job=\"$job\"} + node_memory_Buffers_bytes{instance=\"$node\",job=\"$job\"} + node_memory_SReclaimable_bytes{instance=\"$node\",job=\"$job\"})", - "format": "time_series", - "legendFormat": "Used", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_Cached_bytes{instance=\"$node\",job=\"$job\"} + node_memory_Buffers_bytes{instance=\"$node\",job=\"$job\"} + node_memory_SReclaimable_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "Cache + Buffer", - "range": true, - "step": 240 - } - }, - "refId": "C", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_memory_MemFree_bytes{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "legendFormat": "Free", - "range": true, - "step": 240 - } - }, - "refId": "D", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "(node_memory_SwapTotal_bytes{instance=\"$node\",job=\"$job\"} - node_memory_SwapFree_bytes{instance=\"$node\",job=\"$job\"})", - "format": "time_series", - "legendFormat": "Swap used", - "range": true, - "step": 240 - } - }, - "refId": "E", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true, - "width": 350 - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "bytes", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 40, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Swap used" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#BF1B00", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Total" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#E0F9D7", - "mode": "fixed" - } - }, - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "custom.stacking", - "value": { - "group": false, - "mode": "normal" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Cache + Buffer" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#052B51", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Free" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#7EB26D", - "mode": "fixed" - } - } - ] - } - ] - } - } - } - } - }, - "panel-8": { - "kind": "Panel", - "spec": { - "id": 8, - "title": "Context Switches / Interrupts", - "description": "Per-second rate of context switches and hardware interrupts. High values may indicate intense CPU or I/O activity", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_context_switches_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "legendFormat": "Context switches", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_intr_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "legendFormat": "Interrupts", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "ops", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-82": { - "kind": "Panel", - "spec": { - "id": 82, - "title": "TCP Direct Transition", - "description": "Rate of TCP connection initiations per second. 'Active' opens are initiated by this host. 'Passive' opens are accepted from incoming connections", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_netstat_Tcp_ActiveOpens{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "Active Opens", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_netstat_Tcp_PassiveOpens{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "Passive Opens", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "eps", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-84": { - "kind": "Panel", - "spec": { - "id": 84, - "title": "Network Traffic", - "description": "Incoming and outgoing network traffic per interface", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_network_receive_bytes_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])*8", - "format": "time_series", - "legendFormat": "{{device}} - Rx in", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_network_transmit_bytes_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])*8", - "format": "time_series", - "legendFormat": "{{device}} - Tx out", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "bps", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "out (-) / in (+)", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 40, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*out.*/" - }, - "properties": [ - { - "id": "custom.transform", - "value": "negative-Y" - } - ] - } - ] - } - } - } - } - }, - "panel-85": { - "kind": "Panel", - "spec": { - "id": 85, - "title": "TCP Connections", - "description": "Number of currently established TCP connections and the system's max supported limit. On Linux, MaxConn may return -1 to indicate a dynamic/unlimited configuration", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_netstat_Tcp_CurrEstab{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "Current Connections", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "node_netstat_Tcp_MaxConn{instance=\"$node\",job=\"$job\"}", - "format": "time_series", - "interval": "", - "legendFormat": "Max Connections", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*Max.*/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#890F02", - "mode": "fixed" - } - }, - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "custom.lineStyle", - "value": { - "dash": [ - 10, - 10 - ], - "fill": "dash" - } - } - ] - } - ] - } - } - } - } - }, - "panel-9": { - "kind": "Panel", - "spec": { - "id": 9, - "title": "Disk Read/Write IOps", - "description": "Number of I/O operations completed per second for the device (after merges), including both reads and writes", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_disk_reads_completed_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "legendFormat": "{{device}} - Read", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_disk_writes_completed_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "legendFormat": "{{device}} - Write", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "iops", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "read (–) / write (+)", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*Read.*/" - }, - "properties": [ - { - "id": "custom.transform", - "value": "negative-Y" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/sda.*/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "orange", - "mode": "fixed" - } - } - ] - } - ] - } - } - } - } - }, - "panel-91": { - "kind": "Panel", - "spec": { - "id": 91, - "title": "TCP SynCookie", - "description": "Rate of TCP SYN cookies sent, validated, and failed. These are used to protect against SYN flood attacks and manage TCP handshake resources under load", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_netstat_TcpExt_SyncookiesFailed{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "SYN Cookies Failed", - "range": true, - "step": 240 - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_netstat_TcpExt_SyncookiesRecv{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "SYN Cookies Validated", - "range": true, - "step": 240 - } - }, - "refId": "B", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "editorMode": "code", - "expr": "rate(node_netstat_TcpExt_SyncookiesSent{instance=\"$node\",job=\"$job\"}[$__rate_interval])", - "format": "time_series", - "interval": "", - "legendFormat": "SYN Cookies Sent", - "range": true, - "step": 240 - } - }, - "refId": "C", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.6.1", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "eps", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*Failed.*/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-red", - "mode": "fixed" - } - } - ] - } - ] - } - } - } - } - } - }, - "layout": { - "kind": "RowsLayout", - "spec": { - "rows": [ - { - "kind": "RowsLayoutRow", - "spec": { - "title": "Quick CPU / Mem / Disk", - "collapse": false, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 0, - "width": 3, - "height": 4, - "element": { - "kind": "ElementReference", - "name": "panel-323" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 3, - "y": 0, - "width": 3, - "height": 4, - "element": { - "kind": "ElementReference", - "name": "panel-20" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 6, - "y": 0, - "width": 3, - "height": 4, - "element": { - "kind": "ElementReference", - "name": "panel-155" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 9, - "y": 0, - "width": 3, - "height": 4, - "element": { - "kind": "ElementReference", - "name": "panel-16" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 0, - "width": 3, - "height": 4, - "element": { - "kind": "ElementReference", - "name": "panel-21" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 15, - "y": 0, - "width": 3, - "height": 4, - "element": { - "kind": "ElementReference", - "name": "panel-154" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 18, - "y": 0, - "width": 2, - "height": 2, - "element": { - "kind": "ElementReference", - "name": "panel-14" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 20, - "y": 0, - "width": 2, - "height": 2, - "element": { - "kind": "ElementReference", - "name": "panel-75" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 22, - "y": 0, - "width": 2, - "height": 2, - "element": { - "kind": "ElementReference", - "name": "panel-18" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 18, - "y": 2, - "width": 2, - "height": 2, - "element": { - "kind": "ElementReference", - "name": "panel-23" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 20, - "y": 2, - "width": 4, - "height": 2, - "element": { - "kind": "ElementReference", - "name": "panel-15" - } - } - } - ] - } - } - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "Basic CPU / Mem / Net / Disk", - "collapse": false, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 0, - "width": 12, - "height": 7, - "element": { - "kind": "ElementReference", - "name": "panel-77" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 0, - "width": 12, - "height": 7, - "element": { - "kind": "ElementReference", - "name": "panel-78" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 7, - "width": 12, - "height": 7, - "element": { - "kind": "ElementReference", - "name": "panel-74" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 7, - "width": 12, - "height": 7, - "element": { - "kind": "ElementReference", - "name": "panel-152" - } - } - } - ] - } - } - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "CPU / Memory / Net / Disk", - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 0, - "width": 12, - "height": 12, - "element": { - "kind": "ElementReference", - "name": "panel-3" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 0, - "width": 12, - "height": 12, - "element": { - "kind": "ElementReference", - "name": "panel-24" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 412, - "width": 12, - "height": 12, - "element": { - "kind": "ElementReference", - "name": "panel-84" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 412, - "width": 12, - "height": 12, - "element": { - "kind": "ElementReference", - "name": "panel-338" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 424, - "width": 12, - "height": 12, - "element": { - "kind": "ElementReference", - "name": "panel-229" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 424, - "width": 12, - "height": 12, - "element": { - "kind": "ElementReference", - "name": "panel-42" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 436, - "width": 12, - "height": 12, - "element": { - "kind": "ElementReference", - "name": "panel-43" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 436, - "width": 12, - "height": 12, - "element": { - "kind": "ElementReference", - "name": "panel-156" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 448, - "width": 12, - "height": 12, - "element": { - "kind": "ElementReference", - "name": "panel-127" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 448, - "width": 12, - "height": 12, - "element": { - "kind": "ElementReference", - "name": "panel-322" - } - } - } - ] - } - } - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "Memory Meminfo", - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 710, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-135" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 710, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-130" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 910, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-131" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 910, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-138" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 920, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-136" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 920, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-191" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 930, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-160" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 930, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-70" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 940, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-129" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 940, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-137" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 950, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-128" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 950, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-140" - } - } - } - ] - } - } - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "Memory Vmstat", - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 710, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-176" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 710, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-22" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 890, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-175" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 890, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-307" - } - } - } - ] - } - } - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "System Timesync", - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 710, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-260" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 710, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-291" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 860, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-168" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 860, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-333" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 870, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-334" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 870, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-335" - } - } - } - ] - } - } - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "System Processes", - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 710, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-62" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 710, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-315" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 740, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-148" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 740, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-305" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 750, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-313" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 750, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-314" - } - } - } - ] - } - } - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "System Misc", - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 790, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-8" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 790, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-7" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 800, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-321" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 800, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-306" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 810, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-259" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 810, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-151" - } - } - } - ] - } - } - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "Hardware Misc", - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 710, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-158" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 710, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-300" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 720, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-302" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 720, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-325" - } - } - } - ] - } - } - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "Systemd", - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 4200, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-298" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 4200, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-331" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 4210, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-297" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 4210, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-332" - } - } - } - ] - } - } - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "Storage Disk", - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 0, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-9" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 0, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-33" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 360, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-37" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 360, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-35" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 370, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-133" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 370, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-36" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 380, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-301" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 380, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-326" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 390, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-34" - } - } - } - ] - } - } - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "Storage Filesystem", - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 0, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-28" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 0, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-41" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 340, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-44" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 340, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-219" - } - } - } - ] - } - } - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "Network Traffic", - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 0, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-60" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 0, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-142" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 220, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-143" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 220, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-141" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 230, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-146" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 230, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-327" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 240, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-145" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 240, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-144" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 250, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-232" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 250, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-231" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 260, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-230" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 260, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-61" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 270, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-309" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 270, - "width": 6, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-280" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 18, - "y": 270, - "width": 6, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-288" - } - } - } - ] - } - } - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "Network Sockstat", - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 0, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-63" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 0, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-124" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 10, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-126" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 10, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-125" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 20, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-220" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 20, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-339" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 30, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-336" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 30, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-290" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 40, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-310" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 40, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-330" - } - } - } - ] - } - } - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "Network Netstat", - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 130, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-221" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 130, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-299" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 160, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-55" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 160, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-115" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 170, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-104" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 170, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-109" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 180, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-50" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 180, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-91" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 190, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-85" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 190, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-337" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 200, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-82" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 200, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-320" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 210, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-341" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 210, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-340" - } - } - } - ] - } - } - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "Node Exporter", - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 130, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-40" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 130, - "width": 12, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-308" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 140, - "width": 10, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-149" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 10, - "y": 140, - "width": 10, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-64" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 20, - "y": 140, - "width": 4, - "height": 10, - "element": { - "kind": "ElementReference", - "name": "panel-157" - } - } - } - ] - } - } - } - } - ] - } - }, - "links": [ - { - "title": "GitHub", - "type": "link", - "icon": "external link", - "tooltip": "", - "url": "https://github.com/rfmoz/grafana-dashboards", - "tags": [], - "asDropdown": false, - "targetBlank": true, - "includeVars": false, - "keepTime": false - }, - { - "title": "Grafana", - "type": "link", - "icon": "external link", - "tooltip": "", - "url": "https://grafana.com/grafana/dashboards/1860", - "tags": [], - "asDropdown": false, - "targetBlank": true, - "includeVars": false, - "keepTime": false - } - ], - "liveNow": false, - "preload": false, - "tags": [ - "linux" - ], - "timeSettings": { - "timezone": "browser", - "from": "now-24h", - "to": "now", - "autoRefresh": "1m", - "autoRefreshIntervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "hideTimepicker": false, - "fiscalYearStartMonth": 0 - }, - "title": "Node Exporter Full", - "variables": [ - { - "kind": "DatasourceVariable", - "spec": { - "name": "ds_prometheus", - "pluginId": "prometheus", - "refresh": "onDashboardLoad", - "regex": "", - "current": { - "text": "", - "value": "" - }, - "options": [], - "multi": false, - "includeAll": false, - "label": "Datasource", - "hide": "dontHide", - "skipUrlSync": false, - "allowCustomValue": true - } - }, - { - "kind": "QueryVariable", - "spec": { - "name": "job", - "current": { - "text": "", - "value": "" - }, - "label": "Job", - "hide": "dontHide", - "refresh": "onDashboardLoad", - "skipUrlSync": false, - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "query": "label_values(node_uname_info, job)", - "refId": "Prometheus-job-Variable-Query" - } - }, - "regex": "", - "sort": "alphabeticalAsc", - "definition": "", - "options": [], - "multi": false, - "includeAll": false, - "allowCustomValue": true - } - }, - { - "kind": "QueryVariable", - "spec": { - "name": "nodename", - "current": { - "text": "", - "value": "" - }, - "label": "Nodename", - "hide": "dontHide", - "refresh": "onDashboardLoad", - "skipUrlSync": false, - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "query": "label_values(node_uname_info{job=\"$job\"}, nodename)", - "refId": "Prometheus-nodename-Variable-Query" - } - }, - "regex": "", - "sort": "alphabeticalAsc", - "definition": "label_values(node_uname_info{job=\"$job\"}, nodename)", - "options": [], - "multi": false, - "includeAll": false, - "allowCustomValue": true - } - }, - { - "kind": "QueryVariable", - "spec": { - "name": "node", - "current": { - "text": "", - "value": "" - }, - "label": "Instance", - "hide": "dontHide", - "refresh": "onDashboardLoad", - "skipUrlSync": false, - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${ds_prometheus}" - }, - "spec": { - "query": "label_values(node_uname_info{job=\"$job\", nodename=\"$nodename\"}, instance)", - "refId": "Prometheus-node-Variable-Query" - } - }, - "regex": "", - "sort": "alphabeticalAsc", - "definition": "label_values(node_uname_info{job=\"$job\", nodename=\"$nodename\"}, instance)", - "options": [], - "multi": false, - "includeAll": false, - "allowCustomValue": true - } - } - ] - } -}
\ No newline at end of file diff --git a/modules/by-name/mo/monitoring/dashboards/performance.json b/modules/by-name/mo/monitoring/dashboards/performance.json deleted file mode 100644 index bb8c88f..0000000 --- a/modules/by-name/mo/monitoring/dashboards/performance.json +++ /dev/null @@ -1,1606 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": 6, - "links": [], - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 12, - "panels": [], - "title": "Node", - "type": "row" - }, - { - "datasource": { - "type": "prometheus", - "uid": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": 3600000, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "fieldMinMax": false, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "transparent", - "value": 0.05 - } - ] - }, - "unit": "mbytes" - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "A" - }, - "properties": [ - { - "id": "custom.axisPlacement", - "value": "right" - }, - { - "id": "unit", - "value": "ms" - }, - { - "id": "decimals" - }, - { - "id": "color", - "value": { - "fixedColor": "dark-red", - "mode": "fixed" - } - }, - { - "id": "custom.lineStyle", - "value": { - "dash": [ - 10, - 10 - ], - "fill": "dash" - } - }, - { - "id": "custom.lineWidth", - "value": 2 - } - ] - }, - { - "matcher": { - "id": "byFrameRefID", - "options": "B" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "green", - "mode": "fixed" - } - }, - { - "id": "custom.lineStyle", - "value": { - "dash": [ - 0, - 10 - ], - "fill": "dot" - } - }, - { - "id": "custom.lineWidth", - "value": 2 - }, - { - "id": "custom.fillOpacity", - "value": 10 - }, - { - "id": "custom.axisPlacement", - "value": "auto" - }, - { - "id": "custom.stacking", - "value": { - "group": "A", - "mode": "none" - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 1 - }, - "id": 20, - "options": { - "legend": { - "calcs": [ - "max", - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true, - "width": 300 - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.4.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "editorMode": "code", - "expr": "netdata_system_memory_full_pressure_stall_time_ms_average{hostname=~\"$hostname\"} * -1", - "hide": false, - "instant": false, - "legendFormat": "full stall time", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "editorMode": "code", - "expr": "sum(node_memory_MemTotal_bytes{instance=\"127.0.0.1:9112\"}) / 1000000 - sum(netdata_mem_available_MiB_average{instance=~\"$instance\"})", - "hide": false, - "instant": false, - "legendFormat": "remaining", - "range": true, - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "disableTextWrap": false, - "editorMode": "code", - "expr": "sum by(dimension, service_name) (netdata_systemd_service_memory_usage_MiB_average{instance=~\"$instance\", service_name=~\"$service\", dimension=\"ram\"})", - "fullMetaSearch": false, - "hide": false, - "includeNullMetadata": true, - "legendFormat": "{{service_name}}", - "range": true, - "refId": "used", - "useBackend": false - } - ], - "title": "Memory", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": 3600000, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "fieldMinMax": false, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "transparent", - "value": 0.05 - } - ] - }, - "unit": "mbytes" - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "A" - }, - "properties": [ - { - "id": "custom.axisPlacement", - "value": "right" - }, - { - "id": "unit", - "value": "ms" - }, - { - "id": "decimals" - }, - { - "id": "color", - "value": { - "fixedColor": "dark-red", - "mode": "fixed" - } - }, - { - "id": "custom.lineStyle", - "value": { - "dash": [ - 10, - 10 - ], - "fill": "dash" - } - }, - { - "id": "custom.lineWidth", - "value": 2 - } - ] - }, - { - "matcher": { - "id": "byFrameRefID", - "options": "B" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "green", - "mode": "fixed" - } - }, - { - "id": "custom.lineStyle", - "value": { - "dash": [ - 0, - 10 - ], - "fill": "dot" - } - }, - { - "id": "custom.lineWidth", - "value": 2 - }, - { - "id": "custom.fillOpacity", - "value": 10 - }, - { - "id": "custom.axisPlacement", - "value": "auto" - }, - { - "id": "custom.stacking", - "value": { - "group": "A", - "mode": "none" - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 1 - }, - "id": 23, - "options": { - "legend": { - "calcs": [ - "max", - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true, - "width": 300 - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.4.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "editorMode": "code", - "expr": "netdata_system_memory_full_pressure_stall_time_ms_average{hostname=~\"$hostname\"} * -1", - "hide": false, - "instant": false, - "legendFormat": "full stall time", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "editorMode": "code", - "expr": "sum(node_memory_SwapFree_bytes{instance=~\"127.0.0.1:9112\"}) / 1000000", - "hide": false, - "instant": false, - "legendFormat": "remaining", - "range": true, - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "disableTextWrap": false, - "editorMode": "code", - "expr": "sum by(dimension, service_name) (netdata_systemd_service_memory_usage_MiB_average{hostname=~\"$hostname\", service_name=~\"$service\", dimension=\"swap\"})", - "fullMetaSearch": false, - "hide": false, - "includeNullMetadata": true, - "legendFormat": "{{service_name}}", - "range": true, - "refId": "used", - "useBackend": false - } - ], - "title": "Swap", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": 3600000, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "fieldMinMax": false, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "transparent", - "value": 0.05 - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "B" - }, - "properties": [ - { - "id": "custom.axisPlacement", - "value": "right" - }, - { - "id": "unit", - "value": "ms" - }, - { - "id": "color", - "value": { - "fixedColor": "orange", - "mode": "fixed" - } - }, - { - "id": "custom.lineStyle", - "value": { - "dash": [ - 0, - 10 - ], - "fill": "dot" - } - }, - { - "id": "custom.lineWidth", - "value": 2 - }, - { - "id": "custom.fillOpacity", - "value": 34 - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 9 - }, - "id": 22, - "options": { - "legend": { - "calcs": [ - "max", - "sum" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true, - "width": 300 - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.4.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "editorMode": "code", - "expr": "netdata_system_cpu_some_pressure_stall_time_ms_average{hostname=~\"$hostname\"} * -1", - "hide": false, - "instant": false, - "legendFormat": "some stall time", - "range": true, - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "disableTextWrap": false, - "editorMode": "code", - "expr": "sum by(dimension, service_name) (netdata_systemd_service_cpu_utilization_percentage_average{hostname=~\"$hostname\", service_name=~\"$service\"})", - "fullMetaSearch": false, - "hide": false, - "includeNullMetadata": true, - "legendFormat": "{{service_name}} / {{dimension}}", - "range": true, - "refId": "used", - "useBackend": false - } - ], - "title": "CPU", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": 3600000, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "fieldMinMax": false, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "transparent", - "value": 0.05 - } - ] - }, - "unit": "Kibits" - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "A" - }, - "properties": [ - { - "id": "custom.axisPlacement", - "value": "right" - }, - { - "id": "unit", - "value": "ms" - }, - { - "id": "color", - "value": { - "fixedColor": "red", - "mode": "fixed" - } - }, - { - "id": "custom.lineStyle", - "value": { - "dash": [ - 0, - 10 - ], - "fill": "dot" - } - }, - { - "id": "custom.lineWidth", - "value": 2 - }, - { - "id": "custom.fillOpacity", - "value": 12 - }, - { - "id": "custom.stacking", - "value": { - "group": "A", - "mode": "none" - } - } - ] - }, - { - "matcher": { - "id": "byFrameRefID", - "options": "B" - }, - "properties": [ - { - "id": "custom.axisPlacement", - "value": "right" - }, - { - "id": "unit", - "value": "ms" - }, - { - "id": "color", - "value": { - "fixedColor": "orange", - "mode": "fixed" - } - }, - { - "id": "custom.lineStyle", - "value": { - "dash": [ - 0, - 10 - ], - "fill": "dot" - } - }, - { - "id": "custom.lineWidth", - "value": 2 - }, - { - "id": "custom.fillOpacity", - "value": 17 - }, - { - "id": "custom.stacking", - "value": { - "group": "A", - "mode": "none" - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 9 - }, - "id": 21, - "options": { - "legend": { - "calcs": [ - "max", - "sum" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true, - "width": 300 - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.4.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "editorMode": "code", - "expr": "netdata_system_io_full_pressure_stall_time_ms_average{hostname=~\"$hostname\"} * -1", - "hide": false, - "instant": false, - "legendFormat": "full stall time", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "editorMode": "code", - "expr": "netdata_system_io_some_pressure_stall_time_ms_average{instance=~\"$instance\"} * -1", - "hide": false, - "instant": false, - "legendFormat": "some stall time", - "range": true, - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "disableTextWrap": false, - "editorMode": "code", - "expr": "sum by(dimension, service_name) (netdata_systemd_service_disk_io_KiB_persec_average{instance=~\"$instance\", service_name=~\"$service\"})", - "fullMetaSearch": false, - "hide": false, - "includeNullMetadata": true, - "legendFormat": "{{service_name}} / {{dimension}}", - "range": true, - "refId": "used", - "useBackend": false - } - ], - "title": "Disk I/O", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "Kibits" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 17 - }, - "id": 18, - "options": { - "legend": { - "calcs": [ - "max", - "sum" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.4.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "editorMode": "code", - "expr": "netdata_disk_io_KiB_persec_average{hostname=~\"$hostname\", chart=~\"disk.sd.+\"}", - "instant": false, - "legendFormat": "{{device}} / {{dimension}}", - "range": true, - "refId": "A" - } - ], - "title": "Disk I/O", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 25 - }, - "id": 4, - "panels": [], - "title": "Network Requests", - "type": "row" - }, - { - "datasource": { - "type": "loki", - "uid": "cd6cc53e-840c-484d-85f7-96fede324006" - }, - "fieldConfig": { - "defaults": { - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "scaleDistribution": { - "type": "linear" - } - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 26 - }, - "id": 17, - "links": [ - { - "title": "explore", - "url": "https://grafana.tiserbox.com/explore?panes=%7B%22HWt%22:%7B%22datasource%22:%22cd6cc53e-840c-484d-85f7-96fede324006%22,%22queries%22:%5B%7B%22refId%22:%22A%22,%22expr%22:%22%7Bunit%3D%5C%22nginx.service%5C%22%7D%20%7C%20pattern%20%5C%22%3C_%3E%20%3C_%3E%20%3Cline%3E%5C%22%20%7C%20line_format%20%5C%22%7B%7B.line%7D%7D%5C%22%20%7C%20json%20%7C%20status%20%21~%20%5C%222..%5C%22%20%7C%20__error__%20%21%3D%20%5C%22JSONParserErr%5C%22%22,%22queryType%22:%22range%22,%22datasource%22:%7B%22type%22:%22loki%22,%22uid%22:%22cd6cc53e-840c-484d-85f7-96fede324006%22%7D,%22editorMode%22:%22code%22%7D%5D,%22range%22:%7B%22from%22:%22now-6h%22,%22to%22:%22now%22%7D%7D%7D&schemaVersion=1&orgId=1" - } - ], - "options": { - "calculate": false, - "cellGap": 1, - "color": { - "exponent": 0.5, - "fill": "dark-orange", - "mode": "scheme", - "reverse": false, - "scale": "exponential", - "scheme": "RdBu", - "steps": 62 - }, - "exemplars": { - "color": "rgba(255,0,255,0.7)" - }, - "filterValues": { - "le": 1e-9 - }, - "legend": { - "show": true - }, - "rowsFrame": { - "layout": "auto" - }, - "tooltip": { - "mode": "single", - "showColorScale": false, - "yHistogram": false - }, - "yAxis": { - "axisPlacement": "left", - "decimals": 0, - "reverse": false, - "unit": "s" - } - }, - "pluginVersion": "11.4.0", - "targets": [ - { - "datasource": { - "type": "loki", - "uid": "cd6cc53e-840c-484d-85f7-96fede324006" - }, - "editorMode": "code", - "expr": "{hostname=~\"$hostname\",unit=\"nginx.service\"} | pattern \"<_> <_> <line>\" | line_format \"{{.line}}\" | json | __error__ != \"JSONParserErr\" | request_time > 100", - "legendFormat": "{{server_name}}", - "queryType": "range", - "refId": "A" - } - ], - "title": "Slow Requests Histogram > 100ms", - "transformations": [ - { - "id": "extractFields", - "options": { - "keepTime": false, - "replace": false, - "source": "Line" - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Line": true, - "body_bytes_sent": true, - "bytes_sent": true, - "gzip_ration": true, - "id": true, - "labels": true, - "post": true, - "referrer": true, - "remote_addr": true, - "remote_user": true, - "request": true, - "request_length": true, - "server_name": true, - "status": true, - "time_local": true, - "tsNs": true, - "upstream_addr": true, - "upstream_connect_time": true, - "upstream_header_time": true, - "upstream_response_time": true, - "upstream_status": true, - "user_agent": true - }, - "indexByName": {}, - "renameByName": {} - } - }, - { - "id": "convertFieldType", - "options": { - "conversions": [ - { - "destinationType": "number", - "targetField": "request_time" - } - ], - "fields": {} - } - }, - { - "id": "heatmap", - "options": { - "xBuckets": { - "mode": "size", - "value": "" - }, - "yBuckets": { - "mode": "size", - "scale": { - "log": 2, - "type": "log" - }, - "value": "" - } - } - } - ], - "type": "heatmap" - }, - { - "datasource": { - "type": "loki", - "uid": "cd6cc53e-840c-484d-85f7-96fede324006" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "points", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "ms" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 26 - }, - "id": 2, - "options": { - "legend": { - "calcs": [ - "max", - "mean", - "variance" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.4.0", - "targets": [ - { - "datasource": { - "type": "loki", - "uid": "cd6cc53e-840c-484d-85f7-96fede324006" - }, - "editorMode": "code", - "expr": "{hostname=~\"$hostname\",unit=\"nginx.service\"} | pattern \"<_> <_> <line>\" | line_format \"{{.line}}\" | json | __error__ != \"JSONParserErr\" | request_time > 100", - "legendFormat": "", - "queryType": "range", - "refId": "A" - } - ], - "title": "Requests > 100ms", - "transformations": [ - { - "id": "extractFields", - "options": { - "keepTime": true, - "replace": true, - "source": "labels" - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "body_bytes_sent": true, - "bytes_sent": true, - "gzip_ration": true, - "job": true, - "line": true, - "post": true, - "referrer": true, - "remote_addr": true, - "remote_user": true, - "request": true, - "request_length": true, - "status": true, - "time_local": true, - "unit": true, - "upstream_addr": true, - "upstream_connect_time": true, - "upstream_header_time": true, - "upstream_response_time": true, - "upstream_status": true, - "user_agent": true - }, - "indexByName": {}, - "renameByName": {} - } - }, - { - "id": "convertFieldType", - "options": { - "conversions": [ - { - "dateFormat": "", - "destinationType": "number", - "targetField": "request_time" - } - ], - "fields": {} - } - }, - { - "id": "partitionByValues", - "options": { - "fields": [ - "server_name" - ] - } - }, - { - "id": "renameByRegex", - "options": { - "regex": "request_time (.*)", - "renamePattern": "$1" - } - } - ], - "type": "timeseries" - }, - { - "datasource": { - "type": "loki", - "uid": "cd6cc53e-840c-484d-85f7-96fede324006" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "filterable": false, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 34 - }, - "id": 3, - "links": [ - { - "title": "explore", - "url": "https://grafana.tiserbox.com/explore?panes=%7B%22HWt%22:%7B%22datasource%22:%22cd6cc53e-840c-484d-85f7-96fede324006%22,%22queries%22:%5B%7B%22refId%22:%22A%22,%22expr%22:%22%7Bunit%3D%5C%22nginx.service%5C%22%7D%20%7C%20pattern%20%5C%22%3C_%3E%20%3C_%3E%20%3Cline%3E%5C%22%20%7C%20line_format%20%5C%22%7B%7B.line%7D%7D%5C%22%20%7C%20json%20%7C%20status%20%21~%20%5C%222..%5C%22%20%7C%20__error__%20%21%3D%20%5C%22JSONParserErr%5C%22%22,%22queryType%22:%22range%22,%22datasource%22:%7B%22type%22:%22loki%22,%22uid%22:%22cd6cc53e-840c-484d-85f7-96fede324006%22%7D,%22editorMode%22:%22code%22%7D%5D,%22range%22:%7B%22from%22:%22now-6h%22,%22to%22:%22now%22%7D%7D%7D&schemaVersion=1&orgId=1" - } - ], - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "enablePagination": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "11.4.0", - "targets": [ - { - "datasource": { - "type": "loki", - "uid": "cd6cc53e-840c-484d-85f7-96fede324006" - }, - "editorMode": "code", - "expr": "{hostname=~\"$hostname\",unit=\"nginx.service\"} | pattern \"<_> <_> <line>\" | line_format \"{{.line}}\" | json | __error__ != \"JSONParserErr\" | request_time > 1", - "queryType": "range", - "refId": "A" - } - ], - "title": "Network Requests Above 1s", - "transformations": [ - { - "id": "extractFields", - "options": { - "replace": true, - "source": "Line" - } - } - ], - "type": "table" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 42 - }, - "id": 7, - "panels": [], - "title": "Databases", - "type": "row" - }, - { - "datasource": { - "type": "loki", - "uid": "cd6cc53e-840c-484d-85f7-96fede324006" - }, - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "duration_ms" - }, - "properties": [ - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "unit" - }, - "properties": [ - { - "id": "custom.width", - "value": 150 - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 43 - }, - "id": 6, - "links": [ - { - "title": "explore", - "url": "https://grafana.tiserbox.com/explore?panes=%7B%22HWt%22:%7B%22datasource%22:%22cd6cc53e-840c-484d-85f7-96fede324006%22,%22queries%22:%5B%7B%22refId%22:%22A%22,%22expr%22:%22%7Bunit%3D%5C%22nginx.service%5C%22%7D%20%7C%20pattern%20%5C%22%3C_%3E%20%3C_%3E%20%3Cline%3E%5C%22%20%7C%20line_format%20%5C%22%7B%7B.line%7D%7D%5C%22%20%7C%20json%20%7C%20status%20%21~%20%5C%222..%5C%22%20%7C%20__error__%20%21%3D%20%5C%22JSONParserErr%5C%22%22,%22queryType%22:%22range%22,%22datasource%22:%7B%22type%22:%22loki%22,%22uid%22:%22cd6cc53e-840c-484d-85f7-96fede324006%22%7D,%22editorMode%22:%22code%22%7D%5D,%22range%22:%7B%22from%22:%22now-6h%22,%22to%22:%22now%22%7D%7D%7D&schemaVersion=1&orgId=1" - } - ], - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "11.4.0", - "targets": [ - { - "datasource": { - "type": "loki", - "uid": "cd6cc53e-840c-484d-85f7-96fede324006" - }, - "editorMode": "code", - "expr": "{hostname=~\"$hostname\",unit=\"postgresql.service\"} | regexp \".*duration: (?P<duration_ms>[0-9.]+) ms (?P<statement>.*)\" | duration_ms > 500 | __error__ != \"LabelFilterErr\"", - "queryType": "range", - "refId": "A" - } - ], - "title": "Slow DB Queries", - "transformations": [ - { - "id": "extractFields", - "options": { - "replace": true, - "source": "labels" - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "job": true - }, - "indexByName": { - "duration_ms": 0, - "job": 1, - "statement": 3, - "unit": 2 - }, - "renameByName": {} - } - } - ], - "type": "table" - } - ], - "preload": false, - "refresh": "1m", - "schemaVersion": 40, - "tags": [], - "templating": { - "list": [ - { - "allValue": ".*", - "current": { - "text": [ - "baryum" - ], - "value": [ - "baryum" - ] - }, - "datasource": { - "type": "prometheus", - "uid": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "definition": "label_values(netdata_systemd_service_unit_state_state_average,hostname)", - "includeAll": false, - "multi": true, - "name": "hostname", - "options": [], - "query": { - "qryType": 1, - "query": "label_values(netdata_systemd_service_unit_state_state_average,hostname)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "refresh": 1, - "regex": "", - "type": "query" - }, - { - "allValue": ".*", - "current": { - "text": [ - "All" - ], - "value": [ - "$__all" - ] - }, - "datasource": { - "type": "prometheus", - "uid": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "definition": "label_values(netdata_systemd_service_unit_state_state_average,unit_name)", - "includeAll": true, - "multi": true, - "name": "service", - "options": [], - "query": { - "qryType": 1, - "query": "label_values(netdata_systemd_service_unit_state_state_average,unit_name)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "refresh": 1, - "regex": "", - "type": "query" - } - ] - }, - "time": { - "from": "now-30m", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Performance", - "uid": "e01156bf-cdba-42eb-9845-a401dd634d41", - "version": 82, - "weekStart": "" -} diff --git a/modules/by-name/mo/monitoring/dashboards/scraping_jobs.json b/modules/by-name/mo/monitoring/dashboards/scraping_jobs.json deleted file mode 100644 index 39921d0..0000000 --- a/modules/by-name/mo/monitoring/dashboards/scraping_jobs.json +++ /dev/null @@ -1,334 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": 5, - "links": [], - "panels": [ - { - "datasource": { - "type": "loki", - "uid": "cd6cc53e-840c-484d-85f7-96fede324006" - }, - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 0 - }, - "id": 5, - "options": { - "dedupStrategy": "none", - "enableInfiniteScrolling": false, - "enableLogDetails": true, - "prettifyLogMessage": false, - "showCommonLabels": false, - "showLabels": false, - "showTime": true, - "sortOrder": "Descending", - "wrapLogMessage": false - }, - "pluginVersion": "12.2.0", - "targets": [ - { - "datasource": { - "type": "loki", - "uid": "cd6cc53e-840c-484d-85f7-96fede324006" - }, - "direction": "backward", - "editorMode": "code", - "expr": "{unit=~\"prometheus-.*-exporter.service\"}", - "queryType": "range", - "refId": "A" - } - ], - "title": "Exporter Logs", - "type": "logs" - }, - { - "datasource": { - "type": "prometheus", - "uid": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "red", - "mode": "shades" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 0 - }, - "id": 4, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "12.2.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "editorMode": "code", - "expr": "rate(net_conntrack_dialer_conn_failed_total{hostname=~\"$hostname\"}[2m]) > 0", - "instant": false, - "legendFormat": "{{dialer_name}} - {{reason}}", - "range": true, - "refId": "A" - } - ], - "title": "Errors", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "red", - "mode": "thresholds" - }, - "custom": { - "axisPlacement": "auto", - "fillOpacity": 70, - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineWidth": 0, - "spanNulls": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 1 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 8 - }, - "id": 3, - "options": { - "alignValue": "center", - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "mergeValues": true, - "rowHeight": 0.9, - "showValue": "never", - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "12.2.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "editorMode": "code", - "expr": "prometheus_sd_discovered_targets{hostname=~\"$hostname\"}", - "hide": false, - "instant": false, - "legendFormat": "{{config}}", - "range": true, - "refId": "All" - }, - { - "datasource": { - "type": "prometheus", - "uid": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "editorMode": "code", - "expr": "label_replace(increase((sum by(dialer_name) (net_conntrack_dialer_conn_failed_total{hostname=~\"$hostname\"}))[15m:1m]), \"config\", \"$1\", \"dialer_name\", \"(.*)\")", - "hide": false, - "instant": false, - "legendFormat": "{{dialer_name}}", - "range": true, - "refId": "Failed" - } - ], - "title": "Scraping jobs", - "transformations": [ - { - "id": "labelsToFields", - "options": { - "keepLabels": [ - "config" - ], - "mode": "columns" - } - }, - { - "id": "merge", - "options": {} - }, - { - "id": "organize", - "options": { - "excludeByName": { - "prometheus_sd_discovered_targets": true - }, - "indexByName": {}, - "renameByName": { - "prometheus_sd_discovered_targets": "" - } - } - }, - { - "id": "partitionByValues", - "options": { - "fields": [ - "config" - ] - } - } - ], - "type": "state-timeline" - } - ], - "preload": false, - "refresh": "", - "schemaVersion": 42, - "tags": [], - "templating": { - "list": [ - { - "current": { - "text": "baryum", - "value": "baryum" - }, - "definition": "label_values(up,hostname)", - "includeAll": false, - "name": "hostname", - "options": [], - "query": { - "qryType": 1, - "query": "label_values(up,hostname)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "refresh": 1, - "regex": "", - "type": "query" - } - ] - }, - "time": { - "from": "now-6h", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Scraping Jobs", - "uid": "debb763d-77aa-47bd-9290-2e02583c8ed2", - "version": 24 -} diff --git a/modules/by-name/mo/monitoring/dashboards/systemd_exporter.json b/modules/by-name/mo/monitoring/dashboards/systemd_exporter.json deleted file mode 100644 index 7a7e67c..0000000 --- a/modules/by-name/mo/monitoring/dashboards/systemd_exporter.json +++ /dev/null @@ -1,2870 +0,0 @@ -{ - "apiVersion": "dashboard.grafana.app/v2", - "kind": "Dashboard", - "metadata": { - "name": "d67da086-b996-4b94-be01-84e607a60956", - "namespace": "default", - "uid": "5fdf1a03-a8fd-4697-aaaf-ef7e13e33ce9", - "resourceVersion": "1784477451414701", - "generation": 10, - "creationTimestamp": "2026-07-19T15:05:16Z", - "labels": { - "grafana.app/deprecatedInternalID": "2699293740498944" - }, - "annotations": { - "grafana.app/createdBy": "user:dfsj9uc3855oga", - "grafana.app/folder": "", - "grafana.app/saved-from-ui": "Grafana v13.0.3 (NA)", - "grafana.app/updatedBy": "user:dfsj9uc3855oga", - "grafana.app/updatedTimestamp": "2026-07-19T16:10:51Z" - } - }, - "spec": { - "annotations": [ - { - "kind": "AnnotationQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "grafana", - "version": "v0", - "datasource": { - "name": "-- Grafana --" - }, - "spec": {} - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "builtIn": true - } - } - ], - "cursorSync": "Off", - "description": "Dashboard for prometheus systemd exporter", - "editable": true, - "elements": { - "panel-1": { - "kind": "Panel", - "spec": { - "id": 1, - "title": "Exporter build info", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "spec": { - "editorMode": "code", - "exemplar": false, - "expr": "systemd_exporter_build_info", - "format": "table", - "instant": true, - "legendFormat": "__auto", - "range": false - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "table", - "version": "13.0.3", - "spec": { - "options": { - "cellHeight": "sm", - "showHeader": true - }, - "fieldConfig": { - "defaults": { - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "footer": { - "reducers": [] - }, - "inspect": false - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Time" - }, - "properties": [ - { - "id": "custom.hideFrom.viz", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "branch" - }, - "properties": [ - { - "id": "custom.hideFrom.viz", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "__name__" - }, - "properties": [ - { - "id": "custom.hideFrom.viz", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "instance" - }, - "properties": [ - { - "id": "custom.hideFrom.viz", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Value" - }, - "properties": [ - { - "id": "custom.hideFrom.viz", - "value": true - } - ] - } - ] - } - } - } - } - }, - "panel-10": { - "kind": "Panel", - "spec": { - "id": 10, - "title": "Service Failed State", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "spec": { - "editorMode": "code", - "expr": "count by (state) (systemd_unit_state{instance=~\"$instance\",state=\"failed\"}==1)", - "instant": false, - "legendFormat": "{{state}}", - "range": true - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "stat", - "version": "13.0.3", - "spec": { - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "fieldConfig": { - "defaults": { - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - }, - { - "value": 1, - "color": "red" - } - ] - }, - "color": { - "mode": "thresholds" - }, - "noValue": "0" - }, - "overrides": [] - } - } - } - } - }, - "panel-11": { - "kind": "Panel", - "spec": { - "id": 11, - "title": "Service Active State", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "spec": { - "editorMode": "code", - "expr": "count by (state) (systemd_unit_state{instance=~\"$instance\",state=\"active\"}==1)", - "instant": false, - "legendFormat": "{{state}}", - "range": true - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "stat", - "version": "13.0.3", - "spec": { - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "fieldConfig": { - "defaults": { - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - } - ] - }, - "color": { - "mode": "thresholds" - }, - "noValue": "0" - }, - "overrides": [] - } - } - } - } - }, - "panel-12": { - "kind": "Panel", - "spec": { - "id": 12, - "title": "Service Inactive State", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "spec": { - "editorMode": "code", - "expr": "count by (state) (systemd_unit_state{instance=~\"$instance\",state=\"inactive\"}==1)", - "instant": false, - "legendFormat": "{{state}}", - "range": true - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "stat", - "version": "13.0.3", - "spec": { - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "fieldConfig": { - "defaults": { - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - } - ] - }, - "color": { - "mode": "thresholds" - }, - "noValue": "0" - }, - "overrides": [] - } - } - } - } - }, - "panel-13": { - "kind": "Panel", - "spec": { - "id": 13, - "title": "Service Dectivating State", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "spec": { - "editorMode": "code", - "expr": "count by (state) (systemd_unit_state{instance=~\"$instance\",state=\"deactivating\"}==1)", - "instant": false, - "legendFormat": "{{state}}", - "range": true - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "stat", - "version": "13.0.3", - "spec": { - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "fieldConfig": { - "defaults": { - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - } - ] - }, - "color": { - "mode": "thresholds" - }, - "noValue": "0" - }, - "overrides": [] - } - } - } - } - }, - "panel-14": { - "kind": "Panel", - "spec": { - "id": 14, - "title": "Service State", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "spec": { - "editorMode": "code", - "expr": "count by (state) (systemd_unit_state{instance=~\"$instance\"}==1)", - "instant": false, - "legendFormat": "{{state}}", - "range": true - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "13.0.3", - "spec": { - "options": { - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-15": { - "kind": "Panel", - "spec": { - "id": 15, - "title": "Service Active services", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "spec": { - "$$hashKey": "object:24", - "aggregation": "Last", - "decimals": 2, - "displayAliasType": "Warning / Critical", - "displayType": "Regular", - "displayValueWithAlias": "Never", - "editorMode": "code", - "expr": "sum by (name,state) (systemd_unit_state{instance=~\"$instance\",state=\"active\"}) == 1", - "instant": false, - "legendFormat": "{{name}}", - "range": true, - "units": "none", - "valueHandler": "Number Threshold" - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "13.0.3", - "spec": { - "options": { - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "max": 1, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-16": { - "kind": "Panel", - "spec": { - "id": 16, - "title": "Service Inctive services", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "spec": { - "$$hashKey": "object:24", - "aggregation": "Last", - "decimals": 2, - "displayAliasType": "Warning / Critical", - "displayType": "Regular", - "displayValueWithAlias": "Never", - "editorMode": "code", - "exemplar": false, - "expr": "sum by (name,state) (systemd_unit_state{instance=~\"$instance\",state=\"inactive\"}) == 1", - "instant": false, - "legendFormat": "{{name}} ", - "range": true, - "units": "none", - "valueHandler": "Number Threshold" - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "13.0.3", - "spec": { - "options": { - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "max": 1, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-17": { - "kind": "Panel", - "spec": { - "id": 17, - "title": "Service Activating services", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "spec": { - "$$hashKey": "object:24", - "aggregation": "Last", - "decimals": 2, - "displayAliasType": "Warning / Critical", - "displayType": "Regular", - "displayValueWithAlias": "Never", - "editorMode": "builder", - "expr": "sum by(name, state) (systemd_unit_state{instance=~\"$instance\", state=\"activating\"}) == 1", - "instant": false, - "legendFormat": "{{name}}", - "range": true, - "units": "none", - "valueHandler": "Number Threshold" - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "13.0.3", - "spec": { - "options": { - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "max": 1, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-18": { - "kind": "Panel", - "spec": { - "id": 18, - "title": "Service Failed services", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "spec": { - "$$hashKey": "object:24", - "aggregation": "Last", - "decimals": 2, - "displayAliasType": "Warning / Critical", - "displayType": "Regular", - "displayValueWithAlias": "Never", - "editorMode": "code", - "expr": "sum by (name,state) (systemd_unit_state{instance=~\"$instance\",state=\"failed\"}) == 1", - "instant": false, - "legendFormat": "{{name}}", - "range": true, - "units": "none", - "valueHandler": "Number Threshold" - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "13.0.3", - "spec": { - "options": { - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "max": 1, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-19": { - "kind": "Panel", - "spec": { - "id": 19, - "title": "Service Devativating services", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "spec": { - "$$hashKey": "object:24", - "aggregation": "Last", - "decimals": 2, - "displayAliasType": "Warning / Critical", - "displayType": "Regular", - "displayValueWithAlias": "Never", - "editorMode": "builder", - "expr": "sum by(name, state) (systemd_unit_state{instance=~\"$instance\", state=\"deactivating\"}) == 1", - "instant": false, - "legendFormat": "{{name}}", - "range": true, - "units": "none", - "valueHandler": "Number Threshold" - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "13.0.3", - "spec": { - "options": { - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "max": 1, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-2": { - "kind": "Panel", - "spec": { - "id": 2, - "title": "Service Egress Traffic", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "spec": { - "editorMode": "builder", - "expr": "sum by(name) (rate(systemd_service_ip_egress_bytes{instance=~\"$instance\"}[$__rate_interval]))", - "instant": false, - "legendFormat": "{{name}} egress", - "range": true - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "13.0.3", - "spec": { - "options": { - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "bytes", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-24": { - "kind": "Panel", - "spec": { - "id": 24, - "title": "Timer last run", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "spec": { - "editorMode": "code", - "expr": "time() - systemd_timer_last_trigger_seconds{instance=~\"$instance\"} < 50*365*60*60", - "instant": false, - "legendFormat": "{{name}}", - "range": true - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "13.0.3", - "spec": { - "options": { - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "s", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "log": 2, - "type": "log" - }, - "showPoints": "auto", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-25": { - "kind": "Panel", - "spec": { - "id": 25, - "title": "Service uptime", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "spec": { - "editorMode": "code", - "expr": "time() - systemd_unit_start_time_seconds{instance=~\"$instance\"} < 50*365*60*60", - "instant": false, - "legendFormat": "{{name}}", - "range": true - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "13.0.3", - "spec": { - "options": { - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "s", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "log": 2, - "type": "log" - }, - "showPoints": "auto", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-26": { - "kind": "Panel", - "spec": { - "id": 26, - "title": "Unit State Count", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "spec": { - "editorMode": "code", - "expr": "sum(systemd_unit_state{instance=~\"$instance\"}) by (state)", - "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{ state }}", - "metric": "node_systemd_unit_state", - "range": true, - "step": 120 - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "13.0.3", - "spec": { - "options": { - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max", - "min" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "asc" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "points", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 8, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "always", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-3": { - "kind": "Panel", - "spec": { - "id": 3, - "title": "Service Ingress Traffic", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "spec": { - "editorMode": "code", - "expr": "sum by (name) (rate(systemd_service_ip_ingress_bytes{instance=~\"$instance\"}[$__rate_interval]))", - "instant": false, - "legendFormat": "{{name}} ingress", - "range": true - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "13.0.3", - "spec": { - "options": { - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "bytes", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-4": { - "kind": "Panel", - "spec": { - "id": 4, - "title": "Service Packets Sent", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "spec": { - "editorMode": "code", - "expr": "sum by (name) (rate(systemd_service_ip_egress_packets_total{instance=~\"$instance\"}[$__rate_interval]))", - "instant": false, - "legendFormat": "{{name}} sent", - "range": true - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "13.0.3", - "spec": { - "options": { - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "none", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-5": { - "kind": "Panel", - "spec": { - "id": 5, - "title": "Service Packets Received", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "spec": { - "editorMode": "code", - "expr": "sum by (name) (rate(systemd_service_ip_ingress_packets_total{instance=~\"$instance\"}[$__rate_interval]))", - "instant": false, - "legendFormat": "{{name}} received", - "range": true - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "13.0.3", - "spec": { - "options": { - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "none", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-6": { - "kind": "Panel", - "spec": { - "id": 6, - "title": "Service Restart", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "spec": { - "editorMode": "builder", - "expr": "sum by(name) (increase(systemd_service_restart_total{instance=~\"$instance\"}[$__rate_interval])) >= 1", - "instant": false, - "legendFormat": "{{name}} sent", - "range": true - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "13.0.3", - "spec": { - "options": { - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "none", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-7": { - "kind": "Panel", - "spec": { - "id": 7, - "title": "Service Restart Count", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "spec": { - "editorMode": "builder", - "expr": "sum by(name) (systemd_service_restart_total{instance=~\"$instance\"})", - "instant": false, - "legendFormat": "{{name}} sent", - "range": true - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "13.0.3", - "spec": { - "options": { - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "none", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] - } - } - } - } - }, - "panel-9": { - "kind": "Panel", - "spec": { - "id": 9, - "title": "Service Activating State", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "spec": { - "editorMode": "code", - "expr": "count by (state) (systemd_unit_state{instance=~\"$instance\",state=\"activating\"}==1)", - "instant": false, - "legendFormat": "{{state}}", - "range": true - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "stat", - "version": "13.0.3", - "spec": { - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "fieldConfig": { - "defaults": { - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - } - ] - }, - "color": { - "mode": "thresholds" - }, - "noValue": "0" - }, - "overrides": [] - } - } - } - } - } - }, - "layout": { - "kind": "RowsLayout", - "spec": { - "rows": [ - { - "kind": "RowsLayoutRow", - "spec": { - "title": "General", - "collapse": false, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 0, - "width": 3, - "height": 3, - "element": { - "kind": "ElementReference", - "name": "panel-9" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 3, - "y": 0, - "width": 3, - "height": 3, - "element": { - "kind": "ElementReference", - "name": "panel-11" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 6, - "y": 0, - "width": 3, - "height": 3, - "element": { - "kind": "ElementReference", - "name": "panel-10" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 9, - "y": 0, - "width": 3, - "height": 3, - "element": { - "kind": "ElementReference", - "name": "panel-12" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 0, - "width": 3, - "height": 3, - "element": { - "kind": "ElementReference", - "name": "panel-13" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 3, - "width": 24, - "height": 11, - "element": { - "kind": "ElementReference", - "name": "panel-26" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 14, - "width": 12, - "height": 8, - "element": { - "kind": "ElementReference", - "name": "panel-6" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 14, - "width": 12, - "height": 8, - "element": { - "kind": "ElementReference", - "name": "panel-7" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 22, - "width": 12, - "height": 8, - "element": { - "kind": "ElementReference", - "name": "panel-24" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 22, - "width": 12, - "height": 8, - "element": { - "kind": "ElementReference", - "name": "panel-25" - } - } - } - ] - } - } - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "State", - "collapse": false, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 0, - "width": 12, - "height": 8, - "element": { - "kind": "ElementReference", - "name": "panel-14" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 0, - "width": 12, - "height": 8, - "element": { - "kind": "ElementReference", - "name": "panel-16" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 8, - "width": 12, - "height": 8, - "element": { - "kind": "ElementReference", - "name": "panel-15" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 8, - "width": 12, - "height": 8, - "element": { - "kind": "ElementReference", - "name": "panel-17" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 16, - "width": 12, - "height": 8, - "element": { - "kind": "ElementReference", - "name": "panel-18" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 16, - "width": 12, - "height": 8, - "element": { - "kind": "ElementReference", - "name": "panel-19" - } - } - } - ] - } - } - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "Traffic", - "collapse": false, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 0, - "width": 12, - "height": 8, - "element": { - "kind": "ElementReference", - "name": "panel-2" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 0, - "width": 12, - "height": 8, - "element": { - "kind": "ElementReference", - "name": "panel-3" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 8, - "width": 12, - "height": 8, - "element": { - "kind": "ElementReference", - "name": "panel-4" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 8, - "width": 12, - "height": 8, - "element": { - "kind": "ElementReference", - "name": "panel-5" - } - } - } - ] - } - } - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "Extra", - "collapse": false, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 0, - "width": 17, - "height": 4, - "element": { - "kind": "ElementReference", - "name": "panel-1" - } - } - } - ] - } - } - } - } - ] - } - }, - "links": [], - "liveNow": false, - "preload": false, - "tags": [], - "timeSettings": { - "timezone": "browser", - "from": "now-3h", - "to": "now", - "autoRefresh": "", - "autoRefreshIntervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "hideTimepicker": false, - "fiscalYearStartMonth": 0 - }, - "title": "Systemd exporter", - "variables": [ - { - "kind": "DatasourceVariable", - "spec": { - "name": "datasource", - "pluginId": "prometheus", - "refresh": "onDashboardLoad", - "regex": "", - "current": { - "text": "Prometheus", - "value": "Prometheus" - }, - "options": [], - "multi": false, - "includeAll": false, - "hide": "dontHide", - "skipUrlSync": false, - "allowCustomValue": true - } - }, - { - "kind": "QueryVariable", - "spec": { - "name": "instance", - "current": { - "text": "", - "value": "" - }, - "hide": "dontHide", - "refresh": "onDashboardLoad", - "skipUrlSync": false, - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "spec": { - "query": "label_values(systemd_exporter_build_info,instance)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - } - }, - "regex": "", - "regexApplyTo": "value", - "sort": "disabled", - "definition": "label_values(systemd_exporter_build_info,instance)", - "options": [], - "multi": false, - "includeAll": false, - "allowCustomValue": true - } - } - ] - } -}
\ No newline at end of file diff --git a/modules/by-name/mo/monitoring/module.nix b/modules/by-name/mo/monitoring/module.nix deleted file mode 100644 index e0fc5db..0000000 --- a/modules/by-name/mo/monitoring/module.nix +++ /dev/null @@ -1,31 +0,0 @@ -# Heavily inspired by: -# https://github.com/ibizaman/selfhostblocks/blob/989865eb519e3fc3e8a803c374775451c47a29c8/modules/blocks/monitoring.nix -{ - lib, - config, - ... -}: let - cfg = config.vhack.monitoring; -in { - imports = [ - ./components/loki.nix - # ./components/perses.nix - ./components/grafana.nix - ./components/scrutiny.nix - ./components/prometheus.nix - ]; - - options.vhack.monitoring = { - enable = lib.mkEnableOption "monitoring defaults"; - }; - - config.vhack.monitoring = lib.mkIf cfg.enable { - grafana.enable = true; - - loki.enable = true; - - prometheus.enable = true; - - scrutiny. enable = true; - }; -} diff --git a/modules/by-name/mo/monitoring/rules.json b/modules/by-name/mo/monitoring/rules.json deleted file mode 100644 index 8e050e6..0000000 --- a/modules/by-name/mo/monitoring/rules.json +++ /dev/null @@ -1,386 +0,0 @@ -[ - { - "uid": "f5246fa3-163f-4eae-9e1d-5b0fe2af0509", - "title": "5XX Requests Error Budgets Under 99%", - "condition": "threshold", - "data": [ - { - "refId": "A", - "queryType": "range", - "relativeTimeRange": { - "from": 21600, - "to": 0 - }, - "datasourceUid": "cd6cc53e-840c-484d-85f7-96fede324006", - "model": { - "datasource": { - "type": "loki", - "uid": "cd6cc53e-840c-484d-85f7-96fede324006" - }, - "editorMode": "code", - "expr": "(sum by(server_name) (count_over_time({unit=\"nginx.service\"} | pattern \"<_> <_> <line>\" | line_format \"{{.line}}\" | json | __error__ != \"JSONParserErr\" | status =~ \"[1234]..\" | server_name =~ \".*\" [1h])) / sum by(server_name) (count_over_time({unit=\"nginx.service\"} | pattern \"<_> <_> <line>\" | line_format \"{{.line}}\" | json | __error__ != \"JSONParserErr\" | server_name =~ \".*\" [1h])))", - "intervalMs": 1000, - "legendFormat": "{{server_name}}", - "maxDataPoints": 43200, - "queryType": "range", - "refId": "A" - } - }, - { - "refId": "last", - "relativeTimeRange": { - "from": 0, - "to": 0 - }, - "datasourceUid": "__expr__", - "model": { - "conditions": [ - { - "evaluator": { - "params": [], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "B" - ] - }, - "reducer": { - "params": [], - "type": "last" - }, - "type": "query" - } - ], - "datasource": { - "type": "__expr__", - "uid": "__expr__" - }, - "expression": "A", - "intervalMs": 1000, - "maxDataPoints": 43200, - "reducer": "last", - "refId": "last", - "type": "reduce" - } - }, - { - "refId": "threshold", - "relativeTimeRange": { - "from": 0, - "to": 0 - }, - "datasourceUid": "__expr__", - "model": { - "conditions": [ - { - "evaluator": { - "params": [ - 0.99 - ], - "type": "lt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "C" - ] - }, - "reducer": { - "params": [], - "type": "last" - }, - "type": "query" - } - ], - "datasource": { - "type": "__expr__", - "uid": "__expr__" - }, - "expression": "last", - "intervalMs": 1000, - "maxDataPoints": 43200, - "refId": "threshold", - "type": "threshold" - } - } - ], - "dasboardUid": "d66242cf-71e8-417c-8ef7-51b0741545df", - "panelId": 9, - "noDataState": "OK", - "execErrState": "Error", - "for": "20m", - "annotations": { - "__dashboardUid__": "d66242cf-71e8-417c-8ef7-51b0741545df", - "__panelId__": "9", - "description": "", - "runbook_url": "", - "summary": "The error budget for a service for the last 1 hour is under 99%" - }, - "labels": { - "role": "sysadmin" - }, - "isPaused": false - }, - { - "uid": "ee817l3a88s1sd", - "title": "Certificate Did Not Renew", - "condition": "C", - "data": [ - { - "refId": "A", - "relativeTimeRange": { - "from": 1800, - "to": 0 - }, - "datasourceUid": "df80f9f5-97d7-4112-91d8-72f523a02b09", - "model": { - "adhocFilters": [], - "datasource": { - "type": "prometheus", - "uid": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "editorMode": "code", - "expr": "min by(subject) (ssl_certificate_expiry_seconds)", - "interval": "", - "intervalMs": 15000, - "legendFormat": "{{exported_hostname}}: {{subject}} {{path}}", - "maxDataPoints": 43200, - "range": true, - "refId": "A" - } - }, - { - "refId": "B", - "relativeTimeRange": { - "from": 0, - "to": 0 - }, - "datasourceUid": "__expr__", - "model": { - "conditions": [ - { - "evaluator": { - "params": [], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "B" - ] - }, - "reducer": { - "params": [], - "type": "last" - }, - "type": "query" - } - ], - "datasource": { - "type": "__expr__", - "uid": "__expr__" - }, - "expression": "A", - "intervalMs": 1000, - "maxDataPoints": 43200, - "reducer": "last", - "refId": "B", - "type": "reduce" - } - }, - { - "refId": "C", - "relativeTimeRange": { - "from": 0, - "to": 0 - }, - "datasourceUid": "__expr__", - "model": { - "conditions": [ - { - "evaluator": { - "params": [ - 604800 - ], - "type": "lt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "C" - ] - }, - "reducer": { - "params": [], - "type": "last" - }, - "type": "query" - } - ], - "datasource": { - "type": "__expr__", - "uid": "__expr__" - }, - "expression": "B", - "intervalMs": 1000, - "maxDataPoints": 43200, - "refId": "C", - "type": "threshold" - } - } - ], - "dashboardUid": "ae818js0bvw8wb", - "panelId": 3, - "noDataState": "NoData", - "execErrState": "Error", - "for": "20m", - "annotations": { - "__dashboardUid__": "ae818js0bvw8wb", - "__panelId__": "3", - "description": "The expiry date of the certificate is 1 week from now.", - "summary": "Certificate did not renew on time." - }, - "labels": { - "role": "sysadmin" - }, - "isPaused": false - }, - { - "uid": "df4doj5pomhvkf", - "title": "Late Backups", - "condition": "C", - "data": [ - { - "refId": "A", - "relativeTimeRange": { - "from": 10800, - "to": 0 - }, - "datasourceUid": "df80f9f5-97d7-4112-91d8-72f523a02b09", - "model": { - "adhocFilters": [], - "datasource": { - "type": "prometheus", - "uid": "df80f9f5-97d7-4112-91d8-72f523a02b09" - }, - "editorMode": "code", - "exemplar": false, - "expr": "(\n # Timer triggered at least once in the last 24h\n label_replace((\n time()\n -\n systemd_timer_last_trigger_seconds{name=~\".*backup.*.timer\"}\n ) < 24*60*60, \"name\", \"$1.service\", \"name\", \"(.*).timer\")\n AND on(name)\n # At least one failure in the last 24h\n (\n max_over_time(systemd_unit_state{name=~\".*backup.*.service\", state=\"failed\"}[24h]) > 0\n )\n AND on(name)\n # No successes in the last 24h\n (\n max_over_time(systemd_unit_state{name=~\".*backup.*.service\", state=\"inactive\"}[24h]) == 0\n )\n)", - "instant": false, - "interval": "", - "intervalMs": 15000, - "legendFormat": "{{name}}", - "maxDataPoints": 43200, - "range": true, - "refId": "A" - } - }, - { - "refId": "B", - "relativeTimeRange": { - "from": 0, - "to": 0 - }, - "datasourceUid": "__expr__", - "model": { - "conditions": [ - { - "evaluator": { - "params": [], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "B" - ] - }, - "reducer": { - "params": [], - "type": "last" - }, - "type": "query" - } - ], - "datasource": { - "type": "__expr__", - "uid": "__expr__" - }, - "expression": "A", - "intervalMs": 1000, - "maxDataPoints": 43200, - "reducer": "last", - "refId": "B", - "type": "reduce" - } - }, - { - "refId": "C", - "relativeTimeRange": { - "from": 0, - "to": 0 - }, - "datasourceUid": "__expr__", - "model": { - "conditions": [ - { - "evaluator": { - "params": [ - 0 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "C" - ] - }, - "reducer": { - "params": [], - "type": "last" - }, - "type": "query" - } - ], - "datasource": { - "type": "__expr__", - "uid": "__expr__" - }, - "expression": "B", - "intervalMs": 1000, - "maxDataPoints": 43200, - "refId": "C", - "type": "threshold" - } - } - ], - "dashboardUid": "f05500d0-15ed-4719-b68d-fb898ca13cc8", - "panelId": 15, - "noDataState": "OK", - "execErrState": "Error", - "annotations": { - "__dashboardUid__": "f05500d0-15ed-4719-b68d-fb898ca13cc8", - "__panelId__": "15", - "summary": "A backup did not run in the last 24 hours." - }, - "labels": { - "role": "sysadmin" - }, - "isPaused": false - } -] diff --git a/modules/by-name/mu/murmur/module.nix b/modules/by-name/mu/murmur/module.nix deleted file mode 100644 index 061e236..0000000 --- a/modules/by-name/mu/murmur/module.nix +++ /dev/null @@ -1,83 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.vhack.murmur; -in { - options.vhack.murmur = { - enable = lib.mkEnableOption "murmur, a mumble server software"; - murmurStore = lib.mkOption { - type = lib.types.str; - default = "/var/lib/murmur"; - description = "The location of murmurs data dir."; - }; - host = lib.mkOption { - type = lib.types.str; - description = "The domain murmur should be served on."; - example = "mumble.vhack.eu"; - }; - url = lib.mkOption { - type = lib.types.str; - description = "The url this instance should be registered under. Note that - this is not the domain mumur is served on"; - example = "vhack.eu"; - }; - name = lib.mkOption { - type = lib.types.str; - description = "The name this instance should be registered under."; - example = "vhack"; - }; - }; - config = lib.mkIf cfg.enable { - vhack.persist.directories = [ - { - directory = cfg.murmurStore; - user = "murmur"; - group = "murmur"; - mode = "0700"; - } - ]; - - services.murmur = { - enable = true; - openFirewall = true; - welcometext = '' - <b>You never get a second chance to make a first impression</b><br> - - The entire team of [name of the company] is thrilled to welcome you on board. We hope you’ll do some amazing work here! - ''; - - tls = { - keyPath = "${cfg.murmurStore}/key.pem"; - certPath = "${cfg.murmurStore}/fullchain.pem"; - }; - - registerUrl = cfg.url; - registerName = cfg.name; - registerHostname = cfg.host; - hostName = cfg.host; - clientCertRequired = true; - bandwidth = 7200000; - }; - - security.acme.certs.murmur = { - domain = cfg.host; - postRun = - /* - bash - */ - '' - set -x - rm "${cfg.murmurStore}/key.pem" - rm "${cfg.murmurStore}/fullchain.pem" - - cp key.pem "${cfg.murmurStore}"; - cp fullchain.pem "${cfg.murmurStore}"; - - chown murmur:murmur "${cfg.murmurStore}/key.pem" - chown murmur:murmur "${cfg.murmurStore}/fullchain.pem" - ''; - }; - }; -} diff --git a/modules/by-name/ne/nextcloud/module.nix b/modules/by-name/ne/nextcloud/module.nix deleted file mode 100644 index f91ddae..0000000 --- a/modules/by-name/ne/nextcloud/module.nix +++ /dev/null @@ -1,87 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: let - cfg = config.vhack.nextcloud; -in { - options.vhack.nextcloud = { - enable = lib.mkEnableOption "a sophisticated nextcloud setup"; - package = lib.mkOption { - type = lib.types.package; - default = pkgs.nextcloud32; - description = "The nextcloud package to use"; - }; - hostname = lib.mkOption { - type = lib.types.str; - description = "The nextcloud hostname (fqdn)"; - }; - adminpassFile = lib.mkOption { - type = lib.types.path; - description = "The age encrypted admin password file"; - }; - }; - - config = lib.mkIf cfg.enable { - vhack = { - nginx.enable = true; - postgresql.enable = true; - persist.directories = [ - "/var/lib/nextcloud" - ]; - }; - age.secrets = { - adminpassFile = { - file = cfg.adminpassFile; - mode = "0700"; - owner = "nextcloud"; - group = "nextcloud"; - }; - }; - - services = { - nextcloud = { - enable = true; - inherit (cfg) package; - - extraApps = { - inherit (cfg.package.packages.apps) calendar contacts tasks; - }; - extraAppsEnable = true; - configureRedis = true; - config = { - adminuser = "admin"; - adminpassFile = config.age.secrets.adminpassFile.path; - dbname = "nextcloud"; - dbuser = "nextcloud"; - dbtype = "pgsql"; - }; - database.createLocally = true; - hostName = cfg.hostname; - https = true; - maxUploadSize = "5G"; - settings = { - default_phone_region = "DE"; - }; - }; - nginx.virtualHosts.${cfg.hostname} = { - forceSSL = true; - enableACME = true; - }; - }; - users = { - users = { - "nextcloud".uid = config.vhack.constants.ids.uids.nextcloud; - "redis-nextcloud" = { - uid = config.vhack.constants.ids.uids.redis-nextcloud; - group = "redis-nextcloud"; - }; - }; - groups = { - "nextcloud".gid = config.vhack.constants.ids.gids.nextcloud; - "redis-nextcloud".gid = config.vhack.constants.ids.gids.redis-nextcloud; - }; - }; - }; -} diff --git a/modules/by-name/ng/nginx/module.nix b/modules/by-name/ng/nginx/module.nix deleted file mode 100644 index 1317d4d..0000000 --- a/modules/by-name/ng/nginx/module.nix +++ /dev/null @@ -1,83 +0,0 @@ -{ - lib, - config, - ... -}: let - mkRedirect = _: value: { - forceSSL = true; - enableACME = true; - locations."/".return = "301 ${value}$request_uri"; - }; - - redirects = builtins.mapAttrs mkRedirect cfg.redirects; - - cfg = config.vhack.nginx; -in { - options.vhack.nginx = { - enable = lib.mkEnableOption '' - a default nginx config. - ''; - - redirects = lib.mkOption { - type = lib.types.attrsOf lib.types.str; - default = {}; - description = '' - An attrset of redirects to add. - The keys are the domain that should than be redirected to the url specified as - value. - ''; - }; - }; - - config = lib.mkIf cfg.enable { - vhack = { - persist.directories = [ - "/var/lib/acme" - ]; - - monitoring.prometheus = { - sources = [ - { - name = "nginx"; - target = "127.0.0.1:${toString config.services.prometheus.exporters.nginx.port}"; - } - ]; - }; - }; - - services.prometheus.exporters.nginx = { - enable = true; - port = 9111; - listenAddress = "127.0.0.1"; - scrapeUri = "http://localhost:80/nginx_status"; - }; - - users = { - users.acme = { - uid = config.vhack.constants.ids.uids.acme; - group = "acme"; - }; - groups.acme.gid = config.vhack.constants.ids.gids.acme; - }; - - security.acme = { - acceptTerms = true; - defaults = { - email = "admin@vhack.eu"; - webroot = "/var/lib/acme/acme-challenge"; - }; - }; - - networking.firewall = { - allowedTCPPorts = [80 443]; - }; - services.nginx = { - enable = true; - - # Enable the status page for the prometheus exporter. - statusPage = lib.mkIf config.services.prometheus.enable true; - - virtualHosts = redirects; - }; - }; -} diff --git a/modules/by-name/ni/nix-sync/internal_module.nix b/modules/by-name/ni/nix-sync/internal_module.nix deleted file mode 100644 index 4e28586..0000000 --- a/modules/by-name/ni/nix-sync/internal_module.nix +++ /dev/null @@ -1,299 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - cfg = config.services.nix-sync; - esa = lib.strings.escapeShellArg; - - mkTimer = name: repo: { - description = "Nix sync ${name} timer"; - wantedBy = ["timers.target"]; - timerConfig = { - OnUnitActiveSec = repo.interval; - }; - wants = ["network-online.target"]; - after = ["network-online.target"]; - }; - - parents = path: let - split_path = builtins.split "/" path; - filename = builtins.elemAt split_path (builtins.length split_path - 1); - path_build = - lib.strings.removeSuffix "/" (builtins.replaceStrings [filename] [""] path); - final_path = - if filename == "" - then parents path_build - else path_build; - in - final_path; - - mkUnit = name: repo: let - optionalPathSeparator = - if lib.strings.hasPrefix "/" repo.path - then "" - else "/"; - /* - * `ln` tries to create a symlink in the directory, if the target ends with a '/', - * thus remove it. - */ - repoPath = lib.strings.removeSuffix "/" repo.path; - - repoCachePath = cfg.cachePath + optionalPathSeparator + repo.path; - execStartScript = pkgs.writeScript "nix-sync-exec" '' - #! /usr/bin/env dash - export XDG_CACHE_HOME="$CACHE_DIRECTORY"; - cd ${esa repoCachePath}; - - git fetch - origin="$(git rev-parse @{u})"; - branch="$(git rev-parse @)"; - - if ! [ "$origin" = "$branch" ]; then - git pull --rebase; - - out_paths=$(mktemp); - nix build . --print-out-paths --experimental-features 'nix-command flakes' > "$out_paths"; - [ "$(wc -l < "$out_paths")" -gt 1 ] && { echo "To many out-paths"; exit 1; } - out_path="$(cat "$out_paths")"; - rm ${esa repoPath}; - ln -s "$out_path" ${esa repoPath}; - rm "$out_paths"; - fi - ''; - execStartPreScript = '' - export XDG_CACHE_HOME="$CACHE_DIRECTORY"; - - if ! [ -d ${esa repoCachePath}/.git ]; then - mkdir --parents ${esa repoCachePath}; - git clone ${esa repo.uri} ${esa repoCachePath}; - - out_paths=$(mktemp); - nix build ${esa repoCachePath} --print-out-paths --experimental-features 'nix-command flakes' > "$out_paths"; - [ "$(wc -l < "$out_paths")" -gt 1 ] && { echo "To many out-paths"; exit 1; } - out_path="$(cat "$out_paths")"; - ln -s "$out_path" ${esa repoPath}; - rm "$out_paths"; - fi - - if ! [ -L ${esa repoPath} ]; then - cd ${esa repoCachePath}; - - git pull --rebase; - - out_paths=$(mktemp); - nix build . --print-out-paths --experimental-features 'nix-command flakes' > "$out_paths"; - [ "$(wc -l < "$out_paths")" -gt 1 ] && { echo "To many out-paths"; exit 1; } - out_path="$(cat "$out_paths")"; - - if [ -d ${esa repoPath} ]; then - rm -d ${esa repoPath}; - else - mkdir --parents "$(dirname ${esa repoPath})"; - fi - [ -e ${esa repoPath} ] && rm ${esa repoPath}; - - ln -s "$out_path" ${esa repoPath}; - rm "$out_paths"; - fi - ''; - in { - description = "Nix Sync ${name}"; - wantedBy = ["default.target"]; - after = ["network.target"]; - path = with pkgs; [openssh git nix mktemp coreutils dash]; - preStart = execStartPreScript; - - serviceConfig = { - TimeoutSec = 0; - ExecStart = execStartScript; - Restart = "on-abort"; - # User and group - User = cfg.user; - Group = cfg.group; - # Runtime directory and mode - RuntimeDirectory = "nix-sync"; - RuntimeDirectoryMode = "0750"; - # Cache directory and mode - CacheDirectory = "nix-sync"; - CacheDirectoryMode = "0750"; - # Logs directory and mode - LogsDirectory = "nix-sync"; - LogsDirectoryMode = "0750"; - # Proc filesystem - ProcSubset = "all"; - ProtectProc = "invisible"; - # New file permissions - UMask = "0027"; # 0640 / 0750 - # Capabilities - AmbientCapabilities = ["CAP_CHOWN"]; - CapabilityBoundingSet = ["CAP_CHOWN"]; - # Security - NoNewPrivileges = true; - # Sandboxing (sorted by occurrence in https://www.freedesktop.org/software/systemd/man/systemd.exec.html) - ReadWritePaths = ["${esa (parents repo.path)}" "-${esa (parents repoCachePath)}" "-${esa cfg.cachePath}"]; - ReadOnlyPaths = ["/nix"]; # TODO: Should be irrelevant, as we have ProtectSystem=Strict <2024-06-01> - ProtectSystem = "strict"; - ProtectHome = true; - PrivateTmp = true; - PrivateDevices = true; - ProtectHostname = true; - ProtectClock = true; - ProtectKernelTunables = true; - ProtectKernelModules = true; - ProtectKernelLogs = true; - ProtectControlGroups = true; - RestrictAddressFamilies = ["AF_UNIX" "AF_INET" "AF_INET6"]; - RestrictNamespaces = true; - LockPersonality = true; - MemoryDenyWriteExecute = true; - RestrictRealtime = true; - RestrictSUIDSGID = true; - RemoveIPC = true; - PrivateMounts = true; - # System Call Filtering - SystemCallArchitectures = "native"; - SystemCallFilter = ["~@cpu-emulation @debug @keyring @mount @obsolete @privileged @setuid"]; - }; - }; - - services = - lib.mapAttrs' (name: repo: { - name = "nix-sync-${name}"; - value = mkUnit name repo; - }) - cfg.repositories; - timers = - lib.mapAttrs' (name: repo: { - name = "nix-sync-${name}"; - value = mkTimer name repo; - }) - cfg.repositories; - - # generate the websites directory, so systemd can mount it read write - generatedDirectories = - lib.mapAttrsToList ( - _: repo: "d ${esa (parents repo.path)} 0755 ${cfg.user} ${cfg.group}" - ) - cfg.repositories; - - repositoryType = lib.types.submodule ({name, ...}: { - options = { - name = lib.mkOption { - internal = true; - default = name; - type = lib.types.str; - description = "The name that should be given to this unit."; - }; - - path = lib.mkOption { - type = lib.types.str; - description = "The path at which to sync the repository"; - }; - - uri = lib.mkOption { - type = lib.types.str; - example = "ssh://user@example.com:/~[user]/path/to/repo.git"; - description = '' - The URI of the remote to be synchronized. This is only used in the - event that the directory does not already exist. See - <link xlink:href="https://git-scm.com/docs/git-clone#_git_urls"/> - for the supported URIs. - ''; - }; - - extraSettings = lib.mkOption { - type = lib.types.attrsOf lib.types.anything; - example = lib.literalExpression '' - { - locations."/.well-known/openpgpkey/hu/" = { - extraConfig = \'\' - default_type application/octet-stream; - - add_header Access-Control-Allow-Origin * always; - \'\'; - }; - } - ''; - description = '' - Extra config to add the the nginx virtual host. - ''; - }; - - interval = lib.mkOption { - type = lib.types.int; - default = 500; - description = '' - The interval, specified in seconds, at which the synchronization will - be triggered. - ''; - }; - }; - }); -in { - options = { - services.nix-sync = { - enable = lib.mkEnableOption "nix-sync services"; - - user = lib.mkOption { - type = lib.types.str; - default = "nix-sync"; - description = lib.mdDoc "User account under which nix-sync units runs."; - }; - - group = lib.mkOption { - type = lib.types.str; - default = "nix-sync"; - description = lib.mdDoc "Group account under which nix-sync units runs."; - }; - - cachePath = lib.mkOption { - type = lib.types.str; - default = "/var/lib/nix-sync"; - description = lib.mdDoc '' - Where to cache git directories. Should not end with a slash ("/") - ''; - }; - - repositories = lib.mkOption { - type = with lib.types; attrsOf repositoryType; - description = '' - The repositories that should be synchronized. - ''; - }; - }; - }; - - config = lib.mkIf cfg.enable { - assertions = [ - { - assertion = !lib.strings.hasSuffix "/" cfg.cachePath; - message = "Your cachePath ('${cfg.cachePath}') ends with a slash ('/'), please use: '${lib.strings.removeSuffix "/" cfg.cachePath}'."; - } - ]; - systemd = { - tmpfiles.rules = - generatedDirectories; - - inherit services timers; - }; - users.users = - if cfg.user == "nix-sync" - then { - nix-sync = { - group = "${cfg.group}"; - isSystemUser = true; - }; - } - else lib.warnIf (cfg.user != "nix-sync") "The user (${cfg.user}) is not \"nix-sync\", thus you are responible for generating it."; - users.groups = - if cfg.group == "nix-sync" - then { - nix-sync = { - members = ["${cfg.user}"]; - }; - } - else lib.warnIf (cfg.group != "nix-sync") "The group (${cfg.group}) is not \"nix-sync\", thus you are responible for generating it."; - }; -} diff --git a/modules/by-name/ni/nix-sync/module.nix b/modules/by-name/ni/nix-sync/module.nix deleted file mode 100644 index 9ddd210..0000000 --- a/modules/by-name/ni/nix-sync/module.nix +++ /dev/null @@ -1,108 +0,0 @@ -{ - config, - lib, - modulesPath, - nixLib, - ... -}: let - cfg = config.vhack.nix-sync; - - mkNixSyncRepository = { - domain, - repositoryUrl, - extraSettings, - }: { - name = "${domain}"; - value = { - path = "/etc/nginx/websites/${domain}"; - uri = "${repositoryUrl}"; - inherit extraSettings; - }; - }; - nixSyncRepositories = builtins.listToAttrs (builtins.map mkNixSyncRepository cfg.domains); - - mkVirtHost = { - domain, - repositoryUrl, - extraSettings, - }: { - name = "${domain}"; - value = - # FIXME(@bpeetz): We cannot use something like `lib.recursiveUpdate` because the - # `extraSettings` are instantiated from the “real” nginx type. As such the - # `extaSettings` would override our values here. Therefore, the direct merge. <2025-02-07> - extraSettings - // { - forceSSL = true; - enableACME = true; - root = "/etc/nginx/websites/${domain}"; - }; - }; - virtHosts = builtins.listToAttrs (builtins.map mkVirtHost cfg.domains); -in { - imports = [ - ./internal_module.nix - ]; - - options.vhack.nix-sync = { - enable = lib.mkEnableOption '' - a website git ops solution. - ''; - - domains = lib.mkOption { - type = lib.types.listOf (lib.types.submodule { - options = { - domain = lib.mkOption { - type = lib.types.str; - example = "b-peetz.de"; - description = '' - The fully qualified domain to use as base of this website. - ''; - }; - repositoryUrl = lib.mkOption { - type = lib.types.str; - example = "b-peetz.de"; - description = '' - The url used for the source git repository, which is deployed at this domain. - ''; - }; - extraSettings = lib.mkOption { - type = - lib.types.submodule (import (modulesPath + "/services/web-servers/nginx/vhost-options.nix") {inherit config lib;}); - example = { - locations."/.well-known/openpgpkey/".extraConfig = "default_type application/octet-stream"; - }; - default = {}; - description = '' - Extra configuration to add to the nginx virtual host. - ''; - }; - }; - }); - }; - }; - - config = lib.mkIf cfg.enable { - vhack.persist.directories = [ - { - directory = "/var/lib/nix-sync"; - user = "nix-sync"; - group = "nix-sync"; - mode = "0700"; - } - ]; - - services.nix-sync = { - enable = true; - repositories = nixSyncRepositories; - }; - - vhack.nginx.enable = true; - services.nginx.virtualHosts = virtHosts; - - users = { - users.nix-sync.uid = config.vhack.constants.ids.uids.nix-sync; - groups.nix-sync.gid = config.vhack.constants.ids.gids.nix-sync; - }; - }; -} diff --git a/modules/by-name/ni/nixconfig/module.nix b/modules/by-name/ni/nixconfig/module.nix deleted file mode 100644 index a5bf950..0000000 --- a/modules/by-name/ni/nixconfig/module.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.vhack.nixconfig; -in { - options.vhack.nixconfig = { - enable = lib.mkEnableOption "sophisticated nix settings"; - }; - config = lib.mkIf cfg.enable { - nix = { - # gc = { - # automatic = true; - # dates = "daily"; - # options = "--delete-older-than 3"; - # }; - settings = { - auto-optimise-store = true; - experimental-features = ["nix-command" "flakes"]; - trusted-users = [ - "root" - "@wheel" - ]; - }; - }; - }; -} diff --git a/modules/by-name/ns/nscd/module.nix b/modules/by-name/ns/nscd/module.nix deleted file mode 100644 index 428ae3b..0000000 --- a/modules/by-name/ns/nscd/module.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.vhack.nscd; -in { - options.vhack.nscd = { - # NOTE(@bpeetz): This is enabled by default in NixOS. - # Because of this reason: - # > Whether to enable the Name Service Cache Daemon. Disabling this is - # > strongly discouraged, as this effectively disables NSS Lookups from - # > all non-glibc NSS modules, including the ones provided by systemd. - # - # As such we should also always enable it. <2024-12-25> - enable = (lib.mkEnableOption "nscd") // {default = true;}; - }; - - config = lib.mkIf cfg.enable { - users = { - users.nscd.uid = config.vhack.constants.ids.uids.nscd; - groups.nscd.gid = config.vhack.constants.ids.gids.nscd; - }; - }; -} diff --git a/modules/by-name/oo/oomd/module.nix b/modules/by-name/oo/oomd/module.nix deleted file mode 100644 index 3b39236..0000000 --- a/modules/by-name/oo/oomd/module.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.vhack.systemd.oomd; -in { - options.vhack.systemd.oomd = { - # NOTE(@bpeetz): Enabled by default, because that is what NixOS also does. <2024-12-25> - enable = (lib.mkEnableOption "oomd") // {default = true;}; - }; - - config = lib.mkIf cfg.enable { - users = { - users.systemd-oom.uid = config.vhack.constants.ids.uids.systemd-oom; - groups.systemd-oom.gid = config.vhack.constants.ids.gids.systemd-oom; - }; - }; -} diff --git a/modules/by-name/op/openssh/module.nix b/modules/by-name/op/openssh/module.nix deleted file mode 100644 index 83aeadf..0000000 --- a/modules/by-name/op/openssh/module.nix +++ /dev/null @@ -1,60 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.vhack.openssh; -in { - options.vhack.openssh = { - enable = lib.mkEnableOption '' - a sane openssh implementation. - ''; - }; - - config = lib.mkIf cfg.enable { - /* - FIXME(@bpeetz): - This results in a boot error, as the `/var/lib/sshd` directory - is only mounted _after_ the stage 2 init and with it the system - activation. `agenix` needs the sshd hostkey however to decrypt the - secrets and thus we have to ensure that this directory is mounted - _before_ the system activation. Alas the only way I see to achieve - that is to store the ssh hostkey directly on /srv, which is mounted - before (it's marked as 'neededForBoot' after all). - - It should be possible to achieve this with impermanence however, - as `/var/log` is mounted in the stage 1 init; The problem is that - I have no idea _why_ only this is mounted and nothing else. - - - vhack.persist.directories = [ - { - directory = "/var/lib/sshd"; - user = "root"; - group = "root"; - mode = "0755"; - } - ]; - */ - - users = { - users.sshd.uid = config.vhack.constants.ids.uids.sshd; - groups.sshd.gid = config.vhack.constants.ids.gids.sshd; - }; - - services.openssh = { - enable = true; - settings.PasswordAuthentication = false; - hostKeys = [ - { - # FIXME: Remove the dependency on `/srv` this workaround. - # See the explanation for using `/srv` above. - path = "/srv/var/lib/sshd/ssh_host_ed25519_key"; - - rounds = 1000; - type = "ed25519"; - } - ]; - }; - }; -} diff --git a/modules/by-name/pe/peertube/module.nix b/modules/by-name/pe/peertube/module.nix deleted file mode 100644 index e65e0b5..0000000 --- a/modules/by-name/pe/peertube/module.nix +++ /dev/null @@ -1,124 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.vhack.peertube; -in { - options.vhack.peertube = { - enable = lib.mkEnableOption '' - the peertube video platform. - ''; - peertubeGeneral = lib.mkOption { - type = lib.types.path; - description = "The age encrypted general secret file passed to agenix"; - }; - smtpPasswordFile = lib.mkOption { - type = lib.types.path; - description = "The age encrypted smtp password file passed to agenix"; - }; - }; - - config = lib.mkIf cfg.enable { - services.peertube = { - enable = true; - - configureNginx = true; - localDomain = "peertube.vhack.eu"; - enableWebHttps = true; - listenWeb = 443; - - smtp = { - createLocally = false; - passwordFile = "${config.age.secrets.peertubeSmtp.path}"; - }; - database = { - createLocally = true; - }; - redis = { - enableUnixSocket = true; - createLocally = true; - }; - - secrets.secretsFile = "${config.age.secrets.peertubeGeneral.path}"; - - settings = { - signup = { - enabled = true; - - limit = 10; # When the limit is reached, registrations are disabled. -1 == unlimited - - minimum_age = 18; # Used to configure the signup form - - # Users fill a form to register so moderators can accept/reject the registration - requires_approval = true; - requires_email_verification = true; - }; - user = { - video_quota = "10GB"; - video_quota_daily = "2GB"; - }; - auto_blacklist = { - videos = { - of_users = { - enabled = true; - }; - }; - }; - listen.hostname = "127.0.0.1"; - instance.name = "PeerTube at Vhack.eu"; - - admin.email = "admin@vhack.eu"; - - smtp = let - emailAddress = "peertube@vhack.eu"; - in { - transport = "smtp"; - hostname = "mail.foss-syndicate.org"; - port = 587; - username = emailAddress; - tls = true; - disable_starttls = true; - from_address = emailAddress; - }; - }; - }; - - # The `configureNginx` option does not do this for some reason - # TODO(@bpeetz): Find out why <2024-06-27> - services.nginx.virtualHosts."${config.services.peertube.localDomain}" = { - enableACME = true; - forceSSL = true; - }; - - age.secrets = { - peertubeGeneral = { - file = cfg.peertubeGeneral; - mode = "700"; - owner = "peertube"; - group = "peertube"; - }; - peertubeSmtp = { - file = cfg.smtpPasswordFile; - mode = "700"; - owner = "peertube"; - group = "peertube"; - }; - }; - - vhack.persist.directories = [ - { - directory = "/var/lib/peertube"; - user = "peertube"; - group = "peertube"; - mode = "0700"; - } - ]; - users = { - users.peertube.uid = config.vhack.constants.ids.uids.peertube; - groups.peertube.gid = config.vhack.constants.ids.gids.peertube; - users.redis-peertube.uid = config.vhack.constants.ids.uids.redis-peertube; - groups.redis-peertube.gid = config.vhack.constants.ids.gids.redis-peertube; - }; - }; -} diff --git a/modules/by-name/po/postgresql/module.nix b/modules/by-name/po/postgresql/module.nix deleted file mode 100644 index 319c3ac..0000000 --- a/modules/by-name/po/postgresql/module.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.vhack.postgresql; -in { - options.vhack.postgresql = { - enable = lib.mkEnableOption "postgresql"; - }; - - config = lib.mkIf cfg.enable { - vhack.persist.directories = [ - "/var/lib/postgresql" - ]; - - services.postgresql.enable = true; - }; -} diff --git a/modules/by-name/re/redlib/module.nix b/modules/by-name/re/redlib/module.nix deleted file mode 100644 index 4d3c600..0000000 --- a/modules/by-name/re/redlib/module.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ - config, - pkgsUnstable, - lib, - ... -}: let - domain = "redlib.vhack.eu"; - - cfg = config.vhack.redlib; -in { - options.vhack.redlib = { - enable = lib.mkEnableOption '' - the redlib reddit frontend - ''; - }; - - config = lib.mkIf cfg.enable { - services.redlib = { - enable = true; - package = pkgsUnstable.redlib; - port = 8080; - address = "127.0.0.1"; - openFirewall = false; - }; - - vhack.anubis.instances."${domain}".target = "http://127.0.0.1:${toString config.services.redlib.port}"; - }; -} diff --git a/modules/by-name/re/resolvconf/module.nix b/modules/by-name/re/resolvconf/module.nix deleted file mode 100644 index ff99696..0000000 --- a/modules/by-name/re/resolvconf/module.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.vhack.resolvconf; -in { - options.vhack.resolvconf = { - # NOTE(@bpeetz): This condition is taken directly from NixOS. <2024-12-25> - enable = lib.mkEnableOption "resolvconf" // {default = !(config.environment.etc ? "resolv.conf");}; - }; - - config = lib.mkIf cfg.enable { - users.groups.resolvconf.gid = config.vhack.constants.ids.gids.resolvconf; - }; -} diff --git a/modules/by-name/ro/rocie/module.nix b/modules/by-name/ro/rocie/module.nix deleted file mode 100644 index 1e419b8..0000000 --- a/modules/by-name/ro/rocie/module.nix +++ /dev/null @@ -1,59 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.vhack.rocie; - data = "/var/lib/rocie"; -in { - options.vhack.rocie = { - enable = lib.mkEnableOption "Rocie integration into vhack.eu"; - - domain = lib.mkOption { - type = lib.types.str; - description = "The domain where to deploy rocie"; - }; - - loginSecret = lib.mkOption { - type = lib.types.path; - description = "The age encrypted secret file for rocie, passed to agenix"; - }; - }; - - config = lib.mkIf cfg.enable { - rocie = { - enable = true; - inherit (cfg) domain; - - dbPath = "${data}/database.db"; - - secretKeyFile = config.age.secrets.rocie_secret.path; - }; - - vhack.persist.directories = [ - { - directory = data; - user = "rocie"; - group = "rocie"; - mode = "0700"; - } - ]; - - users = { - groups.rocie = { - gid = config.vhack.constants.ids.gids.rocie; - }; - users.rocie = { - group = "rocie"; - uid = config.vhack.constants.ids.uids.rocie; - }; - }; - - age.secrets.rocie_secret = { - file = cfg.loginSecret; - mode = "700"; - owner = "rocie"; - group = "rocie"; - }; - }; -} diff --git a/modules/by-name/ru/rust-motd/module.nix b/modules/by-name/ru/rust-motd/module.nix deleted file mode 100644 index bf23843..0000000 --- a/modules/by-name/ru/rust-motd/module.nix +++ /dev/null @@ -1,96 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - cfg = config.vhack.rust-motd; - - # List all users that can login - pred = n: v: ( - false # <- just here for neat formatting - || v.initialHashedPassword != null - || v.initialPassword != null - || v.hashedPassword != null - || v.hashedPasswordFile != null - || v.password != null - || v.passwordFile != null - || v.openssh.authorizedKeys.keys != [] - || v.openssh.authorizedKeys.keyFiles != [] - ); - userList = builtins.mapAttrs (n: v: 2) (lib.filterAttrs pred config.users.users); - - bannerFile = - pkgs.runCommandLocal "banner-file" { - nativeBuildInputs = [pkgs.figlet]; - } '' - echo "${config.system.name}" | figlet -f slant > "$out" - ''; -in { - options.vhack.rust-motd = { - enable = lib.mkEnableOption "rust-motd"; - }; - - config = lib.mkIf cfg.enable { - systemd.services.rust-motd = { - path = with pkgs; [ - bash - fail2ban # Needed for rust-motd fail2ban integration - ]; - }; - - programs.rust-motd = { - enable = true; - enableMotdInSSHD = true; - refreshInterval = "*:0/5"; # 0/5 means: hour 0 AND all hour wich match (0 + 5 * x) (is the same as: 0, 5, 10, 15, 20) - - # An example is here: https://raw.githubusercontent.com/rust-motd/rust-motd/refs/heads/main/example_config.toml - settings = { - global = { - progress_full_character = "="; - progress_empty_character = "-"; - progress_prefix = "["; - progress_suffix = "]"; - time_format = "%Y-%m-%d %H:%M:%S"; - }; - - banner = { - color = "red"; - # Avoid some runtime dependencies. - command = "cat ${bannerFile}"; - }; - - cg_stats = { - state_file = "/var/lib/rust-motd/cg_stats_state"; - threshold = 0.02; # When to start generating output for a cgroup - }; - load_avg = { - format = "Load (1, 5, 15 min.): {one:.02}, {five:.02}, {fifteen:.02}"; - }; - - uptime = { - prefix = "Uptime:"; - }; - - filesystems = { - root = "/"; - persistent = "/srv"; - store = "/nix"; - boot = "/boot"; - }; - - memory = { - swap_pos = "beside"; # or "below" or "none" - }; - - fail_2_ban = { - jails = ["sshd"]; #, "anotherjail"] - }; - - last_login = userList; - - last_run = {}; - }; - }; - }; -} diff --git a/modules/by-name/sh/sharkey/module.nix b/modules/by-name/sh/sharkey/module.nix deleted file mode 100644 index 186fed2..0000000 --- a/modules/by-name/sh/sharkey/module.nix +++ /dev/null @@ -1,135 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - cfg = config.vhack.sharkey; -in { - options = { - vhack.sharkey = { - enable = lib.mkEnableOption "sharkey"; - - fqdn = lib.mkOption { - description = "The fully qualified domain name of this instance."; - type = lib.types.str; - example = "sharkey.shonk.social"; - }; - - package = lib.mkOption { - type = lib.types.package; - default = pkgs.sharkey; - defaultText = lib.literalExpression "vhackPackages.sharkey"; - description = "Sharkey package to use."; - }; - - mediaDirectory = lib.mkOption { - type = lib.types.path; - default = "/var/lib/sharkey"; - description = "The directory where sharkey stores it's data."; - }; - - settings = lib.mkOption { - inherit (pkgs.formats.yaml {}) type; - default = {}; - description = '' - Extra Configuration for Sharkey, see - <link xlink:href="https://activitypub.software/TransFem-org/Sharkey/-/blob/develop/.config/example.yml"/> - for supported settings. - - Note, that this is applied on-top of the neccessary config. - ''; - }; - }; - }; - - config = lib.mkIf cfg.enable { - services = { - sharkey = { - enable = true; - - inherit (cfg) package; - openFirewall = false; - setupRedis = true; - setupPostgresql = true; - - settings = - cfg.settings - // { - url = "https://${cfg.fqdn}/"; - port = 5312; - - inherit (cfg) mediaDirectory; - fulltextSearch.provider = "sqlLike"; - }; - }; - - nginx.virtualHosts."${cfg.fqdn}" = { - locations."/" = { - proxyPass = "http://127.0.0.1:${toString config.services.sharkey.settings.port}"; - proxyWebsockets = true; - }; - - enableACME = true; - forceSSL = true; - }; - }; - - systemd.services.sharkey = { - after = [ - "redis-sharkey.service" - ]; - bindsTo = [ - "redis-sharkey.service" - ]; - - serviceConfig = { - # The upstream service uses DynamicUsers, which currently poses issues to our - # directory persisting strategy. - User = "sharkey"; - Group = "sharkey"; - DynamicUser = lib.mkForce false; - }; - }; - - vhack = { - nginx.enable = true; - - persist.directories = [ - { - directory = "${config.services.redis.servers."sharkey".settings.dir}"; - user = "sharkey"; - group = "redis-sharey"; - mode = "0770"; - } - { - directory = "${cfg.mediaDirectory}"; - user = "sharkey"; - group = "sharkey"; - mode = "0700"; - } - ]; - }; - - users = { - groups.sharkey = { - gid = config.vhack.constants.ids.gids.sharkey; - }; - users.sharkey = { - isSystemUser = true; - group = "sharkey"; - uid = config.vhack.constants.ids.uids.sharkey; - home = cfg.package; - packages = [cfg.package]; - }; - - groups.redis-sharkey = { - gid = config.vhack.constants.ids.gids.redis-sharkey; - }; - users.redis-sharkey = { - group = "redis-sharkey"; - uid = config.vhack.constants.ids.uids.redis-sharkey; - }; - }; - }; -} diff --git a/modules/by-name/st/stalwart-mail/module.nix b/modules/by-name/st/stalwart-mail/module.nix deleted file mode 100644 index f7e44d8..0000000 --- a/modules/by-name/st/stalwart-mail/module.nix +++ /dev/null @@ -1,428 +0,0 @@ -{ - lib, - config, - pkgs, - vhackPackages, - ... -}: let - cfg = config.vhack.stalwart-mail; - topCfg = config.services.stalwart-mail; - - configFormat = pkgs.formats.toml {}; - configFile = configFormat.generate "stalwart-mail.toml" topCfg.settings; -in { - imports = [ - ./settings.nix - ]; - - options.vhack.stalwart-mail = { - enable = lib.mkEnableOption "starwart-mail"; - - package = lib.mkPackageOption pkgs "stalwart-mail" {}; - - admin = lib.mkOption { - description = '' - Email address to advertise as administrator. This is the address, where dkim, spv - etc. refusal reports are sent to. - - The format should be: `mailto:<name>@<domain>` - ''; - type = lib.types.str; - example = "mailto:dmarc+rua@example.com"; - default = ""; - }; - - fqdn = lib.mkOption { - type = lib.types.str; - example = "mail.foss-syndicate.org"; - description = '' - The fully qualified domain name for this mail server. - ''; - }; - - principals = lib.mkOption { - default = null; - type = lib.types.nullOr (lib.types.listOf (lib.types.submodule { - options = { - name = lib.mkOption { - type = lib.types.str; - description = "Specifies the username of the account"; - }; - - class = lib.mkOption { - type = lib.types.enum ["individual" "admin"]; - description = "Specifies the account type"; - }; - - description = lib.mkOption { - type = lib.types.str; - description = "Provides a description or full name for the user"; - default = ""; - }; - - secret = lib.mkOption { - type = let - prefix = pre: lib.types.strMatching "^${lib.strings.escapeRegex pre}.*"; - in - lib.types.oneOf [ - (prefix "$argon2") - (prefix "$pbkdf2") - (prefix "$scrypt") - (prefix "$2") # bcrypt - (prefix "$6$") # sha-512 - (prefix "$5$") # sha-256 - (prefix "$sha1") - (prefix "$1") # md5 - (prefix "_") # BSDi crypt - (prefix "{SHA}") # base64 sha - (prefix "{SSHA}") # base64 salted sha - - # unix crypt - (prefix "{CRYPT}") - (prefix "{crypt}") - - # Plain text - (prefix "{PLAIN}") - (prefix "{plain}") - (prefix "{CLEAR}") - (prefix "{clear}") - ]; - description = '' - Sets the password for the user account. - Passwords can be stored hashed or in plain text (not recommended). - See <https://stalw.art/docs/auth/authentication/password/> for a description - of password encoding. - ''; - }; - email = lib.mkOption { - type = lib.types.listOf lib.types.str; - description = '' - A list of email addresses associated with the user. - The first address in the list is considered the primary address. - ''; - }; - }; - })); - }; - - dataDirectory = lib.mkOption { - description = '' - The directory in which to store all storage things. - ''; - default = "/var/lib/stalwart-mail"; - type = lib.types.path; - readOnly = true; - }; - - openFirewall = lib.mkOption { - type = lib.types.bool; - default = false; - description = '' - Whether to open TCP firewall ports, which are specified in - {option}`services.stalwart-mail.settings.listener` on all interfaces. - ''; - }; - - security = lib.mkOption { - type = lib.types.nullOr (lib.types.submodule { - options = { - verificationMode = lib.mkOption { - type = lib.types.enum ["relaxed" "strict"]; - description = '' - Whether to allow invalid signatures/checks or not. - ''; - default = "relaxed"; - }; - - dkimKeys = lib.mkOption { - type = lib.types.attrsOf (lib.types.submodule { - options = { - dkimPublicKey = lib.mkOption { - type = lib.types.str; - description = '' - The base 64 encoded representation of the public dkim key. - ''; - }; - dkimPrivateKeyPath = lib.mkOption { - type = lib.types.path; - description = '' - The path to the dkim private key agenix file. - Generate it via the `./gen_key` script: - ''; - }; - keyAlgorithm = lib.mkOption { - type = lib.types.enum ["ed25519-sha256" "rsa-sha-256" "rsa-sha-1"]; - description = "The algorithm of the used key"; - }; - }; - }); - description = '' - Which key to use for which domain. The attr keys are the domains - ''; - default = {}; - }; - }; - }); - description = '' - Security options. This should only be set to `null` when testing. - ''; - }; - }; - - config = lib.mkIf cfg.enable { - assertions = [ - { - assertion = cfg.admin != ""; - message = "You need to specify an admin address."; - } - ]; - - vhack.nginx.enable = true; - services = { - stalwart-mail = { - # NOTE(@bpeetz): We do not use the NixOS service, as it comes with too much - # bothersome default configuration and not really any useful configuration. - # However, this decision could obviously be reversed in the future. <2025-02-08> - enable = false; - inherit (cfg) package; - }; - - nginx.virtualHosts."${cfg.fqdn}" = { - locations."/" = { - proxyPass = "http://${builtins.elemAt config.services.stalwart-mail.settings.server.listener.http.bind 0}"; - recommendedProxySettings = true; - }; - - useACMEHost = "${cfg.fqdn}"; - forceSSL = true; - }; - - redis = { - servers = { - "stalwart-mail" = { - enable = true; - - user = "stalwart-mail"; - - # Disable TCP listening. (We have a UNIX socket) - port = 0; - bind = null; - - settings = { - protected-mode = true; - enable-protected-configs = false; - enable-debug-command = false; - enable-module-command = false; - - supervised = "systemd"; - stop-writes-on-bgsave-error = true; - sanitize-dump-payload = "clients"; - }; - }; - }; - }; - }; - security.acme.certs = { - "${cfg.fqdn}" = { - domain = cfg.fqdn; - group = "stalwart-mail-certificates"; - }; - }; - - age.secrets = let - keys = - lib.mapAttrs' ( - keyDomain: keyConfig: - lib.nameValuePair "stalwartMail${keyDomain}" - { - file = keyConfig.dkimPrivateKeyPath; - mode = "600"; - owner = "stalwart-mail"; - group = "stalwart-mail"; - } - ) - cfg.security.dkimKeys; - in - lib.mkIf (cfg.security != null) keys; - - vhack.persist.directories = [ - { - directory = "${cfg.dataDirectory}"; - user = "stalwart-mail"; - group = "stalwart-mail"; - mode = "0700"; - } - { - directory = "${config.services.redis.servers."stalwart-mail".settings.dir}"; - user = "stalwart-mail"; - group = "redis-stalwart-mail"; - mode = "0770"; - } - ]; - - # This service stores a potentially large amount of data. - # Running it as a dynamic user would force chown to be run every time the - # service is restarted on a potentially large number of files. - # That would cause unnecessary and unwanted delays. - users = { - groups = { - stalwart-mail = { - gid = config.vhack.constants.ids.gids.stalwart-mail; - }; - stalwart-mail-certificates = { - gid = config.vhack.constants.ids.gids.stalwart-mail-certificates; - }; - redis-stalwart-mail = { - gid = config.vhack.constants.ids.gids.redis-stalwart-mail; - }; - }; - users = { - nginx = { - extraGroups = ["stalwart-mail-certificates"]; - }; - stalwart-mail = { - isSystemUser = true; - group = "stalwart-mail"; - uid = config.vhack.constants.ids.uids.stalwart-mail; - extraGroups = ["stalwart-mail-certificates"]; - }; - redis-stalwart-mail = { - group = "redis-stalwart-mail"; - uid = config.vhack.constants.ids.uids.redis-stalwart-mail; - }; - }; - }; - - systemd.tmpfiles.rules = [ - "d '${cfg.dataDirectory}' - stalwart-mail stalwart-mail - -" - ]; - - systemd = { - services.stalwart-mail = { - wantedBy = ["multi-user.target"]; - requires = - [ - "redis-stalwart-mail.service" - "network-online.target" - ] - ++ (lib.optional (cfg.security != null) "acme-${cfg.fqdn}.service"); - after = [ - "local-fs.target" - "network.target" - "network-online.target" - "redis-stalwart-mail.service" - "acme-${cfg.fqdn}.service" - ]; - conflicts = [ - "postfix.service" - "sendmail.service" - "exim4.service" - ]; - description = "Stalwart Mail Server"; - - environment = { - SSL_CERT_FILE = "/etc/ssl/certs/ca-certificates.crt"; - NIX_SSL_CERT_FILE = "/etc/ssl/certs/ca-certificates.crt"; - }; - - preStart = let - esa = lib.strings.escapeShellArg; - mkTmpFile = path: "[ -d ${esa path} ] || mkdir --parents ${esa path}"; - - # Create the directories for stalwart - storageDirectories = lib.lists.filter (v: v != null) (lib.attrsets.mapAttrsToList (_: {path ? null, ...}: - if (path != null) - then mkTmpFile path - else null) - topCfg.settings.store); - in - '' - # Stalwart actually wants to store _data_ (e.g., blocked ips) in it's own config file. - # Thus we need to make it writable. - cat ${esa configFile} >$CACHE_DIRECTORY/mutable_config_file.toml - '' - + (builtins.concatStringsSep "\n" storageDirectories); - - serviceConfig = { - ExecStart = pkgs.writers.writeDash "start-stalwart-mail" '' - ${lib.getExe cfg.package} --config="$CACHE_DIRECTORY/mutable_config_file.toml" - ''; - - Restart = "no"; - - KillMode = "process"; - KillSignal = "SIGINT"; - - Type = "simple"; - LimitNOFILE = 65536; - - StandardOutput = "journal"; - StandardError = "journal"; - - ReadWritePaths = [ - cfg.dataDirectory - ]; - CacheDirectory = "stalwart-mail"; - StateDirectory = "stalwart-mail"; - - User = "stalwart-mail"; - Group = "stalwart-mail"; - - SyslogIdentifier = "stalwart-mail"; - - # Bind standard privileged ports - AmbientCapabilities = ["CAP_NET_BIND_SERVICE"]; - CapabilityBoundingSet = ["CAP_NET_BIND_SERVICE"]; - - # Hardening - DeviceAllow = [""]; - LockPersonality = true; - MemoryDenyWriteExecute = true; - PrivateDevices = true; - PrivateUsers = false; # incompatible with CAP_NET_BIND_SERVICE - ProcSubset = "pid"; - PrivateTmp = true; - ProtectClock = true; - ProtectControlGroups = true; - ProtectHome = true; - ProtectHostname = true; - ProtectKernelLogs = true; - ProtectKernelModules = true; - ProtectKernelTunables = true; - ProtectProc = "invisible"; - ProtectSystem = "strict"; - RestrictAddressFamilies = [ - "AF_INET" - "AF_INET6" - "AF_UNIX" - ]; - RestrictNamespaces = true; - RestrictRealtime = true; - RestrictSUIDSGID = true; - SystemCallArchitectures = "native"; - SystemCallFilter = [ - "@system-service" - "~@privileged" - ]; - UMask = "0077"; - }; - }; - }; - - # Make admin commands available in the shell - environment.systemPackages = [cfg.package]; - - networking.firewall = let - parsePorts = listeners: let - parseAddresses = listeners: lib.flatten (lib.mapAttrsToList (name: value: value.bind) listeners); - splitAddress = addr: lib.splitString ":" addr; - extractPort = addr: lib.toInt (builtins.foldl' (a: b: b) "" (splitAddress addr)); - in - builtins.map extractPort (parseAddresses listeners); - in - lib.mkIf (cfg.openFirewall && (builtins.hasAttr "listener" topCfg.settings.server)) - { - allowedTCPPorts = parsePorts topCfg.settings.server.listener; - }; - }; -} diff --git a/modules/by-name/st/stalwart-mail/settings.nix b/modules/by-name/st/stalwart-mail/settings.nix deleted file mode 100644 index dfaf63d..0000000 --- a/modules/by-name/st/stalwart-mail/settings.nix +++ /dev/null @@ -1,552 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - cfg = config.vhack.stalwart-mail; - - signaturesByDomain = - (builtins.map ({name, ...}: { - "if" = "sender_domain = '${name}'"; - "then" = "'${name}'"; - }) - (lib.attrsToList cfg.security.dkimKeys)) - ++ [{"else" = false;}]; - - maybeVerificationMode = - if cfg.security != null - then cfg.security.verificationMode - else "disable"; - - directory = - if cfg.principals == null - then "internal" - else "in-memory"; -in { - config.services.stalwart.settings = lib.mkIf cfg.enable { - # https://www.rfc-editor.org/rfc/rfc6376.html#section-3.3 - signature = let - signatures = - lib.mapAttrs (keyDomain: keyConfig: { - private-key = "%{file:${config.age.secrets."stalwartMail${keyDomain}".path}}%"; - - domain = keyDomain; - - selector = "mail"; - headers = ["From" "To" "Cc" "Date" "Subject" "Message-ID" "Organization" "MIME-Version" "Content-Type" "In-Reply-To" "References" "List-Id" "User-Agent" "Thread-Topic" "Thread-Index"]; - algorithm = keyConfig.keyAlgorithm; - - # How do we canonicalize the headers/body? - # https://www.rfc-editor.org/rfc/rfc6376.html#section-3.4 - canonicalization = "simple/simple"; - - expire = "50d"; - report = true; - }) - cfg.security.dkimKeys; - in - lib.mkIf (cfg.security != null) signatures; - - auth = let - # NOTE(@bpeetz): We disable all the checks if the `listener` is submissions, because the - # user's email client will obviously not have the right IP address to pass SPF or - # IPREV. It will also not be able to sign the message with DKIM (as we has to key). <2025-02-25> - ifNotSmpt = valueTrue: valueFalse: [ - { - "if" = "listener != 'submissions'"; - "then" = valueTrue; - } - {"else" = valueFalse;} - ]; - in { - iprev = { - verify = ifNotSmpt maybeVerificationMode "disable"; - }; - spf = { - verify = { - ehlo = ifNotSmpt maybeVerificationMode "disable"; - - mail-from = ifNotSmpt maybeVerificationMode "disable"; - }; - }; - dmarc = { - verify = ifNotSmpt maybeVerificationMode "disable"; - }; - arc = { - seal = lib.mkIf (cfg.security != null) signaturesByDomain; - verify = ifNotSmpt maybeVerificationMode "disable"; - }; - dkim = { - verify = ifNotSmpt maybeVerificationMode "disable"; - - # Ignore insecure dkim signed messages (i.e., messages containing both - # signed and appended not-signed content.) - strict = true; - - sign = - lib.mkIf (cfg.security != null) signaturesByDomain; - }; - }; - report = { - domain = "${cfg.fqdn}"; - submitter = "'${cfg.fqdn}'"; - analysis = { - addresses = ["dmarc@*" "abuse@*"]; - forward = true; - store = "30d"; - }; - tls.aggregate = { - from-name = "'TLS Report'"; - from-address = "'noreply-tls@${cfg.fqdn}'"; - org-name = "'Foss Syndicate Mail Handling'"; - contact-info = "'${cfg.admin}'"; - send = "daily"; - max-size = 26214400; # 25 MiB - sign = lib.mkIf (cfg.security != null) "'${cfg.fqdn}'"; - }; - dmarc = { - aggregate = { - from-name = "'DMARC Report'"; - from-address = "'noreply-dmarc@${cfg.fqdn}'"; - org-name = "'Foss Syndicate Mail Handling'"; - contact-info = "'${cfg.admin}'"; - send = "weekly"; - max-size = 26214400; # 25MiB - sign = lib.mkIf (cfg.security != null) "'${cfg.fqdn}'"; - }; - from-name = "'Report Subsystem'"; - from-address = "'noreply-dmarc@${cfg.fqdn}'"; - subject = "'DMARC Authentication Failure Report'"; - send = "1/1d"; - sign = lib.mkIf (cfg.security != null) signaturesByDomain; - }; - spf = { - from-name = "'Report Subsystem'"; - from-address = "'noreply-spf@${cfg.fqdn}'"; - subject = "'SPF Authentication Failure Report'"; - send = "1/1d"; - sign = lib.mkIf (cfg.security != null) signaturesByDomain; - }; - dkim = { - from-name = "'Report Subsystem'"; - from-address = "'noreply-dkim@${cfg.fqdn}'"; - subject = "'DKIM Authentication Failure Report'"; - send = "1/1d"; - sign = lib.mkIf (cfg.security != null) signaturesByDomain; - }; - dsn = { - from-name = "'Mail Delivery Subsystem'"; - from-address = "'MAILER-DAEMON@${cfg.fqdn}'"; - sign = lib.mkIf (cfg.security != null) signaturesByDomain; - }; - }; - queue = { - schedule = { - retry = "[2m, 5m, 10m, 15m, 30m, 1h, 2h]"; - notify = "[2h, 7h, 1d, 3d]"; - expire = "5d"; - }; - outbound = { - tls = { - starttls = - if maybeVerificationMode == "strict" - then "require" - else "optional"; - allow-invalid-certs = false; - ip-strategy = "ipv6_then_ipv4"; - mta-sts = - if maybeVerificationMode == "strict" - then "require" - else "optional"; - }; - }; - }; - resolver = { - type = "system"; - preserve-intermediates = true; - concurrency = 2; - timeout = "5s"; - attempts = 2; - try-tcp-on-error = true; - public-suffix = [ - "file://${pkgs.publicsuffix-list}/share/publicsuffix/public_suffix_list.dat" - ]; - }; - - spam-filter = { - enable = true; - header = { - status = { - enable = true; - name = "X-Spam-Status"; - }; - result = { - enable = true; - name = "X-Spam-Result"; - }; - }; - bayes = { - enable = true; - - # Learn from users putting mail into JUNK or taking mail out of it. - account = { - enable = true; - }; - }; - - # Fetch the newest spam-filter rules not from github, but from the nix - # package. - resource = "file://${cfg.package.passthru.spam-filter}/spam-filter.toml"; - auto-update = false; - }; - - webadmin = { - # Fetch the newest webadmin bundle not from github, but from the nix - # package. - resource = "file://${cfg.package.passthru.webadmin}/webadmin.zip"; - auto-update = false; - path = "/var/cache/stalwart-mail"; - }; - - session = { - milter = { - # TODO: Add this <2025-02-07> - # "clamav" = { - # enable = true; - # hostname = "127.0.0.1"; - # port = 15112; - # tls = false; - # allow-invalid-certs = false; - # }; - }; - ehlo = { - require = true; - }; - rcpt = { - directory = "'${directory}'"; - catch-all = true; - subaddressing = true; - }; - data = { - spam-filter = true; - add-headers = { - received = true; - received-spf = true; - auth-results = true; - message-id = true; - date = true; - return-path = true; - delivered-to = true; - }; - auth = { - mechanisms = ["LOGIN" "PLAIN"]; - directory = "'${directory}'"; - require = true; - must-match-sender = true; - errors = { - total = 3; - wait = "5s"; - }; - }; - }; - extensions = { - pipelining = true; - chunking = true; - requiretls = true; - no-soliciting = ""; - dsn = [ - { - "if" = "!is_empty(authenticated_as)"; - "then" = true; - } - {"else" = false;} - ]; - future-release = [ - { - "if" = "!is_empty(authenticated_as)"; - "then" = "7d"; - } - {"else" = false;} - ]; - deliver-by = [ - { - "if" = "!is_empty(authenticated_as)"; - "then" = "15d"; - } - {"else" = false;} - ]; - mt-priority = [ - { - "if" = "!is_empty(authenticated_as)"; - "then" = "mixer"; - } - {"else" = false;} - ]; - vrfy = [ - { - "if" = "!is_empty(authenticated_as)"; - "then" = true; - } - {"else" = false;} - ]; - expn = [ - { - "if" = "!is_empty(authenticated_as)"; - "then" = true; - } - {"else" = false;} - ]; - }; - }; - - jmap = { - account = { - purge.frequency = "0 0 *"; - }; - protocol = { - changes.max-history = "14d"; - }; - email = { - # NOTE(@bpeetz): We probably want to enable the auto-deletion of emails in - # the "Junk" and "Deleted" items mail folders, but this should be - # communicated to the users. <2025-02-07> - auto-expunge = false; - }; - mailbox = { - max-depth = 50; - max-name-length = 255; - }; - folders = let - mkFolder = name: { - inherit name; - create = true; - subscribe = true; - }; - in { - inbox = mkFolder "INBOX"; - drafts = mkFolder "DRAFTS"; - sent = mkFolder "SENT"; - trash = mkFolder "TRASH"; - archive = mkFolder "ARCHIVE"; - junk = mkFolder "JUNK"; - shared = {name = "SHARED";}; - }; - }; - imap = { - auth = { - # Allow password login over non tls connection - allow-plain-text = false; - }; - }; - - server = { - hostname = cfg.fqdn; - - listener = { - # HTTP (used for jmap) - "http" = { - bind = ["127.0.0.1:8112"]; - protocol = "http"; - # handled by ngnix - tls.implicit = false; - }; - - # IMAP - "imap" = { - bind = ["[::]:993"]; - protocol = "imap"; - tls.implicit = true; - }; - - # SMTP - "submissions" = { - bind = ["[::]:465"]; - protocol = "smtp"; - tls.implicit = true; - }; - "input" = { - bind = ["[::]:25"]; - protocol = "smtp"; - tls = { - enable = true; - # Require an explicit `STARTTLS` - implicit = false; - }; - }; - - # # POP3 (should be disabled, unless there is a real reason to use it) - # "pop3" = { - # bind = ["[::]:995"]; - # protocol = "pop3"; - # tls.implicit = true; - # }; - - # # LMTP - # "lmtp" = { - # bind = ["[::]:24"]; - # protocol = "lmtp"; - # }; - - # ManageSieve - "managesieve" = { - bind = ["[::]:4190"]; - protocol = "managesieve"; - tls.implicit = true; - }; - }; - - tls = { - enable = true; - - # Expect the client connection to be encrypted from the start (i.e., - # without STARTTLS) - implicit = true; - - certificate = "default"; - }; - - http = { - url = "protocol + '://' + config_get('server.hostname') + ':' + local_port"; - - # We are behind a nginx proxy, and can thus trust this header. - use-x-forwarded = true; - }; - - auto-ban = { - # Ban if the same IP fails to login 10 times in a day - rate = "10/1d"; - - # Ban the login for an user account, if different IP-Addresses tried and - # failed to login 100 times in single day - auth.rate = "100/1d"; - - abuse.rate = "35/1d"; - - loiter.rate = "150/1d"; - - scan.rate = "150/1d"; - }; - - cache = let - MiB = 1024 * 1024; - in { - access-token.size = 10 * MiB; - http-auth.size = 1 * MiB; - permission.size = 5 * MiB; - account.size = 10 * MiB; - mailbox.size = 10 * MiB; - thread.size = 10 * MiB; - bayes.size = 10 * MiB; - dns = { - txt.size = 5 * MiB; - mx.size = 5 * MiB; - ptr.size = 1 * MiB; - ipv4.size = 5 * MiB; - ipv6.size = 5 * MiB; - tlsa.size = 1 * MiB; - mta-sts.size = 1 * MiB; - rbl.size = 5 * MiB; - }; - }; - }; - - tracer = { - # NOTE(@bpeetz): - # We are using the console logger, because that has nice color output. - # Simply using the console should be fine, as systemd pipes that to the journal - # either way. <2025-02-08> - console = { - enable = true; - ansi = true; - level = "info"; - type = "console"; - }; - }; - - store = { - "rocksdb-data" = { - type = "rocksdb"; - path = "${cfg.dataDirectory}/storage/data"; - compression = "lz4"; - - # Perform “maintenance” every day at 3 am local time. - purge.frequency = "0 3 *"; - }; - "rocksdb-directory" = lib.mkIf (cfg.principals == null) { - type = "rocksdb"; - path = "${cfg.dataDirectory}/storage/directory"; - compression = "lz4"; - - # Perform “maintenance” every day at 1 am local time. - purge.frequency = "0 1 *"; - }; - "rocksdb-full-text-search" = { - type = "rocksdb"; - path = "${cfg.dataDirectory}/storage/full-text-search"; - compression = "lz4"; - - # Perform “maintenance” every day at 2 am local time. - purge.frequency = "0 2 *"; - }; - "file-system" = { - type = "fs"; - path = "${cfg.dataDirectory}/storage/blobs"; - depth = 2; - compression = "lz4"; - - # Perform “maintenance” every day at 5:30 am local time. - purge.frequency = "30 5 *"; - }; - "redis" = { - type = "redis"; - redis-type = "single"; - urls = "unix://${config.services.redis.servers."stalwart-mail".unixSocket}"; - timeout = "10s"; - - # Perform “maintenance” every day at 2:30 am local time. - purge.frequency = "30 2 *"; - }; - }; - storage = { - # PostgreSQL is an option, but this is recommended for single node - # configurations. - data = "rocksdb-data"; - - # We could also re-use the data storage backend for that. - blob = "file-system"; - - full-text.default-language = "en"; - fts = "rocksdb-full-text-search"; - - directory = "${directory}"; - - lookup = "redis"; - - # NOTE(@bpeetz): This will encrypt all emails with the users pgp key (if it - # can be determined.) This is a wonderful feature, but quite tiresome, if - # the user intends to read their email without a their pgp key present (for - # example via their smartphone.) <2025-02-07> - encryption.enable = false; - }; - - directory = { - "in-memory" = lib.mkIf (cfg.principals != null) { - type = "memory"; - inherit (cfg) principals; - }; - "internal" = lib.mkIf (cfg.principals == null) { - type = "internal"; - store = "rocksdb-directory"; - }; - }; - - certificate = { - "default" = { - cert = "%{file:${config.security.acme.certs.${cfg.fqdn}.directory}/fullchain.pem}%"; - private-key = "%{file:${config.security.acme.certs.${cfg.fqdn}.directory}/key.pem}%"; - default = true; - }; - }; - }; -} diff --git a/modules/by-name/sy/system-info/module.nix b/modules/by-name/sy/system-info/module.nix deleted file mode 100644 index e25e88c..0000000 --- a/modules/by-name/sy/system-info/module.nix +++ /dev/null @@ -1,81 +0,0 @@ -{ - lib, - config, - pkgs, - ... -}: let - mkVirtualHostDisplay = name: value: let - aliases = - if value.serverAliases != [] - then - ": " - + builtins.concatStringsSep " " value.serverAliases - else ""; - in '' - ${name}${aliases} - ''; - vHosts = builtins.concatStringsSep "" (builtins.attrValues (builtins.mapAttrs mkVirtualHostDisplay config.services.nginx.virtualHosts)); - - mkOpenPortDisplay = mode: port: let - checkEnabled = service: name: - if config.vhack.${service}.enable - then name - else "<port is '${name}' but service 'vhack.${service}' is not enabled.>"; - mappings = { - "22" = checkEnabled "openssh" "ssh"; - "80" = checkEnabled "nginx" "http"; - "443" = checkEnabled "nginx" "https"; - - "53" = checkEnabled "dns" "dns"; - - "24" = checkEnabled "mail" "mail-lmtp"; - "465" = checkEnabled "mail" "mail-smtp-tls"; - "25" = checkEnabled "mail" "mail-smtp"; - "993" = checkEnabled "mail" "mail-imap-tls"; - "995" = checkEnabled "mail" "mail-pop3-tls"; - - "10222" = checkEnabled "taskchampion-sync" "taskchampion-sync"; - - "64738" = checkEnabled "murmur" "murmur"; - - # TODO(@bpeetz): Check which service opens these ports: <2025-01-28> - "4190" = "???"; - "8112" = "???"; - }; - in '' - ${mode} ${builtins.toString port}: ${ - if (builtins.hasAttr "${builtins.toString port}" mappings) - then mappings.${builtins.toString port} - else - builtins.throw - "'${builtins.toString port}' is still missing from the system info port -> name map. Maybe add it?" - } - ''; - - # TODO(@bpeetz): This should probably also include the allowed TCP/UDP port ranges. <2025-01-28> - openTCPPorts = builtins.concatStringsSep "" (builtins.map (mkOpenPortDisplay "TCP") config.networking.firewall.allowedTCPPorts); - openUDPPorts = builtins.concatStringsSep "" (builtins.map (mkOpenPortDisplay "UDP") config.networking.firewall.allowedUDPPorts); - - markdown = pkgs.writeText "${config.networking.hostName}-system-info.md" '' - ## Virtual Hosts - ${vHosts} - ## Open ports - ${openTCPPorts} - ${openUDPPorts} - ''; -in { - options.vhack.system-info = { - markdown = lib.mkOption { - type = lib.types.package; - description = '' - A derivation, that builds a markdown file, showing relevant system - information for this host. - ''; - readOnly = true; - }; - }; - - config.vhack.system-info = { - inherit markdown; - }; -} diff --git a/modules/by-name/ta/taskchampion-sync/module.nix b/modules/by-name/ta/taskchampion-sync/module.nix deleted file mode 100644 index a7cba30..0000000 --- a/modules/by-name/ta/taskchampion-sync/module.nix +++ /dev/null @@ -1,66 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.vhack.taskchampion-sync; - dataDirectory = "/var/lib/taskchampion-sync-server"; -in { - options.vhack.taskchampion-sync = { - enable = lib.mkEnableOption "taskchampion-sync"; - - fqdn = lib.mkOption { - description = "The fully qualified domain name of this instance."; - type = lib.types.str; - example = "task-sync.tw.online"; - }; - }; - - config = lib.mkIf cfg.enable { - users = { - users.taskchampion = { - uid = config.vhack.constants.ids.uids.taskchampion; - group = "taskchampion"; - }; - groups.taskchampion.gid = config.vhack.constants.ids.uids.taskchampion; - }; - - vhack = { - persist.directories = [ - { - directory = dataDirectory; - user = "taskchampion"; - group = "taskchampion"; - mode = "0700"; - } - ]; - nginx.enable = true; - }; - - systemd.services.taskchampion-sync-server = { - serviceConfig = { - # The upstream service uses DynamicUsers, which currently poses issues to our - # directory persisting strategy. - User = "taskchampion"; - Group = "taskchampion"; - DynamicUser = lib.mkForce false; - }; - }; - - services = { - taskchampion-sync-server = { - enable = true; - dataDir = dataDirectory; - }; - - nginx.virtualHosts."${cfg.fqdn}" = { - locations."/" = { - proxyPass = "http://127.0.0.1:${toString config.services.taskchampion-sync-server.port}"; - recommendedProxySettings = true; - }; - enableACME = true; - forceSSL = true; - }; - }; - }; -} diff --git a/modules/by-name/us/users/module.nix b/modules/by-name/us/users/module.nix deleted file mode 100644 index 6011204..0000000 --- a/modules/by-name/us/users/module.nix +++ /dev/null @@ -1,84 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - cfg = config.vhack.users; - - mkUser = { - name, - password, - uid, - sshKey, - }: { - inherit name; - value = { - inherit name uid; - isNormalUser = true; - home = "/home/${name}"; - hashedPassword = password; - extraGroups = [ - "wheel" - ]; - openssh.authorizedKeys.keys = [ - sshKey - ]; - }; - }; - - extraUsers = lib.listToAttrs ( - builtins.map mkUser [ - { - name = "soispha"; - password = "$y$jFT$3.8XmUyukZvpExMUxDZkI.$IVrJgm8ysNDF/0vDD2kF6w73ozXgr1LMVRNN4Bq7pv1"; - sshKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIME4ZVa+IoZf6T3U08JG93i6QIAJ4amm7mkBzO14JSkz cardno:000F_18F83532"; - uid = 1000; - } - { - name = "sils"; - password = "$y$jFT$KpFnahVCE9JbE.5P3us8o.$ZzSxCusWqe3sL7b6DLgOXNNUf114tiiptM6T8lDxtKC"; - sshKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILn7Oumr5IYtTTIKRFvDnofGXXiDLBQE9jVF+7UE+4G5 vhack.eu"; - uid = 1001; - } - ] - ); -in { - options.vhack.users = { - enable = lib.mkEnableOption "user setup"; - }; - - config = lib.mkIf cfg.enable { - users = { - mutableUsers = false; - defaultUserShell = pkgs.bashInteractive; - - users = - { - root = { - hashedPassword = lib.mkForce null; # to lock root - openssh.authorizedKeys.keys = lib.mkForce []; - }; - } - // extraUsers; - - # TODO(@bpeetz): Is this still relevant? - # If it is, it should be moved to a separate module. <2024-12-24> - # nixremote = { - # name = "nixremote"; - # isNormalUser = true; - # createHome = true; - # home = "/home/nixremote"; - # uid = 1003; - # group = "nixremote"; - # openssh.authorizedKeys.keys = [ - # "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCbSWqFzb+WTq2JVoRGoTkCkP7AM3bNY91bsUBeoQQc8gKAWuqCrpAOmr2Q2QMaTTGEOM0CsWfWLs3ZYtynHmc7wIFc4T/sUloV+dB9oSCmOk5ePxtj8+gpPK35Ja+ug5zmXsaI4s+n9mEbuuEjn33MxDYCUzAI+aWvWe68u/j+FM3u9c3Ta009rotajjSZ/cmIltgNLsG1rnAZRpwmLVg5UL4cb9um54o/NLYFd2KAekQFVbwUQDzzqriZhWmzkfhnznBMDblf9R1xvZ18Lqv3JF21shdaR43NW1wtuntBvAdsVYK2VUEbj+3MxTkK0aQ/E9SHMtH8MRE4oxU74TeTWfIhuSZk9/wekzSNMkHP3ReFC6B9xCMYa+ZqaTaGSWLQi78AQDeM2F9rAfp3hQzyRa7T7qKlgbae/hEb07xZglqmG7eml9vPSt4AHv5Y176Q95NiiWduGoLQOmjvSBMU9/KEGrGKyLfGH1Wa2EOfPxKKcvcHW0Xi9PlPiuP0nYk= root@thinklappi" - # ]; - # }; - # }; - # groups.nixremote = { - # gid = 1004; - # }; - }; - }; -} |
