Merge pull request #110870 from asymmetric/doc/prom-node-exp

docs: modules/prometheus: finish exporter setup
This commit is contained in:
ajs124 2022-04-18 22:54:01 +01:00 committed by GitHub
commit 3fedfb5f8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,6 +19,7 @@
<programlisting>
services.prometheus.exporters.node = {
enable = true;
port = 9100;
enabledCollectors = [
"logind"
"systemd"
@ -42,6 +43,26 @@
<link xlink:href="https://nixos.org/nixos/options.html#prometheus.exporters">available
options</link>.
</para>
<para>
Prometheus can now be configured to consume the metrics produced by the exporter:
<programlisting>
services.prometheus = {
# ...
scrapeConfigs = [
{
job_name = "node";
static_configs = [{
targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ];
}];
}
];
# ...
}
</programlisting>
</para>
</section>
<section xml:id="module-services-prometheus-exporters-new-exporter">
<title>Adding a new exporter</title>