How do you set config file for Prometheus?

4.9k Views Asked by At

I installed prometheus but get stuck at: First run Prometheus, using the prometheus-near.yml config file located in the ./conf directory of this repository: $ prometheus --config.file=$PATH_TO_REPO/conf/prometheus-near.yml

1

There are 1 best solutions below

2
On

Installing Prometheus is basically downloading the compressed binary for your platform and unpacking locally (per the documentation). The prometheus binary is located inside that folder. To start prometheus use:

$> ./prometheus --config.file=prometheus.yml

If you want to use a different config file, as suggested by your question, just provide the path to the config file as the argument to config.file like:

$> ./prometheus --config.file=/path/to/config/prometheus-near.yml

You should be able to query prometheus server at port 9090.