mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* code stuff done for Sneck * whoops, correct the abs value post adding it post rrd update * return a array for getting the sneck data and nicely print the raw return value * add test stuff and freeze time at 1650911765 for tests * move the freezeTime * add use Illuminate\Support\Carbon; * more test changes * rework freezeTime a bit more * more test stuff * another test * rework it a bit again * correct variable spelling for $time_diff * remove freezeTime as we are using a old version of Laravel * finalize graphs * misc * finalize sneck page * mve the sneck tests as it needs a newer version of laravel than we are using * add documents for sneck * finalize the poller * formatting cleanup * correct comment type * correct the spelling of description * more documentation * save the check returns as metrics * add some more examples * fix some of the sneck alerts and add a few more examples * turn off time to polling by default * suggest using ntp if enabled * since we are zeroing time_to_polling by default, this now works * backout some suggested changes for once we change to larval 9 * remove del_sneck_data as it is no longer used * add more docs on the metrics * php-cs-fixer to fix a few things * update and fix sneck tests * remote a metric from the test * another minor tweak to the test * one more minor change * ahh! derp! think I found it finally... hopefully hanging this for the last time... * now use app data * now logs check changes * add a missing ) * add a missing ) * some style fixes * update the sneck page use to the app data stuff * update the poller to use the new app data * misc * update sneck to log check status changes * correct alert log messages * correct a comment * fix metrics * derp, another fix * test fix * re-order to avoid warning * poller update * update sneck graphs * update sneck graphs * remove a unneeded line * test update for discovery * minor tweaks to the test and fix update the polling a bit * style fix * fix return data printing * fix the test data to include app data * attempted test fix * add config def to apps.sneck.polling_time_diff * cleanup docs a bit * minor config tweaks * minor doc cleanup
30 lines
673 B
PHP
30 lines
673 B
PHP
<?php
|
|
|
|
$name = 'sneck';
|
|
$unit_text = 'Diff In Secs';
|
|
$colours = 'psychedelic';
|
|
$dostack = 0;
|
|
$printtotal = 0;
|
|
$addarea = 0;
|
|
$transparency = 15;
|
|
|
|
$rrd_filename = Rrd::name($device['hostname'], ['app', $name, $app->app_id]);
|
|
|
|
$rrd_list = [];
|
|
if (Rrd::checkRrdExists($rrd_filename)) {
|
|
$rrd_list[] = [
|
|
'filename' => $rrd_filename,
|
|
'descr' => 'On Dev',
|
|
'ds' => 'time',
|
|
];
|
|
$rrd_list[] = [
|
|
'filename' => $rrd_filename,
|
|
'descr' => 'To Polling',
|
|
'ds' => 'time_to_polling',
|
|
];
|
|
} else {
|
|
d_echo('RRD "' . $rrd_filename . '" not found');
|
|
}
|
|
|
|
require 'includes/html/graphs/generic_multi_line.inc.php';
|