Improved Latency graph (#15940)

* Improved Latency graph
Store loss+jitter info in rrd instead of database
New graph icmp_perf (legacy ping_perf still valid referencing part of the newer data)
Delete device_perf table

* Change loss to an area so it is more visible

* Style fixes

* Cleanups from phpstan & tests

* exit_code fix

* Remove alert usage of device_perf

* Don't use magic __get

* Add test for bulkPing
Add host to previous tests

* style fixes

* Fix issue fping error responses
This commit is contained in:
Tony Murray
2024-04-18 09:57:01 -05:00
committed by GitHub
parent 4cce4f082e
commit 49f8269262
38 changed files with 466 additions and 495 deletions

View File

@@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::dropIfExists('device_perf');
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::create('device_perf', function (Blueprint $table) {
$table->increments('id');
$table->unsignedInteger('device_id')->index();
$table->dateTime('timestamp');
$table->integer('xmt');
$table->integer('rcv');
$table->integer('loss');
$table->float('min');
$table->float('max');
$table->float('avg');
$table->text('debug')->nullable();
$table->index(['device_id', 'timestamp']);
});
}
};