General | laravel-health-go | Spatie       

 SPATIE  

laravel-health-go
=================

spatie.be/open-source

  [Docs](https://spatie.be/docs)  [Laravel-health-go](https://spatie.be/docs/laravel-health-go/v1)  Configuring-notifications  General

 Version   v1      

 Other versions for crawler [v1](https://spatie.be/docs/laravel-health-go/v1) 

  General    
- [ Introduction ](https://spatie.be/docs/laravel-health-go/v1/introduction)
- [ Requirements ](https://spatie.be/docs/laravel-health-go/v1/requirements)
- [ Installation &amp; setup ](https://spatie.be/docs/laravel-health-go/v1/installation-setup)
- [ Questions and issues ](https://spatie.be/docs/laravel-health-go/v1/questions-issues)
- [ About us ](https://spatie.be/docs/laravel-health-go/v1/about-us)
- [ Testing ](https://spatie.be/docs/laravel-health-go/v1/testing)
- [ Releasing ](https://spatie.be/docs/laravel-health-go/v1/releasing)
- [ Changelog ](https://spatie.be/docs/laravel-health-go/v1/changelog)
- [ Support us ](https://spatie.be/docs/laravel-health-go/v1/support-us)

Usage
-----

- [ Registering your first check ](https://spatie.be/docs/laravel-health-go/v1/basic-usage/registering-your-first-check)
- [ Creating custom checks ](https://spatie.be/docs/laravel-health-go/v1/basic-usage/creating-custom-checks)
- [ Manually running checks ](https://spatie.be/docs/laravel-health-go/v1/basic-usage/manually-running-checks)
- [ Conditionally running or modifying checks ](https://spatie.be/docs/laravel-health-go/v1/basic-usage/conditionally-running-or-modifying-checks)
- [ Endpoints ](https://spatie.be/docs/laravel-health-go/v1/basic-usage/endpoints)
- [ Pausing and resuming checks ](https://spatie.be/docs/laravel-health-go/v1/basic-usage/pausing-and-resuming-checks)
- [ Registering the same check multiple times ](https://spatie.be/docs/laravel-health-go/v1/basic-usage/registering-the-same-check-multiple-times)
- [ Testing ](https://spatie.be/docs/laravel-health-go/v1/basic-usage/testing)

Storing results
---------------

- [ General ](https://spatie.be/docs/laravel-health-go/v1/storing-results/general)
- [ In the database ](https://spatie.be/docs/laravel-health-go/v1/storing-results/in-the-database)
- [ In cache ](https://spatie.be/docs/laravel-health-go/v1/storing-results/in-cache)
- [ In a JSON file ](https://spatie.be/docs/laravel-health-go/v1/storing-results/in-a-json-file)
- [ Not storing results ](https://spatie.be/docs/laravel-health-go/v1/storing-results/not-storing-results)

Configuring notifications
-------------------------

- [ General ](https://spatie.be/docs/laravel-health-go/v1/configuring-notifications/general)
- [ Via mail ](https://spatie.be/docs/laravel-health-go/v1/configuring-notifications/via-mail)
- [ Via Slack ](https://spatie.be/docs/laravel-health-go/v1/configuring-notifications/via-slack)
- [ Via Microsoft Teams ](https://spatie.be/docs/laravel-health-go/v1/configuring-notifications/via-teams)
- [ Via Oh Dear ](https://spatie.be/docs/laravel-health-go/v1/configuring-notifications/via-oh-dear)

Available checks
----------------

- [ Overview ](https://spatie.be/docs/laravel-health-go/v1/available-checks/overview)
- [ Cache ](https://spatie.be/docs/laravel-health-go/v1/available-checks/cache)
- [ Debug mode ](https://spatie.be/docs/laravel-health-go/v1/available-checks/debug-mode)
- [ Environment ](https://spatie.be/docs/laravel-health-go/v1/available-checks/environment)
- [ Database connection count ](https://spatie.be/docs/laravel-health-go/v1/available-checks/db-connection-count)
- [ Database connection ](https://spatie.be/docs/laravel-health-go/v1/available-checks/db-connection)
- [ Database size ](https://spatie.be/docs/laravel-health-go/v1/available-checks/db-size-check)
- [ Database table size ](https://spatie.be/docs/laravel-health-go/v1/available-checks/db-table-size-check)
- [ CPU load ](https://spatie.be/docs/laravel-health-go/v1/available-checks/cpu-load)
- [ Used disk space ](https://spatie.be/docs/laravel-health-go/v1/available-checks/used-disk-space)
- [ Ping ](https://spatie.be/docs/laravel-health-go/v1/available-checks/ping)
- [ Redis memory usage ](https://spatie.be/docs/laravel-health-go/v1/available-checks/redis-memory-usage)
- [ Redis ](https://spatie.be/docs/laravel-health-go/v1/available-checks/redis)
- [ Flare error count ](https://spatie.be/docs/laravel-health-go/v1/available-checks/flare-error-count)
- [ Meilisearch ](https://spatie.be/docs/laravel-health-go/v1/available-checks/meilisearch)
- [ Reverb ](https://spatie.be/docs/laravel-health-go/v1/available-checks/reverb)
- [ Cached config, routes, and events ](https://spatie.be/docs/laravel-health-go/v1/available-checks/cached-config-routes-and-events)
- [ Horizon ](https://spatie.be/docs/laravel-health-go/v1/available-checks/horizon)
- [ Security advisories ](https://spatie.be/docs/laravel-health-go/v1/available-checks/security-advisories)
- [ Queue ](https://spatie.be/docs/laravel-health-go/v1/available-checks/queue)
- [ Schedule ](https://spatie.be/docs/laravel-health-go/v1/available-checks/schedule)
- [ Backups ](https://spatie.be/docs/laravel-health-go/v1/available-checks/backups)

Viewing results
---------------

- [ General ](https://spatie.be/docs/laravel-health-go/v1/viewing-results/general)
- [ On the CLI ](https://spatie.be/docs/laravel-health-go/v1/viewing-results/on-the-cli)
- [ On a webpage ](https://spatie.be/docs/laravel-health-go/v1/viewing-results/on-a-webpage)
- [ As JSON ](https://spatie.be/docs/laravel-health-go/v1/viewing-results/as-json)

Security
--------

- [ Using secret token ](https://spatie.be/docs/laravel-health-go/v1/security/using-secret-token)

 General
=======

###  On this page 

1. [ Throttling notifications ](#content-throttling-notifications)
2. [ Only notify on failures ](#content-only-notify-on-failures)
3. [ Custom notifications and recipients ](#content-custom-notifications-and-recipients)

Whenever a check returns a notification message, the package can send you a notification. Configure channels in `Config.Notifications`.

Out of the box, notifications can be sent via [mail](via-mail), [Slack](via-slack) and [Microsoft Teams](via-teams). [Oh Dear](via-oh-dear) can poll results and manage delivery independently.

Throttling notifications
--------------------------------------------------------------------------------------------------------------------------------

Notifications are throttled so you don't get overwhelmed when something goes wrong. By default, each channel and recipient receives at most one notification per hour. Set `Config.NotificationThrottle` to change that duration or zero to disable throttling. Failed delivery clears the throttle claim so the next run can retry.

Throttle keys use Laravel's default cache. Use a shared cache for multiple processes. A channel's ID must be unique for each recipient and delivery destination.

Only notify on failures
-----------------------------------------------------------------------------------------------------------------------------

Set `Config.OnlyOnFailure = true` to send only `Failed` results. It excludes warnings, crashes and other statuses. By default any result with a nonempty message is eligible. Set `NotificationsEnabled = false` to disable all package deliveries.

Custom notifications and recipients
-----------------------------------------------------------------------------------------------------------------------------------------------------------------

Implement `health.Notifier` to replace formatting, recipient resolution or transport. `ID() string` identifies the independently throttled destination. `Send(context.Context, []health.Result) error` receives the selected results. Resolve your application user model or tenant recipients there. No built-in notifiable model is imposed.

 A good
match?
-------------

### What we do best

- All things Laravel
- Custom frontend components
- Building APIs
- AI-powered features
- Simplifying things
- Clean solutions
- Integrating services

### Not our cup of tea

- WordPress themes
- Cutting corners
- Free mockups to win a job
- "Just execute the briefing"

 In short: we'd like to be a **substantial part** of your project.

 [ Get in touch via email ](mailto:info@spatie.be?subject=A%20good%20match%21&body=Tell%20us%20as%20much%20as%20you%20can%20about%0A-%20your%20online%20project%0A-%20your%20planning%0A-%20your%20budget%0A-%20%E2%80%A6%0A%0AAnything%20that%20helps%20us%20to%20start%20straightforward%21)
