From 9b6536f529fa8fc7def1fd95973eb6bdce138c8a Mon Sep 17 00:00:00 2001 From: sinavir Date: Tue, 23 Apr 2024 23:22:28 +0200 Subject: [PATCH] feat(prometheus): monitor garage --- machines/storage01/garage.nix | 2 +- machines/storage01/prometheus.nix | 5 +++++ .../storage01/secrets/garage-environment_file | Bin 1550 -> 1776 bytes .../storage01/secrets/prometheus-garage_api | Bin 0 -> 1502 bytes machines/storage01/secrets/secrets.nix | 1 + 5 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 machines/storage01/secrets/prometheus-garage_api diff --git a/machines/storage01/garage.nix b/machines/storage01/garage.nix index dd3b6b9..3a7b5c5 100644 --- a/machines/storage01/garage.nix +++ b/machines/storage01/garage.nix @@ -50,7 +50,7 @@ in k2v_api.api_bind_addr = "[::]:3904"; - admin.api_bind_addr = "0.0.0.0:3903"; + admin.api_bind_addr = "127.0.0.1:3903"; }; environmentFile = config.age.secrets."garage-environment_file".path; diff --git a/machines/storage01/prometheus.nix b/machines/storage01/prometheus.nix index ad5a1cf..168e9a5 100644 --- a/machines/storage01/prometheus.nix +++ b/machines/storage01/prometheus.nix @@ -69,6 +69,11 @@ in metrics_path = "/ups_metrics"; static_configs = [ { targets = [ "100.80.255.180:9199" ]; } ]; } + { + job_name = "garage"; + static_configs = [ { targets = [ "localhost:3903" ]; } ]; + bearer_token_file = config.age.secrets."prometheus-garage_api".path; + } ]; }; diff --git a/machines/storage01/secrets/garage-environment_file b/machines/storage01/secrets/garage-environment_file index ae6a9db05c8091180dab401ea7007316957eed64..dce047c9e8d20eda2b67caab5ec66ac1079649f0 100644 GIT binary patch literal 1776 zcmZY8{qNia0mt!0M3TaOAc9d8bNDc`Z}au857)a2j$M0wx;|a6z23D;zO2{wdUx&h z`L5T4NPrAXh))SdWX|z0rg0K9FqsLO7>FS#qD&29Wb%!3hWLY9%wiCU-(U92m%reZ zeDZl)p1bLWc3Q^yGzvc-rCxOj0hQkMvS5+RYU5>Tkd}-Uo*xIQ zS?~i&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RE-Za~fm+F+~v>X0*xAv*3SHI1ka zB`{(#uWdvT%)*oDVC=P+W}x$coMd`L3(B+@HR=jB8V`x6uuL1HX~R)b%YrqAR|JW& zkbkm`5PR#ktxHa74>G&tSDGaWUruMY-sS;*5{HN+%EoAHXC_}+t#$*3?qaS{w1K6i zrIOmNWfiT?nw;oD*lHv+q)rSwNSyTYR$itjWk1#`ED0ai@w%Jdr`N8$Q~Nr3^!xQ) zZ?nH_H1>_k^j_tsZw_vG@KErwy7Qh3-`l&fyZe-8f7|)gOP6sw!tslrt|dFpd+bd5 zYyIO>+qd;PUmm!6|9ttQE#F*mOC7uDg|+q{AG~n+Gy6VUKIhqEzjcmndTrl*=biHF z^yJS^-*8Fw{yo$5mG4eEJ^%6bW9!!*_+;17BM-m3`{>W_J-r*<{?%L5L#I8-J+*az zard8hfiv&d$>%>@^2(tto7Z<8zWB(^uWo;O?-QTAZS4B_s*vgVe(th6sy&c+Zo~5jcC4@M q0Um$yFX=;Fc%HoekqeGpwV|~6=;1G_d;Um|T;8V-Ui;h5d;bRa^&Tw% diff --git a/machines/storage01/secrets/prometheus-garage_api b/machines/storage01/secrets/prometheus-garage_api new file mode 100644 index 0000000000000000000000000000000000000000..5c23b18db639b810d7bb27fd4b946b8a92537dbe GIT binary patch literal 1502 zcmZXUInUb!7{^g17I#8IDg#3ngevQ;?bxwnkPwOQGx6%E7+J|AqxyIpWyfWug6cKyQmDCsqRiy`J`$Rs7HXij}~p4-bKgd zYK4%COmO4Ig$7TqNV4J#8kC|!$Uam^7510NwPzmlQeGYfjavKwrn(%5QqEOLj9nH+QMNX4c~8NBQrtY zOP6VGRjOGt$EqbW@8};;c`q^JZmT6g$e*^Wv6_Zs*y$7#k*qh1elZZ~xMMdf5D74? z3=>4fH}`3WyyPz8~xX$e>W*|BcUdX1U5xcF!lZDW>kXUL~9y+ z!311h>yWD?b9Aji0Y+^t1i&~uiJ89b_$9Nxt<~6|wd!ycgLL%V3rBmPQ5w3aHIdxc zwlWTclq}5jm>VT7>8b51H%k=)D+24HrMtSDuH*@p<`i-GxLj7i-aaL|8*DOR#*&)O z)<;dSC=_919P48aEBoBBdFhtP|2{wsDG8=6=A72x0A!6_xpsdR zPu`0*!p_t7yaA%XUyD{pwn%e1$+)|pNt$;(a?j-vMp7!#q=;}k9A)AA+8Vy<%wZAn z`dRcdL+91JD{s|Tq|!&gL1TD!U`aoy)*$bzaeYdFqI2;Q?0Ba>wCQf$Tu)2QaFkV6 zie6STLg+G;rON5~cysdZZb3U4AWFUvu!I5}ik5QZx*B z_R@H|dqb8b=i~JK-#`E9!-tRG(I0&G`q5jj!mq!4mOuaM@y|~VpZ)ma@W*@1+n@gS kCj9dI7q6ZlzPUX5^YqEDzx?(0!{mpjufKTr+YcW61Jup!3jhEB literal 0 HcmV?d00001 diff --git a/machines/storage01/secrets/secrets.nix b/machines/storage01/secrets/secrets.nix index 852b7ec..ef4d5e5 100644 --- a/machines/storage01/secrets/secrets.nix +++ b/machines/storage01/secrets/secrets.nix @@ -17,5 +17,6 @@ lib.setDefault { inherit publicKeys; } [ "peertube-service_environment_file" "peertube-smtp_password_file" "prometheus-web_config_file" + "prometheus-garage_api" "prometheus-uptime-kuma-apikey" ]