git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/prometheus-exporters: minor doc improvements

* Content of `programlisting` shouldn't be indented, otherwise it's weirdly indented in the output. * Use `<xref linkend=.../>` in the release notes: then users can directly go to the option documentation when reading release notes. * Don't use docbook tags in `mkRemovedOptionModule`: it's only used during evaluation where docbook isn't rendered.

commit6e43cc7fb0f22a88a989583ccf50e56f7f72ad6a authorMaximilian Bosch <maximilian@mbosch.me> dateSun 3 Jan 2021, 19:04 (6 years ago) parent3f94c66
3 files changed+12−15
nixos/doc/manual/release-notes/rl-2103.xml+2−2 nixos/modules/services/monitoring/prometheus/exporters/json.nix+5−7 nixos/modules/services/monitoring/prometheus/exporters/rspamd.nix+5−6
nixos/doc/manual/release-notes/rl-2103.xml+2−2
@@ -304,7 +304,7 @@
304304 <literal>/probe</literal> endpoint.
305305 In the prometheus scrape configuration the scrape target might look like this:
306306 <programlisting>
307− http://some.json-exporter.host:7979/probe?target=https://example.com/some/json/endpoint
307+http://some.json-exporter.host:7979/probe?target=https://example.com/some/json/endpoint
308308 </programlisting>
309309 </para>
310310 <para>
@@ -313,7 +313,7 @@
313313 in the corresponding NixOS test.
314314 </para>
315315 <para>
316− These changes also affect <literal>services.prometheus.exporters.rspamd</literal>, which is
316+ These changes also affect <xref linkend="opt-services.prometheus.exporters.rspamd.enable" />, which is
317317 just a preconfigured instance of the json exporter.
318318 </para>
319319 <para>
nixos/modules/services/monitoring/prometheus/exporters/json.nix+5−7
@@ -4,7 +4,6 @@ with lib;
44
55let
66 cfg = config.services.prometheus.exporters.json;
7−
87in
98{
109 port = 7979;
@@ -30,15 +29,14 @@ in
3029 (mkRemovedOptionModule [ "url" ] ''
3130 This option was removed. The URL of the endpoint serving JSON
3231 must now be provided to the exporter by prometheus via the url
33− parameter <literal>target</literal>.
32+ parameter `target'.
3433
3534 In prometheus a scrape URL would look like this:
36− <programlisting>
37− http://some.json-exporter.host:7979/probe?target=https://example.com/some/json/endpoint
38− </programlisting>
3935
40− For more information, take a look at the <link xlink:href="https://github.com/prometheus-community/json_exporter">
41− official documentation</link> of the json_exporter.
36+ http://some.json-exporter.host:7979/probe?target=https://example.com/some/json/endpoint
37+
38+ For more information, take a look at the official documentation
39+ (https://github.com/prometheus-community/json_exporter) of the json_exporter.
4240 '')
4341 ({ options.warnings = options.warnings; options.assertions = options.assertions; })
4442 ];
nixos/modules/services/monitoring/prometheus/exporters/rspamd.nix+5−6
@@ -85,15 +85,14 @@ in
8585 (mkRemovedOptionModule [ "url" ] ''
8686 This option was removed. The URL of the rspamd metrics endpoint
8787 must now be provided to the exporter by prometheus via the url
88− parameter <literal>target</literal>.
88+ parameter `target'.
8989
9090 In prometheus a scrape URL would look like this:
91− <programlisting>
92− http://some.rspamd-exporter.host:7980/probe?target=http://some.rspamd.host:11334/stat
93− </programlisting>
9491
95− For more information, take a look at the <link xlink:href="https://github.com/prometheus-community/json_exporter">
96− official documentation</link> of the json_exporter.
92+ http://some.rspamd-exporter.host:7980/probe?target=http://some.rspamd.host:11334/stat
93+
94+ For more information, take a look at the official documentation
95+ (https://github.com/prometheus-community/json_exporter) of the json_exporter.
9796 '')
9897 ({ options.warnings = options.warnings; options.assertions = options.assertions; })
9998 ];