← 返回命令列表

Linux command

prometheus 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Start Prometheus

prometheus --config.file=[prometheus.yml]

Start with storage path

prometheus --config.file=[prometheus.yml] --storage.tsdb.path=[/data]

Specify retention

prometheus --storage.tsdb.retention.time=[15d]

Enable web admin API

prometheus --web.enable-admin-api

说明

Prometheus is a monitoring and alerting toolkit that collects metrics from configured targets, stores them, and makes them available for querying and alerting.

参数

--config.file _file_
Configuration file.
--storage.tsdb.path _path_
Data storage directory.
--storage.tsdb.retention.time _duration_
Data retention period.
--web.listen-address _addr_
Listen address.
--web.enable-admin-api
Enable admin endpoints.
--log.level _level_
Log verbosity.

FAQ

What is the prometheus command used for?

Prometheus is a monitoring and alerting toolkit that collects metrics from configured targets, stores them, and makes them available for querying and alerting.

How do I run a basic prometheus example?

Run `prometheus --config.file=[prometheus.yml]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --config.file _file_ do in prometheus?

Configuration file.