mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-10-31 07:06:51 +01:00 
			
		
		
		
	 00644c2c60
			
		
	
	
		00644c2c60
		
			
		
	
	
	
	
		
			
			* add spatie health * change slug for health page * add check for panel version * only check for debug mode if env isn't local * add check for node versions * improve short summary * fix outdated check * run pint * fix health checks during tests * add count to ok message * fix typo * temp fix for phpstan job * fix pint... * improve "outdated" count Co-authored-by: MartinOscar <40749467+RMartinOscar@users.noreply.github.com> * run pint * skip node versions check if no nodes are created * auto run health checks if they didn't run before * small refactor * update navigation Co-authored-by: Charles <sir3lit@gmail.com> * fix errors if tests didn't run yet * fix disk usage check * remove plugin and use own page * use health status indicator from spatie * fix after merge * update icon * update color classes * fix after merge * add back imports oops... * wrong import oops²... * update spatie/laravel-health to latest * move Health page to correct namespace * update NodeVersionsCheck * use style instead of tailwind classes workaround until we have vite * cleanup custom checks --------- Co-authored-by: MartinOscar <40749467+RMartinOscar@users.noreply.github.com> Co-authored-by: Charles <sir3lit@gmail.com>
		
			
				
	
	
		
			124 lines
		
	
	
		
			3.8 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			124 lines
		
	
	
		
			3.8 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| return [
 | |
|     /*
 | |
|      * A result store is responsible for saving the results of the checks. The
 | |
|      * `EloquentHealthResultStore` will save results in the database. You
 | |
|      * can use multiple stores at the same time.
 | |
|      */
 | |
|     'result_stores' => [
 | |
|         /*
 | |
|         Spatie\Health\ResultStores\EloquentHealthResultStore::class => [
 | |
|             'connection' => env('HEALTH_DB_CONNECTION', env('DB_CONNECTION')),
 | |
|             'model' => Spatie\Health\Models\HealthCheckResultHistoryItem::class,
 | |
|             'keep_history_for_days' => 5,
 | |
|         ],
 | |
|         */
 | |
| 
 | |
|         Spatie\Health\ResultStores\CacheHealthResultStore::class => [
 | |
|             'store' => 'file',
 | |
|         ],
 | |
| 
 | |
|         /*
 | |
|         Spatie\Health\ResultStores\JsonFileHealthResultStore::class => [
 | |
|             'disk' => 's3',
 | |
|             'path' => 'health.json',
 | |
|         ],
 | |
| 
 | |
|         Spatie\Health\ResultStores\InMemoryHealthResultStore::class,
 | |
|         */
 | |
|     ],
 | |
| 
 | |
|     /*
 | |
|      * You can get notified when specific events occur. Out of the box you can use 'mail' and 'slack'.
 | |
|      * For Slack you need to install laravel/slack-notification-channel.
 | |
|      */
 | |
|     'notifications' => [
 | |
|         /*
 | |
|          * Notifications will only get sent if this option is set to `true`.
 | |
|          */
 | |
|         'enabled' => false,
 | |
| 
 | |
|         'notifications' => [
 | |
|             Spatie\Health\Notifications\CheckFailedNotification::class => ['mail'],
 | |
|         ],
 | |
| 
 | |
|         /*
 | |
|          * Here you can specify the notifiable to which the notifications should be sent. The default
 | |
|          * notifiable will use the variables specified in this config file.
 | |
|          */
 | |
|         'notifiable' => Spatie\Health\Notifications\Notifiable::class,
 | |
| 
 | |
|         /*
 | |
|          * When checks start failing, you could potentially end up getting
 | |
|          * a notification every minute.
 | |
|          *
 | |
|          * With this setting, notifications are throttled. By default, you'll
 | |
|          * only get one notification per hour.
 | |
|          */
 | |
|         'throttle_notifications_for_minutes' => 60,
 | |
|         'throttle_notifications_key' => 'health:latestNotificationSentAt:',
 | |
| 
 | |
|         'mail' => [
 | |
|             'to' => 'your@example.com',
 | |
| 
 | |
|             'from' => [
 | |
|                 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
 | |
|                 'name' => env('MAIL_FROM_NAME', 'Example'),
 | |
|             ],
 | |
|         ],
 | |
| 
 | |
|         'slack' => [
 | |
|             'webhook_url' => env('HEALTH_SLACK_WEBHOOK_URL', ''),
 | |
| 
 | |
|             /*
 | |
|              * If this is set to null the default channel of the webhook will be used.
 | |
|              */
 | |
|             'channel' => null,
 | |
| 
 | |
|             'username' => null,
 | |
| 
 | |
|             'icon' => null,
 | |
|         ],
 | |
|     ],
 | |
| 
 | |
|     /*
 | |
|      * You can let Oh Dear monitor the results of all health checks. This way, you'll
 | |
|      * get notified of any problems even if your application goes totally down. Via
 | |
|      * Oh Dear, you can also have access to more advanced notification options.
 | |
|      */
 | |
|     'oh_dear_endpoint' => [
 | |
|         'enabled' => false,
 | |
| 
 | |
|         /*
 | |
|          * When this option is enabled, the checks will run before sending a response.
 | |
|          * Otherwise, we'll send the results from the last time the checks have run.
 | |
|          */
 | |
|         'always_send_fresh_results' => true,
 | |
| 
 | |
|         /*
 | |
|          * The secret that is displayed at the Application Health settings at Oh Dear.
 | |
|          */
 | |
|         'secret' => env('OH_DEAR_HEALTH_CHECK_SECRET'),
 | |
| 
 | |
|         /*
 | |
|          * The URL that should be configured in the Application health settings at Oh Dear.
 | |
|          */
 | |
|         'url' => '/oh-dear-health-check-results',
 | |
|     ],
 | |
| 
 | |
|     /*
 | |
|      * You can set a theme for the local results page
 | |
|      *
 | |
|      * - light: light mode
 | |
|      * - dark: dark mode
 | |
|      */
 | |
|     'theme' => 'light',
 | |
| 
 | |
|     /*
 | |
|      * When enabled,  completed `HealthQueueJob`s will be displayed
 | |
|      * in Horizon's silenced jobs screen.
 | |
|      */
 | |
|     'silence_health_queue_job' => true,
 | |
| ];
 |