mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-22 23:55:37 +00:00
fix: prometheus remote write
This commit is contained in:
parent
e86b2f184f
commit
9d4bf082c7
@ -10,8 +10,9 @@
|
|||||||
|
|
||||||
services.prometheus = {
|
services.prometheus = {
|
||||||
exporters.node.enable = true;
|
exporters.node.enable = true;
|
||||||
|
extraFlags = lib.mkIf isServer [ "--web.enable-remote-write-receiver" ];
|
||||||
scrapeConfigs = [{
|
scrapeConfigs = [{
|
||||||
job_name = "local";
|
job_name = config.networking.hostName;
|
||||||
static_configs = [{ targets = [ "127.0.0.1:9100" ]; }];
|
static_configs = [{ targets = [ "127.0.0.1:9100" ]; }];
|
||||||
}];
|
}];
|
||||||
webExternalUrl =
|
webExternalUrl =
|
||||||
@ -28,7 +29,7 @@
|
|||||||
});
|
});
|
||||||
remoteWrite = lib.mkIf (!isServer) [{
|
remoteWrite = lib.mkIf (!isServer) [{
|
||||||
name = config.networking.hostName;
|
name = config.networking.hostName;
|
||||||
url = "https://${config.hostnames.prometheus}";
|
url = "https://${config.hostnames.prometheus}/api/v1/write";
|
||||||
basic_auth = {
|
basic_auth = {
|
||||||
# Uses password hashed with bcrypt above
|
# Uses password hashed with bcrypt above
|
||||||
username = "prometheus";
|
username = "prometheus";
|
||||||
|
Loading…
Reference in New Issue
Block a user