{"id":31938850,"url":"https://github.com/zarplata/zabbix-sender-php","last_synced_at":"2025-10-14T08:19:06.168Z","repository":{"id":53182900,"uuid":"135571653","full_name":"zarplata/zabbix-sender-php","owner":"zarplata","description":"Zabbix sender protocol implementation","archived":false,"fork":false,"pushed_at":"2025-07-30T17:41:43.000Z","size":18,"stargazers_count":16,"open_issues_count":0,"forks_count":5,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-09-16T07:14:55.760Z","etag":null,"topics":["alert","alerting","notifications","php","reporter","zabbix"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/zarplata.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}},"created_at":"2018-05-31T10:54:57.000Z","updated_at":"2025-07-30T17:41:47.000Z","dependencies_parsed_at":"2022-08-22T20:01:02.935Z","dependency_job_id":null,"html_url":"https://github.com/zarplata/zabbix-sender-php","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/zarplata/zabbix-sender-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zarplata%2Fzabbix-sender-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zarplata%2Fzabbix-sender-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zarplata%2Fzabbix-sender-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zarplata%2Fzabbix-sender-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zarplata","download_url":"https://codeload.github.com/zarplata/zabbix-sender-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zarplata%2Fzabbix-sender-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018282,"owners_count":26086334,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["alert","alerting","notifications","php","reporter","zabbix"],"created_at":"2025-10-14T08:19:05.133Z","updated_at":"2025-10-14T08:19:06.155Z","avatar_url":"https://github.com/zarplata.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zabbix sender\n\nZabbix sender it's a PHP implementation of Zabbix sender protocol.\nWith this library you can send any metric to Zabbix server.\nAdditional information about Zabbix sender protocol and request/response\nyou can be found in official documentation:\n - https://www.zabbix.com/documentation/6.4/manual/appendix/items/trapper\n - https://www.zabbix.com/documentation/6.4/manual/appendix/protocols/header_datalen\n\n### Installation\n```sh\ncomposer require zarplata/zabbix-sender\n```\n\n### Usage\n```php\n\u003c?php\n\nuse \\Zarplata\\Zabbix\\ZabbixSender;\nuse \\Zarplata\\Zabbix\\Request\\Packet as ZabbixPacket;\nuse \\Zarplata\\Zabbix\\Request\\Metric as ZabbixMetric;\n\n// At first you must initialize ZabbixSender object\n// with address of Zabbix Server. If your Zabbix Server\n// don't listen default port (10051) you can define it in constructor\n// $sender = new ZabbixSender(\n//     $serverAddress='ZABBIX_SERVER_HOSTNAME',\n//     $serverPort=12345\n// );\n$sender = new ZabbixSender('ZABBIX_SERVER_HOSTNAME');\n\n// After you define the $sender you must create ZabbixPacket\n// it's just accumulator of your metrics which you will add.\n$packet = new ZabbixPacket();\n\n// Define your metrinc\n$packet-\u003eaddMetric(new ZabbixMetric('my.super.text.item.key', 'OK'));\n$packet-\u003eaddMetric(new ZabbixMetric('my.super.int.item.key', 1));\n\n// And finally send to Zabbix Server\n$sender-\u003esend($packet);\n```\n\n### Advanced usage options\n\nSometimes it may be necessary to provide hostname and/or timestamp \nof metric. By default construction:\n```php\n\u003c?php\n\nnew ZabbixMetric('my.super.text.item.key', 'OK');\n```\ntake your current hostname and set object creation time as a metric timestamp.\nIf you want define another hostname or/and timestamp you must\nwrite the following code:\n```php\n\u003c?php\n\n(new ZabbixMetric('my.super.text.item.key', 'OK'))\n    -\u003ewithHostname('my_non_local_hostname')\n    -\u003ewithTimestamp(662637600); //Timestamp in past \n```\n\n### License\n\nMIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzarplata%2Fzabbix-sender-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzarplata%2Fzabbix-sender-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzarplata%2Fzabbix-sender-php/lists"}