{"id":29973670,"url":"https://github.com/yeyo11/monitoring-stack-docker-swarm","last_synced_at":"2025-10-13T04:10:01.980Z","repository":{"id":305489316,"uuid":"1023015064","full_name":"yeyo11/monitoring-stack-docker-swarm","owner":"yeyo11","description":"Comprehensive monitoring stack for Docker Swarm environments. Includes Prometheus, Alertmanager, Grafana, Loki, Promtail, cAdvisor, and Node Exporter. Ready for production use with secure configuration and easy provisioning.","archived":false,"fork":false,"pushed_at":"2025-07-22T15:46:59.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-04T07:57:01.408Z","etag":null,"topics":["alertmanager","cadvisor","dashboards","docker-swarm","grafana","loki","monitoring","node-exporter","observability","prometheus","promtail"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yeyo11.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-20T10:49:27.000Z","updated_at":"2025-07-22T15:47:02.000Z","dependencies_parsed_at":"2025-07-20T12:34:01.961Z","dependency_job_id":null,"html_url":"https://github.com/yeyo11/monitoring-stack-docker-swarm","commit_stats":null,"previous_names":["yeyo11/monitoring-stack-docker-swarm"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yeyo11/monitoring-stack-docker-swarm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeyo11%2Fmonitoring-stack-docker-swarm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeyo11%2Fmonitoring-stack-docker-swarm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeyo11%2Fmonitoring-stack-docker-swarm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeyo11%2Fmonitoring-stack-docker-swarm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yeyo11","download_url":"https://codeload.github.com/yeyo11/monitoring-stack-docker-swarm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeyo11%2Fmonitoring-stack-docker-swarm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279013591,"owners_count":26085389,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alertmanager","cadvisor","dashboards","docker-swarm","grafana","loki","monitoring","node-exporter","observability","prometheus","promtail"],"created_at":"2025-08-04T07:01:10.784Z","updated_at":"2025-10-13T04:10:01.941Z","avatar_url":"https://github.com/yeyo11.png","language":null,"readme":"# Monitoring Stack for Docker Swarm\n\nThis repository provides a complete monitoring solution for Docker Swarm environments. All services and configurations are designed specifically for Docker Swarm deployments, including service discovery and network settings.\n\n## Components\n\n- **Prometheus**: Collects and stores metrics from services and hosts.\n- **Alertmanager**: Manages alerts sent by Prometheus and routes them to notification channels (e.g., Telegram).\n- **Grafana**: Visualizes metrics and logs with customizable dashboards.\n- **Loki**: Stores and queries logs.\n- **Promtail**: Collects logs and ships them to Loki.\n- **cAdvisor**: Provides container resource usage and performance metrics.\n- **Node Exporter**: Exposes hardware and OS metrics for Prometheus.\n- **Cloudflared Tunnel**: Provides secure remote access to Grafana.\n\n## Folder Structure\n\n```\nmonitoring/\n├── .env.example\n├── README.md\n├── monitoring.yml\n├── alertmanager/\n│   ├── alertmanager.yml\n│   └── templates/\n│       └── telegram.tmpl\n├── grafana/\n│   ├── dashboards/\n│   │   ├── container-metrics.json\n│   │   ├── loki-logs.json\n│   │   ├── node-exporter-full.json\n│   │   └── node-metrics.json\n│   └── provisioning/\n│       ├── dashboard.yml\n│       └── datasource.yml\n├── loki/\n│   └── loki-config.yaml\n├── prometheus/\n│   ├── alert-rules.yml\n│   └── prometheus.yml\n├── promtail/\n│   └── promtail-config.yml\n```\n\n## Configuration \u0026 Environment Variables\n\nSensitive information (such as credentials and tokens) is managed via environment variables. These must be set in the `monitoring.yml` under the `environment:` section for each service that requires them.\n\n```\nenvironment:\n  - SOME_API_URL=https://api.example.com\n  - SOME_SERVICE_TOKEN=your_token\n  - SOME_CHAT_ID=your_chat_id\n```\n\nYou can also use a `.env` file for global variables, but ensure they are passed to the container if referenced in configuration files.\n\nThe path to configuration files can be set using the `MONITORING_CONFIG_PATH` variable:\n```\nMONITORING_CONFIG_PATH=/absolute/or/relative/path/to/configs\n```\n\n## Environment Variables\n\nThis stack uses environment variables for configuration and secrets. You can set them in a `.env` file at the root of the repository. See `.env.example` for all required variables:\n\n```\nMONITORING_CONFIG_PATH=/home/user/stacks/monitoring\nGRAFANA_USER=admin\nGRAFANA_PASSWORD=admin\nGRAFANA_ALLOW_SIGN_UP=false\nTUNNEL_TOKEN=your_cloudflare_tunnel_token\n```\n\nCopy `.env.example` to `.env` and fill in your values before deploying.\n\n## Deployment\n\n1. Set all required environment variables in your `.env` file or directly in `monitoring.yml`.\n2. Deploy the stack with Docker Swarm:\n   ```sh\n   docker stack deploy -c monitoring.yml monitoring\n   ```\n3. Access Grafana via the exposed port or through the Cloudflared tunnel.\n\n## Security Notes\n\n- Never commit sensitive credentials (tokens, passwords) directly in configuration files.\n- Always use environment variables for secrets.\n- Restrict access to monitoring endpoints and dashboards.\n\n## Contributing\n\nFeel free to open issues or submit pull requests for improvements or bug fixes.\n\n## Contact\n\nFor questions or support, please open an issue in this repository.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyeyo11%2Fmonitoring-stack-docker-swarm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyeyo11%2Fmonitoring-stack-docker-swarm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyeyo11%2Fmonitoring-stack-docker-swarm/lists"}