feat: enhance Ansible playbook and Nginx configuration with authentication and logrotate setup

- Added environment variables for project configuration in env.template.
- Updated Ansible playbook to use environment variables for project settings and added tasks for monitoring authentication setup.
- Enhanced Nginx configuration for Alertmanager and Prometheus with HTTP Basic Authentication.
- Introduced logrotate configuration for managing log files and set up cron for daily execution.
- Removed obsolete Uptime Kuma docker-compose file.
This commit is contained in:
2025-09-19 12:09:05 +03:00
parent 1eb11e454d
commit f7b08ae9e8
16 changed files with 959 additions and 51 deletions

View File

@@ -0,0 +1,147 @@
{
"monitors": [
{
"id": 1,
"name": "Telegram Bot Health",
"url": "http://telegram-bot:8080/health",
"type": "http",
"method": "GET",
"interval": 60,
"retries": 3,
"timeout": 10,
"keyword": null,
"maxredirects": 10,
"ignoreTls": false,
"upsideDown": false,
"tags": ["bot", "telegram", "health"],
"description": "Мониторинг состояния Telegram Helper Bot",
"active": true
},
{
"id": 2,
"name": "AnonBot Health",
"url": "http://anon-bot:8081/health",
"type": "http",
"method": "GET",
"interval": 60,
"retries": 3,
"timeout": 10,
"keyword": null,
"maxredirects": 10,
"ignoreTls": false,
"upsideDown": false,
"tags": ["bot", "anon", "health"],
"description": "Мониторинг состояния AnonBot",
"active": true
},
{
"id": 3,
"name": "Prometheus Health",
"url": "http://prometheus:9090/-/healthy",
"type": "http",
"method": "GET",
"interval": 60,
"retries": 3,
"timeout": 10,
"keyword": null,
"maxredirects": 10,
"ignoreTls": false,
"upsideDown": false,
"tags": ["monitoring", "prometheus", "health"],
"description": "Мониторинг состояния Prometheus",
"active": true
},
{
"id": 4,
"name": "Grafana Health",
"url": "http://grafana:3000/api/health",
"type": "http",
"method": "GET",
"interval": 60,
"retries": 3,
"timeout": 10,
"keyword": null,
"maxredirects": 10,
"ignoreTls": false,
"upsideDown": false,
"tags": ["monitoring", "grafana", "health"],
"description": "Мониторинг состояния Grafana",
"active": true
},
{
"id": 5,
"name": "AlertManager Health",
"url": "http://alertmanager:9093/-/healthy",
"type": "http",
"method": "GET",
"interval": 60,
"retries": 3,
"timeout": 10,
"keyword": null,
"maxredirects": 10,
"ignoreTls": false,
"upsideDown": false,
"tags": ["monitoring", "alertmanager", "health"],
"description": "Мониторинг состояния AlertManager",
"active": true
},
{
"id": 6,
"name": "Nginx Health",
"url": "http://nginx:80/nginx-health",
"type": "http",
"method": "GET",
"interval": 60,
"retries": 3,
"timeout": 10,
"keyword": "healthy",
"maxredirects": 10,
"ignoreTls": false,
"upsideDown": false,
"tags": ["infrastructure", "nginx", "health"],
"description": "Мониторинг состояния Nginx",
"active": true
},
{
"id": 7,
"name": "External Bot Status",
"url": "https://your-domain/status/",
"type": "http",
"method": "GET",
"interval": 300,
"retries": 2,
"timeout": 15,
"keyword": null,
"maxredirects": 10,
"ignoreTls": false,
"upsideDown": false,
"tags": ["external", "status-page"],
"description": "Мониторинг внешней доступности статусной страницы",
"active": false
}
],
"tags": [
{
"name": "bot",
"color": "#3498db"
},
{
"name": "monitoring",
"color": "#e74c3c"
},
{
"name": "infrastructure",
"color": "#f39c12"
},
{
"name": "health",
"color": "#27ae60"
},
{
"name": "external",
"color": "#9b59b6"
}
]
}