https://github.com/zarplata/zabbix-sender-php
Zabbix sender protocol implementation
https://github.com/zarplata/zabbix-sender-php
alert alerting notifications php reporter zabbix
Last synced: 9 months ago
JSON representation
Zabbix sender protocol implementation
- Host: GitHub
- URL: https://github.com/zarplata/zabbix-sender-php
- Owner: zarplata
- License: mit
- Created: 2018-05-31T10:54:57.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2025-07-30T17:41:43.000Z (11 months ago)
- Last Synced: 2025-09-16T07:14:55.760Z (9 months ago)
- Topics: alert, alerting, notifications, php, reporter, zabbix
- Language: PHP
- Size: 17.6 KB
- Stars: 16
- Watchers: 9
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Zabbix sender
Zabbix sender it's a PHP implementation of Zabbix sender protocol.
With this library you can send any metric to Zabbix server.
Additional information about Zabbix sender protocol and request/response
you can be found in official documentation:
- https://www.zabbix.com/documentation/6.4/manual/appendix/items/trapper
- https://www.zabbix.com/documentation/6.4/manual/appendix/protocols/header_datalen
### Installation
```sh
composer require zarplata/zabbix-sender
```
### Usage
```php
addMetric(new ZabbixMetric('my.super.text.item.key', 'OK'));
$packet->addMetric(new ZabbixMetric('my.super.int.item.key', 1));
// And finally send to Zabbix Server
$sender->send($packet);
```
### Advanced usage options
Sometimes it may be necessary to provide hostname and/or timestamp
of metric. By default construction:
```php
withHostname('my_non_local_hostname')
->withTimestamp(662637600); //Timestamp in past
```
### License
MIT.