pluswerk / uptime-robot
Simple wrapper to call uptime-robot heartbeat unified
Installs: 8 747
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 5
Forks: 0
Open Issues: 0
Requires
- php: ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0
- psr/log: ^1 || ^2 || ^3
Requires (Dev)
- pluswerk/grumphp-config: ^6.0 || ^7.0
This package is auto-updated.
Last update: 2024-11-13 16:03:35 UTC
README
This package wraps another PHP function to create and send a heartbeat for uptime-robot and can log a warning if request was not succesful.
Upgrade from 1 to 2
there is no HeartBeatException
anymore. If you want to log that the request to uptime-robot has failed, you need to inject an \Psr\Log\LoggerInterface
in the constructor.
Installation
composer req pluswerk/uptime-robot
Usage
Send request to UptimeRobot:
$heartBeat = new HeartBeat(); $heartBeat->alive('https://heartbeat.uptimerobot.com/m0000000000-0000000000000000000000000');
Throttle your requests with a given time:
$heartBeat->throttledAlive($yourUptimeUrl, 300);