add prometheus and friends
[distro-setup] / distro-end
index 1b25a55eced2a26e3dd6e5a74903af810ca14adf..f2df46e6770aa47f79cae78dd5903442f5aa26c0 100755 (executable)
@@ -180,6 +180,22 @@ sgo certbotmail.timer
 
 pi ${p1[@]}
 
+
+## prometheus node exporter setup
+web-conf -f 9100 -p 9101 apache2 $(hostname -f) <<'EOF'
+#https://httpd.apache.org/docs/2.4/mod/mod_authn_core.html#authtype
+# https://stackoverflow.com/questions/5011102/apache-reverse-proxy-with-basic-authentication
+<Location />
+   AllowOverride None
+   AuthType basic
+   AuthName "Authentication Required"
+   # setup one time, with root:www-data, 640
+   AuthUserFile "/etc/prometheus-htpasswd"
+   Require valid-user
+</Location>
+EOF
+
+
 # website setup
 case $HOSTNAME in
   lj|li)