This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
sw:prometheus:intro [2022/01/11 10:43] – Frank Fegert | sw:prometheus:intro [2022/01/11 11:20] (current) – Frank Fegert | ||
---|---|---|---|
Line 64: | Line 64: | ||
root@host: | root@host: | ||
root@host: | root@host: | ||
+ | </ | ||
+ | |||
+ | Create the // | ||
+ | |||
+ | <cli> | ||
+ | root@host: | ||
+ | </ | ||
+ | |||
+ | File contents: | ||
+ | |||
+ | <file config / | ||
+ | template(name=" | ||
+ | if ($programname startswith ' | ||
+ | | ||
+ | type=" | ||
+ | dynaFile=" | ||
+ | fileCreateMode=" | ||
+ | fileOwner=" | ||
+ | fileGroup=" | ||
+ | dirCreateMode=" | ||
+ | dirOwner=" | ||
+ | dirGroup=" | ||
+ | ioBufferSize=" | ||
+ | ) | ||
+ | stop | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Restart the '' | ||
+ | |||
+ | <cli> | ||
+ | root@host: | ||
</ | </ | ||
Line 87: | Line 119: | ||
====== Configuration ====== | ====== Configuration ====== | ||
+ | |||
+ | ===== Initial ===== | ||
Configure the // | Configure the // | ||
<cli> | <cli> | ||
- | root@host: | + | root@host: |
+ | </ | ||
+ | |||
+ | File contents: | ||
+ | |||
+ | <file config / | ||
+ | [...] | ||
+ | ARGS=" | ||
+ | [...] | ||
+ | </ | ||
+ | |||
+ | ===== Adding Prometheus to Grafana ===== | ||
+ | |||
+ | See [[sw: | ||
+ | |||
+ | ===== Scraping metrics with Prometheus ===== | ||
+ | |||
+ | Configure // | ||
+ | |||
+ | ==== Loki ==== | ||
+ | |||
+ | < | ||
+ | root@host: | ||
+ | </ | ||
+ | |||
+ | File contents: | ||
+ | |||
+ | <file config / | ||
+ | [...] | ||
+ | scrape_configs: | ||
+ | [...] | ||
+ | - job_name: loki | ||
+ | static_configs: | ||
+ | - targets: [' | ||
+ | [...] | ||
+ | [...] | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Promtail ==== | ||
+ | |||
+ | < | ||
+ | root@host: | ||
</ | </ | ||
Line 98: | Line 174: | ||
<file config / | <file config / | ||
[...] | [...] | ||
- | storage: | + | scrape_configs: |
- | | + | |
- | | + | - job_name: promtail |
+ | | ||
+ | - targets: [' | ||
+ | [...] | ||
[...] | [...] | ||
</ | </ |