Update + home assistent -> prometheus
This commit is contained in:
parent
4b6fc29c91
commit
31833e1681
5 changed files with 146 additions and 2718 deletions
|
|
@ -19,6 +19,10 @@
|
|||
trusted_proxies = ["::1"];
|
||||
use_x_forwarded_for = true;
|
||||
};
|
||||
prometheus = {
|
||||
namespace = "hass";
|
||||
requires_auth = false;
|
||||
};
|
||||
recorder.db_url = "postgresql://@/hass";
|
||||
# Includes dependencies for a basic setup
|
||||
# https://www.home-assistant.io/integrations/default_config/
|
||||
|
|
|
|||
|
|
@ -27,7 +27,15 @@
|
|||
{
|
||||
job_name = "stargate";
|
||||
static_configs = [
|
||||
{targets = ["127.0.0.1:9100"];}
|
||||
{targets = ["localhost:9100"];}
|
||||
];
|
||||
}
|
||||
{
|
||||
job_name = "hass";
|
||||
metrics_path = "/api/prometheus";
|
||||
scrape_interval = "10s";
|
||||
static_configs = [
|
||||
{targets = ["localhost:8123"];}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
|
|
|||
|
|
@ -86,9 +86,20 @@ in {
|
|||
extraConfig = ''
|
||||
proxy_buffering off;
|
||||
'';
|
||||
locations."/" = {
|
||||
proxyPass = "http://[::1]:8123";
|
||||
proxyWebsockets = true;
|
||||
locations = {
|
||||
"/" = {
|
||||
proxyPass = "http://[::1]:8123";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
"/api/prometheus" = {
|
||||
proxyPass = "http://[::1]:8123";
|
||||
proxyWebsockets = true;
|
||||
extraConfig = ''
|
||||
allow 127.0.0.1;
|
||||
allow ::1;
|
||||
deny all;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
"grafana.kylekrein.com" = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue