bytes-commerce/zabbix-api
Symfony bundle for the Zabbix JSON-RPC API with persistent auth/token caching, type-safe action factory, and history/metrics retrieval. PHP 8.3+ strict typing, zero-config via env vars, broad API coverage, optional async monitoring via Messenger.
HttpClient or Guzzle.bus:dispatch) instead of Symfony Messenger.symfony/http-client → Replace with Laravel’s HttpClient or Guzzle.symfony/messenger → Replace with Laravel Queues.symfony/options-resolver → Replace with Laravel’s Illuminate\Support\Arr or custom logic.| Risk Area | Assessment |
|---|---|
| Symfony Dependency | High if not using Symfony components; moderate if abstracted behind interfaces. |
| Messenger Integration | High if relying on Symfony Messenger; low if using Laravel Queues. |
| Authentication | Low (persistent token caching is robust). |
| Type Safety | Low (PHP 8.3+ features are backward-compatible). |
| Zabbix API Changes | Moderate (Zabbix API is stable, but version mismatches may require updates). |
HttpClientInterface)?bus:dispatch) or Symfony Messenger?ZabbixServiceInterface for unit tests?| Component | Laravel Equivalent | Integration Strategy |
|---|---|---|
| Symfony HTTP Client | Illuminate\Support\Facades\Http or Guzzle |
Replace with Laravel’s HTTP client. |
| Symfony Messenger | Laravel Queues (bus:dispatch) |
Use dispatch() or dispatchSync() for async. |
| Symfony DI | Laravel Service Container | Bind interfaces manually or use app()->bind(). |
| Symfony OptionsResolver | Illuminate\Support\Arr or custom DTOs |
Replace with Laravel’s array helpers. |
HttpClient.ZabbixService (extends ZabbixServiceInterface).class LaravelZabbixService implements ZabbixServiceInterface {
public function action(string $actionClass): object {
return new $actionClass($this->httpClient, $this->cache);
}
}
use BytesCommerce\ZabbixApi\Message\PushMetricMessage;
Bus::dispatch(new PushMetricMessage('key', 1));
EnsureZabbixSetupMessage to use Laravel’s Artisan::queue().symfony/messenger transport with Laravel’s queue drivers.ZabbixService available in Laravel.Cache instead of Symfony’s.| Task | Effort | Notes |
|---|---|---|
| Dependency Updates | Low | Composer handles updates; Symfony components are stable. |
| Token Management | Low | Persistent caching reduces manual auth handling. |
| Error Logging | Medium | May need custom logging for Zabbix API errors. |
| Configuration | Low | .env variables are Laravel-compatible. |
Log facade for Zabbix API responses/errors.ZabbixClient to log raw requests/responses.401 Unauthorized gracefully.massAdd, massUpdate methods.Cache.| Failure Scenario | Mitigation Strategy |
|---|---|
| Zabbix API Down | Retry with exponential backoff. |
| Token Expiry | Auto-retry once before failing. |
| Rate Limiting | Implement queue delays for bulk operations. |
| Messenger/Queue Fail | Fallback to sync HTTP calls. |
| Configuration Errors | Validate .env variables on app startup. |
.env and basic usage.How can I help you explore Laravel packages today?