Some checks failed
Run nix flake check / flake-check (push) Has been cancelled
NATS HTTP monitoring endpoint serves JSON, not Prometheus format. Use the prometheus-nats-exporter which queries the NATS endpoint and exposes proper Prometheus metrics. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
45 lines
857 B
Nix
45 lines
857 B
Nix
{ ... }:
|
|
{
|
|
homelab.monitoring.scrapeTargets = [{
|
|
job_name = "nats";
|
|
port = 7777;
|
|
}];
|
|
|
|
services.prometheus.exporters.nats = {
|
|
enable = true;
|
|
url = "http://localhost:8222";
|
|
};
|
|
|
|
services.nats = {
|
|
enable = true;
|
|
jetstream = true;
|
|
serverName = "nats1";
|
|
settings = {
|
|
http_port = 8222;
|
|
accounts = {
|
|
ADMIN = {
|
|
users = [
|
|
{
|
|
nkey = "UA44ZINQKUBTV7CX3RE7MVHOEQOQK2VQGCI4GL4M7XBJB4S66URHLW7A";
|
|
}
|
|
];
|
|
};
|
|
|
|
HOMELAB = {
|
|
jetstream = "enabled";
|
|
users = [
|
|
{
|
|
nkey = "UASLNKLWGICRTZMIXVD3RXLQ57XRIMCKBHP5V3PYFFRNO3E3BIJBCYMZ";
|
|
}
|
|
];
|
|
};
|
|
};
|
|
system_account = "ADMIN";
|
|
jetstream = {
|
|
max_mem = "1G";
|
|
max_file = "1G";
|
|
};
|
|
};
|
|
};
|
|
}
|