Download the PHP package fliix-cloud/php-zabbix-sender without Composer

On this page you can find all versions of the php package fliix-cloud/php-zabbix-sender. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-zabbix-sender

fliix/php-zabbix-sender

PHP Version Zabbix

PHP implementation of the Zabbix Sender protocol — compatible with Zabbix 7.x.

A fork of webmasterskaya/php-zabbix-sender.

Highlights

See the official Zabbix Sender docs: https://www.zabbix.com/documentation/current/en/manpages/zabbix_sender

Contents


Requirements

Requirement Version
PHP ≥ 8.4
ext-sockets any
openssl binary any (needed for PSK connections)

Installation


Quick start – unencrypted connection

  1. Create a Trapper item in Zabbix
    → https://www.zabbix.com/documentation/current/en/manual/config/items/itemtypes/trapper

  2. Instantiate the sender:

  3. Send a single value:

  4. Check the result:

Batch mode

Collect multiple values and send them in a single request:


TLS PSK connection (Zabbix 7.x)

Background

Zabbix supports Pre-Shared Key (PSK) encryption between the sender and the Zabbix Server/Proxy. PSK uses TLS 1.2 cipher suites defined in RFC 4279 (e.g. PSK-AES256-CBC-SHA). These cipher suites are not available in TLS 1.3 and are disabled by default in OpenSSL 3.x, which is why the connection must explicitly use TLS 1.2.

Step 1 – Generate a PSK key

A PSK key is a hex-encoded random string. Generate one with:

Keep this value – you will need it both in Zabbix and in your PHP code.

Step 2 – Configure PSK in Zabbix

  1. Open the Zabbix web UI and navigate to Configuration → Hosts
  2. Select the host that will receive the data.
  3. Go to the Encryption tab.
  4. Set Connections from host to PSK.
  5. Fill in:
    • PSK identity – a human-readable name, e.g. hostname
    • PSK – the hex key generated in Step 1.
  6. Save the host.

Step 3 – Use PSK in PHP

Optional: override the PSK cipher

By default, the library uses a TLS 1.2 PSK cipher list to improve compatibility with different OpenSSL/Zabbix builds:

PSK-AES128-GCM-SHA256:PSK-AES256-GCM-SHA384:PSK-AES128-CBC-SHA256:PSK-AES256-CBC-SHA384:PSK-AES128-CBC-SHA:PSK-AES256-CBC-SHA

If your Zabbix Server is configured to use a specific cipher, pass tls-cipher explicitly:

PSK with batch mode

PSK works transparently with batch mode. The same tls-connect options are used — just call batch() before sending:

Troubleshooting PSK

Symptom Likely cause Fix
SSL alert handshake failure Cipher mismatch or TLS version mismatch Ensure tls-cipher matches what Zabbix accepts; Zabbix 7 requires TLS 1.2
no cipher can be selected OpenSSL 3.x with PSK Use -tls1_2 and a PSK-specific cipher (already handled by this library)
Processed 0 Failed 1 Item key or host name mismatch Verify the Zabbix host name and trapper item key
Connection refused Wrong server/port or firewall Check server/port options and Zabbix Server firewall rules

Protocol compatibility (zabbix_sender)

This library follows the Zabbix sender protocol frame format:

This matches the Zabbix protocol docs for zabbix_sender and header_datalen.


All available options

All options are supported by both connection types unless noted.

Option Type Default Description
server string required Zabbix Server or Proxy hostname / IP
port int 10051 Zabbix Server port
timeout int 30 Socket read/write timeout in seconds
host string required Zabbix host name the data belongs to
tls-connect string unencrypted unencrypted or psk (PSK only)
tls-psk-identity string – Required when tls-connect=psk
tls-psk string – Required when tls-connect=psk; must be a hex-encoded key
tls-cipher string see below Override TLS 1.2 PSK cipher list
tls-cipher13 string – Override TLS 1.3 ciphersuite (OpenSSL ≥ 1.1.1)

The default — used when tls-cipher is not set and tls-connect=psk — is:


License

This project is licensed under the Apache License 2.0.
See the LICENSE file for the full text.


All versions of php-zabbix-sender with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
ext-sockets Version *
symfony/options-resolver Version ^7.4
symfony/validator Version ^7.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package fliix-cloud/php-zabbix-sender contains the following files

Loading the files please wait ...