{"id":48074600,"url":"https://github.com/usrrname/promgraf","last_synced_at":"2026-04-04T14:48:55.768Z","repository":{"id":334639254,"uuid":"1142140676","full_name":"usrrname/promgraf","owner":"usrrname","description":"Prometheus + Alertmanager + Grafana with Docker Compose","archived":false,"fork":false,"pushed_at":"2026-02-28T17:45:14.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-28T20:08:01.965Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/usrrname.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-26T02:08:39.000Z","updated_at":"2026-02-28T17:45:17.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/usrrname/promgraf","commit_stats":null,"previous_names":["usrrname/promgraf"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/usrrname/promgraf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usrrname%2Fpromgraf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usrrname%2Fpromgraf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usrrname%2Fpromgraf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usrrname%2Fpromgraf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/usrrname","download_url":"https://codeload.github.com/usrrname/promgraf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usrrname%2Fpromgraf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31403645,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: 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":[],"created_at":"2026-04-04T14:48:55.658Z","updated_at":"2026-04-04T14:48:55.754Z","avatar_url":"https://github.com/usrrname.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Prometheus + Alertmanager + Grafana with Docker Compose\n\nHomeNAS monitoring for my Pi 4 NAS using:\n- Prometheus `localhost:9090` w/remote write to Grafana Cloud \n- Grafana `localhost:3000`\n- Docker Compose\n- Alertmanager with email notifications `localhost:9093`\n\nListening for \n- Node Exporter metrics on port `9100`\n  - UFW metrics w/custom systemd service and timer\n  - Fail2ban metrics w/custom systemd service and timer\n- process-exporter on `9256`\n- cAdvisor on port `8080`\n- immich API on port `8081` \n- immich microservices `8082`\n\n## Run\n\n```bash\n# To start all containers:\ndocker compose up -d\n\n# To stop and remove all containers, networks, and volumes:\ndocker compose down -v\n\n# To run the exporter container separately:\ndocker compose up -f docker-compose-exporter.yml\n\n```\n\n### Directory Structure\n```bash\n.\n├── alertmanager       # routing and notification settings\n├── docker-compose.yml\n├── docker-compose-exporter.yml\n├── grafana\n|   └── provisioning/\n|       ├── dashboards/\n|       └── datasources/\n├── prometheus.yml\n├── process-exporter.yml\n├── README.md\n└── rules              # custom alerting and recording rules\n```\n\n# Run \n```\ndocker compose -f docker-compose.yml -f docker-compose-exporter.yml up -d\n```\n\nUpdate the node exporter container with the latest config and mounts:\n`docker compose up -d --no-deps --force-recreate node-exporter`\n\nLink the UFW metrics systemd service and timer, reload the daemon, enable and start the timer, and check their status:\n\n```\nsudo systemctl link ~/code/prometheus/fail2ban-metrics.service\nsudo systemctl link ~/code/prometheus/fail2ban-metrics.timer\nsudo systemctl daemon-reload\nsudo systemctl enable --now fail2ban-metrics.timer\nsudo systemctl status \u003ctimer\u003e \u003cservice\u003e --no-pager\n```\n\n# Recreate node-exporter container (to pick up new bind):\n`docker compose up -d --no-deps --force-recreate node-exporter`\n\nMoving the UFW log to a separate file on the storage partition and configuring rsyslog to write UFW messages there can help reduce wear on the SD card and centralize logs. Here's how you can set this up:\n```\n# Make sure the storage directory exists and set sensible perms\nsudo mkdir -p /mnt/storage/logs\nsudo chown root:adm /mnt/storage/logs\nsudo chmod 0750 /mnt/storage/logs\n\n# Ensure ufw.log exists on the storage partition and set ownership/perm\nsudo touch /mnt/storage/logs/ufw.log\nsudo chown root:adm /mnt/storage/logs/ufw.log\nsudo chmod 0640 /mnt/storage/logs/ufw.log\n\n# If you are bind-mounting the file to /var/log/ufw.log, mount it now (or add to /etc/fstab)\n# Temporary bind-mount (immediate, not persistent)\nsudo mount --bind /mnt/storage/logs/ufw.log /var/log/ufw.log\n\n# Reload/restart rsyslog so it picks up the config and file handles\nsudo systemctl daemon-reload\nsudo systemctl restart rsyslog\n\n# Quick test: emit a kernel-level UFW test message, then show the tail of the log\nsudo logger -p kern.warning \"UFW TEST from $(hostname)\"\nsleep 1\nsudo tail -n 50 /mnt/storage/logs/ufw.log || sudo tail -n 50 /var/log/ufw.log || true\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusrrname%2Fpromgraf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fusrrname%2Fpromgraf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusrrname%2Fpromgraf/lists"}