prometheus's Examples

Show context-sensitive help (also try --help-long and --help-man).

prometheus --help

Show application version.

prometheus --version

Prometheus configuration file path.

prometheus --config.file="prometheus.yml"

Address to listen on for UI, API, and telemetry.

prometheus --web.listen-address="0.0.0.0:9090"

[EXPERIMENTAL] Path to configuration file that can enable TLS or authentication.

prometheus --web.config.file=""

Maximum duration before timing out read of the request, and closing idle connections.

prometheus --web.read-timeout=5m

Maximum number of simultaneous connections.

prometheus --web.max-connections=512

The URL under which Prometheus is externally reachable (for example, if Prometheus is served via a reverse proxy). Used for generating relative and absolute links back to Prometheus itself. If the URL has a path portion, it will be used to prefix all HTTP endpoints served by Prometheus. If omitted, relevant URL components will be derived automatically.

prometheus --web.external-url=<URL>

Prefix for the internal routes of web endpoints. Defaults to path of --web.external-url.

prometheus --web.route-prefix=<path>

Path to static asset directory, available at /user.

prometheus --web.user-assets=<path>

Enable shutdown and reload via HTTP request.

prometheus --web.enable-lifecycle

Enable API endpoints for admin control actions.

prometheus --web.enable-admin-api

Path to the console template directory, available at /consoles.

prometheus --web.console.templates="consoles"

Path to the console library directory.

prometheus --web.console.libraries="console_libraries"

Document title of Prometheus instance.

prometheus --web.page-title="Prometheus Time Series Collection and Processing Server"

Regex for CORS origin. It is fully anchored. Example: 'https?://(domain1|domain2)\.com'

prometheus --web.cors.origin=".*"

Base path for metrics storage.

prometheus --storage.tsdb.path="data/"

[DEPRECATED] How long to retain samples in storage. This flag has been deprecated, use "storage.tsdb.retention.time" instead.

prometheus --storage.tsdb.retention=STORAGE.TSDB.RETENTION

How long to retain samples in storage. When this flag is set it overrides "storage.tsdb.retention". If neither this flag nor "storage.tsdb.retention" nor "storage.tsdb.retention.size" is set, the retention time defaults to 15d. Units Supported: y, w, d, h, m, s, ms.

prometheus --storage.tsdb.retention.time=STORAGE.TSDB.RETENTION.TIME

Maximum number of bytes that can be stored for blocks. A unit is required, supported units: B, KB, MB, GB, TB, PB, EB. Ex: "512MB".

prometheus --storage.tsdb.retention.size=STORAGE.TSDB.RETENTION.SIZE

Do not create lockfile in data directory.

prometheus --storage.tsdb.no-lockfile

Allow overlapping blocks, which in turn enables vertical compaction and vertical query merge.

prometheus --storage.tsdb.allow-overlapping-blocks

How long to wait flushing sample on shutdown or config reload.

prometheus --storage.remote.flush-deadline=<duration>

Maximum overall number of samples to return via the remote rea  interface, in a single query. 0 means no limit. This limit is ignored for streamed response types.

prometheus --storage.remote.read-sample-limit=5e7

Maximum number of concurrent remote read calls. 0 means no limit.

prometheus --storage.remote.read-concurrent-limit=10

Maximum number of bytes in a single frame for streaming remote read response types before marshalling. Note that client might have limit on frame size as well. 1MB as recommended by protobuf by default.

prometheus --storage.remote.read-max-bytes-in-frame=1048576

 Max time to tolerate prometheus outage for restoring "for" state of alert.

prometheus --rules.alert.for-outage-tolerance=1h

Minimum duration between alert and restored "for" state. This is  maintained only for alerts with configured "for" time greater than grace period.

prometheus --rules.alert.for-grace-period=10m

Minimum amount of time to wait before resending an alert to Alertmanager.

prometheus --rules.alert.resend-delay=1m

The capacity of the queue for pending Alertmanager notifications.

prometheus --alertmanager.notification-queue-capacity=10000

The maximum lookback duration for retrieving metrics during expression  evaluations and federation.

prometheus --query.lookback-delta=5m

The maximum lookback duration for retrieving metrics during expression  evaluations and federation.

prometheus --query.lookback-delta=5m

Maximum time a query may take before being aborted. prometheus --query.max-concurrency=20

prometheus --query.timeout=2m

Maximum number of queries executed concurrently.

prometheus --query.max-concurrency=20

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.

prometheus --query.max-samples=50000000

Comma separated feature names to enable. Valid options:
                                 exemplar-storage, expand-external-labels, memory-snapshot-on-shutdown,
                                 promql-at-modifier, promql-negative-offset, remote-write-receiver,
                                 extra-scrape-metrics. See
                                 https://prometheus.io/docs/prometheus/latest/feature_flags/ for more
                                 details.

prometheus --enable-feature= ...

 Only log messages with the given severity or above. One of: [debug, info, warn, error]

prometheus --log.level=info

Output format of log messages. One of: [logfmt, json]

prometheus --log.format=logfmt

DevOpsSchool
Typically replies within an hour

DevOpsSchool
Hi there 👋

How can I help you?
×
Chat with Us