{"id":16162271,"url":"https://github.com/0xerr0r/dex","last_synced_at":"2025-04-08T04:16:52.611Z","repository":{"id":37420944,"uuid":"255105182","full_name":"0xERR0R/dex","owner":"0xERR0R","description":"Prometheus Docker EXporter","archived":false,"fork":false,"pushed_at":"2025-03-26T13:04:54.000Z","size":908,"stargazers_count":65,"open_issues_count":2,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-26T14:24:48.562Z","etag":null,"topics":["docker","golang","grafana-dashboard","prometheus-exporter"],"latest_commit_sha":null,"homepage":"","language":"Go","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/0xERR0R.png","metadata":{"files":{"readme":"docs/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}},"created_at":"2020-04-12T14:52:55.000Z","updated_at":"2025-03-26T13:04:16.000Z","dependencies_parsed_at":"2023-02-11T23:30:31.151Z","dependency_job_id":"c893b637-aa61-4c67-9d32-b2ec8690c726","html_url":"https://github.com/0xERR0R/dex","commit_stats":null,"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xERR0R%2Fdex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xERR0R%2Fdex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xERR0R%2Fdex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xERR0R%2Fdex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xERR0R","download_url":"https://codeload.github.com/0xERR0R/dex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247773721,"owners_count":20993639,"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":["docker","golang","grafana-dashboard","prometheus-exporter"],"created_at":"2024-10-10T02:29:36.645Z","updated_at":"2025-04-08T04:16:52.583Z","avatar_url":"https://github.com/0xERR0R.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DEX - Docker EXporter for prometheus\n\nDEX is a lightweight Prometheus exporter that monitors Docker containers and exports their metrics. It's designed to run as a Docker container and supports all architectures.\n\n## Key Features\n- Lightweight and efficient\n- Supports all architectures\n- Real-time container metrics monitoring\n- Easy integration with Prometheus and Grafana\n- No configuration required for basic usage\n\n## Exposed Metrics\n\n| Metric Name | Type | Description |\n|------------|------|-------------|\n| dex_block_io_read_bytes_total | Counter | Total number of bytes read from block devices |\n| dex_block_io_write_bytes_total | Counter | Total number of bytes written to block devices |\n| dex_container_exited | Gauge | 1 if container has exited, 0 otherwise |\n| dex_container_restarting | Gauge | 1 if container is restarting, 0 otherwise |\n| dex_container_restarts_total | Counter | Total number of container restarts |\n| dex_container_running | Gauge | 1 if container is running, 0 otherwise |\n| dex_cpu_utilization_percent | Gauge | Current CPU utilization percentage |\n| dex_cpu_utilization_seconds_total | Counter | Cumulative CPU time consumed |\n| dex_memory_total_bytes | Gauge | Total memory limit in bytes |\n| dex_memory_usage_bytes | Counter | Current memory usage in bytes |\n| dex_memory_utilization_percent | Gauge | Current memory utilization percentage |\n| dex_network_rx_bytes_total | Counter | Total bytes received over network |\n| dex_network_tx_bytes_total | Counter | Total bytes transmitted over network |\n| dex_pids_current | Counter | Current number of processes in the container |\n\n## Prerequisites\n- Docker installed and running\n- Prometheus server (for metrics collection)\n- Grafana (optional, for visualization)\n\n## Run with docker\nStart docker container with following `docker-compose.yml`:\n```yml\nversion: '2.1'\nservices:\n   dex:\n      image: spx01/dex\n      container_name: dex\n      volumes:\n         - /var/run/docker.sock:/var/run/docker.sock\n      ports:\n         - 8386:8080\n      restart: always\n```\n\n## Test with curl\n```\n$ curl localhost:8386/metrics\n```\n\n## Grafana dashboard\n\n### Grafana 7\n\nExample grafana7 dashboard definition [as JSON](grafana7.json)\n![grafana-dashboard](grafana7-dashboard.png).\n\n### Grafana 8\n\nAnother dashboard for Grafana 8 (thanks @scMarkus !!!) [as JSON](grafana8.json)\n![grafana-dashboard](grafana8-dashboard.png)\n\nModification (thanks @GitSchorsch) with additional job filter [as JSON](grafana8_2.json)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xerr0r%2Fdex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xerr0r%2Fdex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xerr0r%2Fdex/lists"}