|
| 1 | +<?php |
| 2 | + |
| 3 | +return [ |
| 4 | + /* |
| 5 | + * A result store is responsible for saving the results of the checks. The |
| 6 | + * `EloquentHealthResultStore` will save results in the database. You |
| 7 | + * can use multiple stores at the same time. |
| 8 | + */ |
| 9 | + 'result_stores' => [ |
| 10 | + Spatie\Health\ResultStores\EloquentHealthResultStore::class => [ |
| 11 | + 'connection' => env('HEALTH_DB_CONNECTION', env('DB_CONNECTION')), |
| 12 | + 'model' => Spatie\Health\Models\HealthCheckResultHistoryItem::class, |
| 13 | + 'keep_history_for_days' => 5, |
| 14 | + ], |
| 15 | + |
| 16 | + /* |
| 17 | + Spatie\Health\ResultStores\CacheHealthResultStore::class => [ |
| 18 | + 'store' => 'file', |
| 19 | + ], |
| 20 | +
|
| 21 | + Spatie\Health\ResultStores\JsonFileHealthResultStore::class => [ |
| 22 | + 'disk' => 's3', |
| 23 | + 'path' => 'health.json', |
| 24 | + ], |
| 25 | +
|
| 26 | + Spatie\Health\ResultStores\InMemoryHealthResultStore::class, |
| 27 | + */ |
| 28 | + ], |
| 29 | + |
| 30 | + /* |
| 31 | + * You can get notified when specific events occur. Out of the box you can use 'mail' and 'slack'. |
| 32 | + * For Slack you need to install laravel/slack-notification-channel. |
| 33 | + */ |
| 34 | + 'notifications' => [ |
| 35 | + /* |
| 36 | + * Notifications will only get sent if this option is set to `true`. |
| 37 | + */ |
| 38 | + 'enabled' => false, |
| 39 | + |
| 40 | + 'notifications' => [ |
| 41 | + Spatie\Health\Notifications\CheckFailedNotification::class => ['mail'], |
| 42 | + ], |
| 43 | + |
| 44 | + /* |
| 45 | + * Here you can specify the notifiable to which the notifications should be sent. The default |
| 46 | + * notifiable will use the variables specified in this config file. |
| 47 | + */ |
| 48 | + 'notifiable' => Spatie\Health\Notifications\Notifiable::class, |
| 49 | + |
| 50 | + /* |
| 51 | + * When checks start failing, you could potentially end up getting |
| 52 | + * a notification every minute. |
| 53 | + * |
| 54 | + * With this setting, notifications are throttled. By default, you'll |
| 55 | + * only get one notification per hour. |
| 56 | + */ |
| 57 | + 'throttle_notifications_for_minutes' => 60, |
| 58 | + 'throttle_notifications_key' => 'health:latestNotificationSentAt:', |
| 59 | + |
| 60 | + 'mail' => [ |
| 61 | + 'to' => 'your@example.com', |
| 62 | + |
| 63 | + 'from' => [ |
| 64 | + 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), |
| 65 | + 'name' => env('MAIL_FROM_NAME', 'Example'), |
| 66 | + ], |
| 67 | + ], |
| 68 | + |
| 69 | + 'slack' => [ |
| 70 | + 'webhook_url' => env('HEALTH_SLACK_WEBHOOK_URL', ''), |
| 71 | + |
| 72 | + /* |
| 73 | + * If this is set to null the default channel of the webhook will be used. |
| 74 | + */ |
| 75 | + 'channel' => null, |
| 76 | + |
| 77 | + 'username' => null, |
| 78 | + |
| 79 | + 'icon' => null, |
| 80 | + ], |
| 81 | + ], |
| 82 | + |
| 83 | + /* |
| 84 | + * You can let Oh Dear monitor the results of all health checks. This way, you'll |
| 85 | + * get notified of any problems even if your application goes totally down. Via |
| 86 | + * Oh Dear, you can also have access to more advanced notification options. |
| 87 | + */ |
| 88 | + 'oh_dear_endpoint' => [ |
| 89 | + 'enabled' => false, |
| 90 | + |
| 91 | + /* |
| 92 | + * When this option is enabled, the checks will run before sending a response. |
| 93 | + * Otherwise, we'll send the results from the last time the checks have run. |
| 94 | + */ |
| 95 | + 'always_send_fresh_results' => true, |
| 96 | + |
| 97 | + /* |
| 98 | + * The secret that is displayed at the Application Health settings at Oh Dear. |
| 99 | + */ |
| 100 | + 'secret' => env('OH_DEAR_HEALTH_CHECK_SECRET'), |
| 101 | + |
| 102 | + /* |
| 103 | + * The URL that should be configured in the Application health settings at Oh Dear. |
| 104 | + */ |
| 105 | + 'url' => '/oh-dear-health-check-results', |
| 106 | + ], |
| 107 | + |
| 108 | + /* |
| 109 | + * You can set a theme for the local results page |
| 110 | + * |
| 111 | + * - light: light mode |
| 112 | + * - dark: dark mode |
| 113 | + */ |
| 114 | + 'theme' => 'light', |
| 115 | + |
| 116 | + /* |
| 117 | + * When enabled, completed `HealthQueueJob`s will be displayed |
| 118 | + * in Horizon's silenced jobs screen. |
| 119 | + */ |
| 120 | + 'silence_health_queue_job' => true, |
| 121 | + |
| 122 | + /* |
| 123 | + * The response code to use for HealthCheckJsonResultsController when a health |
| 124 | + * check has failed |
| 125 | + */ |
| 126 | + 'json_results_failure_status' => 200, |
| 127 | +]; |
0 commit comments