From a2a01eb868cf9df6d0aa180dbc32e0115149ae95 Mon Sep 17 00:00:00 2001 From: Kat Inskip Date: Mon, 14 Aug 2023 09:24:57 -0700 Subject: [PATCH] Prom-MC --- flake.lock | 66 ++++++++++---------- nixos/roles/minecraft-server.nix | 3 +- nixos/roles/monitoring-server/prometheus.nix | 8 +++ 3 files changed, 43 insertions(+), 34 deletions(-) diff --git a/flake.lock b/flake.lock index c239683f..506ef897 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "arcexprs": { "flake": false, "locked": { - "lastModified": 1689536930, - "narHash": "sha256-KcdLerVhBYP7hpUTrP3kj3a0RkFdw85XjoW7krcVtD0=", + "lastModified": 1691705955, + "narHash": "sha256-QgOlQvuDHOSUTYkHRT4GXPpcx5eUPf+J8H650/OkOwA=", "owner": "arcnmx", "repo": "nixexprs", - "rev": "670f6ade5d1486e17f28f5298faf763b87a5ef6f", + "rev": "7d7f797a243c964861b0856ee9117518261072b1", "type": "github" }, "original": { @@ -81,11 +81,11 @@ ] }, "locked": { - "lastModified": 1689825754, - "narHash": "sha256-u3W3WGO3BA63nb+CeNLBajbJ/sl8tDXBHKxxeTOCxfo=", + "lastModified": 1691640097, + "narHash": "sha256-6vPsJYjtt2hs4mkiR46yt8c/Spdm/UiUKoSCIlc7iJw=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "531c3de7eccf95155828e0cd9f18c25e7f937777", + "rev": "426d38710b656b0a31f8eaae6e0002206a3b96d7", "type": "github" }, "original": { @@ -178,11 +178,11 @@ ] }, "locked": { - "lastModified": 1689875525, - "narHash": "sha256-fgUrFH3bMZ6R7qgBTfuTRGlkZXIkdyjndl6ZbExbjE8=", + "lastModified": 1691882297, + "narHash": "sha256-e1/LAQSGLnBywfA1TfMl0Vj3tvYka73XOZ/D2/CJowE=", "owner": "nix-community", "repo": "home-manager", - "rev": "1443abd2696ec6bd6fb9701e6c26b277a27b4a3e", + "rev": "c3ab5ea047e6dc73df530948f7367455749d8906", "type": "github" }, "original": { @@ -255,11 +255,11 @@ ] }, "locked": { - "lastModified": 1691544427, - "narHash": "sha256-OwVJ6hn/Yqye3sO1Z6CjdoQvVUMuielyr1Fn/Epqg7A=", + "lastModified": 1691889358, + "narHash": "sha256-dQnPV0ox9vFf127md0tc3VTg3ZhFI9vw1ADEIT+SDBU=", "owner": "Infinidoge", "repo": "nix-minecraft", - "rev": "ab3c5557225d31e36bf447561133ef0850c7eb47", + "rev": "0465296887b97bbe2aae423f0c89e735e1f98e7a", "type": "github" }, "original": { @@ -297,11 +297,11 @@ ] }, "locked": { - "lastModified": 1689479461, - "narHash": "sha256-Ak+PTYdmfOQEmcOsOEnrwqdP0HP20PLraRwpjSAzSeE=", + "lastModified": 1691897365, + "narHash": "sha256-jvWIU4ht3YAmF8TDVM2Ps2+Gf4MtNGLL1zEWQZdTrzU=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "22fa44b7f14684d184733fb26a628f3878ff7aaf", + "rev": "f4d70d098f066a30c7087144063dca179495f7d6", "type": "github" }, "original": { @@ -312,11 +312,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1689320556, - "narHash": "sha256-vODUkZLWFVCvo1KPK3dC2CbXjxa9antEn5ozwlcTr48=", + "lastModified": 1691871742, + "narHash": "sha256-6yDNjfbAMpwzWL4y75fxs6beXHRANfYX8BNSPjYehck=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "d4ea64f2063820120c05f6ba93ee02e6d4671d6b", + "rev": "430a56dd16fe583a812b2df44dca002acab2f4f6", "type": "github" }, "original": { @@ -341,11 +341,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1689473667, - "narHash": "sha256-41ePf1ylHMTogSPAiufqvBbBos+gtB6zjQlYFSEKFMM=", + "lastModified": 1691874659, + "narHash": "sha256-qgmixg0c/CRNT2p9Ad35kaC7NzYVZ6GRooErYI7OGJM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "13231eccfa1da771afa5c0807fdd73e05a1ec4e6", + "rev": "efeed708ece1a9f4ae0506ae4a4d7da264a74102", "type": "github" }, "original": { @@ -357,11 +357,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1689679375, - "narHash": "sha256-LHUC52WvyVDi9PwyL1QCpaxYWBqp4ir4iL6zgOkmcb8=", + "lastModified": 1691654369, + "narHash": "sha256-gSILTEx1jRaJjwZxRlnu3ZwMn1FVNk80qlwiCX8kmpo=", "owner": "nixos", "repo": "nixpkgs", - "rev": "684c17c429c42515bafb3ad775d2a710947f3d67", + "rev": "ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e", "type": "github" }, "original": { @@ -397,11 +397,11 @@ "pypi-deps-db": { "flake": false, "locked": { - "lastModified": 1689774708, - "narHash": "sha256-36Zwo1G2oi+Gg3Cpp3EOwDzBkmpqyRlzL8OLBN2rgu4=", + "lastModified": 1691923991, + "narHash": "sha256-immwfgL1gA/bXo9mzc6KGnkyFc/zhDUphi1LPeJjuTs=", "owner": "DavHau", "repo": "pypi-deps-db", - "rev": "944094e4184b4079298d44a7697118f998288964", + "rev": "73dd4babab274b8da5adf283bd7c05e81df9b6e6", "type": "github" }, "original": { @@ -484,11 +484,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1689534977, - "narHash": "sha256-EB4hasmjKgetTR0My2bS5AwELZFIQ4zANLqHKi7aVXg=", + "lastModified": 1691915920, + "narHash": "sha256-4pitrahUZc1ftIw38CelScd+JYGUVZ4mQTMe3VAz44c=", "owner": "Mic92", "repo": "sops-nix", - "rev": "bd695cc4d0a5e1bead703cc1bec5fa3094820a81", + "rev": "32603de0dc988d60a7b80774dd7aed1083cd9629", "type": "github" }, "original": { @@ -620,11 +620,11 @@ ] }, "locked": { - "lastModified": 1689163449, - "narHash": "sha256-C/cm0fRoNGx00lDOieW5439jpBH9VRWRJcAOXUFy+zs=", + "lastModified": 1690553050, + "narHash": "sha256-pK3kF30OykL3v6P8UP6ipihlS34KoGq9SryCj3tHrFw=", "owner": "nix-community", "repo": "NixOS-WSL", - "rev": "20a1f182aed3d2bbc72f62f5814fc3dd34a1cf0c", + "rev": "f7a95a37306c46b42e9ce751977c44c752fd5eca", "type": "github" }, "original": { diff --git a/nixos/roles/minecraft-server.nix b/nixos/roles/minecraft-server.nix index 04b06bec..3b9bf5b6 100644 --- a/nixos/roles/minecraft-server.nix +++ b/nixos/roles/minecraft-server.nix @@ -13,7 +13,7 @@ servers.arkamew = let modpack = inputs.minecraft.legacyPackages.${pkgs.system}.fetchPackwizModpack { url = "https://github.com/kittywitch/arka-modpack/raw/main/pack.toml"; - packHash = "sha256-5JbJvoVd+YxAS+EIFsXHuG5ZqVGxEgf2AjQOLSuG99U="; + packHash = "sha256-4Fa8xB0CpeANzjRg7B0RUEHepJvnVGFfgTPq7NLa8mM="; manifestHash = "sha256:17lg9syx1ddggyq2h8a92frg4lpr2xc7ryh30bniv9dhymr0vc23"; side = "both"; }; @@ -28,6 +28,7 @@ katrynn = "356d8cf2-246a-4c07-b547-422aea06c0ab"; arcnmx = "e9244315-848c-424a-b004-ae5305449fee"; }; + jvmOpts = "-Xmx4G -Xms1G"; serverProperties = { server-port = 25565; gamemode = 0; diff --git a/nixos/roles/monitoring-server/prometheus.nix b/nixos/roles/monitoring-server/prometheus.nix index d8659cca..adb07ea5 100644 --- a/nixos/roles/monitoring-server/prometheus.nix +++ b/nixos/roles/monitoring-server/prometheus.nix @@ -38,6 +38,14 @@ } ]; } + { + job_name = "${config.networking.hostName}-minecraft"; + static_configs = [ + { + targets = ["127.0.0.1:25585"]; + } + ]; + } { job_name = "${config.networking.hostName}"; static_configs = [