Heartbeat monitoring is a specialized but simple type of monitoring used to track the health of processes, applications, or systems by periodically sending "heartbeat" signals to a monitoring service. These signals act as a status indicator, showing that a process or application is functioning as expected. If the heartbeat fails to arrive within a predefined time frame, an alert is triggered to inform web admins of a potential issue.
Within the Acumen Logs dashboard, navigate to Heartbeat in the side navigation. Then select the create button and add an identifiable name that you can recognise later. Then press save, you will then be redirected to your Heartbeat dashboard where you will find your unique endpoint which you can then use as shown in the example below.
1. Open your Laravel project and navigate to the below file.
App\Console\Kernel.php
2. Then within the schedule method call the heartbeat endpoint provided to you within the Acumen Logs dashboard
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
// Task a
// Task b
Http::post('https://acumenlogs.com/heartbeat/xxxx-xxxx-xxx-xxx-xxxx/pulse');
}
3. Run your scheduler and you will see the pulse registered in your dashboard