Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Zabbix Sender Laravel Package

okitsu/zabbix-sender

PHP/Laravel package for sending metrics to Zabbix trapper items using the zabbix_sender protocol. Define host and key values, then push them from your app through a simple API to feed custom monitoring data into Zabbix dashboards, triggers, and alerts. Ideal for app-level telemetry and health checks...

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • The package is framework-agnostic PHP (Composer/PSR-4), not a Laravel package — no service provider, facade, config publish, or queue integration ships with it. Treat it as a low-level outbound adapter, not a monitoring subsystem.
  • It bundles two distinct concerns: a Zabbix sender client (trapper protocol, JSON payload over a raw TCP socket to port 10051) and an agent config parser (zabbix_agentd.conf reader). The sender is the only piece with a plausible role in a Laravel app; the config parser is relevant only if we want to auto-discover server addresses from an existing agent installation.
  • Best fit is as a thin egress adapter in an observability layer: a ZabbixMetricsService that maps domain events (order placed, job failed, queue depth) onto Zabbix trapper items. It does not replace Laravel's native logging, Telescope, or Pulse — it complements them by pushing business metrics into an existing Zabbix estate.
  • Architectural mismatch to flag: the sender is synchronous and blocking. Calling it inline in a request or job lifecycle introduces network I/O into request latency and couples application success to monitoring availability. It must sit behind a queued/batched boundary.

Integration feasibility

  • Low effort to integrate technically: composer require, a small service provider, a config file for host/port/timeout. A working spike is days, not weeks.
  • Two real constraints:
    • Plaintext transport. The Zabbix trapper protocol is unencrypted by default; TLS/PSK is not a property of the sender protocol the way it is for active-agent checks. Any metric payload crossing an untrusted network segment is exposed.
    • Raw socket dependency. Requires outbound TCP to the Zabbix server and consistent behavior from the PHP stream/socket layer; egress rules, NAT, and firewall policy become integration prerequisites, not afterthoughts.

Technical risk

  • Maintenance risk is the dominant risk. 36 stars, 0 dependents, a single maintainer, and a composite score of 1.82 indicate essentially no adoption. There is no evidence of a version-testing matrix against modern PHP (8.2/8.3) or modern Zabbix (6.x/7.x). The opportunity score (5.66) reflects an unmet need in the ecosystem, not package strength — it should not be read as a quality signal.
  • Obsolescence risk is low. The trapper protocol is simple and has been stable for years; the codebase is small enough to vendor or fork in-house if upstream goes quiet. This materially de-risks the adoption decision.
  • Version-compatibility risk is medium. Sender response parsing and, more importantly, zabbix_agentd.conf format changes across Zabbix major versions (new/renamed parameters) mean the config-parser half is the more fragile component. Scoping it out reduces risk substantially.
  • Silent-failure risk is high. Zabbix acknowledges a send with a response body containing processed/failed counts; a transport-level success does not mean the data was accepted. Unchecked, this produces metrics that look instrumented but are quietly dropped.

Key questions

  1. Which Zabbix server version(s) are in the estate, and are the target items provisioned as trapper items with correct value types?
  2. Is TLS/PSK a compliance requirement for this data? If yes, the sender protocol may be disqualifying and an agent-based UserParameter or active check is the better path.
  3. Do we actually need the agent-config parser, or only the sender? Scoping to the sender roughly halves the surface area and the version risk.
  4. What is the acceptable latency/throughput envelope, and can all emissions be asynchronous?
  5. If upstream is abandoned, who owns the fork, and what is the SLA for patching it?
  6. Has anyone validated the package under PHP 8.2+/Laravel 10/11, or are we the first?

Integration Approach

Stack fit

  • Plain PHP library — compatible in principle with any Laravel version, but "compatible in principle" is the operative phrase. Verify composer.json PHP constraints and run the test suite (if any) against our target runtime before committing.
  • Fits cleanly as a single adapter class behind an interface (MetricsEmitter), so the Zabbix dependency is swappable for a log driver or a no-op in local/test environments. This is the key design decision: do not let Zabbix types leak into domain code.
  • Requires ext-sockets or stream functions and outbound TCP 10051. Add to the platform baseline and container image checks.

