{"id":46076059,"url":"https://github.com/ry-ops/monitoring-infrastructure-prometheus-grafana","last_synced_at":"2026-03-01T14:35:04.423Z","repository":{"id":335025950,"uuid":"1143334167","full_name":"ry-ops/monitoring-infrastructure-prometheus-grafana","owner":"ry-ops","description":"Monitor infrastructure with Prometheus metrics and Grafana dashboards","archived":false,"fork":false,"pushed_at":"2026-02-21T01:53:28.000Z","size":24,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-21T07:35:22.963Z","etag":null,"topics":["grafana","monitoring","observability","prometheus","tutorial"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ry-ops.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-27T13:04:18.000Z","updated_at":"2026-02-21T01:52:27.000Z","dependencies_parsed_at":"2026-02-21T04:02:07.150Z","dependency_job_id":null,"html_url":"https://github.com/ry-ops/monitoring-infrastructure-prometheus-grafana","commit_stats":null,"previous_names":["ry-ops/monitoring-infrastructure-prometheus-grafana"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ry-ops/monitoring-infrastructure-prometheus-grafana","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ry-ops%2Fmonitoring-infrastructure-prometheus-grafana","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ry-ops%2Fmonitoring-infrastructure-prometheus-grafana/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ry-ops%2Fmonitoring-infrastructure-prometheus-grafana/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ry-ops%2Fmonitoring-infrastructure-prometheus-grafana/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ry-ops","download_url":"https://codeload.github.com/ry-ops/monitoring-infrastructure-prometheus-grafana/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ry-ops%2Fmonitoring-infrastructure-prometheus-grafana/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29971001,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T14:11:48.712Z","status":"ssl_error","status_checked_at":"2026-03-01T14:11:48.352Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["grafana","monitoring","observability","prometheus","tutorial"],"created_at":"2026-03-01T14:35:03.837Z","updated_at":"2026-03-01T14:35:04.407Z","avatar_url":"https://github.com/ry-ops.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Monitoring Infrastructure with Prometheus \u0026 Grafana\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"hero.svg\" alt=\"Monitoring Infrastructure with Prometheus \u0026 Grafana\" width=\"100%\"\u003e\n\u003c/p\u003e\n\nA production-ready monitoring stack using Prometheus for metrics collection and Grafana for visualization. This project provides a complete setup for monitoring your infrastructure, applications, and services.\n\n## Features\n\n- **Prometheus**: Time-series database and monitoring system\n- **Grafana**: Powerful visualization and analytics platform\n- **Node Exporter**: Hardware and OS metrics collector\n- **cAdvisor**: Container metrics analyzer\n- **Alert Manager**: Alert handling and routing\n- **Pre-configured Dashboards**: Ready-to-use monitoring dashboards\n\n## Prerequisites\n\n- Docker and Docker Compose installed\n- Basic understanding of monitoring concepts\n- At least 2GB of available RAM\n\n## Quick Start\n\n1. Clone this repository:\n```bash\ngit clone https://github.com/ry-ops/monitoring-infrastructure-prometheus-grafana.git\ncd monitoring-infrastructure-prometheus-grafana\n```\n\n2. Start the monitoring stack:\n```bash\ndocker-compose up -d\n```\n\n3. Access the services:\n   - Grafana: http://localhost:3000 (default credentials: admin/admin)\n   - Prometheus: http://localhost:9090\n   - AlertManager: http://localhost:9093\n\n## Project Structure\n\n```\n.\n├── README.md\n├── LICENSE\n├── docker-compose.yml\n├── prometheus/\n│   ├── prometheus.yml          # Prometheus configuration\n│   ├── alerts.yml              # Alert rules\n│   └── targets/                # Service discovery configs\n├── grafana/\n│   ├── provisioning/\n│   │   ├── dashboards/         # Dashboard definitions\n│   │   └── datasources/        # Data source configs\n│   └── dashboards/             # JSON dashboard files\n├── alertmanager/\n│   └── config.yml              # AlertManager configuration\n├── examples/\n│   ├── python-app/             # Example Python app with metrics\n│   └── node-app/               # Example Node.js app with metrics\n└── documentation/\n    ├── SETUP.md                # Detailed setup guide\n    ├── DASHBOARDS.md           # Dashboard documentation\n    └── TROUBLESHOOTING.md      # Common issues and solutions\n```\n\n## Configuration\n\n### Prometheus Targets\n\nEdit `prometheus/prometheus.yml` to add your services for monitoring. The default configuration monitors:\n- Prometheus itself\n- Node Exporter (system metrics)\n- cAdvisor (container metrics)\n\n### Grafana Dashboards\n\nDashboards are automatically provisioned on startup. To add custom dashboards:\n1. Create your dashboard in Grafana UI\n2. Export as JSON\n3. Save to `grafana/dashboards/`\n4. Restart Grafana\n\n### Alert Rules\n\nConfigure alerts in `prometheus/alerts.yml`. Example alerts are included for:\n- High CPU usage\n- High memory usage\n- Service down\n- Disk space low\n\n## Example Applications\n\nTwo example applications with Prometheus metrics are included:\n\n### Python Application\n```bash\ncd examples/python-app\ndocker-compose up -d\n```\n\n### Node.js Application\n```bash\ncd examples/node-app\ndocker-compose up -d\n```\n\nBoth apps expose metrics at `/metrics` endpoint and demonstrate best practices for application instrumentation.\n\n## Monitoring Your Own Applications\n\n### Python (using prometheus-client)\n```python\nfrom prometheus_client import Counter, Histogram, generate_latest\n\nrequest_count = Counter('app_requests_total', 'Total requests')\nrequest_duration = Histogram('app_request_duration_seconds', 'Request duration')\n```\n\n### Node.js (using prom-client)\n```javascript\nconst client = require('prom-client');\nconst counter = new client.Counter({\n  name: 'app_requests_total',\n  help: 'Total requests'\n});\n```\n\n## Data Retention\n\nDefault retention period is 15 days. To modify:\n1. Edit `docker-compose.yml`\n2. Update Prometheus command args: `--storage.tsdb.retention.time=30d`\n\n## Security Considerations\n\nFor production deployments:\n- Change default Grafana credentials immediately\n- Enable HTTPS/TLS\n- Configure authentication (LDAP, OAuth, etc.)\n- Set up proper network isolation\n- Use secrets management for sensitive configs\n- Enable Grafana authentication and authorization\n\n## Troubleshooting\n\nSee [documentation/TROUBLESHOOTING.md](documentation/TROUBLESHOOTING.md) for common issues and solutions.\n\n## Documentation\n\n- [Detailed Setup Guide](documentation/SETUP.md)\n- [Dashboard Guide](documentation/DASHBOARDS.md)\n- [Troubleshooting](documentation/TROUBLESHOOTING.md)\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nMIT License - see LICENSE file for details\n\n## Resources\n\n- [Prometheus Documentation](https://prometheus.io/docs/)\n- [Grafana Documentation](https://grafana.com/docs/)\n- [PromQL Guide](https://prometheus.io/docs/prometheus/latest/querying/basics/)\n- [Best Practices](https://prometheus.io/docs/practices/)\n\n## Support\n\nFor issues and questions:\n- Check the [Troubleshooting Guide](documentation/TROUBLESHOOTING.md)\n- Open an issue on GitHub\n- Review the official Prometheus and Grafana documentation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fry-ops%2Fmonitoring-infrastructure-prometheus-grafana","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fry-ops%2Fmonitoring-infrastructure-prometheus-grafana","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fry-ops%2Fmonitoring-infrastructure-prometheus-grafana/lists"}