mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Allows ping checks at intervals not tied to the poller. Pointless if you are not alerting on device status. I updated the rrdstep.php script to treat ping-perf files separately and made it so it only converts if needed. Docs here: https://docs.librenms.org/Extensions/Fast-Ping-Check/ DO NOT DELETE THIS TEXT #### Please note > Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting. - [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/) #### Testers If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
47 lines
928 B
PHP
47 lines
928 B
PHP
<?php
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
use App\Jobs\PingCheck;
|
|
use Illuminate\Console\Command;
|
|
|
|
class Ping extends Command
|
|
{
|
|
/**
|
|
* The name and signature of the console command.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $signature = 'ping {--d|debug} {groups?* | Optional List of distributed poller groups to poll}';
|
|
|
|
/**
|
|
* The console command description.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $description = 'Check if devices are up or down via icmp';
|
|
|
|
/**
|
|
* Create a new command instance.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
}
|
|
|
|
/**
|
|
* Execute the console command.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function handle()
|
|
{
|
|
$this->alert("Do not use this command yet, use ./ping.php");
|
|
exit();
|
|
|
|
PingCheck::dispatch(new PingCheck($this->argument('groups')));
|
|
}
|
|
}
|