This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
сервис_grafana [2026/11/04 10:09] val [Подключение Prometheus] |
сервис_grafana [2026/11/30 15:18] (current) val [Сервис Grafana] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Сервис Grafana ====== | ====== Сервис Grafana ====== | ||
| + | |||
| + | * [[https://habr.com/ru/companies/karuna/articles/771134/|Мониторинг с Grafana. Best practices]] | ||
| * [[https://geekflare.com/prometheus-grafana-setup-for-linux/|A Guide to Monitor Linux Server using Prometheus and Grafana]] | * [[https://geekflare.com/prometheus-grafana-setup-for-linux/|A Guide to Monitor Linux Server using Prometheus and Grafana]] | ||
| Line 6: | Line 8: | ||
| ===== Установка ===== | ===== Установка ===== | ||
| - | |||
| * [[https://grafana.com/docs/grafana/latest/installation/debian/|Install on Debian or Ubuntu]] | * [[https://grafana.com/docs/grafana/latest/installation/debian/|Install on Debian or Ubuntu]] | ||
| * [[https://github.com/grafana/grafana/releases]] | * [[https://github.com/grafana/grafana/releases]] | ||
| - | |||
| - | |||
| ==== Docker ==== | ==== Docker ==== | ||
| Line 35: | Line 34: | ||
| # docker update --restart=always grafana | # docker update --restart=always grafana | ||
| + | |||
| + | # docker logs -fn0 grafana | ||
| </code> | </code> | ||
| Line 123: | Line 124: | ||
| <code> | <code> | ||
| Connections->Data Source->Prometheus | Connections->Data Source->Prometheus | ||
| - | URL: http://localhost:9090 | + | URL: http://192.168.X.10:9090 |
| - | http://192.168.X.10:9090 Если grafana в docker | + | |
| </code> | </code> | ||
| + | ===== Подключение Loki ===== | ||
| + | |||
| + | <code> | ||
| + | Connections->Data Source->Loki | ||
| + | URL: http://192.168.X.10:3100 | ||
| + | </code> | ||
| ===== Grafana dashboard ===== | ===== Grafana dashboard ===== | ||
| Line 188: | Line 194: | ||
| # cat /etc/grafana/grafana.ini | # cat /etc/grafana/grafana.ini | ||
| </code><code> | </code><code> | ||
| + | ... | ||
| + | [server] | ||
| + | domain = server.corpX.un | ||
| ... | ... | ||
| [smtp] | [smtp] | ||
| enabled = true | enabled = true | ||
| - | host = server.corpX.un:25 #if docker, and may be, better use ip | + | ;if docker, and may be, better use ip |
| + | host = server.corpX.un:25 | ||
| from_address = grafana@corpX.un | from_address = grafana@corpX.un | ||
| ehlo_identity = server.corpX.un | ehlo_identity = server.corpX.un | ||
| Line 197: | Line 207: | ||
| ... | ... | ||
| </code><code> | </code><code> | ||
| - | # service grafana-server restart | ||
| - | или | ||
| # docker restart grafana | # docker restart grafana | ||
| </code> | </code> | ||
| Line 210: | Line 218: | ||
| ==== Настройка уведомлений ==== | ==== Настройка уведомлений ==== | ||
| + | |||
| + | === Версия 13 === | ||
| + | <code> | ||
| + | 1. Enter alert rule name: roundcube_login_logout_runtime | ||
| + | 2. Define query and alert condition: roundcube_login_logout_runtime | ||
| + | Alert condition: IS ABOVE 1 | ||
| + | 3. Add folder and labels: Alerts | ||
| + | 4. Set evaluation behavior: 1m-group | ||
| + | 5. Configure notifications: student | ||
| + | </code> | ||
| === Версия 11 === | === Версия 11 === | ||