Migration path

  • No data migration. This is net-new instrumentation egress.
  • Recommended path: (1) standalone spike against a non-production Zabbix server, (2) wrap in app/Monitoring/Zabbix/ with a published config file and env vars (ZABBIX_HOST, ZABBIX_PORT, ZABBIX_TIMEOUT, ZABBIX_ENABLED), (3) introduce a queued EmitZabbixMetrics job that batches items per host, (4) wire domain events to that job.
  • Ship with ZABBIX_ENABLED=false by default and a no-op implementation, so environments without a Zabbix server (local, CI) are unaffected.

Compatibility

  • Conflicts with Laravel's HTTP client, Guzzle, or the scheduler are unlikely — the package occupies a different layer.
  • The agentconfig parser reads files from disk; in containerized deployments the agent config typically isn't present, so its value proposition drops sharply. Recommend excluding it from the initial scope.
  • If Laravel Octane/Swoole is in use, confirm socket behavior under a persistent worker and avoid holding connections across requests.

Sequencing

  1. Validate the protocol against the target Zabbix version — send one item, confirm processed: 1 / failed: 0, confirm the item shows data in the frontend.
  2. Build the adapter with an interface boundary, config, and a disabled-by-default flag.
  3. Add the queue boundary — batching, retry policy, and a dead-letter path. This is not optional; it is the difference between instrumentation and an outage vector.
  4. Instrument the instrumenter — log send failures, expose a fallback counter, and alert on emission failure rate.
  5. Hold a documented fallback: shelling out to the official zabbix_sender binary is a viable escape hatch if the library proves unreliable, at the cost of process-spawn overhead.

Operational Impact

Maintenance

  • Upstream activity is minimal and the maintainer pool is one person. Plan on internal ownership from day one: vendor the source or maintain a fork, and pin the version explicitly.
  • Positive offset: the codebase is small and the protocol is stable, so the realistic maintenance burden is low — a few hours per quarter to re-verify against PHP and Zabbix upgrades. That is a manageable line item, not a program risk.

Support

  • No commercial support, no vendor SLA, community-only issue tracker with low traffic. Internal runbook required covering: how to verify emission, how to interpret failed counts, how to rotate the Zabbix host/port, and how to disable the integration during an incident.
  • Domain knowledge, not code knowledge, is the real support cost. Whoever is on call needs to understand Zabbix items, hosts, value types, and trapper semantics.

Scaling

  • Each send is a TCP connection + JSON round-trip. Per-request emission will not scale and will add measurable latency under load.
  • Batch multiple items into a single sender call (the API supports arrays of metrics with host/key/value/timestamp) and drive it from queue workers. This converts N connections into one per batch and decouples throughput from request rate.
  • Watch queue worker concurrency against Zabbix server connection limits and trapper processing capacity; Zabbix is not designed for high-frequency per-item writes from many clients.
  • Clock skew between app hosts and the Zabbix server will cause timestamp-based rejections or misaligned graphs — enforce NTP as a platform prerequisite.

Failure modes

  • Server unreachable / timeout → blocking exception. Must be caught at the boundary; never allowed to fail a user request or abort a job.
  • Transport success, logical failure → response reports failed > 0. Silent data loss if the info string is not parsed and logged. This is the most likely real-world failure and the one most often missed.
  • Value type / item mismatch → Zabbix rejects the item; appears as an unexplained gap in dashboards. Mitigate with an integration test that asserts a known item accepts a known payload.
  • Plaintext interception → metric payloads visible on the wire. Assess against data classification; avoid sending PII or identifiers in item keys.
  • Upstream abandonment → mitigated by vendoring; risk is schedule, not capability.
  • Local/CI without a Zabbix server → the disabled-by-default flag and no-op implementation prevent this from becoming a developer-experience tax.

Ramp-up

  • Engineering ramp-up is short: a mid-level PHP developer can build the adapter, config, and queue job in roughly 1–2 days.
  • Operational ramp-up is the longer pole — 1–2 weeks for the team to become fluent in the Zabbix side (item provisioning, trapper configuration, dashboard validation). Budget for that explicitly; it is consistently underestimated.
  • Net assessment: adopt with conditions — scope to the sender only, wrap behind an interface, run it through a queue, own the fork, and validate the protocol against the real Zabbix version before writing production code.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hsluv/hsluv
seampact/codegen
seampact/hooks
seampact/ir
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support