PHPackages                             enescode/laravel-api-watchdog - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. enescode/laravel-api-watchdog

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

enescode/laravel-api-watchdog
=============================

API performance and status monitoring package.

v1.0.0(4mo ago)00MITPHPPHP ^8.1

Since Feb 12Pushed 4mo agoCompare

[ Source](https://github.com/enescode/laravel-api-watchdog)[ Packagist](https://packagist.org/packages/enescode/laravel-api-watchdog)[ RSS](/packages/enescode-laravel-api-watchdog/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (2)Versions (2)Used By (0)

🚨 Laravel API Watchdog
======================

[](#-laravel-api-watchdog)

[English](#english) | [Türkçe](#t%C3%BCrk%C3%A7e)

---

English
-------

[](#english)

Laravel API Watchdog is a lightweight and powerful package designed to monitor your external API endpoints. It tracks response times, verifies status codes, and alerts you via Email or Logs when an API is down or performing poorly.

### ✨ Features

[](#-features)

- 📡 **Multi-Method Support:** Monitor both `GET` and `POST` requests seamlessly.
- ⚡ **Performance Monitoring:** Automatically alerts you if an API response exceeds your threshold (default: 2 seconds).
- 🔐 **Authorization Support:** Easily add custom headers and Bearer tokens for secure APIs.
- 🚨 **Smart Alerting:** Sends instant email notifications. If email is not configured, it intelligently falls back to `laravel.log`.
- 🛠 **Scheduler Ready:** Designed to work perfectly with Laravel's Task Scheduler.

### 🛠 Installation

[](#-installation)

1. Install the package via composer:

```
composer require enescode/laravel-api-watchdog
```

### ✨ Publish the configuration file:

[](#-publish-the-configuration-file)

```
php artisan vendor:publish --tag="api-watchdog-config"
```

### ⚙️ Configuration

[](#️-configuration)

```
return [
    'notify_email' => 'admin@example.com',
    'max_response_time' => 2000, // miliseconds
    'endpoints' => [
        [
            'name' => 'Payment Gateway',
            'url' => '[https://api.example.com/v1/status](https://api.example.com/v1/status)',
            'method' => 'POST',
            'headers' => [
                'Authorization' => 'Bearer your-token-here'
            ],
            'data' => ['check' => true],
            'expect' => 200,
        ],
    ],
];
```

### 🚀 Usage

[](#-usage)

```
php artisan watchdog:check
```

### 📧 Email Configuration

[](#-email-configuration)

To receive email alerts, make sure your `.env` file is properly configured with your SMTP settings. Additionally, define the recipient email address for the watchdog alerts:

**Laravel 10 add the command to your app/Console/Kernel.php:**

```
protected function schedule(Schedule $schedule)
{
    $schedule->command('watchdog:check')->everyFiveMinutes();
}
```

**Laravel 10+ add the command to your routes/console.php:**

```
Schedule::command('watchdog:check')->everyFiveMinutes();
```

---

Türkçe
------

[](#türkçe)

Laravel API Watchdog, config dosyanızda belirlediğiniz API rotalarını sizin belirlediğiniz saniyelerde izler ve bir Endpoint uzun süre yada hiç yanıt vermezse sizi e-posta ile bilgilendirir. Böylece herhangi bir olumsuzlukta önceden bilgilendirilirsiniz.

### ✨ Özellikler

[](#-özellikler)

- 📡 **Method Desteği:** Hem `GET` hem de `POST` isteklerini sorunsuz bir şekilde izleyin.
- ⚡ **Performans İzleme:** Bir API yanıtı eşiğinizi aşarsa otomatik olarak sizi uyarır (varsayılan: 2 saniye).
- 🔐 **Yetkilendirme Desteği:** Güvenli API'ler için kolayca özel başlıklar ve Bearer token'ları ekleyin.
- 🚨 **Akıllı Uyarı:** Anında e-posta bildirimleri gönderir. E-posta yapılandırılmadıysa, `laravel.log` dosyasına akıllıca geri döner.
- 🛠 **Zamanlayıcı Hazırlığı:** Laravel'in Görev Zamanlayıcısı ile mükemmel şekilde çalışmak için tasarlanmıştır.

### 🛠 Kurulum

[](#-kurulum)

1. Paketi composer aracılığıyla kurun:

```
composer require enescode/laravel-api-watchdog
```

### ✨ Yapılandırma dosyasını yayınlayın:

[](#-yapılandırma-dosyasını-yayınlayın)

```
php artisan vendor:publish --tag="api-watchdog-config"
```

### ⚙️ Yapılandırma

[](#️-yapılandırma)

```
return [
    'notify_email' => 'admin@example.com',
    'max_response_time' => 2000, // milisaniye
    'endpoints' => [
        [
            'name' => 'Ödeme Geçidi',
            'url' => '[https://api.example.com/v1/status](https://api.example.com/v1/status)',
            'method' => 'POST',
            'headers' => [
                'Authorization' => 'Bearer your-token-here'
            ],
            'data' => ['check' => true],
            'expect' => 200,
        ],
    ],
];
```

### 🚀 Kullanımı

[](#-kullanımı)

```
php artisan watchdog:check
```

### 📧 E-Posta Ayarlaması

[](#-e-posta-ayarlaması)

E-posta bildirimlerini alabilmek için `.env` dosyanızda SMTP ayarlarının yapılmış olduğundan emin olun. Ayrıca, uyarıların gönderileceği e-posta adresini şu şekilde tanımlayın:

**Laravel 10'da app/Console/Kernel.php dosyanıza ekleyin:**

```
protected function schedule(Schedule $schedule)
{
    $schedule->command('watchdog:check')->everyFiveMinutes();
}
```

**Laravel 11 ve 12 de routes/console.php dosyanıza ekleyin:**

```
Schedule::command('watchdog:check')->everyFiveMinutes();
```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance74

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

141d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/62e8c2d7b669223fb275b95bb9d8aa4cbc3191ff34e1efd07fac395321a32117?d=identicon)[thek4x](/maintainers/thek4x)

---

Top Contributors

[![thek4x](https://avatars.githubusercontent.com/u/8832586?v=4)](https://github.com/thek4x "thek4x (6 commits)")

### Embed Badge

![Health badge](/badges/enescode-laravel-api-watchdog/health.svg)

```
[![Health](https://phpackages.com/badges/enescode-laravel-api-watchdog/health.svg)](https://phpackages.com/packages/enescode-laravel-api-watchdog)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M165](/packages/spatie-laravel-health)[illuminate/http

The Illuminate Http package.

11937.9M6.9k](/packages/illuminate-http)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[larabug/larabug

Laravel 6.x/7.x/8.x/9.x/10.x/11.x/12.x/13.x bug notifier

299582.7k1](/packages/larabug-larabug)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5021.9k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
