{"id":26275680,"url":"https://github.com/bossm8/gitlab-pages-exporter","last_synced_at":"2025-03-14T10:17:30.767Z","repository":{"id":206227157,"uuid":"716103659","full_name":"bossm8/gitlab-pages-exporter","owner":"bossm8","description":"Prometheus exporter showing statistics about static pages deployment of a GitLab instance","archived":false,"fork":false,"pushed_at":"2024-12-19T08:34:28.000Z","size":91,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-19T09:29:17.464Z","etag":null,"topics":["gitlab-pages","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":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bossm8.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":"2023-11-08T13:01:46.000Z","updated_at":"2024-12-19T08:34:25.000Z","dependencies_parsed_at":"2024-01-14T11:49:49.672Z","dependency_job_id":"91c63d25-6aa6-488a-a846-0dfbe3871b2d","html_url":"https://github.com/bossm8/gitlab-pages-exporter","commit_stats":null,"previous_names":["bossm8/gitlab-pages-exporter"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bossm8%2Fgitlab-pages-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bossm8%2Fgitlab-pages-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bossm8%2Fgitlab-pages-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bossm8%2Fgitlab-pages-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bossm8","download_url":"https://codeload.github.com/bossm8/gitlab-pages-exporter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243558443,"owners_count":20310574,"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":["gitlab-pages","prometheus-exporter"],"created_at":"2025-03-14T10:17:30.097Z","updated_at":"2025-03-14T10:17:30.755Z","avatar_url":"https://github.com/bossm8.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitLab Pages Exporter (gpe)\n\nExporter gathering periodic statistics about GitLab pages via GitLab's API.\n\n## Why This Exporter Exists\n\nThere is no builtin way in GitLab to find information about what projects\nexpose pages.\n\n## How it Works\n\nThe exporter periodically scrapes the GitLab API to get information about pages \ndeployments. Since there is no built-in way in GitLab to get all projects with \npages deployments the exporter checks if a project has CI/CD enabled and if so\nif there is a job named `pages` which was successfully run. If those conditions\nare met, the exporter assumes pages are deployed.\n\n[GitLab Pages Doc](https://docs.gitlab.com/ee/user/project/pages/#how-it-works)\n\n**Note**: Scraping may issue a lot of requests depending on how large your \ninstance is and you might need to check your rate-limiting settings.\n\n## Exposed Metrics\n\nThe following metrics will be exposed to `:2112/metrics`:\n\n| Metric Name                               | Description                                   |\n| ------------------------------------------|-----------------------------------------------|\n| `gpe_project_pages_enabled`               | If GitLab pages are enabled                   |\n| `gpe_project_pages_total`                 | Total number of projects with deployed pages  |\n| `gpe_custom_domains_verified`             | If a custom Domain is verified                |\n| `gpe_custom_domains_total`                | Total number of custom domains registered     |\n| `gpe_projects_checked_total`              | Number of projects processed                  |\n| `gpe_check_running`                       | If the check is currently running             |\n| `gpe_last_check_duration_seconds`         | How long the last check took                  |\n| `gpe_last_check_run_finished_seconds`     | When the last check happened                  |\n| `gpe_next_check_run_scheduled_seconds`    | When the next check will happen               |\n| `gpe_number_of_scrapes`                   | How many times the exporter ran since restart |\n\n## Configuration\n\nCurrently configuration can only be achieved with environment variables, it is\nrecommended to use the docker image to run the exporter.\n\n| Variable Name                  | Description                                                                                                                                                  | Default       |\n| -------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|\n| `GPE_GITLAB_ADMIN_READ_TOKEN`  | A read-only API token with admin permissions (to be able to fetch all projects).                                                                             | ``            |\n| `GPE_GITLAB_API_URL`           | The base URL to your GitLab instance.                                                                                                                        | ``            |\n| `GPE_CRON_SCHEDULE`            | Schedule for tests in cron format (seconds, minutes, hours, day of month, month, day of week).                                                               | `0 0 2 * * *` |\n| `GPE_SET_ALL_PROJECT_METRICS`  | If all projects should be exposed as metric, by default only project with pages deployed are exposed. Only set to true if really needed as this grows quick! | `false`       |\n\nExample usage:\n\n```bash\ndocker run -it --rm \\\n           -e GPE_GITLAB_ADMIN_READ_TOKEN=\u003cTOKEN\u003e \\\n           -e GPE_GITLAB_API_URL=\u003cURL\u003e \\\n           -e TZ=Europe/Zurich \\\n           -p 2112:2112 \\\n           ghcr.io/bossm8/gitlab-pages-exporter:latest\n```\n\n\n## Grafana Dashboards\n\nFind an example dashboard in the `grafana` folder.\n\n## Credits\n\nOriginally developed at Bern University of Applied Sciences (TI): [BFH](https://www.bfh.ch/ti/en/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbossm8%2Fgitlab-pages-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbossm8%2Fgitlab-pages-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbossm8%2Fgitlab-pages-exporter/lists"}