mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Polling poller debug (#14691)
* Add poller_name to debug * Documentation * Clarify debug output var is for traceroute. * Fix -hopefully * StyleCI
This commit is contained in:
@@ -151,7 +151,7 @@ class ConnectivityHelper
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
'traceroute' => $process->getOutput(),
|
'traceroute' => $process->getOutput(),
|
||||||
'output' => $process->getErrorOutput(),
|
'traceroute_output' => $process->getErrorOutput(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -201,8 +201,9 @@ class ConnectivityHelper
|
|||||||
private function savePingStats(FpingResponse $ping_response): void
|
private function savePingStats(FpingResponse $ping_response): void
|
||||||
{
|
{
|
||||||
$perf = $ping_response->toModel();
|
$perf = $ping_response->toModel();
|
||||||
|
$perf->debug = ['poller_name'=>Config::get('distributed_poller_name')];
|
||||||
if (! $ping_response->success() && Config::get('debug.run_trace', false)) {
|
if (! $ping_response->success() && Config::get('debug.run_trace', false)) {
|
||||||
$perf->debug = $this->traceroute();
|
$perf->debug = array_merge($perf->debug, $this->traceroute());
|
||||||
}
|
}
|
||||||
$this->device->perf()->save($perf);
|
$this->device->perf()->save($perf);
|
||||||
$this->device->last_ping_timetaken = $ping_response->avg_latency ?: $this->device->last_ping_timetaken;
|
$this->device->last_ping_timetaken = $ping_response->avg_latency ?: $this->device->last_ping_timetaken;
|
||||||
|
@@ -64,9 +64,11 @@ been up for 30344 seconds`.
|
|||||||
- ping min (if icmp enabled): `$alert->ping_min`
|
- ping min (if icmp enabled): `$alert->ping_min`
|
||||||
- ping max (if icmp enabled): `$alert->ping_max`
|
- ping max (if icmp enabled): `$alert->ping_max`
|
||||||
- ping avg (if icmp enabled): `$alert->ping_avg`
|
- ping avg (if icmp enabled): `$alert->ping_avg`
|
||||||
- debug (array) If `$config['debug']['run_trace] = true;` is set then this will contain:
|
- debug (array)
|
||||||
- traceroute (if enabled you will receive traceroute output): `$alert->debug['traceroute']`
|
- poller_name - name of poller (for distributed setups)
|
||||||
- output (if the traceroute fails this will contain why): `$alert->debug['output']`
|
- If `$config['debug']['run_trace] = true;` is set then this will contain:
|
||||||
|
- traceroute (if enabled you will receive traceroute output): `$alert->debug['traceroute']`
|
||||||
|
- traceroute_output (if the traceroute fails this will contain why): `$alert->debug['output']`
|
||||||
- Title for the Alert: `$alert->title`
|
- Title for the Alert: `$alert->title`
|
||||||
- Time Elapsed, Only available on recovery (`$alert->state == 0`): `$alert->elapsed`
|
- Time Elapsed, Only available on recovery (`$alert->state == 0`): `$alert->elapsed`
|
||||||
- Rule Builder (the actual rule) (use `{!! $alert->builder !!}`): `$alert->builder`
|
- Rule Builder (the actual rule) (use `{!! $alert->builder !!}`): `$alert->builder`
|
||||||
|
Reference in New Issue
Block a user