{"id":19462874,"url":"https://github.com/promphp/prometheus_push_gateway_php","last_synced_at":"2025-08-20T08:33:32.238Z","repository":{"id":42176424,"uuid":"297234676","full_name":"PromPHP/prometheus_push_gateway_php","owner":"PromPHP","description":"Prometheus Push Gateway client for PHP applications.","archived":false,"fork":false,"pushed_at":"2024-06-04T19:40:09.000Z","size":33,"stargazers_count":27,"open_issues_count":4,"forks_count":9,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-24T19:23:12.624Z","etag":null,"topics":["hacktoberfest","php","prometheus","prometheus-php","prometheus-pushgateway","pushgateway"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PromPHP.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":"2020-09-21T05:11:04.000Z","updated_at":"2024-05-20T13:14:48.000Z","dependencies_parsed_at":"2024-06-18T18:43:42.643Z","dependency_job_id":"5976d6d2-b118-4801-adbd-216a019091bb","html_url":"https://github.com/PromPHP/prometheus_push_gateway_php","commit_stats":{"total_commits":17,"total_committers":4,"mean_commits":4.25,"dds":"0.17647058823529416","last_synced_commit":"c57c1ab91d295aa7d09a2b655518ae8b508aed91"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PromPHP%2Fprometheus_push_gateway_php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PromPHP%2Fprometheus_push_gateway_php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PromPHP%2Fprometheus_push_gateway_php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PromPHP%2Fprometheus_push_gateway_php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PromPHP","download_url":"https://codeload.github.com/PromPHP/prometheus_push_gateway_php/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230408171,"owners_count":18220974,"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":["hacktoberfest","php","prometheus","prometheus-php","prometheus-pushgateway","pushgateway"],"created_at":"2024-11-10T18:06:23.427Z","updated_at":"2024-12-19T09:08:06.161Z","avatar_url":"https://github.com/PromPHP.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A prometheus push gateway client library written in PHP\n\n![Tests](https://github.com/promphp/prometheus_push_gateway_php/workflows/Tests/badge.svg)\n\nThis package provides an easy PHP API for Prometheus Push Gateway. It was part of [promphp/prometheus_client_php](https://github.com/promphp/prometheus_client_php) and was moved into a seperate package as of Prometheus Client PHP Version 2.0.0. \n\n## How does it work?\n\nThe PushGateway allows Prometheus to get Metrics from Systems that are not scrableable (Your Prometheus cannot access that systems). With this library you can easily send your metrics to the PushGateway. \n## Installation\n\nAdd as [Composer](https://getcomposer.org/) dependency:\n\n```sh\ncomposer require promphp/prometheus_push_gateway_php\n```\n\n## Usage\n\nLet's assume you have that simple counter and want to send it to your PushGateway. \n```php\n\\Prometheus\\CollectorRegistry::getDefault()\n    -\u003egetOrRegisterCounter('', 'some_quick_counter', 'just a quick measurement')\n    -\u003einc();\n\n// Now send it to the PushGateway:\n$pushGateway = new \\PrometheusPushGateway\\PushGateway('http://192.168.59.100:9091');\n$pushGateway-\u003epush(\\Prometheus\\CollectorRegistry::getDefault(), 'my_job', ['instance' =\u003e 'foo']);\n```\n\nAlso look at the [examples](examples).\n\n## Development\n\n### Dependencies\n\n* PHP ^7.2 | ^8.0\n* [Composer](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx)\n\n## Black box testing\n\nJust start the PushGateway by using docker-compose\n```\ndocker-compose up\n```\n\nUse composer to grab all dependencies\n```\ndocker run --rm --interactive --tty --volume $PWD:/app composer install\n```\n\nExecute the tests:\n```\ndocker-compose run phpunit vendor/bin/phpunit tests/Test/\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpromphp%2Fprometheus_push_gateway_php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpromphp%2Fprometheus_push_gateway_php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpromphp%2Fprometheus_push_gateway_php/lists"}