mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 00:57:22 +01:00
feat: add prometheus auth
This commit is contained in:
parent
c5a6bda441
commit
a9354c3959
3 changed files with 10 additions and 6 deletions
|
|
@ -6592,15 +6592,16 @@ Also, the system state version is set here. No need to touch it.
|
|||
http_addr = "127.0.0.1";
|
||||
protocol = "https";
|
||||
domain = "status.swarsel.win";
|
||||
root_url = "%(protocol)s://%(domain)s:%(http_port)s/grafana/";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.prometheus = {
|
||||
enable = true;
|
||||
webExternalUrl = "https://status.swarsel.win/prometheus";
|
||||
port = 9090;
|
||||
listenAddress = "127.0.0.1";
|
||||
webConfigFile = /../../programs/server/prometheus/web.config;
|
||||
exporters = {
|
||||
zfs = {
|
||||
enable = true;
|
||||
|
|
@ -6620,13 +6621,13 @@ Also, the system state version is set here. No need to touch it.
|
|||
acmeRoot = null;
|
||||
locations = {
|
||||
"/grafana" = {
|
||||
proxyPass = "http://localhost:3000/grafana/";
|
||||
proxyPass = "http://localhost:3000";
|
||||
extraConfig = ''
|
||||
client_max_body_size 0;
|
||||
'';
|
||||
};
|
||||
"/prometheus" = {
|
||||
proxyPass = "http://localhost:9090/prometheus/";
|
||||
proxyPass = "http://localhost:9090";
|
||||
extraConfig = ''
|
||||
client_max_body_size 0;
|
||||
'';
|
||||
|
|
|
|||
|
|
@ -21,15 +21,16 @@
|
|||
http_addr = "127.0.0.1";
|
||||
protocol = "https";
|
||||
domain = "status.swarsel.win";
|
||||
root_url = "%(protocol)s://%(domain)s:%(http_port)s/grafana/";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.prometheus = {
|
||||
enable = true;
|
||||
webExternalUrl = "https://status.swarsel.win/prometheus";
|
||||
port = 9090;
|
||||
listenAddress = "127.0.0.1";
|
||||
webConfigFile = /../../programs/server/prometheus/web.config;
|
||||
exporters = {
|
||||
zfs = {
|
||||
enable = true;
|
||||
|
|
@ -49,13 +50,13 @@
|
|||
acmeRoot = null;
|
||||
locations = {
|
||||
"/grafana" = {
|
||||
proxyPass = "http://localhost:3000/grafana/";
|
||||
proxyPass = "http://localhost:3000";
|
||||
extraConfig = ''
|
||||
client_max_body_size 0;
|
||||
'';
|
||||
};
|
||||
"/prometheus" = {
|
||||
proxyPass = "http://localhost:9090/prometheus/";
|
||||
proxyPass = "http://localhost:9090";
|
||||
extraConfig = ''
|
||||
client_max_body_size 0;
|
||||
'';
|
||||
|
|
|
|||
2
programs/server/prometheus/web.config
Normal file
2
programs/server/prometheus/web.config
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
basic_auth_users:
|
||||
admin: $2a$12$UFCdK2B67OM.p51ON8eKLOxQ4Ek9jruJPtaLE4Owc4Ukf7jGx//LC
|
||||
Loading…
Add table
Add a link
Reference in a new issue