{"id":13605344,"url":"https://github.com/oijkn/Docker-Raspberry-PI-Monitoring","last_synced_at":"2025-04-12T05:32:36.281Z","repository":{"id":41115292,"uuid":"413555653","full_name":"oijkn/Docker-Raspberry-PI-Monitoring","owner":"oijkn","description":"A docker-compose stack solution for monitoring host and containers with Prometheus, Grafana, cAdvisor and NodeExporter.","archived":false,"fork":false,"pushed_at":"2024-04-18T07:31:52.000Z","size":228,"stargazers_count":419,"open_issues_count":1,"forks_count":65,"subscribers_count":11,"default_branch":"main","last_synced_at":"2024-10-25T03:52:21.328Z","etag":null,"topics":["cadvisor","dashboard-templates","docker","docker-compose","grafana","grafana-dashboard","monitoring","node-exporter","prometheus","raspberry-pi","stack"],"latest_commit_sha":null,"homepage":"","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/oijkn.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}},"created_at":"2021-10-04T19:22:46.000Z","updated_at":"2024-10-23T16:35:21.000Z","dependencies_parsed_at":"2024-03-14T14:28:55.633Z","dependency_job_id":"6ce03c3b-081f-43a5-9a77-36cd1167f39b","html_url":"https://github.com/oijkn/Docker-Raspberry-PI-Monitoring","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oijkn%2FDocker-Raspberry-PI-Monitoring","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oijkn%2FDocker-Raspberry-PI-Monitoring/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oijkn%2FDocker-Raspberry-PI-Monitoring/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oijkn%2FDocker-Raspberry-PI-Monitoring/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oijkn","download_url":"https://codeload.github.com/oijkn/Docker-Raspberry-PI-Monitoring/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223497744,"owners_count":17155199,"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","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":["cadvisor","dashboard-templates","docker","docker-compose","grafana","grafana-dashboard","monitoring","node-exporter","prometheus","raspberry-pi","stack"],"created_at":"2024-08-01T19:00:57.613Z","updated_at":"2024-11-07T10:30:26.357Z","avatar_url":"https://github.com/oijkn.png","language":null,"readme":"# Raspberry Pi \u0026 Docker Monitoring\n\n## Hit the Star! :star:\n\nIf you find this repository useful, please consider giving it a star. Your support is greatly appreciated! :pray:\n\n## Introduction\n\nIntroducing the Raspberry Pi monitoring solution using Grafana, Prometheus, Cadvisor, and Node-Exporter Stack! This project aims to provide a comprehensive and user-friendly way to monitor the performance of your Raspberry Pi. With Grafana's intuitive dashboards, you can easily visualize system metrics collected by Prometheus and Cadvisor, while Node-Exporter provides valuable information about the Raspberry Pi's hardware and operating system. The combination of these tools results in a powerful and efficient monitoring solution that will give you complete visibility into your system's health. Check out the project and take your Raspberry Pi monitoring to the next level !\n\nThis repository contains a `docker-compose` file to run a Raspberry PI monitoring stack. It is based on the following projects:\n- [Prometheus](https://prometheus.io/)\n- [Grafana](http://grafana.org/)\n- [cAdvisor](https://github.com/google/cadvisor)\n- [NodeExporter](https://github.com/prometheus/node_exporter)\n\n## Prerequisites\n\nBefore we get started installing the stack, we need to make sure that the following prerequisites are met:\n- Docker is installed on the host machine\n- Docker Compose is installed on the host machine\n- The host machine is running a Raspberry PI OS or any other compatible Linux distribution\n\n## Installation and Configuration\n\nTo install the stack, follow the steps below:\n\n- Clone this repository to your host machine.\n```bash\ngit clone https://github.com/oijkn/Docker-Raspberry-PI-Monitoring.git\n```\n\n- Enter to the cloned directory.\n```bash\ncd Docker-Raspberry-PI-Monitoring\n```\n\n - Create `data` directory and change the ownership of the `prometheus` and `grafana` folders for a nice and clean installation.\n```bash\nmkdir -p prometheus/data grafana/data \u0026\u0026 \\\nsudo chown -R 472:472 grafana/ \u0026\u0026 \\\nsudo chown -R 65534:65534 prometheus/\n```\n\n - Start the stack with `docker-compose`.\n```bash\ndocker-compose up -d\n```\n\nThis will start all the containers and make them available on the host machine.\n\u003cbr/\u003eThe following ports are used (only Grafana is exposed on the host machine):\n- 3000: Grafana\n- 9090: Prometheus\n- 8080: cAdvisor\n- 9100: NodeExporter\n\nThe Grafana dashboard can be accessed by navigating to `http://\u003chost-ip\u003e:3000` in your browser for example `http://192.168.1.100:3000`.\n\u003cbr/\u003eThe default username and password are both `admin`. You will be prompted to change the password on the first login.\n\u003cbr/\u003eCredentials can be changed by editing the [.env](grafana/.env) file.\n\nIf you would like to change which targets should be monitored, you can edit the [prometheus.yml](prometheus/prometheus.yml) file.\n\u003cbr/\u003eThe targets section contains a list of all the targets that should be monitored by Prometheus.\n\u003cbr/\u003eThe names defined in the `job_name` section are used to identify the targets in Grafana.\n\u003cbr/\u003eThe `static_configs` section contains the IP addresses of the targets that should be monitored. Actually, they are sourced from the service names defined in the [docker-compose.yml](docker-compose.yml) file.\n\u003cbr/\u003eIf you think that the `scrape_interval` value is too aggressive, you can change it to a more suitable value.\n\nIn order to check if the stack is running correctly, you can run the following command:\n```bash\ndocker-compose ps\n```\n\nView the logs of a specific container by running the following command:\n```bash\ndocker logs -f \u003ccontainer-name\u003e\n```\n\n## Add Data Sources and Dashboards\n\nSince Grafana v5 has introduced the concept of provisioning, it is possible to automatically add data sources and dashboards to Grafana.\n\u003cbr/\u003eThis is done by placing the `datasources` and `dashboards` directories in the [provisioning](grafana/provisioning) folder. The files in these directories are automatically loaded by Grafana on startup.\n\nIf you like to add a new dashboard, simply place the JSON file in the [dashboards](grafana/provisioning/dashboards) directory, and it will be automatically loaded next time Grafana is started.\n\n# Install Dashboard from Grafana.com (Optional)\n\nIf you would like to install this dashboard from Grafana.com, simply follow the steps below:\n- Navigate to the dashboard on [Grafana.com Dashboard](https://grafana.com/grafana/dashboards/15120-raspberry-pi-docker-monitoring/)\n- Click on the `Copy ID to Clipboard` button\n- Navigate to the `Import` page in Grafana\n- Paste the ID into the `Import via grafana.com` field\n- Click on the `Load` button\n- Click on the `Import` button\n\nOr you can follow the steps described in the [Grafana Documentation](https://grafana.com/docs/grafana/latest/dashboards/manage-dashboards/#import-a-dashboard).\n\nThis dashboard is intended to help you get started with monitoring your Raspberry PI devices. If you have any changes or suggestions, you would like to see, please feel free to open an issue or create a pull request.\n\nHere is a screenshot of the dashboard:\n![Grafana Dashboard](grafana/screenshots/dashboard.png)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n\n## Troubleshooting\n\nEnable `c-group` memory and swap accounting on the host machine by running the following command:\n```bash\nsudo sed -i 's/^GRUB_CMDLINE_LINUX=\"\"/GRUB_CMDLINE_LINUX=\"cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1 swapaccount=1\"/' /etc/default/grub\nsudo update-grub\nsudo reboot\n```\n","funding_links":[],"categories":["Others","raspberry-pi"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foijkn%2FDocker-Raspberry-PI-Monitoring","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foijkn%2FDocker-Raspberry-PI-Monitoring","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foijkn%2FDocker-Raspberry-PI-Monitoring/lists"}