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";
|
job_name = "node";
|
||||||
static_configs = [
|
static_configs = [
|
||||||
{
|
{
|
||||||
targets = [ "localhost:9100" ];
|
targets = [ "100.64.0.13:9100" ];
|
||||||
labels.instance = config.networking.hostName; # h001
|
labels.instance = config.networking.hostName; # h001
|
||||||
}
|
}
|
||||||
# {
|
# {
|
||||||
|
@ -109,7 +109,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
ruler = {
|
ruler = {
|
||||||
alertmanager_url = "http://localhost:9093";
|
|
||||||
storage = {
|
storage = {
|
||||||
type = "local";
|
type = "local";
|
||||||
local = {
|
local = {
|
||||||
|
|
|
@ -4,7 +4,10 @@
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
config = {
|
config = {
|
||||||
services.prometheus.exporters.node.enable = true; # port 9080
|
services.prometheus.exporters.node = {
|
||||||
|
enable = true;
|
||||||
|
port = 9100;
|
||||||
|
};
|
||||||
# Create necessary directories with appropriate permissions
|
# Create necessary directories with appropriate permissions
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
"d /tmp/positions 1777 - - -" # World-writable directory for positions file
|
"d /tmp/positions 1777 - - -" # World-writable directory for positions file
|
||||||
|
@ -26,7 +29,7 @@
|
||||||
};
|
};
|
||||||
clients = [
|
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 = [
|
scrape_configs = [
|
||||||
|
@ -38,7 +41,7 @@
|
||||||
path = "/var/log/journal";
|
path = "/var/log/journal";
|
||||||
labels = {
|
labels = {
|
||||||
job = "systemd-journal";
|
job = "systemd-journal";
|
||||||
host = "${config.networking.hostName}";
|
host = config.networking.hostName;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
relabel_configs = [
|
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