Feature/logging prometheus#163
Merged
Merged
Conversation
VeryBigSad
approved these changes
Jul 15, 2023
| HOST: 0.0.0.0 No newline at end of file | ||
| HOST: 0.0.0.0 | ||
| grafana: | ||
| image: grafana/grafana:8.5.3-ubuntu |
Comment on lines
+321
to
+339
| PROMETHEUS_LATENCY_BUCKETS = ( | ||
| 0.01, | ||
| 0.025, | ||
| 0.05, | ||
| 0.075, | ||
| 0.1, | ||
| 0.25, | ||
| 0.5, | ||
| 0.75, | ||
| 1.0, | ||
| 2.5, | ||
| 5.0, | ||
| 7.5, | ||
| 10.0, | ||
| 25.0, | ||
| 50.0, | ||
| 75.0, | ||
| float("inf"), | ||
| ) |
Contributor
There was a problem hiding this comment.
Странно, что это нужно указывать в настройках
Я бы такие бакеты поставил, но в целом as you wish
0.1
0.5
1
3
5
10
10
Contributor
|
Еще, если у тебя жалуется линтер, то ты, кажется, не подключил pre-commit хуки, они должны будут перед коммитом форматировать все файлики и проверять их на всякое полезное. В ридми написано, как установить, полезная штука |
grafana to /grafana
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Метрики
Внес изменения в докер
Добавил графану, работает на 3000 порту. Node-exporter для отслеживания метрик систем и сам Prometheus для сбора метрик. Добавил "web" (название контейнера) в переменную ALLOWED_HOSTS по просьбе Prometheus.
Проверка кода
После запуска докера переходим по ссылке и проверяем работоспособность графаны, доступ admin admin.
Далее переходим по ссылке и добавляем прометеус http://localhost:3000/datasources
Settings > HTTP > URL > http://prometheus:9090
Далее проматываем внизу и нажимаем Save and test
Переходим по ссылке http://localhost:3000/dashboard/import и импортим нужный шаблон via grafana.com (9528)
Теперь тотально кайфуем.
Дополнительная информация
В планах настроить nginx, чтобы графана работала на основном порте сервиса и добавить отслеживание метрик для нескольких самых популярных моделей.
Важно
Смерджить feature/nginx > feature/logging-prometheus
#172