{"id":25182150,"url":"https://github.com/ductnn/domolo","last_synced_at":"2026-04-07T19:31:49.401Z","repository":{"id":64449927,"uuid":"571689367","full_name":"ductnn/domolo","owner":"ductnn","description":"A monitoring and logging solution for Docker hosts and containers with Prometheus, Grafana, Loki, cAdvisor, NodeExporter and alerting with AlertManager.","archived":false,"fork":false,"pushed_at":"2025-02-13T03:40:22.000Z","size":3487,"stargazers_count":78,"open_issues_count":6,"forks_count":23,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-19T20:11:42.189Z","etag":null,"topics":["container","docker","grafana","logging","loki","monitoring","nodeexporter","prometheus","promtail"],"latest_commit_sha":null,"homepage":"https://github.com/ductnn/domolo","language":"Shell","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/ductnn.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}},"created_at":"2022-11-28T17:13:19.000Z","updated_at":"2025-03-19T20:03:46.000Z","dependencies_parsed_at":"2025-05-19T20:11:20.776Z","dependency_job_id":"a10efd58-7290-414d-8be4-6659f92f0a61","html_url":"https://github.com/ductnn/domolo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ductnn/domolo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ductnn%2Fdomolo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ductnn%2Fdomolo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ductnn%2Fdomolo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ductnn%2Fdomolo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ductnn","download_url":"https://codeload.github.com/ductnn/domolo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ductnn%2Fdomolo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31526665,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"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":["container","docker","grafana","logging","loki","monitoring","nodeexporter","prometheus","promtail"],"created_at":"2025-02-09T17:29:55.510Z","updated_at":"2026-04-07T19:31:49.382Z","avatar_url":"https://github.com/ductnn.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# domolo\n\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/ductnn/Dockerfile/pulls)\n[![license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\n  \u003cp align=\"center\"\u003e\n    \u003cimg src=\"assets/domolo.png\" width=\"500\"\u003e\n  \u003c/p\u003e\n\nA monitoring and logging solution for Docker hosts and containers with [Prometheus](https://prometheus.io/),\n[Grafana](http://grafana.org/), [Loki](https://github.com/grafana/loki/), [cAdvisor](https://github.com/google/cadvisor),\n[NodeExporter](https://github.com/prometheus/node_exporter) and alerting with\n[AlertManager](https://github.com/prometheus/alertmanager).\n\nInspired by [dockprom](https://github.com/stefanprodan/dockprom)\n\n## Install\n\nClone this repository on your Docker host, cd into `domolo` directory and run\n`docker-compose up -d`:\n\n```bash\ngit clone https://github.com/ductnn/domolo.git\ncd domolo\ndocker-compose up -d\n```\n\nContainers:\n  - **Prometheus** (metrics database): `http://\u003chost-ip\u003e:9090`\n  - **Prometheus-Pushgateway** (push acceptor for ephemeral and batch jobs): `http://\u003chost-ip\u003e:9091`\n  - **AlertManager** (alerts management): `http://\u003chost-ip\u003e:9093`\n  - **Grafana** (visualize metrics): `http://\u003chost-ip\u003e:3000`\n  - **Loki** (likes prometheus, but for logs): `http://\u003chost-ip\u003e:3100`\n  - **Promtail** (is the agent, responsible for gathering logs and sending them to Loki)\n  - **NodeExporter** (host metrics collector)\n  - **cAdvisor** (containers metrics collector)\n  - **Caddy** (reverse proxy and basic auth provider for prometheus and alertmanager)\n\n## Grafana\n\nChange the credentials in file [config](config):\n\n```\nGF_SECURITY_ADMIN_USER=admin\nGF_SECURITY_ADMIN_PASSWORD=changeme\nGF_USERS_ALLOW_SIGN_UP=false\n```\n\n**Grafana** is preconfigured with dashboards, setup **Prometheus**(default) and\n**Loki** in [datasources](grafana/provisioning/datasources/datasource.yml)\n\n```yaml\napiVersion: 1\n\ndatasources:\n  - name: Prometheus\n    type: prometheus\n    access: proxy\n    orgId: 1\n    url: http://prometheus:9090\n    basicAuth: false\n    isDefault: true\n    editable: true\n\n  - name: Loki\n    type: loki\n    access: proxy\n    jsonData:\n      maxLines: 1000\n    basicAuth: false\n    url: http://loki:3100\n    isDefault: false\n    editable: true\n```\n\n### Prometheus + Node Exporter\n\nConfig `prometheus` for receiving *metrics* from `node_exporter`.\nFirst, setup `node_exporter` in servers we need monitor with [docker-compose.agents.yml](docker-compose.agents.yml)\nand run command:\n\n```sh\ndocker-compose -f docker-compose.agents.yml up -d\n```\n\nThis file will setup 3 agents:\n  - `node_exporter`\n  - `cAdvisor`\n  - `promtail`\n\nThen, we need config scrape *metric* on **prometheus server**:\n\nLive monitoring **prometheus server**:\n```yaml\nscrape_configs:\n  - job_name: 'nodeexporter'\n    scrape_interval: 5s\n    static_configs:\n      - targets: ['nodeexporter:9100']\n```\n\nMonitoring other Server, we need to add `external_labels`:\n```yaml\nexternal_labels:\n  monitor: 'docker-host-alpha'\n\nscrape_configs:\n  - job_name: 'ApiExporter'\n    scrape_interval: 5s\n    static_configs:\n      - targets: ['\u003cIP Server need Monitor\u003e:Port']\n```\n\n### Grafana Dashboards\n\nSimple dashboards on *Grafana*:\n\n***Node Exporter***\n\n![NodeExporter](https://raw.githubusercontent.com/ductnn/domolo/master/assets/node_exporter.png)\n\n***Monitor Services***\n\n![MonitorServices](https://raw.githubusercontent.com/ductnn/domolo/master/assets/monitor_service.png)\n\n***Docker Host***\n\n![DockerHost](https://raw.githubusercontent.com/ductnn/domolo/master/assets/docker_host.png)\n\n## Loki\n\nSetup config *loki* in file [loki-config](loki/loki-config.yaml)\n\n*TODO: Setup s3*\n\nConfig scrape *logs* with *promtail*, create file `promtail-config.yaml` and setup:\n- Scrape logs container:\n\n```yaml\n- job_name: container_logs\n  docker_sd_configs:\n    - host: unix:///var/run/docker.sock\n      refresh_interval: 5s\n  relabel_configs:\n    - source_labels: ['__meta_docker_container_name']\n      regex: '/(.*)'\n      target_label: 'container'\n```\n\n- Scrape logs systems:\n\n```yaml\n- job_name: system\n  static_configs:\n  - targets:\n      - localhost\n    labels:\n      job: varlogs\n      __path__: /var/log/*log\n```\n\n### Demo\n\nCreate simple tool generate logs and containerization this tool. Navigate to file\n[entrypoint.sh](fake-logs/entrypoint.sh) and run test:\n\n```bash\n➜  domolo git:(master) cd fake-logs\n➜  fake-logs git:(master) ✗ chmod +x entrypoint.sh\n➜  fake-logs git:(master) ✗ ./entrypoint.sh\n2022-12-08T13:20:00Z ERROR An error is usually an exception that has been caught and not handled.\n2022-12-08T13:20:00Z DEBUG This is a debug log that shows a log that can be ignored.\n2022-12-08T13:20:01Z WARN A warning that should be ignored is usually at this level and should be actionable.\n2022-12-08T13:20:03Z ERROR An error is usually an exception that has been caught and not handled.\n2022-12-08T13:20:05Z ERROR An error is usually an exception that has been caught and not handled.\n2022-12-08T13:20:09Z INFO This is less important than debug log and is often used to provide context in the current task.\n2022-12-08T13:20:13Z ERROR An error is usually an exception that has been caught and not handled.\n2022-12-08T13:20:15Z DEBUG This is a debug log that shows a log that can be ignored.\n2022-12-08T13:20:16Z INFO This is less important than debug log and is often used to provide context in the current task.\n2022-12-08T13:20:17Z INFO This is less important than debug log and is often used to provide context in the current task.\n...\n```\n\nThen, add `fake-logs` in [docker-compose.yml](docker-compose.yml)\n\n```yaml\n# Fake Logs\nflogs:\n  image: ductn4/flog:v1 # Set your name image :)\n  build:\n    context: ./fake-logs\n    dockerfile: Dockerfile\n  container_name: fake-logs\n  restart: always\n  networks:\n    - monitor-net\n  labels:\n    org.label-schema.group: \"monitoring\"\n```\n\nor checkout [docker-compose.with-flogs.yml](docker-compose.with-flogs.yml)\nand run command `docker-compose -f docker-compose.with-flogs.yml up -d`\n\nNavigate *[grafana](localhost:3000)* and open `Explore`:\n\n![Explore](https://raw.githubusercontent.com/ductnn/domolo/master/assets/explore.png)\n\nSo, we can select `labels` and views `logs`:\n\n![Labels](https://raw.githubusercontent.com/ductnn/domolo/master/assets/labels.png)\n\nEx: Select `label container` and view log container `fake-logs`:\n\n![LabelFlog](https://raw.githubusercontent.com/ductnn/domolo/master/assets/label_flog.png)\n\n![LogsFlog](https://raw.githubusercontent.com/ductnn/domolo/master/assets/flog_logs.png)\n\nMore logs: *logs system, other containers, ....*\n\n![SystemLogs](https://raw.githubusercontent.com/ductnn/domolo/master/assets/syslogs.png)\n\n![ContainersLogs](https://raw.githubusercontent.com/ductnn/domolo/master/assets/containers_logs.png)\n\n## Show your support\nGive a ⭐ if you like *domolo* ❤️\n\n## Contribution\nAll contributions are welcomed in this project!\n\n## License\nThe MIT License (MIT). Please see [LICENSE](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fductnn%2Fdomolo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fductnn%2Fdomolo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fductnn%2Fdomolo/lists"}