Add Prometheus metrics: /metrics, node_exporter and a page for it
The web UI serves the router's own state at /metrics (token needed); router.metrics.nodeExporter runs node_exporter for the machine's and opens its port only to the zones named. The Prometheus page edits those settings and shows the scrape configuration. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -859,6 +859,26 @@ let
|
||||
};
|
||||
expect = [ "natOnly does not apply to the router itself" ];
|
||||
};
|
||||
exporterOnWan = {
|
||||
router = {
|
||||
lans.main = lan { };
|
||||
metrics.nodeExporter = {
|
||||
enable = true;
|
||||
zones = [ "wan" ];
|
||||
};
|
||||
};
|
||||
expect = [ "node_exporter must not be open to it" ];
|
||||
};
|
||||
exporterUnknownZone = {
|
||||
router = {
|
||||
lans.main = lan { };
|
||||
metrics.nodeExporter = {
|
||||
enable = true;
|
||||
zones = [ "nowhere" ];
|
||||
};
|
||||
};
|
||||
expect = [ "unknown source zone `nowhere`" ];
|
||||
};
|
||||
localNoPorts = {
|
||||
router = {
|
||||
lans.main = lan { };
|
||||
|
||||
Reference in New Issue
Block a user