arch-wiki-md-repo
Version:
All arch-wiki articles in markdown format, updated every two days.
48 lines (31 loc) • 2.7 kB
Markdown
Related articles
* [Zabbix](/index.php/Zabbix "Zabbix")
* [Munin](/index.php/Munin "Munin")
* [Grafana](/index.php/Grafana "Grafana")
[](https://prometheus.io/) is an open-source metrics collection and processing tool. It consists primarily of a timeseries database and a query language to access and process the metrics it stores. Separate services perform metric exposure, from which the Prometheus server can pull. It provides a very minimal web UI out of the box. To get a functional dashboard system, third-party tools like [Grafana](/index.php/Grafana "Grafana") can be used.
* [1 Installation](
* [2 Configuration](
* [2.1 Adding metric](
* [3 Using the UI](
* [4 See also](
[](/index.php/Install "Install") the [prometheus](https://aur.archlinux.org/packages/prometheus/) or [prometheus-bin](https://aur.archlinux.org/packages/prometheus-bin/) package. After that you can [Enable](/index.php/Enable "Enable") and [start](/index.php/Start "Start") the `prometheus` service and access the application via HTTP on port 9090 by default.
The default configuration monitors the `prometheus` process itself, but not much beyond that. To perform system monitoring, you can install [prometheus-node-exporter](https://aur.archlinux.org/packages/prometheus-node-exporter/) or [prometheus-node-exporter-bin](https://aur.archlinux.org/packages/prometheus-node-exporter-bin/), which performs metric scraping from the local system. You can start and enable the `prometheus-node-exporter` service. It will open port 9100 by default.
The Prometheus configuration is done through [YAML](https://en.wikipedia.org/wiki/YAML "wikipedia:YAML") files, the main one being located at `/etc/prometheus/prometheus.yml`.
You can add new places to scrape metrics from by adding them to the `scrape_configs` array. To add the local node exporter as a source, next to the prometheus process itself, the configuration would look like this:
```
scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
- job_name: 'localhost'
static_configs:
- targets: ['localhost:9100']
```
Prometheus comes with a very limited web UI to verify configuration, query and graph metrics. You can reach it at [http://localhost:9090](http://localhost:9090) by default. You can find an in-depth explanation of Prometheus' query language in the [Prometheus docs](https://prometheus.io/docs/prometheus/latest/querying/basics/).
* [Official homepage](https://prometheus.io/)