Prometheus run on macOS
On macOS, you can run a Prometheus server by running the binary that is compatible with Apple silicon. If you are looking for information about what to do with Prometheus, check out a previous post to get an overview.
Install
If you are using a Mac, I recommend using homebrew to install Prometheus along with many other applications.
|
|
Configure prometheus
You can configure this Prometheus server by creating/updating the file /opt/homebrew/etc/prometheus.yml
Run prometheus in the background
You can run Prometheus with homebrew services or by running the installed binary.
|
|
This command will run prometheus and log the output to the file .prometheus.log
in your home directory.
When run from brew services
, prometheus
is run from
prometheus_brew_services
and uses the flags in:
|
|
When Prometheus is running, an API is available on your local system http://localhost:9090
Using prometheus
You can use prometheus to collect many different types of metrics. Check out a previous post about prometheus and how to create graphs based on metrics collected using Grafana.