Prometheus 启动参数可以通过命令行参数或者配置文件进行设置。以下是一些常用的启动参数设置方式:
./prometheus --web.listen-address=:9090 --storage.tsdb.path=/path/to/data --config.file=/path/to/prometheus.yml global: scrape_interval: 15s evaluation_interval: 15s scrape_configs: - job_name: 'node' static_configs: - targets: ['localhost:9100'] 然后通过以下命令启动 Prometheus,并使用该配置文件:
./prometheus --config.file=/path/to/prometheus.yml 除了以上例子中的参数设置方式,还可以通过环境变量、标志等方式设置 Prometheus 的启动参数。更多详细的启动参数设置方式请参考 Prometheus 官方文档。