update metrics reporting
This commit is contained in:
parent
7f63bb2d05
commit
c83736eae0
2 changed files with 7 additions and 19 deletions
|
@ -11,7 +11,7 @@
|
|||
job_name = "node";
|
||||
static_configs = [
|
||||
{
|
||||
targets = [ "localhost:9100" ];
|
||||
targets = [ "100.64.0.13:9100" ];
|
||||
labels.instance = config.networking.hostName; # h001
|
||||
}
|
||||
# {
|
||||
|
@ -109,7 +109,6 @@
|
|||
};
|
||||
|
||||
ruler = {
|
||||
alertmanager_url = "http://localhost:9093";
|
||||
storage = {
|
||||
type = "local";
|
||||
local = {
|
||||
|
|
|
@ -4,7 +4,10 @@
|
|||
}:
|
||||
{
|
||||
config = {
|
||||
services.prometheus.exporters.node.enable = true; # port 9080
|
||||
services.prometheus.exporters.node = {
|
||||
enable = true;
|
||||
port = 9100;
|
||||
};
|
||||
# Create necessary directories with appropriate permissions
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /tmp/positions 1777 - - -" # World-writable directory for positions file
|
||||
|
@ -26,7 +29,7 @@
|
|||
};
|
||||
clients = [
|
||||
{
|
||||
url = "http://localhost:3100/loki/api/v1/push"; # Points to your Loki instance
|
||||
url = "http://100.64.0.13:3100/loki/api/v1/push"; # Points to your Loki instance
|
||||
}
|
||||
];
|
||||
scrape_configs = [
|
||||
|
@ -38,7 +41,7 @@
|
|||
path = "/var/log/journal";
|
||||
labels = {
|
||||
job = "systemd-journal";
|
||||
host = "${config.networking.hostName}";
|
||||
host = config.networking.hostName;
|
||||
};
|
||||
};
|
||||
relabel_configs = [
|
||||
|
@ -48,20 +51,6 @@
|
|||
}
|
||||
];
|
||||
}
|
||||
# Simple file-based logs as a fallback
|
||||
{
|
||||
job_name = "system";
|
||||
static_configs = [
|
||||
{
|
||||
targets = [ "localhost" ];
|
||||
labels = {
|
||||
job = "syslog";
|
||||
host = "${config.networking.hostName}";
|
||||
__path__ = "/var/log/syslog";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue