Prometheus: Difference between revisions
From wikinotes
(→Notes) |
No edit summary |
||
(23 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
A system monitoring tool | A system monitoring tool.<br> | ||
Metrics are polled/persisted over REST, | |||
= Documentation = | = Overview = | ||
<blockquote> | |||
== Documentation == | |||
<blockquote> | <blockquote> | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 10: | Line 13: | ||
</blockquote><!-- Documentation --> | </blockquote><!-- Documentation --> | ||
= Tutorials = | == Tutorials == | ||
<blockquote> | <blockquote> | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
| | | overview || https://sbcode.net/prometheus/ | ||
|- | |- | ||
|} | |} | ||
</blockquote><!-- Tutorials --> | </blockquote><!-- Tutorials --> | ||
= | == Routes == | ||
<blockquote> | <blockquote> | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |||
| <code>9090</code> || default web-ui | |||
|- | |- | ||
| <code>http://${IP_ADDR}:9090</code> || web-ui | | <code>http://${IP_ADDR}:9090</code> || web-ui | ||
|- | |- | ||
| <code>http://${IP_ADDR}:9090/targets</code> || web-gui (health of queried metrics) | | <code>http://${IP_ADDR}:9090/targets</code> || web-gui (health of queried metrics) | ||
|- | |- | ||
|} | |} | ||
</blockquote><!-- | </blockquote><!-- Routes --> | ||
= | == Locations == | ||
<blockquote> | <blockquote> | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
| <code> | | <code>${PREFIX}/etc/prometheus.yml</code> || main configuration | ||
|- | |||
| <code>/var/db/prometheus</code> || data dir | |||
|- | |- | ||
|} | |} | ||
</blockquote><!-- | </blockquote><!-- Locations --> | ||
</blockquote><!-- Overview --> | |||
= | = Quickstart = | ||
<blockquote> | <blockquote> | ||
* '''prometheus''' polls HTTP endpoints for collected metrics | * '''prometheus''' polls HTTP endpoints for collected metrics | ||
* these endpoints are called '''exporters''', and they are generated/exposed using '''clients''' | * these endpoints are called '''exporters''', and they are generated/exposed using '''clients''' | ||
* you can configure '''alerts''' when a metric fails | * you can configure '''rules''' to persist data, or emit '''alerts''' when a metric fails | ||
</blockquote><!-- | |||
<syntaxhighlight lang="bash"> | |||
xdg-open localhost:9090 # prometheus-ui | |||
promtool check rules /path/to/example.rules.yml # validate rule | |||
amtool check-config alertmanager.yml # validate alertmanager config | |||
</syntaxhighlight> | |||
</blockquote><!-- Quickstart --> | |||
= Notes = | = Notes = | ||
<blockquote> | <blockquote> | ||
Setup | == Setup == | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
| [[prometheus install]] | | [[prometheus install]] | ||
|- | |||
| [[prometheus exporters]] | |||
|- | |||
| [[prometheus alerters]] | |||
|- | |||
|} | |||
== Configuration == | |||
{| class="wikitable" | |||
|- | |- | ||
| [[prometheus configuration]] | | [[prometheus configuration]] | ||
|- | |- | ||
| [[prometheus | | [[prometheus rules]] | ||
|- | |- | ||
|} | |} | ||
Usage | == Usage == | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
| [[prometheus | | [[prometheus web ui]] | ||
|- | |||
| [[prometheus http api]] | |||
|- | |||
|} | |||
== Syntax == | |||
{| class="wikitable" | |||
|- | |- | ||
| [[prometheus promql]] | | [[prometheus promql]] | ||
|- | |||
| [[prometheus metric syntax]] | |||
|- | |- | ||
|} | |} | ||
</blockquote><!-- Notes --> | |||
= Integrations = | |||
<blockquote> | |||
Dashboards | Dashboards | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
| [[ | | [[grafana]] || metric/graph dashboards | ||
|- | |- | ||
|} | |} | ||
</blockquote><!-- | </blockquote><!-- Integrations --> |
Latest revision as of 16:34, 1 October 2022
A system monitoring tool.
Metrics are polled/persisted over REST,
Overview
Documentation
home https://prometheus.io/ Tutorials
overview https://sbcode.net/prometheus/ Routes
9090
default web-ui http://${IP_ADDR}:9090
web-ui http://${IP_ADDR}:9090/targets
web-gui (health of queried metrics) Locations
${PREFIX}/etc/prometheus.yml
main configuration /var/db/prometheus
data dir
Quickstart
- prometheus polls HTTP endpoints for collected metrics
- these endpoints are called exporters, and they are generated/exposed using clients
- you can configure rules to persist data, or emit alerts when a metric fails
xdg-open localhost:9090 # prometheus-ui promtool check rules /path/to/example.rules.yml # validate rule amtool check-config alertmanager.yml # validate alertmanager config
Notes
Setup
prometheus install prometheus exporters prometheus alerters Configuration
prometheus configuration prometheus rules Usage
prometheus web ui prometheus http api Syntax
prometheus promql prometheus metric syntax
Integrations
Dashboards
grafana metric/graph dashboards