lol

nixos/prometheus: convert option descriptions to MD

this notable also now interprets a markdown-flavored list in
triton_sd_config as actual markdown and renders it differently, but this
is arguably for the better (and probably the original intention).

no other rendering changes.

authored by

pennae and committed by
pennae
169072fb 97b6defb

+50 -50
+50 -50
nixos/modules/services/monitoring/prometheus/default.nix
··· 99 99 100 100 mkDefOpt = type: defaultStr: description: mkOpt type (description + '' 101 101 102 - Defaults to <literal>${defaultStr}</literal> in prometheus 103 - when set to <literal>null</literal>. 102 + Defaults to ````${defaultStr}```` in prometheus 103 + when set to `null`. 104 104 ''); 105 105 106 106 mkOpt = type: description: mkOption { 107 107 type = types.nullOr type; 108 108 default = null; 109 - inherit description; 109 + description = lib.mdDoc description; 110 110 }; 111 111 112 112 mkSdConfigModule = extraOptions: types.submodule { ··· 123 123 ''; 124 124 125 125 credentials = mkOpt types.str '' 126 - Sets the credentials. It is mutually exclusive with <literal>credentials_file</literal>. 126 + Sets the credentials. It is mutually exclusive with `credentials_file`. 127 127 ''; 128 128 129 129 credentials_file = mkOpt types.str '' 130 130 Sets the credentials to the credentials read from the configured file. 131 - It is mutually exclusive with <literal>credentials</literal>. 131 + It is mutually exclusive with `credentials`. 132 132 ''; 133 133 }; 134 134 }) '' 135 - Optional <literal>Authorization</literal> header configuration. 135 + Optional `Authorization` header configuration. 136 136 ''; 137 137 138 138 oauth2 = mkOpt promtypes.oauth2 '' ··· 229 229 ''; 230 230 231 231 client_secret_file = mkOpt types.str '' 232 - Read the client secret from a file. It is mutually exclusive with <literal>client_secret</literal>. 232 + Read the client secret from a file. It is mutually exclusive with `client_secret`. 233 233 ''; 234 234 235 235 scopes = mkOpt (types.listOf types.str) '' ··· 288 288 289 289 If honor_labels is set to "false", label conflicts are 290 290 resolved by renaming conflicting labels in the scraped data 291 - to "exported_&lt;original-label&gt;" (for example 291 + to "exported_\<original-label\>" (for example 292 292 "exported_instance", "exported_job") and then attaching 293 293 server-side labels. This is useful for use cases such as 294 294 federation, where all labels specified in the target should ··· 299 299 honor_timestamps controls whether Prometheus respects the timestamps present 300 300 in scraped data. 301 301 302 - If honor_timestamps is set to <literal>true</literal>, the timestamps of the metrics exposed 302 + If honor_timestamps is set to `true`, the timestamps of the metrics exposed 303 303 by the target will be used. 304 304 305 - If honor_timestamps is set to <literal>false</literal>, the timestamps of the metrics exposed 305 + If honor_timestamps is set to `false`, the timestamps of the metrics exposed 306 306 by the target will be ignored. 307 307 ''; 308 308 ··· 315 315 ''; 316 316 317 317 basic_auth = mkOpt promTypes.basic_auth '' 318 - Sets the <literal>Authorization</literal> header on every scrape request with the 318 + Sets the `Authorization` header on every scrape request with the 319 319 configured username and password. 320 320 password and password_file are mutually exclusive. 321 321 ''; 322 322 323 323 bearer_token = mkOpt types.str '' 324 - Sets the <literal>Authorization</literal> header on every scrape request with 324 + Sets the `Authorization` header on every scrape request with 325 325 the configured bearer token. It is mutually exclusive with 326 - <option>bearer_token_file</option>. 326 + {option}`bearer_token_file`. 327 327 ''; 328 328 329 329 bearer_token_file = mkOpt types.str '' 330 - Sets the <literal>Authorization</literal> header on every scrape request with 330 + Sets the `Authorization` header on every scrape request with 331 331 the bearer token read from the configured file. It is mutually 332 - exclusive with <option>bearer_token</option>. 332 + exclusive with {option}`bearer_token`. 333 333 ''; 334 334 335 335 tls_config = mkOpt promTypes.tls_config '' ··· 379 379 gce_sd_configs = mkOpt (types.listOf promTypes.gce_sd_config) '' 380 380 List of Google Compute Engine service discovery configurations. 381 381 382 - See <link xlink:href="https://prometheus.io/docs/prometheus/latest/configuration/configuration/#gce_sd_config">the relevant Prometheus configuration docs</link> 382 + See [the relevant Prometheus configuration docs](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#gce_sd_config) 383 383 for more detail. 384 384 ''; 385 385 ··· 591 591 592 592 allow_stale = mkOpt types.bool '' 593 593 Allow stale Consul results 594 - (see <link xlink:href="https://www.consul.io/api/index.html#consistency-modes"/>). 594 + (see <https://www.consul.io/api/index.html#consistency-modes>). 595 595 596 596 Will reduce load on Consul. 597 597 ''; ··· 623 623 }; 624 624 625 625 port = mkDefOpt types.int "80" '' 626 - The port to scrape metrics from, when <literal>role</literal> is nodes, and for discovered 626 + The port to scrape metrics from, when `role` is nodes, and for discovered 627 627 tasks and services that don't have published ports. 628 628 ''; 629 629 ··· 632 632 options = { 633 633 name = mkOption { 634 634 type = types.str; 635 - description = '' 635 + description = lib.mdDoc '' 636 636 Name of the filter. The available filters are listed in the upstream documentation: 637 - Services: <link xlink:href="https://docs.docker.com/engine/api/v1.40/#operation/ServiceList"/> 638 - Tasks: <link xlink:href="https://docs.docker.com/engine/api/v1.40/#operation/TaskList"/> 639 - Nodes: <link xlink:href="https://docs.docker.com/engine/api/v1.40/#operation/NodeList"/> 637 + Services: <https://docs.docker.com/engine/api/v1.40/#operation/ServiceList> 638 + Tasks: <https://docs.docker.com/engine/api/v1.40/#operation/TaskList> 639 + Nodes: <https://docs.docker.com/engine/api/v1.40/#operation/NodeList> 640 640 ''; 641 641 }; 642 642 values = mkOption { 643 643 type = types.str; 644 - description = '' 644 + description = lib.mdDoc '' 645 645 Value for the filter. 646 646 ''; 647 647 }; ··· 707 707 708 708 access_key = mkOpt types.str '' 709 709 The AWS API key id. If blank, the environment variable 710 - <literal>AWS_ACCESS_KEY_ID</literal> is used. 710 + `AWS_ACCESS_KEY_ID` is used. 711 711 ''; 712 712 713 713 secret_key = mkOpt types.str '' 714 714 The AWS API key secret. If blank, the environment variable 715 - <literal>AWS_SECRET_ACCESS_KEY</literal> is used. 715 + `AWS_SECRET_ACCESS_KEY` is used. 716 716 ''; 717 717 718 718 profile = mkOpt types.str '' ··· 738 738 options = { 739 739 name = mkOption { 740 740 type = types.str; 741 - description = '' 742 - See <link xlink:href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html">this list</link> 741 + description = lib.mdDoc '' 742 + See [this list](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html) 743 743 for the available filters. 744 744 ''; 745 745 }; ··· 747 747 values = mkOption { 748 748 type = types.listOf types.str; 749 749 default = [ ]; 750 - description = '' 750 + description = lib.mdDoc '' 751 751 Value of the filter. 752 752 ''; 753 753 }; ··· 806 806 filter = mkOpt types.str '' 807 807 Filter can be used optionally to filter the instance list by other 808 808 criteria Syntax of this filter string is described here in the filter 809 - query parameter section: <link xlink:href="https://cloud.google.com/compute/docs/reference/latest/instances/list"/>. 809 + query parameter section: <https://cloud.google.com/compute/docs/reference/latest/instances/list>. 810 810 ''; 811 811 812 812 refresh_interval = mkDefOpt types.str "60s" '' ··· 822 822 The tag separator used to separate concatenated GCE instance network tags. 823 823 824 824 See the GCP documentation on network tags for more information: 825 - <link xlink:href="https://cloud.google.com/vpc/docs/add-remove-network-tags"/> 825 + <https://cloud.google.com/vpc/docs/add-remove-network-tags> 826 826 ''; 827 827 }; 828 828 }; ··· 917 917 options = { 918 918 role = mkOption { 919 919 type = types.str; 920 - description = '' 920 + description = lib.mdDoc '' 921 921 Selector role 922 922 ''; 923 923 }; ··· 976 976 ''; 977 977 978 978 access_key = mkOpt types.str '' 979 - The AWS API keys. If blank, the environment variable <literal>AWS_ACCESS_KEY_ID</literal> is used. 979 + The AWS API keys. If blank, the environment variable `AWS_ACCESS_KEY_ID` is used. 980 980 ''; 981 981 982 982 secret_key = mkOpt types.str '' 983 - The AWS API keys. If blank, the environment variable <literal>AWS_SECRET_ACCESS_KEY</literal> is used. 983 + The AWS API keys. If blank, the environment variable `AWS_SECRET_ACCESS_KEY` is used. 984 984 ''; 985 985 986 986 profile = mkOpt types.str '' ··· 1030 1030 1031 1031 auth_token = mkOpt types.str '' 1032 1032 Optional authentication information for token-based authentication: 1033 - <link xlink:href="https://docs.mesosphere.com/1.11/security/ent/iam-api/#passing-an-authentication-token"/> 1034 - It is mutually exclusive with <literal>auth_token_file</literal> and other authentication mechanisms. 1033 + <https://docs.mesosphere.com/1.11/security/ent/iam-api/#passing-an-authentication-token> 1034 + It is mutually exclusive with `auth_token_file` and other authentication mechanisms. 1035 1035 ''; 1036 1036 1037 1037 auth_token_file = mkOpt types.str '' 1038 1038 Optional authentication information for token-based authentication: 1039 - <link xlink:href="https://docs.mesosphere.com/1.11/security/ent/iam-api/#passing-an-authentication-token"/> 1040 - It is mutually exclusive with <literal>auth_token</literal> and other authentication mechanisms. 1039 + <https://docs.mesosphere.com/1.11/security/ent/iam-api/#passing-an-authentication-token> 1040 + It is mutually exclusive with `auth_token` and other authentication mechanisms. 1041 1041 ''; 1042 1042 }; 1043 1043 ··· 1205 1205 1206 1206 secret_key = mkOpt types.str '' 1207 1207 Secret key to use when listing targets. https://console.scaleway.com/project/credentials 1208 - It is mutually exclusive with <literal>secret_key_file</literal>. 1208 + It is mutually exclusive with `secret_key_file`. 1209 1209 ''; 1210 1210 1211 1211 secret_key_file = mkOpt types.str '' 1212 1212 Sets the secret key with the credentials read from the configured file. 1213 - It is mutually exclusive with <literal>secret_key</literal>. 1213 + It is mutually exclusive with `secret_key`. 1214 1214 ''; 1215 1215 1216 1216 project_id = mkOption { ··· 1299 1299 }; 1300 1300 1301 1301 groups = mkOpt (types.listOf types.str) '' 1302 - A list of groups for which targets are retrieved, only supported when targeting the <literal>container</literal> role. 1302 + A list of groups for which targets are retrieved, only supported when targeting the `container` role. 1303 1303 If omitted all containers owned by the requesting account are scraped. 1304 1304 ''; 1305 1305 ··· 1440 1440 remote write configs. 1441 1441 ''; 1442 1442 basic_auth = mkOpt promTypes.basic_auth '' 1443 - Sets the <literal>Authorization</literal> header on every remote write request with the 1443 + Sets the `Authorization` header on every remote write request with the 1444 1444 configured username and password. 1445 1445 password and password_file are mutually exclusive. 1446 1446 ''; 1447 1447 bearer_token = mkOpt types.str '' 1448 - Sets the <literal>Authorization</literal> header on every remote write request with 1449 - the configured bearer token. It is mutually exclusive with <literal>bearer_token_file</literal>. 1448 + Sets the `Authorization` header on every remote write request with 1449 + the configured bearer token. It is mutually exclusive with `bearer_token_file`. 1450 1450 ''; 1451 1451 bearer_token_file = mkOpt types.str '' 1452 - Sets the <literal>Authorization</literal> header on every remote write request with the bearer token 1453 - read from the configured file. It is mutually exclusive with <literal>bearer_token</literal>. 1452 + Sets the `Authorization` header on every remote write request with the bearer token 1453 + read from the configured file. It is mutually exclusive with `bearer_token`. 1454 1454 ''; 1455 1455 tls_config = mkOpt promTypes.tls_config '' 1456 1456 Configures the remote write request's TLS settings. ··· 1531 1531 the local storage should have complete data for. 1532 1532 ''; 1533 1533 basic_auth = mkOpt promTypes.basic_auth '' 1534 - Sets the <literal>Authorization</literal> header on every remote read request with the 1534 + Sets the `Authorization` header on every remote read request with the 1535 1535 configured username and password. 1536 1536 password and password_file are mutually exclusive. 1537 1537 ''; 1538 1538 bearer_token = mkOpt types.str '' 1539 - Sets the <literal>Authorization</literal> header on every remote read request with 1540 - the configured bearer token. It is mutually exclusive with <literal>bearer_token_file</literal>. 1539 + Sets the `Authorization` header on every remote read request with 1540 + the configured bearer token. It is mutually exclusive with `bearer_token_file`. 1541 1541 ''; 1542 1542 bearer_token_file = mkOpt types.str '' 1543 - Sets the <literal>Authorization</literal> header on every remote read request with the bearer token 1544 - read from the configured file. It is mutually exclusive with <literal>bearer_token</literal>. 1543 + Sets the `Authorization` header on every remote read request with the bearer token 1544 + read from the configured file. It is mutually exclusive with `bearer_token`. 1545 1545 ''; 1546 1546 tls_config = mkOpt promTypes.tls_config '' 1547 1547 Configures the remote read request's TLS settings.