promQLLabelsDeleteName:=promQLLabelsDeleteCmd.Arg("name","Name of the label to delete.").Required().String()
promQLLabelsDeleteName:=promQLLabelsDeleteCmd.Arg("name","Name of the label to delete.").Required().String()
featureList:=app.Flag("enable-feature","Comma separated feature names to enable (only PromQL related and no-default-scrape-port). See https://prometheus.io/docs/prometheus/latest/feature_flags/ for the options and more details.").Default("").Strings()
featureList:=app.Flag("enable-feature","Comma separated feature names to enable. Currently unused.").Default("").Strings()
documentationCmd:=app.Command("write-documentation","Generate command line documentation. Internal use.").Hidden()
documentationCmd:=app.Command("write-documentation","Generate command line documentation. Internal use.").Hidden()
@ -321,24 +321,21 @@ func main() {
}
}
}
}
varnoDefaultScrapePortbool
for_,f:=range*featureList{
for_,f:=range*featureList{
opts:=strings.Split(f,",")
opts:=strings.Split(f,",")
for_,o:=rangeopts{
for_,o:=rangeopts{
switcho{
switcho{
case"no-default-scrape-port":
noDefaultScrapePort=true
case"":
case"":
continue
continue
default:
default:
fmt.Printf(" WARNING: Unknown option for --enable-feature: %q\n",o)
fmt.Printf(" WARNING: --enable-feature is currently a no-op")
| <codeclass="text-nowrap">--query.timeout</code> | Maximum time a query may take before being aborted. Use with server mode only. | `2m` |
| <codeclass="text-nowrap">--query.timeout</code> | Maximum time a query may take before being aborted. Use with server mode only. | `2m` |
| <codeclass="text-nowrap">--query.max-concurrency</code> | Maximum number of queries executed concurrently. Use with server mode only. | `20` |
| <codeclass="text-nowrap">--query.max-concurrency</code> | Maximum number of queries executed concurrently. Use with server mode only. | `20` |
| <codeclass="text-nowrap">--query.max-samples</code> | Maximum number of samples a single query can load into memory. Note that queries will fail if they try to load more samples than this into memory, so this also limits the number of samples a query can return. Use with server mode only. | `50000000` |
| <codeclass="text-nowrap">--query.max-samples</code> | Maximum number of samples a single query can load into memory. Note that queries will fail if they try to load more samples than this into memory, so this also limits the number of samples a query can return. Use with server mode only. | `50000000` |
| <codeclass="text-nowrap">--enable-feature</code><codeclass="text-nowrap">...<codeclass="text-nowrap"> | Comma separated feature names to enable. Valid options: auto-gomemlimit, exemplar-storage, expand-external-labels, memory-snapshot-on-shutdown, promql-per-step-stats, promql-experimental-functions, extra-scrape-metrics, auto-gomaxprocs, no-default-scrape-port, native-histograms, otlp-write-receiver, created-timestamp-zero-ingestion, concurrent-rule-eval, delayed-compaction, old-ui. See https://prometheus.io/docs/prometheus/latest/feature_flags/ for more details. | |
| <codeclass="text-nowrap">--enable-feature</code><codeclass="text-nowrap">...<codeclass="text-nowrap"> | Comma separated feature names to enable. Valid options: auto-gomemlimit, exemplar-storage, expand-external-labels, memory-snapshot-on-shutdown, promql-per-step-stats, promql-experimental-functions, extra-scrape-metrics, auto-gomaxprocs, native-histograms, otlp-write-receiver, created-timestamp-zero-ingestion, concurrent-rule-eval, delayed-compaction, old-ui. See https://prometheus.io/docs/prometheus/latest/feature_flags/ for more details. | |
| <codeclass="text-nowrap">--agent</code> | Run Prometheus in 'Agent mode'. | |
| <codeclass="text-nowrap">--agent</code> | Run Prometheus in 'Agent mode'. | |
| <codeclass="text-nowrap">--log.level</code> | Only log messages with the given severity or above. One of: [debug, info, warn, error] | `info` |
| <codeclass="text-nowrap">--log.level</code> | Only log messages with the given severity or above. One of: [debug, info, warn, error] | `info` |
| <codeclass="text-nowrap">--log.format</code> | Output format of log messages. One of: [logfmt, json] | `logfmt` |
| <codeclass="text-nowrap">--log.format</code> | Output format of log messages. One of: [logfmt, json] | `logfmt` |
| <codeclass="text-nowrap">--enable-feature</code><codeclass="text-nowrap">...<codeclass="text-nowrap"> | Comma separated feature names to enable (only PromQL related and no-default-scrape-port). See https://prometheus.io/docs/prometheus/latest/feature_flags/ for the options and more details. |
| <codeclass="text-nowrap">--enable-feature</code><codeclass="text-nowrap">...<codeclass="text-nowrap"> | Comma separated feature names to enable. Currently unused. |
@ -71,15 +71,6 @@ When enabled, the GOMEMLIMIT variable is automatically set to match the Linux co
There is also an additional tuning flag, `--auto-gomemlimit.ratio`, which allows controlling how much of the memory is used for Prometheus. The remainder is reserved for memory outside the process. For example, kernel page cache. Page cache is important for Prometheus TSDB query performance. The default is `0.9`, which means 90% of the memory limit will be used for Prometheus.
There is also an additional tuning flag, `--auto-gomemlimit.ratio`, which allows controlling how much of the memory is used for Prometheus. The remainder is reserved for memory outside the process. For example, kernel page cache. Page cache is important for Prometheus TSDB query performance. The default is `0.9`, which means 90% of the memory limit will be used for Prometheus.
## No default scrape port
`--enable-feature=no-default-scrape-port`
When enabled, the default ports for HTTP (`:80`) or HTTPS (`:443`) will _not_ be added to
the address used to scrape a target (the value of the `__address_` label), contrary to the default behavior.
In addition, if a default HTTP or HTTPS port has already been added either in a static configuration or
by a service discovery mechanism and the respective scheme is specified (`http` or `https`), that port will be removed.