Skip to content

Basic service for monitoring background workers in a distributed system.

Notifications You must be signed in to change notification settings

ginja-th/heartbeat-monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Heartbeat Monitor In order to test if our Laravel queue is still working, a job is added every minute that simply updates a timestamp called 'heartbeat_date'. This monitoring script checks for a lack of change in that value, and if so trigger slack notifications. Notifications of errors are only repeated every 60 mins to avoid notification spam.

#Install

git clone git@github.com:ginja-th/heartbeat-monitor.git
cd heartbeat-monitor
composer install

#Prerequisites

  • Your API should have a guest oauth layer
  • Your API has an endpoint that returns payload in this format
{"data":{"heartbeat_date":"2016-11-26 10:22:50"}}

#Configuration Copy app/.env.example to app/.env and update the values for your API as appropriate.

#Execute the Script

php app/HeartMonitor.php

#Add to Cron Add this entry to your cron using crontab -e

* * * * * cd /path/to/montir && php app/HeartMonitor.php

About

Basic service for monitoring background workers in a distributed system.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages