~xdavidwu/uptime-monitor

ref: 7a06e716309094ab34439a4be1f87a19eefb68f3 uptime-monitor/app/Probes/PingProbe.php -rw-r--r-- 348 bytes
7a06e716xdavidwu view: uptime: set title to app.name 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php

namespace App\Probes;

class PingProbe extends CommandProbe
{
    public function __construct($host)
    {
        $this->host = $host;
        parent::__construct([
            'ping',
            '-c1',
            '-W1',
            $host
        ]);
    }

    public function describe()
    {
        return "Ping $this->host";
    }
}