mirror of
https://github.com/Noratrieb/vps.git
synced 2026-07-12 08:17:45 +02:00
add victoria logs, use both
This commit is contained in:
parent
b49a602213
commit
5a28c30d16
3 changed files with 22 additions and 1 deletions
|
|
@ -29,7 +29,9 @@ in
|
||||||
package = caddy;
|
package = caddy;
|
||||||
logFormat = ''
|
logFormat = ''
|
||||||
output stdout
|
output stdout
|
||||||
format json
|
format json {
|
||||||
|
message_key "_msg"
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
globalConfig = ''
|
globalConfig = ''
|
||||||
email tls@noratrieb.dev
|
email tls@noratrieb.dev
|
||||||
|
|
|
||||||
|
|
@ -175,6 +175,7 @@ in
|
||||||
};
|
};
|
||||||
clients = [
|
clients = [
|
||||||
{ url = "http://loki.internal:3100/loki/api/v1/push"; }
|
{ url = "http://loki.internal:3100/loki/api/v1/push"; }
|
||||||
|
{ url = "http://loki.internal:9428/insert/loki/api/v1/push"; }
|
||||||
];
|
];
|
||||||
scrape_configs = [
|
scrape_configs = [
|
||||||
{
|
{
|
||||||
|
|
@ -207,6 +208,10 @@ in
|
||||||
};
|
};
|
||||||
}];
|
}];
|
||||||
relabel_configs = [
|
relabel_configs = [
|
||||||
|
{
|
||||||
|
source_labels = [ "msg" ];
|
||||||
|
target_label = "_msg";
|
||||||
|
}
|
||||||
{
|
{
|
||||||
source_labels = [ "__journal__systemd_unit" ];
|
source_labels = [ "__journal__systemd_unit" ];
|
||||||
target_label = "unit";
|
target_label = "unit";
|
||||||
|
|
|
||||||
|
|
@ -117,6 +117,10 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
declarativePlugins = [
|
||||||
|
pkgs.grafanaPlugins.victoriametrics-logs-datasource
|
||||||
|
];
|
||||||
|
|
||||||
provision = {
|
provision = {
|
||||||
enable = true;
|
enable = true;
|
||||||
datasources.settings = {
|
datasources.settings = {
|
||||||
|
|
@ -144,6 +148,12 @@
|
||||||
access = "proxy";
|
access = "proxy";
|
||||||
url = "http://pyroscope.internal:4040";
|
url = "http://pyroscope.internal:4040";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
name = "victorialogs";
|
||||||
|
type = "victoriametrics-logs-datasource";
|
||||||
|
access = "proxy";
|
||||||
|
url = "http://loki.internal:9428";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -267,4 +277,8 @@
|
||||||
createHome = true;
|
createHome = true;
|
||||||
};
|
};
|
||||||
users.groups.pyroscope = { };
|
users.groups.pyroscope = { };
|
||||||
|
|
||||||
|
services.victorialogs = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue