Heartbeat monitoring for Laravel

Updated on: 1 month ago
Created on: 1 month ago

Heartbeat overview

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.

Create a new Heartbeat check in Acumen Logs

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.

Let's install a Heartbeat in the Laravel scheduler

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

Frequently asked questions

Need support? We're just a message away and ready to
help. We’re here to answer any questions you have

Why should I use Acumen Logs?
We provide a simple and easy-to-use platform that allows you to monitor your website and applications.
What is synthetic monitoring?
Synthetic monitoring is a type of monitoring that simulates user interactions with your application.
Can we do custom integrations?
Need support? We're just a message away and ready to help. We’re here to answer any questions you have
What is API monitoring
API monitoring is a type of monitoring that checks the availability and performance of your APIs.
Is there a contract
No, there is no contract. You can cancel your subscription at any time.
Make your question
Your message has been sent successfully.