{"id":21094979,"url":"https://github.com/wizardjedi/php-zabbix-agent","last_synced_at":"2025-05-16T14:34:02.949Z","repository":{"id":56938812,"uuid":"73415076","full_name":"wizardjedi/php-zabbix-agent","owner":"wizardjedi","description":"Zabbix Agent implemented in PHP for long living php-servers","archived":false,"fork":false,"pushed_at":"2020-04-15T17:49:59.000Z","size":27,"stargazers_count":8,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T02:41:33.393Z","etag":null,"topics":["php","zabbix","zabbix-agent"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/wizardjedi.png","metadata":{"files":{"readme":"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}},"created_at":"2016-11-10T19:40:13.000Z","updated_at":"2024-07-09T09:49:44.000Z","dependencies_parsed_at":"2022-08-21T06:50:22.762Z","dependency_job_id":null,"html_url":"https://github.com/wizardjedi/php-zabbix-agent","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wizardjedi%2Fphp-zabbix-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wizardjedi%2Fphp-zabbix-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wizardjedi%2Fphp-zabbix-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wizardjedi%2Fphp-zabbix-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wizardjedi","download_url":"https://codeload.github.com/wizardjedi/php-zabbix-agent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254547103,"owners_count":22089262,"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":["php","zabbix","zabbix-agent"],"created_at":"2024-11-19T22:21:43.027Z","updated_at":"2025-05-16T14:34:02.652Z","avatar_url":"https://github.com/wizardjedi.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## php-zabbix-agent ![Build badge image](https://travis-ci.org/wizardjedi/php-zabbix-agent.svg?branch=master) [![codecov](https://codecov.io/gh/wizardjedi/php-zabbix-agent/branch/master/graph/badge.svg)](https://codecov.io/gh/wizardjedi/php-zabbix-agent) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=wizardjedi_php-zabbix-agent\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=wizardjedi_php-zabbix-agent)\n\nZabbix Agent implemented in PHP for long living php-servers\n\n## 1. Create `composer.json` file\n\n```json\n{\n   \"require\" : {\n        \"a1s/php-zabbix-agent\" : \"dev-master\"\n   },\n   \"minimum-stability\": \"dev\",\n   \"prefer-stable\": true,\n   \"repositories\": [\n        {\n            \"url\": \"https://github.com/wizardjedi/php-zabbix-agent.git\",\n            \"type\": \"git\"\n        }\n   ]\n}\n```\n\n## 2. Update composer deps\n\n```\n$ composer update\n```\n\n## 3. Add `autoload.php` to your app\n\n```php\ninclude(\"vendor/autoload.php\");\n```\n\n## 4. Simple script\n\n```php\n\u003c?php\n\ninclude(\"vendor/autoload.php\");\n\n$agent = ZabbixAgent::create(10051);\n\n$agent-\u003estart();\n\n$agent-\u003esetItem(\"some.key\", ZabbixTimeDuration::now());\n\nwhile (true) {\n    echo \"Usefull payload\\n\";\n\n    $agent-\u003etick();\n\n    usleep(500000);\n}\n```\n\n## 5. Main classes\n\n * `ZabbixPrimitiveItem` - holds primitive values like int, string, float. Return `var_export()`'ed string for object or array\n * `ZabbixTimeDuration` - holds duration from moment in past to current time.\n   * Use `acceptIfNewer($timeValue)` to move moment near in past\n * `ZabbixAvgRate` - calculats rate of processing\n   * Use `acquire($count)` method to inform item of processed objects count.\n\n## 6. CI project page\n\nCheckout project build status on: https://travis-ci.org/wizardjedi/php-zabbix-agent\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwizardjedi%2Fphp-zabbix-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwizardjedi%2Fphp-zabbix-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwizardjedi%2Fphp-zabbix-agent/lists"}