monitoring: use nats exporter instead of direct scrape
Some checks failed
Run nix flake check / flake-check (push) Has been cancelled
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>
This commit is contained in:
@@ -2,9 +2,14 @@
|
|||||||
{
|
{
|
||||||
homelab.monitoring.scrapeTargets = [{
|
homelab.monitoring.scrapeTargets = [{
|
||||||
job_name = "nats";
|
job_name = "nats";
|
||||||
port = 8222;
|
port = 7777;
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
services.prometheus.exporters.nats = {
|
||||||
|
enable = true;
|
||||||
|
url = "http://localhost:8222";
|
||||||
|
};
|
||||||
|
|
||||||
services.nats = {
|
services.nats = {
|
||||||
enable = true;
|
enable = true;
|
||||||
jetstream = true;
|
jetstream = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user