Apply fixes from StyleCI (#14899)

Co-authored-by: StyleCI Bot <bot@styleci.io>
This commit is contained in:
Jellyfrog 2023-03-13 22:32:22 +01:00 committed by GitHub
parent 0e322ae5d5
commit 68e0b3df28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
220 changed files with 2050 additions and 2035 deletions

View File

@ -39,7 +39,6 @@ class AlertRules
{
public function runRules($device_id)
{
//Check to see if under maintenance
if (AlertUtil::isMaintenance($device_id) > 0) {
echo "Under Maintenance, skipping alert rules check.\r\n";

View File

@ -70,7 +70,7 @@ class Alertmanager extends Transport
unset($api['url']);
foreach ($api as $label => $value) {
// To allow dynamic values
if ((preg_match('/^extra_[A-Za-z0-9_]+$/', $label)) && (! empty($obj['faults'][1][$value]))) {
if (preg_match('/^extra_[A-Za-z0-9_]+$/', $label) && (! empty($obj['faults'][1][$value]))) {
$data[0]['labels'][$label] = $obj['faults'][1][$value];
} else {
$data[0]['labels'][$label] = $value;

View File

@ -90,7 +90,6 @@ class Boxcar extends Transport
default:
$title_text = $severity;
break;
}
$data['notification[title]'] = $title_text . ' - ' . $obj['hostname'] . ' - ' . $obj['name'];
$message_text = 'Timestamp: ' . $obj['timestamp'];

View File

@ -21,6 +21,7 @@
*
* @copyright 2018 Ryan Finney
* @author https://github.com/theherodied/
*
* @contributer f0o, sdef2
* Thanks to F0o <f0o@devilcode.org> for creating the Slack transport which is the majority of this code.
* Thanks to sdef2 for figuring out the differences needed to make Discord work.

View File

@ -56,7 +56,7 @@ class Telegram extends Transport
if (! empty($data['message_thread_id'])) {
$messageThreadId = '&message_thread_id=' . $data['message_thread_id'];
}
curl_setopt($curl, CURLOPT_URL, ("https://api.telegram.org/bot{$data['token']}/sendMessage?chat_id={$data['chat_id']}$messageThreadId&text=$text{$format}"));
curl_setopt($curl, CURLOPT_URL, "https://api.telegram.org/bot{$data['token']}/sendMessage?chat_id={$data['chat_id']}$messageThreadId&text=$text{$format}");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$ret = curl_exec($curl);
$code = curl_getinfo($curl, CURLINFO_HTTP_CODE);

View File

@ -70,7 +70,7 @@ class QueryBuilderFilter implements \JsonSerializable
continue; // don't include the time based macros, they don't work like that
}
if ((Str::endsWith($key, '_usage_perc')) || (Str::startsWith($key, 'packet_loss_'))) {
if (Str::endsWith($key, '_usage_perc') || Str::startsWith($key, 'packet_loss_')) {
$this->filter[$field] = [
'id' => $field,
'type' => 'integer',

View File

@ -347,11 +347,11 @@ class NetSnmpQuery implements SnmpQueryInterface
case 'authpriv':
array_push($cmd, '-x', $this->device->cryptoalgo);
array_push($cmd, '-X', $this->device->cryptopass);
// fallthrough
// fallthrough
case 'authnopriv':
array_push($cmd, '-a', $this->device->authalgo);
array_push($cmd, '-A', $this->device->authpass);
// fallthrough
// fallthrough
case 'noauthnopriv':
array_push($cmd, '-u', $this->device->authname ?: 'root');
break;

View File

@ -656,9 +656,9 @@ class Rrd extends BaseDatastore
$substr_count_length = $length <= 0 ? null : min(strlen($descr), $length);
$extra = substr_count($descr, ':', 0, $substr_count_length);
$result = substr(str_pad($result, $length), 0, ($length + $extra));
$result = substr(str_pad($result, $length), 0, $length + $extra);
if ($extra > 0) {
$result = substr($result, 0, (-1 * $extra));
$result = substr($result, 0, -1 * $extra);
}
}

View File

@ -27,7 +27,7 @@ namespace LibreNMS\Enum;
use LibreNMS\Config;
enum ImageFormat : string
enum ImageFormat: string
{
case png = 'png';
case svg = 'svg';

View File

@ -225,7 +225,7 @@ class IRCBot
return false;
}
if (($this->socket['alert'] = fopen($f, 'r+'))) {
if ($this->socket['alert'] = fopen($f, 'r+')) {
$this->log('Opened Alert-File');
stream_set_blocking($this->socket['alert'], false);
@ -246,7 +246,7 @@ class IRCBot
$r = strlen($r);
if (strstr($this->buff[$buff], "\n")) {
$tmp = explode("\n", $this->buff[$buff], 2);
$this->buff[$buff] = substr($this->buff[$buff], (strlen($tmp[0]) + 1));
$this->buff[$buff] = substr($this->buff[$buff], strlen($tmp[0]) + 1);
if ($this->debug) {
$this->log("Returning buffer '$buff': '" . trim($tmp[0]) . "'");
}
@ -369,7 +369,7 @@ class IRCBot
}
}
if (($this->config['irc_ctcp']) && (preg_match('/^:' . chr(1) . '.*/', $ex[3]))) {
if ($this->config['irc_ctcp'] && preg_match('/^:' . chr(1) . '.*/', $ex[3])) {
// Handle CTCP
$ctcp = trim(preg_replace('/[^A-Z]/', '', $ex[3]));
$ctcp_reply = null;
@ -529,7 +529,7 @@ class IRCBot
if ($try > $this->max_retry) {
$this->log('Failed too many connection attempts, aborting');
return exit();
return exit;
}
$this->log('Trying to connect (' . ($try + 1) . ') to ' . $this->server . ':' . $this->port . ($this->ssl ? ' (SSL)' : ''));
@ -612,7 +612,7 @@ class IRCBot
} catch (\PDOException $e) {
$this->log('Cannot connect to MySQL: ' . $e->getMessage());
return exit();
return exit;
}
}
@ -765,7 +765,7 @@ class IRCBot
if ($this->user['level'] == 10) {
$this->ircRaw('QUIT :Requested');
return exit();
return exit;
} else {
return $this->respond('Permission denied.');
}

View File

@ -112,7 +112,7 @@ class PrinterSupplies implements Module
'toner',
Alert::NOTICE,
$toner['supply_id']
);
);
}
$toner->supply_current = $tonerperc;

View File

@ -89,7 +89,7 @@ class Allied extends OS implements OSDiscovery
$serial = snmp_get($this->getDeviceArray(), 'arBoardSerialNumber.1', '-OsvQU', 'AT-INTERFACES-MIB');
//AT-GS950/24 Gigabit Ethernet WebSmart Switch
//Also requires system description as no OIDs provide $hardware
//Also requires system description as no OIDs provide $hardware
} elseif ($d == 'WebSmart' && $e == 'Switch') {
$version = snmp_get($this->getDeviceArray(), 'swhub.167.81.1.3.0', '-OsvQU', 'AtiL2-MIB');
$version = $d . ' ' . $version;

View File

@ -34,9 +34,9 @@ use LibreNMS\OS\Shared\Fortinet;
use LibreNMS\RRD\RrdDefinition;
class Fortigate extends Fortinet implements
OSPolling,
WirelessClientsDiscovery,
WirelessApCountDiscovery
OSPolling,
WirelessClientsDiscovery,
WirelessApCountDiscovery
{
public function discoverOS(Device $device): void
{

View File

@ -13,8 +13,7 @@ class Ruckuswireless extends OS implements
{
public function discoverWirelessClients()
{
// Find Per SSID Client Count
// Find Per SSID Client Count
$sensors = [];
$ssids = $this->getCacheByIndex('ruckusZDWLANSSID', 'RUCKUS-ZD-WLAN-MIB');
$counts = $this->getCacheByIndex('ruckusZDWLANNumSta', 'RUCKUS-ZD-WLAN-MIB');
@ -42,7 +41,7 @@ class Ruckuswireless extends OS implements
if (count($total_oids) > 1) {
// Find Total Client Count
$oid = '.1.3.6.1.4.1.25053.1.2.1.1.1.15.2.0'; //RUCKUS-ZD-SYSTEM-MIB::ruckusZDSystemStatsNumSta.0
array_push($sensors, new WirelessSensor('clients', $this->getDeviceId(), $oid, 'ruckuswireless', ($index + 1), 'System Total:'));
array_push($sensors, new WirelessSensor('clients', $this->getDeviceId(), $oid, 'ruckuswireless', $index + 1, 'System Total:'));
}
return $sensors;
@ -56,13 +55,13 @@ class Ruckuswireless extends OS implements
$oidtotal = '.1.3.6.1.4.1.25053.1.2.1.1.1.15.15.0'; //RUCKUS-ZD-SYSTEM-MIB::ruckusZDSystemStatsNumRegisteredAP.0
$sensorindex = 0;
$sensors[] = new WirelessSensor(
'ap-count',
$this->getDeviceId(),
$oidconnected,
'ruckuswireless',
++$sensorindex,
'Connected APs'
);
'ap-count',
$this->getDeviceId(),
$oidconnected,
'ruckuswireless',
++$sensorindex,
'Connected APs'
);
array_push($sensors, new WirelessSensor('ap-count', $this->getDeviceId(), $oidtotal, 'ruckuswireless', ++$sensorindex, 'Total APs'));

View File

@ -55,7 +55,7 @@ class RuckuswirelessSz extends OS implements
if (count($total_oids) > 1) {
// clients - Discover System Total Client Count
$oid = '.1.3.6.1.4.1.25053.1.4.1.1.1.15.2.0'; //RUCKUS-SZ-SYSTEM-MIB::ruckusSZSystemStatsNumSta.0
array_push($sensors, new WirelessSensor('clients', $this->getDeviceId(), $oid, 'ruckuswireless-sz', ($index + 1), 'System Total:'));
array_push($sensors, new WirelessSensor('clients', $this->getDeviceId(), $oid, 'ruckuswireless-sz', $index + 1, 'System Total:'));
}
return $sensors;

View File

@ -430,7 +430,7 @@ class Cisco extends OS implements
$rtt_type = $sla->rtt_type;
// Lets process each SLA
$unixtime = intval(($data[$sla_nr]['rttMonLatestRttOperTime'] / 100 + $time_offset));
$unixtime = intval($data[$sla_nr]['rttMonLatestRttOperTime'] / 100 + $time_offset);
$time = date('Y-m-d H:i:s', $unixtime);
// Save data

View File

@ -57,7 +57,7 @@ class Zyxel extends OS
return;
}
$device->hardware = $data['.1.3.6.1.4.1.890.1.15.3.1.11.0'] ?? null;
[$device->version,] = explode(' | ', $data['.1.3.6.1.4.1.890.1.15.3.1.6.0'] ?? null);
[$device->version] = explode(' | ', $data['.1.3.6.1.4.1.890.1.15.3.1.6.0'] ?? null);
$device->serial = $data['.1.3.6.1.4.1.890.1.15.3.1.12.0'] ?? null;
}
}

View File

@ -37,7 +37,7 @@ class ThreeCom extends OS implements OSDiscovery
if (Str::contains($device->sysDescr, 'Software')) {
$device->hardware = str_replace('3Com ', '', substr($device->sysDescr, 0, strpos($device->sysDescr, 'Software')));
// Version is the last word in the sysDescr's first line
[$device->version] = explode("\n", substr($device->sysDescr, (strpos($device->sysDescr, 'Version') + 8)));
[$device->version] = explode("\n", substr($device->sysDescr, strpos($device->sysDescr, 'Version') + 8));
return;
}

View File

@ -467,7 +467,7 @@ class Vrp extends OS implements
// We have at least 1 SSID, so we can count the total of STA
$sensors[] = new WirelessSensor(
'clients',
$this->getDeviceId(),
$this->getDeviceId(),
$ssid_total_oid_array,
'vrp-clients',
'total-all-ssids',

View File

@ -20,18 +20,18 @@ class HpFault implements SnmptrapHandler
{
$type = $trap->getOidData($trap->findOid('HP-ICF-FAULT-FINDER-MIB::hpicfFfLogFaultType'));
switch ($type) {
case 'badXcvr':
$trap->log('Fault - CRC Error ' . $trap->getOidData($trap->findOid('HP-ICF-FAULT-FINDER-MIB::hpicfFfFaultInfoURL')), 4, $type);
break;
case 'badCable':
$trap->log('Fault - Bad Cable ' . $trap->getOidData($trap->findOid('HP-ICF-FAULT-FINDER-MIB::hpicfFfFaultInfoURL')), 4, $type);
break;
case 'bcastStorm':
$trap->log('Fault - Broadcaststorm ' . $trap->getOidData($trap->findOid('HP-ICF-FAULT-FINDER-MIB::hpicfFfFaultInfoURL')), 5, $type);
break;
default:
$trap->log('Fault - Unhandled ' . $trap->getOidData($trap->findOid('HP-ICF-FAULT-FINDER-MIB::hpicfFfFaultInfoURL')), 2, $type);
break;
}
case 'badXcvr':
$trap->log('Fault - CRC Error ' . $trap->getOidData($trap->findOid('HP-ICF-FAULT-FINDER-MIB::hpicfFfFaultInfoURL')), 4, $type);
break;
case 'badCable':
$trap->log('Fault - Bad Cable ' . $trap->getOidData($trap->findOid('HP-ICF-FAULT-FINDER-MIB::hpicfFfFaultInfoURL')), 4, $type);
break;
case 'bcastStorm':
$trap->log('Fault - Broadcaststorm ' . $trap->getOidData($trap->findOid('HP-ICF-FAULT-FINDER-MIB::hpicfFfFaultInfoURL')), 5, $type);
break;
default:
$trap->log('Fault - Unhandled ' . $trap->getOidData($trap->findOid('HP-ICF-FAULT-FINDER-MIB::hpicfFfFaultInfoURL')), 2, $type);
break;
}
}
}

View File

@ -295,7 +295,7 @@ SVG;
$px = (int) ((imagesx($img) - 7.5 * strlen($text)) / 2);
$font = $width < 200 ? 3 : 5;
imagestring($img, $font, $px, ($height / 2 - 8), $text, imagecolorallocate($img, ...$color));
imagestring($img, $font, $px, $height / 2 - 8, $text, imagecolorallocate($img, ...$color));
// Output the image
ob_start();

View File

@ -489,7 +489,7 @@ class ModuleTestHelper
foreach ($snmprec_data as $line) {
if (! empty($line)) {
[$oid,] = explode('|', $line, 2);
[$oid] = explode('|', $line, 2);
$result[$oid] = $line;
}
}

View File

@ -45,14 +45,14 @@ class Number
if ($value >= '0.1') {
$sizes = ['', 'k', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y'];
$ext = $sizes[0];
for ($i = 1; (($i < count($sizes)) && ($value >= 1000)); $i++) {
for ($i = 1; ($i < count($sizes)) && ($value >= 1000); $i++) {
$value = $value / 1000;
$ext = $sizes[$i];
}
} else {
$sizes = ['', 'm', 'u', 'n', 'p'];
$ext = $sizes[0];
for ($i = 1; (($i < count($sizes)) && ($value != 0) && ($value <= 0.1)); $i++) {
for ($i = 1; ($i < count($sizes)) && ($value != 0) && ($value <= 0.1); $i++) {
$value = $value * 1000;
$ext = $sizes[$i];
}
@ -74,7 +74,7 @@ class Number
}
$sizes = ['', 'Ki', 'Mi', 'Gi', 'Ti', 'Pi', 'Ei', 'Zi', 'Yi'];
$ext = $sizes[0];
for ($i = 1; (($i < count($sizes)) && ($value >= 1024)); $i++) {
for ($i = 1; ($i < count($sizes)) && ($value >= 1024); $i++) {
$value = $value / 1024;
$ext = $sizes[$i];
}

View File

@ -155,7 +155,7 @@ class Rewrite
*/
public static function readableOUI($mac)
{
$cached = Cache::get('OUIDB-' . (substr($mac, 0, 6)), '');
$cached = Cache::get('OUIDB-' . substr($mac, 0, 6), '');
if ($cached == 'IEEE Registration Authority') {
// Then we may have a shorter prefix, so let's try them one ater the other, ordered by probability
return Cache::get('OUIDB-' . substr($mac, 0, 9)) ?: Cache::get('OUIDB-' . substr($mac, 0, 7));

View File

@ -50,7 +50,7 @@ class CheckDatabaseServerVersion implements Validation
trans('validation.validations.database.CheckDatabaseServerVersion.fix', ['server' => 'MariaDB', 'suggested' => Database::MARIADB_RECOMMENDED_VERSION]),
);
}
break;
break;
case 'MySQL':
if (version_compare($version, Database::MYSQL_MIN_VERSION, '<=')) {
return ValidationResult::fail(
@ -58,7 +58,7 @@ class CheckDatabaseServerVersion implements Validation
trans('validation.validations.database.CheckDatabaseServerVersion.fix', ['server' => 'MySQL', 'suggested' => Database::MYSQL_RECOMMENDED_VERSION]),
);
}
break;
break;
}
return ValidationResult::ok(trans('validation.validations.database.CheckDatabaseServerVersion.ok'));

View File

@ -111,7 +111,6 @@ class Updates extends BaseValidation
$modifiedcmd = 'git diff --name-only --exit-code';
$validator->execAsUser($modifiedcmd, $cmdoutput, $code);
if ($code !== 0 && ! empty($cmdoutput)) {
// Check so it's not only plugins that "pests" the diff
if (! ($cmdoutput === ['composer.json', 'composer.lock'] && ComposerHelper::getPlugins())) {
$result = ValidationResult::warn(

View File

@ -116,14 +116,14 @@ class DevSimulate extends LnmsCommand
{
if (function_exists('pcntl_signal')) {
pcntl_signal(SIGINT, function () {
exit(); // exit normally on SIGINT
exit; // exit normally on SIGINT
});
}
register_shutdown_function(function () use ($device_id) {
Device::findOrNew($device_id)->delete();
$this->info(trans('commands.dev:simulate.removed', ['id' => $device_id]));
exit();
exit;
});
}

View File

@ -97,8 +97,8 @@ class KeyRotate extends LnmsCommand
if ($this->option('generate-new-key')) {
$old = $new; // use key in env as existing key
$new = 'base64:' . base64_encode(
Encrypter::generateKey($this->laravel['config']['app.cipher'])
);
Encrypter::generateKey($this->laravel['config']['app.cipher'])
);
}
$this->line(trans('commands.key:rotate.old_key', ['key' => $old]));

View File

@ -35,7 +35,7 @@ class NetflowController implements DeviceTab
{
if (Config::get('nfsen_enable')) {
foreach ((array) Config::get('nfsen_rrds', []) as $nfsenrrds) {
if ($nfsenrrds[(strlen($nfsenrrds) - 1)] != '/') {
if ($nfsenrrds[strlen($nfsenrrds) - 1] != '/') {
$nfsenrrds .= '/';
}

View File

@ -104,7 +104,7 @@ class ShowConfigController extends Controller implements DeviceTab
if (Config::has('rancid_configs.0')) {
$device = DeviceCache::getPrimary();
foreach (Config::get('rancid_configs') as $configs) {
if ($configs[(strlen($configs) - 1)] != '/') {
if ($configs[strlen($configs) - 1] != '/') {
$configs .= '/';
}

View File

@ -76,6 +76,7 @@ abstract class PaginatedAjaxController extends Controller
*
* @param \Illuminate\Http\Request $request
* @return array
*
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
protected function searchFields($request)
@ -88,6 +89,7 @@ abstract class PaginatedAjaxController extends Controller
*
* @param \Illuminate\Http\Request $request
* @return array
*
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
protected function filterFields($request)
@ -100,6 +102,7 @@ abstract class PaginatedAjaxController extends Controller
*
* @param \Illuminate\Http\Request $request
* @return array
*
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
protected function sortFields($request)

View File

@ -49,6 +49,7 @@ class EventlogController extends SelectController
*
* @param \Illuminate\Http\Request $request
* @return array
*
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
protected function sortFields($request)

View File

@ -35,6 +35,7 @@ class LocationController extends TableController
*
* @param \Illuminate\Http\Request $request
* @return array
*
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function searchFields($request)

View File

@ -113,7 +113,7 @@ class OutagesController extends TableController
}
$output = "<span style='display:inline;'>";
$output .= (Carbon::createFromTimestamp($timestamp))->format(Config::get('dateformat.compact')); // Convert epoch to local time
$output .= Carbon::createFromTimestamp($timestamp)->format(Config::get('dateformat.compact')); // Convert epoch to local time
$output .= '</span>';
return $output;

View File

@ -27,7 +27,6 @@ class QueryDebugListener
public function handle(QueryExecuted $query)
{
if (Debug::queryDebugIsEnabled()) {
// collect bindings and make them a little more readable
$bindings = collect($query->bindings)->map(function ($item) {
if ($item instanceof \Carbon\Carbon) {

View File

@ -23,6 +23,7 @@ use LibreNMS\Alert\Transport;
* @method static \Illuminate\Database\Eloquent\Builder|AlertTransport whereTransportId($value)
* @method static \Illuminate\Database\Eloquent\Builder|AlertTransport whereTransportName($value)
* @method static \Illuminate\Database\Eloquent\Builder|AlertTransport whereTransportType($value)
*
* @mixin \Eloquent
*/
class AlertTransport extends Model

View File

@ -106,7 +106,7 @@ class Port extends DeviceRelatedModel
*/
public function getDescription(): string
{
return (string) ($this->ifAlias);
return (string) $this->ifAlias;
}
/**

View File

@ -42,7 +42,6 @@ class EventServiceProvider extends ServiceProvider
*/
public function boot()
{
//
}
}

View File

@ -38,7 +38,6 @@ class RouteServiceProvider extends ServiceProvider
//$this->configureRateLimiting();
$this->routes(function () {
/**
* Define the "api" routes for the application.
*

View File

@ -8,250 +8,250 @@
| request an environment variable to be created upstream or send a pull request.
*/
return [
return [
/*
|--------------------------------------------------------------------------
| Application Name
|--------------------------------------------------------------------------
|
| This value is the name of your application. This value is used when the
| framework needs to place the application's name in a notification or
| any other location as required by the application or its packages.
|
*/
/*
|--------------------------------------------------------------------------
| Application Name
|--------------------------------------------------------------------------
|
| This value is the name of your application. This value is used when the
| framework needs to place the application's name in a notification or
| any other location as required by the application or its packages.
|
*/
'name' => env('APP_NAME', 'LibreNMS'),
'name' => env('APP_NAME', 'LibreNMS'),
/*
|--------------------------------------------------------------------------
| Application Environment
|--------------------------------------------------------------------------
|
| This value determines the "environment" your application is currently
| running in. This may determine how you prefer to configure various
| services the application utilizes. Set this in your ".env" file.
|
*/
/*
|--------------------------------------------------------------------------
| Application Environment
|--------------------------------------------------------------------------
|
| This value determines the "environment" your application is currently
| running in. This may determine how you prefer to configure various
| services the application utilizes. Set this in your ".env" file.
|
*/
'env' => env('APP_ENV', 'production'),
'env' => env('APP_ENV', 'production'),
/*
|--------------------------------------------------------------------------
| Application Debug Mode
|--------------------------------------------------------------------------
|
| When your application is in debug mode, detailed error messages with
| stack traces will be shown on every error that occurs within your
| application. If disabled, a simple generic error page is shown.
|
*/
/*
|--------------------------------------------------------------------------
| Application Debug Mode
|--------------------------------------------------------------------------
|
| When your application is in debug mode, detailed error messages with
| stack traces will be shown on every error that occurs within your
| application. If disabled, a simple generic error page is shown.
|
*/
'debug' => (bool) env('APP_DEBUG', false),
'debug' => (bool) env('APP_DEBUG', false),
/*
|--------------------------------------------------------------------------
| Application URL
|--------------------------------------------------------------------------
|
| This URL is used by the console to properly generate URLs when using
| the Artisan command line tool. You should set this to the root of
| your application so that it is used when running Artisan tasks.
|
*/
/*
|--------------------------------------------------------------------------
| Application URL
|--------------------------------------------------------------------------
|
| This URL is used by the console to properly generate URLs when using
| the Artisan command line tool. You should set this to the root of
| your application so that it is used when running Artisan tasks.
|
*/
'url' => env('APP_URL', 'http://localhost'),
'url' => env('APP_URL', 'http://localhost'),
'asset_url' => env('ASSET_URL', null),
'asset_url' => env('ASSET_URL', null),
/*
|--------------------------------------------------------------------------
| Application Timezone
|--------------------------------------------------------------------------
|
| Here you may specify the default timezone for your application, which
| will be used by the PHP date and date-time functions. We have gone
| ahead and set this to a sensible default for you out of the box.
|
*/
/*
|--------------------------------------------------------------------------
| Application Timezone
|--------------------------------------------------------------------------
|
| Here you may specify the default timezone for your application, which
| will be used by the PHP date and date-time functions. We have gone
| ahead and set this to a sensible default for you out of the box.
|
*/
'timezone' => ini_get('date.timezone') ?: 'UTC', // use existing timezone
'timezone' => ini_get('date.timezone') ?: 'UTC', // use existing timezone
/*
|--------------------------------------------------------------------------
| Application Locale Configuration
|--------------------------------------------------------------------------
|
| The application locale determines the default locale that will be used
| by the translation service provider. You are free to set this value
| to any of the locales which will be supported by the application.
|
*/
/*
|--------------------------------------------------------------------------
| Application Locale Configuration
|--------------------------------------------------------------------------
|
| The application locale determines the default locale that will be used
| by the translation service provider. You are free to set this value
| to any of the locales which will be supported by the application.
|
*/
'locale' => env('APP_LOCALE', 'en'),
'locale' => env('APP_LOCALE', 'en'),
/*
|--------------------------------------------------------------------------
| Application Fallback Locale
|--------------------------------------------------------------------------
|
| The fallback locale determines the locale to use when the current one
| is not available. You may change the value to correspond to any of
| the language folders that are provided through your application.
|
*/
/*
|--------------------------------------------------------------------------
| Application Fallback Locale
|--------------------------------------------------------------------------
|
| The fallback locale determines the locale to use when the current one
| is not available. You may change the value to correspond to any of
| the language folders that are provided through your application.
|
*/
'fallback_locale' => 'en',
'fallback_locale' => 'en',
/*
|--------------------------------------------------------------------------
| Faker Locale
|--------------------------------------------------------------------------
|
| This locale will be used by the Faker PHP library when generating fake
| data for your database seeds. For example, this will be used to get
| localized telephone numbers, street address information and more.
|
*/
/*
|--------------------------------------------------------------------------
| Faker Locale
|--------------------------------------------------------------------------
|
| This locale will be used by the Faker PHP library when generating fake
| data for your database seeds. For example, this will be used to get
| localized telephone numbers, street address information and more.
|
*/
'faker_locale' => 'en_US',
'faker_locale' => 'en_US',
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| This key is used by the Illuminate encrypter service and should be set
| to a random, 32 character string, otherwise these encrypted strings
| will not be safe. Please do this before deploying an application!
|
*/
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| This key is used by the Illuminate encrypter service and should be set
| to a random, 32 character string, otherwise these encrypted strings
| will not be safe. Please do this before deploying an application!
|
*/
'key' => env('APP_KEY'),
'key' => env('APP_KEY'),
'cipher' => 'AES-256-CBC',
'cipher' => 'AES-256-CBC',
/*
|--------------------------------------------------------------------------
| Autoloaded Service Providers
|--------------------------------------------------------------------------
|
| The service providers listed here will be automatically loaded on the
| request to your application. Feel free to add your own services to
| this array to grant expanded functionality to your applications.
|
*/
/*
|--------------------------------------------------------------------------
| Autoloaded Service Providers
|--------------------------------------------------------------------------
|
| The service providers listed here will be automatically loaded on the
| request to your application. Feel free to add your own services to
| this array to grant expanded functionality to your applications.
|
*/
'providers' => [
'providers' => [
/*
* Laravel Framework Service Providers...
*/
Illuminate\Auth\AuthServiceProvider::class,
Illuminate\Broadcasting\BroadcastServiceProvider::class,
Illuminate\Bus\BusServiceProvider::class,
Illuminate\Cache\CacheServiceProvider::class,
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
Illuminate\Cookie\CookieServiceProvider::class,
Illuminate\Database\DatabaseServiceProvider::class,
Illuminate\Encryption\EncryptionServiceProvider::class,
Illuminate\Filesystem\FilesystemServiceProvider::class,
Illuminate\Foundation\Providers\FoundationServiceProvider::class,
Illuminate\Hashing\HashServiceProvider::class,
Illuminate\Mail\MailServiceProvider::class,
Illuminate\Notifications\NotificationServiceProvider::class,
Illuminate\Pagination\PaginationServiceProvider::class,
Illuminate\Pipeline\PipelineServiceProvider::class,
Illuminate\Queue\QueueServiceProvider::class,
Illuminate\Redis\RedisServiceProvider::class,
Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
Illuminate\Session\SessionServiceProvider::class,
Illuminate\Translation\TranslationServiceProvider::class,
Illuminate\Validation\ValidationServiceProvider::class,
Illuminate\View\ViewServiceProvider::class,
/*
* Laravel Framework Service Providers...
*/
Illuminate\Auth\AuthServiceProvider::class,
Illuminate\Broadcasting\BroadcastServiceProvider::class,
Illuminate\Bus\BusServiceProvider::class,
Illuminate\Cache\CacheServiceProvider::class,
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
Illuminate\Cookie\CookieServiceProvider::class,
Illuminate\Database\DatabaseServiceProvider::class,
Illuminate\Encryption\EncryptionServiceProvider::class,
Illuminate\Filesystem\FilesystemServiceProvider::class,
Illuminate\Foundation\Providers\FoundationServiceProvider::class,
Illuminate\Hashing\HashServiceProvider::class,
Illuminate\Mail\MailServiceProvider::class,
Illuminate\Notifications\NotificationServiceProvider::class,
Illuminate\Pagination\PaginationServiceProvider::class,
Illuminate\Pipeline\PipelineServiceProvider::class,
Illuminate\Queue\QueueServiceProvider::class,
Illuminate\Redis\RedisServiceProvider::class,
Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
Illuminate\Session\SessionServiceProvider::class,
Illuminate\Translation\TranslationServiceProvider::class,
Illuminate\Validation\ValidationServiceProvider::class,
Illuminate\View\ViewServiceProvider::class,
/*
* Package Service Providers...
*/
/*
* Package Service Providers...
*/
/*
* LibreNMS Service Providers...
*/
App\Providers\ConfigServiceProvider::class,
App\Providers\ErrorReportingProvider::class, // This should always be after the config is loaded
App\Providers\AppServiceProvider::class,
App\Providers\CliServiceProvider::class,
App\Providers\AuthServiceProvider::class,
// App\Providers\BroadcastServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
App\Providers\ComposerServiceProvider::class,
App\Providers\DatastoreServiceProvider::class,
App\Providers\SnmptrapProvider::class,
App\Providers\PluginProvider::class,
],
/*
* LibreNMS Service Providers...
*/
App\Providers\ConfigServiceProvider::class,
App\Providers\ErrorReportingProvider::class, // This should always be after the config is loaded
App\Providers\AppServiceProvider::class,
App\Providers\CliServiceProvider::class,
App\Providers\AuthServiceProvider::class,
// App\Providers\BroadcastServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
App\Providers\ComposerServiceProvider::class,
App\Providers\DatastoreServiceProvider::class,
App\Providers\SnmptrapProvider::class,
App\Providers\PluginProvider::class,
],
/*
|--------------------------------------------------------------------------
| Class Aliases
|--------------------------------------------------------------------------
|
| This array of class aliases will be registered when this application
| is started. However, feel free to register as many as you wish as
| the aliases are "lazy" loaded so they don't hinder performance.
|
*/
/*
|--------------------------------------------------------------------------
| Class Aliases
|--------------------------------------------------------------------------
|
| This array of class aliases will be registered when this application
| is started. However, feel free to register as many as you wish as
| the aliases are "lazy" loaded so they don't hinder performance.
|
*/
'aliases' => [
'aliases' => [
'App' => Illuminate\Support\Facades\App::class,
'Arr' => Illuminate\Support\Arr::class,
'Artisan' => Illuminate\Support\Facades\Artisan::class,
'Auth' => Illuminate\Support\Facades\Auth::class,
'Blade' => Illuminate\Support\Facades\Blade::class,
'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
'Bus' => Illuminate\Support\Facades\Bus::class,
'Cache' => Illuminate\Support\Facades\Cache::class,
'Config' => Illuminate\Support\Facades\Config::class,
'Cookie' => Illuminate\Support\Facades\Cookie::class,
'Crypt' => Illuminate\Support\Facades\Crypt::class,
'Date' => Illuminate\Support\Facades\Date::class,
'DB' => Illuminate\Support\Facades\DB::class,
'Eloquent' => Illuminate\Database\Eloquent\Model::class,
'Event' => Illuminate\Support\Facades\Event::class,
'File' => Illuminate\Support\Facades\File::class,
'Gate' => Illuminate\Support\Facades\Gate::class,
'Hash' => Illuminate\Support\Facades\Hash::class,
'Http' => Illuminate\Support\Facades\Http::class,
'Lang' => Illuminate\Support\Facades\Lang::class,
'Log' => Illuminate\Support\Facades\Log::class,
'Mail' => Illuminate\Support\Facades\Mail::class,
'Notification' => Illuminate\Support\Facades\Notification::class,
'Password' => Illuminate\Support\Facades\Password::class,
'Queue' => Illuminate\Support\Facades\Queue::class,
'RateLimiter' => Illuminate\Support\Facades\RateLimiter::class,
'Redirect' => Illuminate\Support\Facades\Redirect::class,
'Redis' => Illuminate\Support\Facades\Redis::class,
'Request' => Illuminate\Support\Facades\Request::class,
'Response' => Illuminate\Support\Facades\Response::class,
'Route' => Illuminate\Support\Facades\Route::class,
'Schema' => Illuminate\Support\Facades\Schema::class,
'Session' => Illuminate\Support\Facades\Session::class,
'Storage' => Illuminate\Support\Facades\Storage::class,
'Str' => Illuminate\Support\Str::class,
'URL' => Illuminate\Support\Facades\URL::class,
'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class,
'Debugbar' => Barryvdh\Debugbar\Facades\Debugbar::class,
'Flare' => Facade\Ignition\Facades\Flare::class,
'App' => Illuminate\Support\Facades\App::class,
'Arr' => Illuminate\Support\Arr::class,
'Artisan' => Illuminate\Support\Facades\Artisan::class,
'Auth' => Illuminate\Support\Facades\Auth::class,
'Blade' => Illuminate\Support\Facades\Blade::class,
'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
'Bus' => Illuminate\Support\Facades\Bus::class,
'Cache' => Illuminate\Support\Facades\Cache::class,
'Config' => Illuminate\Support\Facades\Config::class,
'Cookie' => Illuminate\Support\Facades\Cookie::class,
'Crypt' => Illuminate\Support\Facades\Crypt::class,
'Date' => Illuminate\Support\Facades\Date::class,
'DB' => Illuminate\Support\Facades\DB::class,
'Eloquent' => Illuminate\Database\Eloquent\Model::class,
'Event' => Illuminate\Support\Facades\Event::class,
'File' => Illuminate\Support\Facades\File::class,
'Gate' => Illuminate\Support\Facades\Gate::class,
'Hash' => Illuminate\Support\Facades\Hash::class,
'Http' => Illuminate\Support\Facades\Http::class,
'Lang' => Illuminate\Support\Facades\Lang::class,
'Log' => Illuminate\Support\Facades\Log::class,
'Mail' => Illuminate\Support\Facades\Mail::class,
'Notification' => Illuminate\Support\Facades\Notification::class,
'Password' => Illuminate\Support\Facades\Password::class,
'Queue' => Illuminate\Support\Facades\Queue::class,
'RateLimiter' => Illuminate\Support\Facades\RateLimiter::class,
'Redirect' => Illuminate\Support\Facades\Redirect::class,
'Redis' => Illuminate\Support\Facades\Redis::class,
'Request' => Illuminate\Support\Facades\Request::class,
'Response' => Illuminate\Support\Facades\Response::class,
'Route' => Illuminate\Support\Facades\Route::class,
'Schema' => Illuminate\Support\Facades\Schema::class,
'Session' => Illuminate\Support\Facades\Session::class,
'Storage' => Illuminate\Support\Facades\Storage::class,
'Str' => Illuminate\Support\Str::class,
'URL' => Illuminate\Support\Facades\URL::class,
'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class,
'Debugbar' => Barryvdh\Debugbar\Facades\Debugbar::class,
'Flare' => Facade\Ignition\Facades\Flare::class,
// LibreNMS
'Permissions' => \App\Facades\Permissions::class,
'PluginManager' => \App\Facades\PluginManager::class,
'DeviceCache' => \App\Facades\DeviceCache::class,
'Rrd' => \App\Facades\Rrd::class,
'SnmpQuery' => \App\Facades\FacadeAccessorSnmp::class,
],
// LibreNMS
'Permissions' => \App\Facades\Permissions::class,
'PluginManager' => \App\Facades\PluginManager::class,
'DeviceCache' => \App\Facades\DeviceCache::class,
'Rrd' => \App\Facades\Rrd::class,
'SnmpQuery' => \App\Facades\FacadeAccessorSnmp::class,
],
'charset' => env('CHARSET', ini_get('php.output_encoding') ?: ini_get('default_charset') ?: 'UTF-8'),
];
'charset' => env('CHARSET', ini_get('php.output_encoding') ?: ini_get('default_charset') ?: 'UTF-8'),
];

View File

@ -8,129 +8,129 @@
| request an environment variable to be created upstream or send a pull request.
*/
return [
return [
/*
|--------------------------------------------------------------------------
| Authentication Defaults
|--------------------------------------------------------------------------
|
| This option controls the default authentication "guard" and password
| reset options for your application. You may change these defaults
| as required, but they're a perfect start for most applications.
|
*/
/*
|--------------------------------------------------------------------------
| Authentication Defaults
|--------------------------------------------------------------------------
|
| This option controls the default authentication "guard" and password
| reset options for your application. You may change these defaults
| as required, but they're a perfect start for most applications.
|
*/
'defaults' => [
'guard' => 'web',
'passwords' => 'users',
],
'defaults' => [
'guard' => 'web',
'passwords' => 'users',
],
/*
|--------------------------------------------------------------------------
| Authentication Guards
|--------------------------------------------------------------------------
|
| Next, you may define every authentication guard for your application.
| Of course, a great default configuration has been defined for you
| here which uses session storage and the Eloquent user provider.
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| Supported: "session"
|
*/
/*
|--------------------------------------------------------------------------
| Authentication Guards
|--------------------------------------------------------------------------
|
| Next, you may define every authentication guard for your application.
| Of course, a great default configuration has been defined for you
| here which uses session storage and the Eloquent user provider.
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| Supported: "session"
|
*/
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'legacy',
],
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'legacy',
],
'api' => [
'driver' => 'token',
'provider' => 'users',
'hash' => false,
],
'api' => [
'driver' => 'token',
'provider' => 'users',
'hash' => false,
],
'token' => [
'driver' => 'token_driver',
'provider' => 'token_provider',
'hash' => false,
],
],
'token' => [
'driver' => 'token_driver',
'provider' => 'token_provider',
'hash' => false,
],
],
/*
|--------------------------------------------------------------------------
| User Providers
|--------------------------------------------------------------------------
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| If you have multiple user tables or models you may configure multiple
| sources which represent each model / table. These sources may then
| be assigned to any extra authentication guards you have defined.
|
| Supported: "database", "eloquent"
|
*/
/*
|--------------------------------------------------------------------------
| User Providers
|--------------------------------------------------------------------------
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| If you have multiple user tables or models you may configure multiple
| sources which represent each model / table. These sources may then
| be assigned to any extra authentication guards you have defined.
|
| Supported: "database", "eloquent"
|
*/
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\Models\User::class,
],
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\Models\User::class,
],
'legacy' => [
'driver' => 'legacy',
'model' => App\Models\User::class,
],
'legacy' => [
'driver' => 'legacy',
'model' => App\Models\User::class,
],
// 'users' => [
// 'driver' => 'database',
// 'table' => 'users',
// ],
],
// 'users' => [
// 'driver' => 'database',
// 'table' => 'users',
// ],
],
/*
|--------------------------------------------------------------------------
| Resetting Passwords
|--------------------------------------------------------------------------
|
| You may specify multiple password reset configurations if you have more
| than one user table or model in the application and you want to have
| separate password reset settings based on the specific user types.
|
| The expire time is the number of minutes that the reset token should be
| considered valid. This security feature keeps tokens short-lived so
| they have less time to be guessed. You may change this as needed.
|
*/
/*
|--------------------------------------------------------------------------
| Resetting Passwords
|--------------------------------------------------------------------------
|
| You may specify multiple password reset configurations if you have more
| than one user table or model in the application and you want to have
| separate password reset settings based on the specific user types.
|
| The expire time is the number of minutes that the reset token should be
| considered valid. This security feature keeps tokens short-lived so
| they have less time to be guessed. You may change this as needed.
|
*/
'passwords' => [
'users' => [
'provider' => 'users',
'table' => 'password_resets',
'expire' => 60,
'throttle' => 60,
],
],
'passwords' => [
'users' => [
'provider' => 'users',
'table' => 'password_resets',
'expire' => 60,
'throttle' => 60,
],
],
/*
|--------------------------------------------------------------------------
| Password Confirmation Timeout
|--------------------------------------------------------------------------
|
| Here you may define the amount of seconds before a password confirmation
| times out and the user is prompted to re-enter their password via the
| confirmation screen. By default, the timeout lasts for three hours.
|
*/
/*
|--------------------------------------------------------------------------
| Password Confirmation Timeout
|--------------------------------------------------------------------------
|
| Here you may define the amount of seconds before a password confirmation
| times out and the user is prompted to re-enter their password via the
| confirmation screen. By default, the timeout lasts for three hours.
|
*/
'password_timeout' => 10800,
'password_timeout' => 10800,
];
];

View File

@ -8,65 +8,65 @@
| request an environment variable to be created upstream or send a pull request.
*/
return [
return [
/*
|--------------------------------------------------------------------------
| Default Broadcaster
|--------------------------------------------------------------------------
|
| This option controls the default broadcaster that will be used by the
| framework when an event needs to be broadcast. You may set this to
| any of the connections defined in the "connections" array below.
|
| Supported: "pusher", "ably", "redis", "log", "null"
|
*/
/*
|--------------------------------------------------------------------------
| Default Broadcaster
|--------------------------------------------------------------------------
|
| This option controls the default broadcaster that will be used by the
| framework when an event needs to be broadcast. You may set this to
| any of the connections defined in the "connections" array below.
|
| Supported: "pusher", "ably", "redis", "log", "null"
|
*/
'default' => env('BROADCAST_DRIVER', 'null'),
'default' => env('BROADCAST_DRIVER', 'null'),
/*
|--------------------------------------------------------------------------
| Broadcast Connections
|--------------------------------------------------------------------------
|
| Here you may define all of the broadcast connections that will be used
| to broadcast events to other systems or over websockets. Samples of
| each available type of connection are provided inside this array.
|
*/
/*
|--------------------------------------------------------------------------
| Broadcast Connections
|--------------------------------------------------------------------------
|
| Here you may define all of the broadcast connections that will be used
| to broadcast events to other systems or over websockets. Samples of
| each available type of connection are provided inside this array.
|
*/
'connections' => [
'connections' => [
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'cluster' => env('PUSHER_APP_CLUSTER'),
'useTLS' => true,
],
],
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'cluster' => env('PUSHER_APP_CLUSTER'),
'useTLS' => true,
],
],
'ably' => [
'driver' => 'ably',
'key' => env('ABLY_KEY'),
],
'ably' => [
'driver' => 'ably',
'key' => env('ABLY_KEY'),
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
],
'log' => [
'driver' => 'log',
],
'log' => [
'driver' => 'log',
],
'null' => [
'driver' => 'null',
],
'null' => [
'driver' => 'null',
],
],
],
];
];

View File

@ -8,111 +8,111 @@
| request an environment variable to be created upstream or send a pull request.
*/
use Illuminate\Support\Str;
use Illuminate\Support\Str;
return [
return [
/*
|--------------------------------------------------------------------------
| Default Cache Store
|--------------------------------------------------------------------------
|
| This option controls the default cache connection that gets used while
| using this caching library. This connection is used when another is
| not explicitly specified when executing a given caching function.
|
*/
/*
|--------------------------------------------------------------------------
| Default Cache Store
|--------------------------------------------------------------------------
|
| This option controls the default cache connection that gets used while
| using this caching library. This connection is used when another is
| not explicitly specified when executing a given caching function.
|
*/
'default' => env('CACHE_DRIVER', 'database'),
'default' => env('CACHE_DRIVER', 'database'),
/*
|--------------------------------------------------------------------------
| Cache Stores
|--------------------------------------------------------------------------
|
| Here you may define all of the cache "stores" for your application as
| well as their drivers. You may even define multiple stores for the
| same cache driver to group types of items stored in your caches.
|
| Supported drivers: "apc", "array", "database", "file",
| "memcached", "redis", "dynamodb", "octane", "null"
|
*/
/*
|--------------------------------------------------------------------------
| Cache Stores
|--------------------------------------------------------------------------
|
| Here you may define all of the cache "stores" for your application as
| well as their drivers. You may even define multiple stores for the
| same cache driver to group types of items stored in your caches.
|
| Supported drivers: "apc", "array", "database", "file",
| "memcached", "redis", "dynamodb", "octane", "null"
|
*/
'stores' => [
'stores' => [
'apc' => [
'driver' => 'apc',
],
'apc' => [
'driver' => 'apc',
],
'array' => [
'driver' => 'array',
'serialize' => false,
],
'array' => [
'driver' => 'array',
'serialize' => false,
],
'database' => [
'driver' => 'database',
'table' => 'cache',
'connection' => null,
'lock_connection' => null,
],
'database' => [
'driver' => 'database',
'table' => 'cache',
'connection' => null,
'lock_connection' => null,
],
'file' => [
'driver' => 'file',
'path' => storage_path('framework/cache/data'),
],
'file' => [
'driver' => 'file',
'path' => storage_path('framework/cache/data'),
],
'memcached' => [
'driver' => 'memcached',
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
'sasl' => [
env('MEMCACHED_USERNAME'),
env('MEMCACHED_PASSWORD'),
],
'options' => [
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
],
'servers' => [
[
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
'port' => env('MEMCACHED_PORT', 11211),
'weight' => 100,
],
],
],
'memcached' => [
'driver' => 'memcached',
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
'sasl' => [
env('MEMCACHED_USERNAME'),
env('MEMCACHED_PASSWORD'),
],
'options' => [
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
],
'servers' => [
[
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
'port' => env('MEMCACHED_PORT', 11211),
'weight' => 100,
],
],
],
'redis' => [
'driver' => 'redis',
'connection' => 'cache',
'lock_connection' => 'default',
],
'redis' => [
'driver' => 'redis',
'connection' => 'cache',
'lock_connection' => 'default',
],
'dynamodb' => [
'driver' => 'dynamodb',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
'endpoint' => env('DYNAMODB_ENDPOINT'),
],
'dynamodb' => [
'driver' => 'dynamodb',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
'endpoint' => env('DYNAMODB_ENDPOINT'),
],
'octane' => [
'driver' => 'octane',
],
'octane' => [
'driver' => 'octane',
],
],
],
/*
|--------------------------------------------------------------------------
| Cache Key Prefix
|--------------------------------------------------------------------------
|
| When utilizing a RAM based store such as APC or Memcached, there might
| be other applications utilizing the same cache. So, we'll specify a
| value to get prefixed to all our keys so we can avoid collisions.
|
*/
/*
|--------------------------------------------------------------------------
| Cache Key Prefix
|--------------------------------------------------------------------------
|
| When utilizing a RAM based store such as APC or Memcached, there might
| be other applications utilizing the same cache. So, we'll specify a
| value to get prefixed to all our keys so we can avoid collisions.
|
*/
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_cache'),
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_cache'),
];
];

View File

@ -8,225 +8,225 @@
| request an environment variable to be created upstream or send a pull request.
*/
use Illuminate\Support\Str;
use Illuminate\Support\Str;
return [
return [
/*
|--------------------------------------------------------------------------
| Default Database Connection Name
|--------------------------------------------------------------------------
|
| Here you may specify which of the database connections below you wish
| to use as your default connection for all database work. Of course
| you may use many connections at once using the Database library.
|
*/
/*
|--------------------------------------------------------------------------
| Default Database Connection Name
|--------------------------------------------------------------------------
|
| Here you may specify which of the database connections below you wish
| to use as your default connection for all database work. Of course
| you may use many connections at once using the Database library.
|
*/
'default' => env('DB_CONNECTION', env('DBTEST') ? 'testing' : 'mysql'),
'default' => env('DB_CONNECTION', env('DBTEST') ? 'testing' : 'mysql'),
/*
|--------------------------------------------------------------------------
| Database Connections
|--------------------------------------------------------------------------
|
| Here are each of the database connections setup for your application.
| Of course, examples of configuring each database platform that is
| supported by Laravel is shown below to make development simple.
|
|
| All database work in Laravel is done through the PHP PDO facilities
| so make sure you have the driver for your particular database of
| choice installed on your machine before you begin development.
|
*/
/*
|--------------------------------------------------------------------------
| Database Connections
|--------------------------------------------------------------------------
|
| Here are each of the database connections setup for your application.
| Of course, examples of configuring each database platform that is
| supported by Laravel is shown below to make development simple.
|
|
| All database work in Laravel is done through the PHP PDO facilities
| so make sure you have the driver for your particular database of
| choice installed on your machine before you begin development.
|
*/
'connections' => [
'connections' => [
'sqlite' => [
'driver' => 'sqlite',
'url' => env('DATABASE_URL'),
'database' => env('DB_DATABASE', storage_path('librenms.sqlite')),
'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
],
'sqlite' => [
'driver' => 'sqlite',
'url' => env('DATABASE_URL'),
'database' => env('DB_DATABASE', storage_path('librenms.sqlite')),
'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
],
'mysql' => [
'driver' => 'mysql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'librenms'),
'username' => env('DB_USERNAME', 'librenms'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'sslmode' => env('DB_SSLMODE', 'disabled'),
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
],
'mysql' => [
'driver' => 'mysql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'librenms'),
'username' => env('DB_USERNAME', 'librenms'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'sslmode' => env('DB_SSLMODE', 'disabled'),
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
],
'mysql_cluster' => [
'read' => [
'host' => [
env('DB_HOST', 'localhost'),
env('DB_HOST_R2', ''),
env('DB_HOST_R3', ''),
env('DB_HOST_R4', ''),
env('DB_HOST_R5', ''),
env('DB_HOST_R6', ''),
env('DB_HOST_R7', ''),
env('DB_HOST_R8', ''),
env('DB_HOST_R9', ''),
],
],
'write' => [
'host' => [
env('DB_HOST', 'localhost'),
env('DB_HOST_W2', ''),
env('DB_HOST_W3', ''),
env('DB_HOST_W4', ''),
env('DB_HOST_W5', ''),
env('DB_HOST_W6', ''),
env('DB_HOST_W7', ''),
env('DB_HOST_W8', ''),
env('DB_HOST_W9', ''),
],
],
'sticky' => env('DB_STICKY', null),
'driver' => 'mysql',
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'librenms'),
'username' => env('DB_USERNAME', 'librenms'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
],
'mysql_cluster' => [
'read' => [
'host' => [
env('DB_HOST', 'localhost'),
env('DB_HOST_R2', ''),
env('DB_HOST_R3', ''),
env('DB_HOST_R4', ''),
env('DB_HOST_R5', ''),
env('DB_HOST_R6', ''),
env('DB_HOST_R7', ''),
env('DB_HOST_R8', ''),
env('DB_HOST_R9', ''),
],
],
'write' => [
'host' => [
env('DB_HOST', 'localhost'),
env('DB_HOST_W2', ''),
env('DB_HOST_W3', ''),
env('DB_HOST_W4', ''),
env('DB_HOST_W5', ''),
env('DB_HOST_W6', ''),
env('DB_HOST_W7', ''),
env('DB_HOST_W8', ''),
env('DB_HOST_W9', ''),
],
],
'sticky' => env('DB_STICKY', null),
'driver' => 'mysql',
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'librenms'),
'username' => env('DB_USERNAME', 'librenms'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
],
'testing' => [
'driver' => env('DB_TEST_DRIVER', 'mysql'),
'host' => env('DB_TEST_HOST', 'localhost'),
'port' => env('DB_TEST_PORT', '3306'),
'database' => env('DB_TEST_DATABASE', 'librenms_phpunit_78hunjuybybh'),
'username' => env('DB_TEST_USERNAME', 'root'),
'password' => env('DB_TEST_PASSWORD', ''),
'unix_socket' => env('DB_TEST_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'strict' => true,
'engine' => null,
],
'testing' => [
'driver' => env('DB_TEST_DRIVER', 'mysql'),
'host' => env('DB_TEST_HOST', 'localhost'),
'port' => env('DB_TEST_PORT', '3306'),
'database' => env('DB_TEST_DATABASE', 'librenms_phpunit_78hunjuybybh'),
'username' => env('DB_TEST_USERNAME', 'root'),
'password' => env('DB_TEST_PASSWORD', ''),
'unix_socket' => env('DB_TEST_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'strict' => true,
'engine' => null,
],
'pgsql' => [
'driver' => 'pgsql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'prefix_indexes' => true,
'schema' => 'public',
'sslmode' => 'prefer',
],
'pgsql' => [
'driver' => 'pgsql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'prefix_indexes' => true,
'schema' => 'public',
'sslmode' => 'prefer',
],
'sqlsrv' => [
'driver' => 'sqlsrv',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '1433'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'prefix_indexes' => true,
],
'sqlsrv' => [
'driver' => 'sqlsrv',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '1433'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'prefix_indexes' => true,
],
'testing_memory' => [
'driver' => 'sqlite',
'database' => ':memory:',
'prefix' => '',
'foreign_key_constraints' => true,
],
'testing_memory' => [
'driver' => 'sqlite',
'database' => ':memory:',
'prefix' => '',
'foreign_key_constraints' => true,
],
'testing_persistent' => [
'driver' => 'sqlite',
'database' => storage_path('testing.sqlite'),
'prefix' => '',
'foreign_key_constraints' => true,
],
'testing_persistent' => [
'driver' => 'sqlite',
'database' => storage_path('testing.sqlite'),
'prefix' => '',
'foreign_key_constraints' => true,
],
],
],
/*
|--------------------------------------------------------------------------
| Migration Repository Table
|--------------------------------------------------------------------------
|
| This table keeps track of all the migrations that have already run for
| your application. Using this information, we can determine which of
| the migrations on disk haven't actually been run in the database.
|
*/
/*
|--------------------------------------------------------------------------
| Migration Repository Table
|--------------------------------------------------------------------------
|
| This table keeps track of all the migrations that have already run for
| your application. Using this information, we can determine which of
| the migrations on disk haven't actually been run in the database.
|
*/
'migrations' => 'migrations',
'migrations' => 'migrations',
/*
|--------------------------------------------------------------------------
| Redis Databases
|--------------------------------------------------------------------------
|
| Redis is an open source, fast, and advanced key-value store that also
| provides a richer body of commands than a typical key-value system
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
*/
/*
|--------------------------------------------------------------------------
| Redis Databases
|--------------------------------------------------------------------------
|
| Redis is an open source, fast, and advanced key-value store that also
| provides a richer body of commands than a typical key-value system
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
*/
'redis' => [
'redis' => [
'client' => env('REDIS_CLIENT', 'predis'),
'client' => env('REDIS_CLIENT', 'predis'),
'options' => [
'cluster' => env('REDIS_CLUSTER', 'redis'),
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_database_'),
],
'options' => [
'cluster' => env('REDIS_CLUSTER', 'redis'),
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_database_'),
],
'default' => [
'scheme' => env('REDIS_SCHEME', 'tcp'),
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_DB', '0'),
],
'default' => [
'scheme' => env('REDIS_SCHEME', 'tcp'),
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_DB', '0'),
],
'cache' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_CACHE_DB', '1'),
],
'cache' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_CACHE_DB', '1'),
],
],
],
];
];

View File

@ -8,204 +8,204 @@
| request an environment variable to be created upstream or send a pull request.
*/
return [
return [
/*
|--------------------------------------------------------------------------
| Debugbar Settings
|--------------------------------------------------------------------------
|
| Debugbar is enabled by default, when debug is set to true in app.php.
| You can override the value by setting enable to true or false instead of null.
|
| You can provide an array of URI's that must be ignored (eg. 'api/*')
|
*/
/*
|--------------------------------------------------------------------------
| Debugbar Settings
|--------------------------------------------------------------------------
|
| Debugbar is enabled by default, when debug is set to true in app.php.
| You can override the value by setting enable to true or false instead of null.
|
| You can provide an array of URI's that must be ignored (eg. 'api/*')
|
*/
'enabled' => env('DEBUGBAR_ENABLED', null),
'except' => [
'api*',
'graph*',
'push*',
],
'enabled' => env('DEBUGBAR_ENABLED', null),
'except' => [
'api*',
'graph*',
'push*',
],
/*
|--------------------------------------------------------------------------
| Storage settings
|--------------------------------------------------------------------------
|
| DebugBar stores data for session/ajax requests.
| You can disable this, so the debugbar stores data in headers/session,
| but this can cause problems with large data collectors.
| By default, file storage (in the storage folder) is used. Redis and PDO
| can also be used. For PDO, run the package migrations first.
|
*/
'storage' => [
'enabled' => true,
'driver' => 'file', // redis, file, pdo, custom
'path' => storage_path('debugbar'), // For file driver
'connection' => null, // Leave null for default connection (Redis/PDO)
'provider' => '', // Instance of StorageInterface for custom driver
],
/*
|--------------------------------------------------------------------------
| Storage settings
|--------------------------------------------------------------------------
|
| DebugBar stores data for session/ajax requests.
| You can disable this, so the debugbar stores data in headers/session,
| but this can cause problems with large data collectors.
| By default, file storage (in the storage folder) is used. Redis and PDO
| can also be used. For PDO, run the package migrations first.
|
*/
'storage' => [
'enabled' => true,
'driver' => 'file', // redis, file, pdo, custom
'path' => storage_path('debugbar'), // For file driver
'connection' => null, // Leave null for default connection (Redis/PDO)
'provider' => '', // Instance of StorageInterface for custom driver
],
/*
|--------------------------------------------------------------------------
| Vendors
|--------------------------------------------------------------------------
|
| Vendor files are included by default, but can be set to false.
| This can also be set to 'js' or 'css', to only include javascript or css vendor files.
| Vendor files are for css: font-awesome (including fonts) and highlight.js (css files)
| and for js: jquery and and highlight.js
| So if you want syntax highlighting, set it to true.
| jQuery is set to not conflict with existing jQuery scripts.
|
*/
/*
|--------------------------------------------------------------------------
| Vendors
|--------------------------------------------------------------------------
|
| Vendor files are included by default, but can be set to false.
| This can also be set to 'js' or 'css', to only include javascript or css vendor files.
| Vendor files are for css: font-awesome (including fonts) and highlight.js (css files)
| and for js: jquery and and highlight.js
| So if you want syntax highlighting, set it to true.
| jQuery is set to not conflict with existing jQuery scripts.
|
*/
'include_vendors' => true,
'include_vendors' => true,
/*
|--------------------------------------------------------------------------
| Capture Ajax Requests
|--------------------------------------------------------------------------
|
| The Debugbar can capture Ajax requests and display them. If you don't want this (ie. because of errors),
| you can use this option to disable sending the data through the headers.
|
| Optionally, you can also send ServerTiming headers on ajax requests for the Chrome DevTools.
*/
/*
|--------------------------------------------------------------------------
| Capture Ajax Requests
|--------------------------------------------------------------------------
|
| The Debugbar can capture Ajax requests and display them. If you don't want this (ie. because of errors),
| you can use this option to disable sending the data through the headers.
|
| Optionally, you can also send ServerTiming headers on ajax requests for the Chrome DevTools.
*/
'capture_ajax' => true,
'add_ajax_timing' => false,
'capture_ajax' => true,
'add_ajax_timing' => false,
/*
|--------------------------------------------------------------------------
| Custom Error Handler for Deprecated warnings
|--------------------------------------------------------------------------
|
| When enabled, the Debugbar shows deprecated warnings for Symfony components
| in the Messages tab.
|
*/
'error_handler' => false,
/*
|--------------------------------------------------------------------------
| Custom Error Handler for Deprecated warnings
|--------------------------------------------------------------------------
|
| When enabled, the Debugbar shows deprecated warnings for Symfony components
| in the Messages tab.
|
*/
'error_handler' => false,
/*
|--------------------------------------------------------------------------
| Clockwork integration
|--------------------------------------------------------------------------
|
| The Debugbar can emulate the Clockwork headers, so you can use the Chrome
| Extension, without the server-side code. It uses Debugbar collectors instead.
|
*/
'clockwork' => false,
/*
|--------------------------------------------------------------------------
| Clockwork integration
|--------------------------------------------------------------------------
|
| The Debugbar can emulate the Clockwork headers, so you can use the Chrome
| Extension, without the server-side code. It uses Debugbar collectors instead.
|
*/
'clockwork' => false,
/*
|--------------------------------------------------------------------------
| DataCollectors
|--------------------------------------------------------------------------
|
| Enable/disable DataCollectors
|
*/
/*
|--------------------------------------------------------------------------
| DataCollectors
|--------------------------------------------------------------------------
|
| Enable/disable DataCollectors
|
*/
'collectors' => [
'phpinfo' => true, // Php version
'messages' => true, // Messages
'time' => true, // Time Datalogger
'memory' => true, // Memory usage
'exceptions' => true, // Exception displayer
'log' => true, // Logs from Monolog (merged in messages if enabled)
'db' => true, // Show database (PDO) queries and bindings
'views' => true, // Views with their data
'route' => true, // Current route information
'auth' => true, // Display Laravel authentication status
'gate' => true, // Display Laravel Gate checks
'session' => true, // Display session data
'symfony_request' => true, // Only one can be enabled..
'mail' => true, // Catch mail messages
'laravel' => false, // Laravel version and environment
'events' => false, // All events fired
'default_request' => false, // Regular or special Symfony request logger
'logs' => false, // Add the latest log messages
'files' => false, // Show the included files
'config' => false, // Display config settings
'cache' => false, // Display cache events
],
'collectors' => [
'phpinfo' => true, // Php version
'messages' => true, // Messages
'time' => true, // Time Datalogger
'memory' => true, // Memory usage
'exceptions' => true, // Exception displayer
'log' => true, // Logs from Monolog (merged in messages if enabled)
'db' => true, // Show database (PDO) queries and bindings
'views' => true, // Views with their data
'route' => true, // Current route information
'auth' => true, // Display Laravel authentication status
'gate' => true, // Display Laravel Gate checks
'session' => true, // Display session data
'symfony_request' => true, // Only one can be enabled..
'mail' => true, // Catch mail messages
'laravel' => false, // Laravel version and environment
'events' => false, // All events fired
'default_request' => false, // Regular or special Symfony request logger
'logs' => false, // Add the latest log messages
'files' => false, // Show the included files
'config' => false, // Display config settings
'cache' => false, // Display cache events
],
/*
|--------------------------------------------------------------------------
| Extra options
|--------------------------------------------------------------------------
|
| Configure some DataCollectors
|
*/
/*
|--------------------------------------------------------------------------
| Extra options
|--------------------------------------------------------------------------
|
| Configure some DataCollectors
|
*/
'options' => [
'auth' => [
'show_name' => true, // Also show the users name/email in the debugbar
],
'db' => [
'with_params' => true, // Render SQL with the parameters substituted
'backtrace' => true, // Use a backtrace to find the origin of the query in your files.
'timeline' => false, // Add the queries to the timeline
'explain' => [ // Show EXPLAIN output on queries
'enabled' => false,
'types' => ['SELECT'], // // workaround ['SELECT'] only. https://github.com/barryvdh/laravel-debugbar/issues/888 ['SELECT', 'INSERT', 'UPDATE', 'DELETE']; for MySQL 5.6.3+
],
'hints' => true, // Show hints for common mistakes
],
'mail' => [
'full_log' => false,
],
'views' => [
'data' => false, //Note: Can slow down the application, because the data can be quite large..
],
'route' => [
'label' => true, // show complete route on bar
],
'logs' => [
'file' => null,
],
'cache' => [
'values' => true, // collect cache values
],
],
'options' => [
'auth' => [
'show_name' => true, // Also show the users name/email in the debugbar
],
'db' => [
'with_params' => true, // Render SQL with the parameters substituted
'backtrace' => true, // Use a backtrace to find the origin of the query in your files.
'timeline' => false, // Add the queries to the timeline
'explain' => [ // Show EXPLAIN output on queries
'enabled' => false,
'types' => ['SELECT'], // // workaround ['SELECT'] only. https://github.com/barryvdh/laravel-debugbar/issues/888 ['SELECT', 'INSERT', 'UPDATE', 'DELETE']; for MySQL 5.6.3+
],
'hints' => true, // Show hints for common mistakes
],
'mail' => [
'full_log' => false,
],
'views' => [
'data' => false, //Note: Can slow down the application, because the data can be quite large..
],
'route' => [
'label' => true, // show complete route on bar
],
'logs' => [
'file' => null,
],
'cache' => [
'values' => true, // collect cache values
],
],
/*
|--------------------------------------------------------------------------
| Inject Debugbar in Response
|--------------------------------------------------------------------------
|
| Usually, the debugbar is added just before </body>, by listening to the
| Response after the App is done. If you disable this, you have to add them
| in your template yourself. See http://phpdebugbar.com/docs/rendering.html
|
*/
/*
|--------------------------------------------------------------------------
| Inject Debugbar in Response
|--------------------------------------------------------------------------
|
| Usually, the debugbar is added just before </body>, by listening to the
| Response after the App is done. If you disable this, you have to add them
| in your template yourself. See http://phpdebugbar.com/docs/rendering.html
|
*/
'inject' => true,
'inject' => true,
/*
|--------------------------------------------------------------------------
| DebugBar route prefix
|--------------------------------------------------------------------------
|
| Sometimes you want to set route prefix to be used by DebugBar to load
| its resources from. Usually the need comes from misconfigured web server or
| from trying to overcome bugs like this: http://trac.nginx.org/nginx/ticket/97
|
*/
'route_prefix' => '_debugbar',
/*
|--------------------------------------------------------------------------
| DebugBar route prefix
|--------------------------------------------------------------------------
|
| Sometimes you want to set route prefix to be used by DebugBar to load
| its resources from. Usually the need comes from misconfigured web server or
| from trying to overcome bugs like this: http://trac.nginx.org/nginx/ticket/97
|
*/
'route_prefix' => '_debugbar',
/*
|--------------------------------------------------------------------------
| DebugBar route domain
|--------------------------------------------------------------------------
|
| By default DebugBar route served from the same domain that request served.
| To override default domain, specify it as a non-empty value.
*/
'route_domain' => null,
];
/*
|--------------------------------------------------------------------------
| DebugBar route domain
|--------------------------------------------------------------------------
|
| By default DebugBar route served from the same domain that request served.
| To override default domain, specify it as a non-empty value.
*/
'route_domain' => null,
];

View File

@ -8,79 +8,79 @@
| request an environment variable to be created upstream or send a pull request.
*/
return [
return [
/*
|--------------------------------------------------------------------------
| Default Filesystem Disk
|--------------------------------------------------------------------------
|
| Here you may specify the default filesystem disk that should be used
| by the framework. The "local" disk, as well as a variety of cloud
| based disks are available to your application. Just store away!
|
*/
/*
|--------------------------------------------------------------------------
| Default Filesystem Disk
|--------------------------------------------------------------------------
|
| Here you may specify the default filesystem disk that should be used
| by the framework. The "local" disk, as well as a variety of cloud
| based disks are available to your application. Just store away!
|
*/
'default' => env('FILESYSTEM_DRIVER', 'local'),
'default' => env('FILESYSTEM_DRIVER', 'local'),
/*
|--------------------------------------------------------------------------
| Filesystem Disks
|--------------------------------------------------------------------------
|
| Here you may configure as many filesystem "disks" as you wish, and you
| may even configure multiple disks of the same driver. Defaults have
| been setup for each driver as an example of the required options.
|
| Supported Drivers: "local", "ftp", "sftp", "s3"
|
*/
/*
|--------------------------------------------------------------------------
| Filesystem Disks
|--------------------------------------------------------------------------
|
| Here you may configure as many filesystem "disks" as you wish, and you
| may even configure multiple disks of the same driver. Defaults have
| been setup for each driver as an example of the required options.
|
| Supported Drivers: "local", "ftp", "sftp", "s3"
|
*/
'disks' => [
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
],
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
],
'base' => [
'driver' => 'local',
'root' => base_path(),
],
'base' => [
'driver' => 'local',
'root' => base_path(),
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL') . '/storage',
'visibility' => 'public',
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL') . '/storage',
'visibility' => 'public',
],
's3' => [
'driver' => 's3',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'),
'endpoint' => env('AWS_ENDPOINT'),
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
],
's3' => [
'driver' => 's3',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'),
'endpoint' => env('AWS_ENDPOINT'),
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
],
],
],
/*
|--------------------------------------------------------------------------
| Symbolic Links
|--------------------------------------------------------------------------
|
| Here you may configure the symbolic links that will be created when the
| `storage:link` Artisan command is executed. The array keys should be
| the locations of the links and the values should be their targets.
|
*/
/*
|--------------------------------------------------------------------------
| Symbolic Links
|--------------------------------------------------------------------------
|
| Here you may configure the symbolic links that will be created when the
| `storage:link` Artisan command is executed. The array keys should be
| the locations of the links and the values should be their targets.
|
*/
'links' => [
public_path('storage') => storage_path('app/public'),
],
'links' => [
public_path('storage') => storage_path('app/public'),
],
];
];

View File

@ -8,63 +8,63 @@
| request an environment variable to be created upstream or send a pull request.
*/
return [
/*
|
|--------------------------------------------------------------------------
| Flare API key
|--------------------------------------------------------------------------
|
| Specify Flare's API key below to enable error reporting to the service.
|
| More info: https://flareapp.io/docs/general/projects
|
*/
return [
/*
|
|--------------------------------------------------------------------------
| Flare API key
|--------------------------------------------------------------------------
|
| Specify Flare's API key below to enable error reporting to the service.
|
| More info: https://flareapp.io/docs/general/projects
|
*/
'key' => env('FLARE_KEY', 'quYFBTFNKHLBqFCoeo5yDVOQNbs6muV1'),
'key' => env('FLARE_KEY', 'quYFBTFNKHLBqFCoeo5yDVOQNbs6muV1'),
/*
|--------------------------------------------------------------------------
| Reporting Options
|--------------------------------------------------------------------------
|
| These options determine which information will be transmitted to Flare.
|
*/
/*
|--------------------------------------------------------------------------
| Reporting Options
|--------------------------------------------------------------------------
|
| These options determine which information will be transmitted to Flare.
|
*/
'reporting' => [
'anonymize_ips' => true,
'collect_git_information' => false,
'report_queries' => true,
'maximum_number_of_collected_queries' => 50,
'report_query_bindings' => true,
'report_view_data' => true,
'grouping_type' => null,
'report_logs' => false,
'maximum_number_of_collected_logs' => 50,
'censor_request_body_fields' => ['username', 'password', 'sysContact', 'community', 'authname', 'authpass', 'cryptopass'],
],
'reporting' => [
'anonymize_ips' => true,
'collect_git_information' => false,
'report_queries' => true,
'maximum_number_of_collected_queries' => 50,
'report_query_bindings' => true,
'report_view_data' => true,
'grouping_type' => null,
'report_logs' => false,
'maximum_number_of_collected_logs' => 50,
'censor_request_body_fields' => ['username', 'password', 'sysContact', 'community', 'authname', 'authpass', 'cryptopass'],
],
/*
|--------------------------------------------------------------------------
| Reporting Log statements
|--------------------------------------------------------------------------
|
| If this setting is `false` log statements won't be sent as events to Flare,
| no matter which error level you specified in the Flare log channel.
|
*/
/*
|--------------------------------------------------------------------------
| Reporting Log statements
|--------------------------------------------------------------------------
|
| If this setting is `false` log statements won't be sent as events to Flare,
| no matter which error level you specified in the Flare log channel.
|
*/
'send_logs_as_events' => false,
'send_logs_as_events' => false,
/*
|--------------------------------------------------------------------------
| Censor request body fields
|--------------------------------------------------------------------------
|
| These fields will be censored from your request when sent to Flare.
|
*/
/*
|--------------------------------------------------------------------------
| Censor request body fields
|--------------------------------------------------------------------------
|
| These fields will be censored from your request when sent to Flare.
|
*/
'censor_request_body_fields' => ['username', 'password', 'sysContact', 'community', 'authname', 'authpass', 'cryptopass'],
];
'censor_request_body_fields' => ['username', 'password', 'sysContact', 'community', 'authname', 'authpass', 'cryptopass'],
];

View File

@ -8,53 +8,53 @@
| request an environment variable to be created upstream or send a pull request.
*/
return [
return [
/*
|--------------------------------------------------------------------------
| Default Hash Driver
|--------------------------------------------------------------------------
|
| This option controls the default hash driver that will be used to hash
| passwords for your application. By default, the bcrypt algorithm is
| used; however, you remain free to modify this option if you wish.
|
| Supported: "bcrypt", "argon", "argon2id"
|
*/
/*
|--------------------------------------------------------------------------
| Default Hash Driver
|--------------------------------------------------------------------------
|
| This option controls the default hash driver that will be used to hash
| passwords for your application. By default, the bcrypt algorithm is
| used; however, you remain free to modify this option if you wish.
|
| Supported: "bcrypt", "argon", "argon2id"
|
*/
'driver' => 'bcrypt',
'driver' => 'bcrypt',
/*
|--------------------------------------------------------------------------
| Bcrypt Options
|--------------------------------------------------------------------------
|
| Here you may specify the configuration options that should be used when
| passwords are hashed using the Bcrypt algorithm. This will allow you
| to control the amount of time it takes to hash the given password.
|
*/
/*
|--------------------------------------------------------------------------
| Bcrypt Options
|--------------------------------------------------------------------------
|
| Here you may specify the configuration options that should be used when
| passwords are hashed using the Bcrypt algorithm. This will allow you
| to control the amount of time it takes to hash the given password.
|
*/
'bcrypt' => [
'rounds' => env('BCRYPT_ROUNDS', 10),
],
'bcrypt' => [
'rounds' => env('BCRYPT_ROUNDS', 10),
],
/*
|--------------------------------------------------------------------------
| Argon Options
|--------------------------------------------------------------------------
|
| Here you may specify the configuration options that should be used when
| passwords are hashed using the Argon algorithm. These will allow you
| to control the amount of time it takes to hash the given password.
|
*/
/*
|--------------------------------------------------------------------------
| Argon Options
|--------------------------------------------------------------------------
|
| Here you may specify the configuration options that should be used when
| passwords are hashed using the Argon algorithm. These will allow you
| to control the amount of time it takes to hash the given password.
|
*/
'argon' => [
'memory' => 1024,
'threads' => 2,
'time' => 2,
],
'argon' => [
'memory' => 1024,
'threads' => 2,
'time' => 2,
],
];
];

View File

@ -8,49 +8,49 @@
| request an environment variable to be created upstream or send a pull request.
*/
return [
return [
/*
|--------------------------------------------------------------------------
| User
|--------------------------------------------------------------------------
|
| This value is the user LibreNMS runs as. It is used to secure permissions
| and grant access to things needed. Defaults to librenms.
*/
/*
|--------------------------------------------------------------------------
| User
|--------------------------------------------------------------------------
|
| This value is the user LibreNMS runs as. It is used to secure permissions
| and grant access to things needed. Defaults to librenms.
*/
'user' => env('LIBRENMS_USER', 'librenms'),
'user' => env('LIBRENMS_USER', 'librenms'),
/*
|--------------------------------------------------------------------------
| Group
|--------------------------------------------------------------------------
|
| This value is the group LibreNMS runs as. It is used to secure permissions
| and grant access to things needed. Defaults to the same as LIBRENMS_USER.
*/
/*
|--------------------------------------------------------------------------
| Group
|--------------------------------------------------------------------------
|
| This value is the group LibreNMS runs as. It is used to secure permissions
| and grant access to things needed. Defaults to the same as LIBRENMS_USER.
*/
'group' => env('LIBRENMS_GROUP', env('LIBRENMS_USER', 'librenms')),
'group' => env('LIBRENMS_GROUP', env('LIBRENMS_USER', 'librenms')),
/*
|--------------------------------------------------------------------------
| Install
|--------------------------------------------------------------------------
|
| This value sets if the install process needs to be run.
| You may also specify which install steps to present with a comma separated list.
*/
/*
|--------------------------------------------------------------------------
| Install
|--------------------------------------------------------------------------
|
| This value sets if the install process needs to be run.
| You may also specify which install steps to present with a comma separated list.
*/
'install' => env('INSTALL', false),
'install' => env('INSTALL', false),
/*
|--------------------------------------------------------------------------
| NODE ID
|--------------------------------------------------------------------------
|
| Unique value to identify this node. Primarily used for distributed polling.
*/
/*
|--------------------------------------------------------------------------
| NODE ID
|--------------------------------------------------------------------------
|
| Unique value to identify this node. Primarily used for distributed polling.
*/
'node_id' => env('NODE_ID'),
'node_id' => env('NODE_ID'),
];
];

View File

@ -8,144 +8,144 @@
| request an environment variable to be created upstream or send a pull request.
*/
use Monolog\Handler\NullHandler;
use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;
use Monolog\Handler\NullHandler;
use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;
return [
return [
/*
|--------------------------------------------------------------------------
| Default Log Channel
|--------------------------------------------------------------------------
|
| This option defines the default log channel that gets used when writing
| messages to the logs. The name specified in this option should match
| one of the channels defined in the "channels" configuration array.
|
*/
/*
|--------------------------------------------------------------------------
| Default Log Channel
|--------------------------------------------------------------------------
|
| This option defines the default log channel that gets used when writing
| messages to the logs. The name specified in this option should match
| one of the channels defined in the "channels" configuration array.
|
*/
'default' => env('LOG_CHANNEL', 'stack'),
'default' => env('LOG_CHANNEL', 'stack'),
/*
|--------------------------------------------------------------------------
| Log Channels
|--------------------------------------------------------------------------
|
| Here you may configure the log channels for your application. Out of
| the box, Laravel uses the Monolog PHP logging library. This gives
| you a variety of powerful log handlers / formatters to utilize.
|
| Available Drivers: "single", "daily", "slack", "syslog",
| "errorlog", "monolog",
| "custom", "stack"
|
*/
/*
|--------------------------------------------------------------------------
| Log Channels
|--------------------------------------------------------------------------
|
| Here you may configure the log channels for your application. Out of
| the box, Laravel uses the Monolog PHP logging library. This gives
| you a variety of powerful log handlers / formatters to utilize.
|
| Available Drivers: "single", "daily", "slack", "syslog",
| "errorlog", "monolog",
| "custom", "stack"
|
*/
'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => ['single', 'flare'],
'ignore_exceptions' => false,
],
'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => ['single', 'flare'],
'ignore_exceptions' => false,
],
'console' => [
'driver' => 'stack',
'channels' => ['single', 'stdout', 'flare'],
'ignore_exceptions' => false,
],
'console' => [
'driver' => 'stack',
'channels' => ['single', 'stdout', 'flare'],
'ignore_exceptions' => false,
],
'console_debug' => [
'driver' => 'stack',
'channels' => ['single', 'stdout_debug'],
'ignore_exceptions' => false,
],
'console_debug' => [
'driver' => 'stack',
'channels' => ['single', 'stdout_debug'],
'ignore_exceptions' => false,
],
'single' => [
'driver' => 'single',
'path' => env('APP_LOG', \LibreNMS\Config::get('log_file', base_path('logs/librenms.log'))),
'formatter' => \App\Logging\NoColorFormatter::class,
'level' => env('LOG_LEVEL', 'error'),
],
'single' => [
'driver' => 'single',
'path' => env('APP_LOG', \LibreNMS\Config::get('log_file', base_path('logs/librenms.log'))),
'formatter' => \App\Logging\NoColorFormatter::class,
'level' => env('LOG_LEVEL', 'error'),
],
'daily' => [
'driver' => 'daily',
'path' => env('APP_LOG', \LibreNMS\Config::get('log_file', base_path('logs/librenms.log'))),
'formatter' => \App\Logging\NoColorFormatter::class,
'level' => env('LOG_LEVEL', 'error'),
'days' => 14,
],
'daily' => [
'driver' => 'daily',
'path' => env('APP_LOG', \LibreNMS\Config::get('log_file', base_path('logs/librenms.log'))),
'formatter' => \App\Logging\NoColorFormatter::class,
'level' => env('LOG_LEVEL', 'error'),
'days' => 14,
],
'slack' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => 'Laravel Log',
'emoji' => ':boom:',
'level' => env('LOG_LEVEL', 'critical'),
],
'slack' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => 'Laravel Log',
'emoji' => ':boom:',
'level' => env('LOG_LEVEL', 'critical'),
],
'papertrail' => [
'driver' => 'monolog',
'level' => env('LOG_LEVEL', 'debug'),
'handler' => SyslogUdpHandler::class,
'handler_with' => [
'host' => env('PAPERTRAIL_URL'),
'port' => env('PAPERTRAIL_PORT'),
],
],
'papertrail' => [
'driver' => 'monolog',
'level' => env('LOG_LEVEL', 'debug'),
'handler' => SyslogUdpHandler::class,
'handler_with' => [
'host' => env('PAPERTRAIL_URL'),
'port' => env('PAPERTRAIL_PORT'),
],
],
'stderr' => [
'driver' => 'monolog',
'handler' => StreamHandler::class,
'formatter' => \App\Logging\CliColorFormatter::class,
'with' => [
'stream' => 'php://stderr',
],
'level' => 'debug',
],
'stderr' => [
'driver' => 'monolog',
'handler' => StreamHandler::class,
'formatter' => \App\Logging\CliColorFormatter::class,
'with' => [
'stream' => 'php://stderr',
],
'level' => 'debug',
],
'stdout_debug' => [
'driver' => 'monolog',
'handler' => StreamHandler::class,
'formatter' => \App\Logging\CliColorFormatter::class,
'with' => [
'stream' => 'php://output',
],
'level' => 'debug',
],
'stdout_debug' => [
'driver' => 'monolog',
'handler' => StreamHandler::class,
'formatter' => \App\Logging\CliColorFormatter::class,
'with' => [
'stream' => 'php://output',
],
'level' => 'debug',
],
'stdout' => [
'driver' => 'monolog',
'handler' => StreamHandler::class,
'formatter' => \App\Logging\CliColorFormatter::class,
'with' => [
'stream' => 'php://output',
],
'level' => 'info',
],
'stdout' => [
'driver' => 'monolog',
'handler' => StreamHandler::class,
'formatter' => \App\Logging\CliColorFormatter::class,
'with' => [
'stream' => 'php://output',
],
'level' => 'info',
],
'syslog' => [
'driver' => 'syslog',
'level' => env('LOG_LEVEL', 'debug'),
],
'syslog' => [
'driver' => 'syslog',
'level' => env('LOG_LEVEL', 'debug'),
],
'errorlog' => [
'driver' => 'errorlog',
'level' => env('LOG_LEVEL', 'debug'),
],
'errorlog' => [
'driver' => 'errorlog',
'level' => env('LOG_LEVEL', 'debug'),
],
'null' => [
'driver' => 'monolog',
'handler' => NullHandler::class,
],
'null' => [
'driver' => 'monolog',
'handler' => NullHandler::class,
],
'emergency' => [
'path' => storage_path('logs/laravel.log'),
],
'emergency' => [
'path' => storage_path('logs/laravel.log'),
],
'flare' => [
'driver' => 'flare',
],
],
'flare' => [
'driver' => 'flare',
],
],
];
];

View File

@ -8,94 +8,94 @@
| request an environment variable to be created upstream or send a pull request.
*/
return [
return [
/*
|--------------------------------------------------------------------------
| Default Queue Connection Name
|--------------------------------------------------------------------------
|
| Laravel's queue API supports an assortment of back-ends via a single
| API, giving you convenient access to each back-end using the same
| syntax for every one. Here you may define a default connection.
|
*/
/*
|--------------------------------------------------------------------------
| Default Queue Connection Name
|--------------------------------------------------------------------------
|
| Laravel's queue API supports an assortment of back-ends via a single
| API, giving you convenient access to each back-end using the same
| syntax for every one. Here you may define a default connection.
|
*/
'default' => env('QUEUE_CONNECTION', 'sync'),
'default' => env('QUEUE_CONNECTION', 'sync'),
/*
|--------------------------------------------------------------------------
| Queue Connections
|--------------------------------------------------------------------------
|
| Here you may configure the connection information for each server that
| is used by your application. A default configuration has been added
| for each back-end shipped with Laravel. You are free to add more.
|
| Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
|
*/
/*
|--------------------------------------------------------------------------
| Queue Connections
|--------------------------------------------------------------------------
|
| Here you may configure the connection information for each server that
| is used by your application. A default configuration has been added
| for each back-end shipped with Laravel. You are free to add more.
|
| Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
|
*/
'connections' => [
'connections' => [
'sync' => [
'driver' => 'sync',
],
'sync' => [
'driver' => 'sync',
],
'database' => [
'driver' => 'database',
'table' => 'jobs',
'queue' => 'default',
'retry_after' => 90,
'after_commit' => false,
],
'database' => [
'driver' => 'database',
'table' => 'jobs',
'queue' => 'default',
'retry_after' => 90,
'after_commit' => false,
],
'beanstalkd' => [
'driver' => 'beanstalkd',
'host' => 'localhost',
'queue' => 'default',
'retry_after' => 90,
'block_for' => 0,
'after_commit' => false,
],
'beanstalkd' => [
'driver' => 'beanstalkd',
'host' => 'localhost',
'queue' => 'default',
'retry_after' => 90,
'block_for' => 0,
'after_commit' => false,
],
'sqs' => [
'driver' => 'sqs',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
'queue' => env('SQS_QUEUE', 'default'),
'suffix' => env('SQS_SUFFIX'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'after_commit' => false,
],
'sqs' => [
'driver' => 'sqs',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
'queue' => env('SQS_QUEUE', 'default'),
'suffix' => env('SQS_SUFFIX'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'after_commit' => false,
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
'queue' => env('REDIS_QUEUE', 'default'),
'retry_after' => 90,
'block_for' => null,
'after_commit' => false,
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
'queue' => env('REDIS_QUEUE', 'default'),
'retry_after' => 90,
'block_for' => null,
'after_commit' => false,
],
],
],
/*
|--------------------------------------------------------------------------
| Failed Queue Jobs
|--------------------------------------------------------------------------
|
| These options configure the behavior of failed queue job logging so you
| can control which database and table are used to store the jobs that
| have failed. You may change them to any database / table you wish.
|
*/
/*
|--------------------------------------------------------------------------
| Failed Queue Jobs
|--------------------------------------------------------------------------
|
| These options configure the behavior of failed queue job logging so you
| can control which database and table are used to store the jobs that
| have failed. You may change them to any database / table you wish.
|
*/
'failed' => [
'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
'database' => env('DB_CONNECTION', 'mysql'),
'table' => 'failed_jobs',
],
'failed' => [
'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
'database' => env('DB_CONNECTION', 'mysql'),
'table' => 'failed_jobs',
],
];
];

View File

@ -8,34 +8,34 @@
| request an environment variable to be created upstream or send a pull request.
*/
return [
return [
/*
|--------------------------------------------------------------------------
| Third Party Services
|--------------------------------------------------------------------------
|
| This file is for storing the credentials for third party services such
| as Mailgun, Postmark, AWS and more. This file provides the de facto
| location for this type of information, allowing packages to have
| a conventional file to locate the various service credentials.
|
*/
/*
|--------------------------------------------------------------------------
| Third Party Services
|--------------------------------------------------------------------------
|
| This file is for storing the credentials for third party services such
| as Mailgun, Postmark, AWS and more. This file provides the de facto
| location for this type of information, allowing packages to have
| a conventional file to locate the various service credentials.
|
*/
'mailgun' => [
'domain' => env('MAILGUN_DOMAIN'),
'secret' => env('MAILGUN_SECRET'),
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
],
'mailgun' => [
'domain' => env('MAILGUN_DOMAIN'),
'secret' => env('MAILGUN_SECRET'),
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
],
'postmark' => [
'token' => env('POSTMARK_TOKEN'),
],
'postmark' => [
'token' => env('POSTMARK_TOKEN'),
],
'ses' => [
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
],
'ses' => [
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
],
];
];

View File

@ -8,19 +8,19 @@
| request an environment variable to be created upstream or send a pull request.
*/
return [
return [
/*
|--------------------------------------------------------------------------
| Alias Blacklist
|--------------------------------------------------------------------------
|
| Typically, Tinker automatically aliases classes as you require them in
| Tinker. However, you may wish to never alias certain classes, which
| you may accomplish by listing the classes in the following array.
|
*/
/*
|--------------------------------------------------------------------------
| Alias Blacklist
|--------------------------------------------------------------------------
|
| Typically, Tinker automatically aliases classes as you require them in
| Tinker. However, you may wish to never alias certain classes, which
| you may accomplish by listing the classes in the following array.
|
*/
'dont_alias' => [],
'dont_alias' => [],
];
];

View File

@ -8,6 +8,6 @@
| request an environment variable to be created upstream or send a pull request.
*/
return [
'options' => [],
];
return [
'options' => [],
];

View File

@ -164,8 +164,8 @@ if ($options['f'] === 'handle_notifiable') {
Notifications::create($title, "The daily update script (daily.sh) has failed on $poller_name."
. 'Please check output by hand. If you need assistance, '
. 'visit the <a href="https://www.librenms.org/#support">LibreNMS Website</a> to find out how.',
'daily.sh',
2
'daily.sh',
2
);
}
} elseif ($options['t'] === 'phpver') {

View File

@ -168,7 +168,7 @@ if (isset($_GET['format']) && preg_match('/^[a-z]*$/', $_GET['format'])) {
if ($_GET['debug'] == 1) {
echo '<pre>$map</pre>';
exit();
exit;
}
switch ($_GET['format']) {
@ -179,7 +179,7 @@ if (isset($_GET['format']) && preg_match('/^[a-z]*$/', $_GET['format'])) {
break;
case 'dot':
echo $map;
exit();
exit;
default:
$_GET['format'] = 'png:gd';
}

View File

@ -123,7 +123,7 @@ function get95thagg($bill_id, $datefrom, $dateto)
$mq_sql = 'SELECT count(delta) FROM bill_data WHERE bill_id = ?';
$mq_sql .= ' AND timestamp > ? AND timestamp <= ?';
$measurements = dbFetchCell($mq_sql, [$bill_id, $datefrom, $dateto]);
$measurement_95th = (round(($measurements / 100 * 95)) - 1);
$measurement_95th = (round($measurements / 100 * 95) - 1);
$q_95_sql = 'SELECT (delta / period * 8) AS rate FROM bill_data WHERE bill_id = ?';
$q_95_sql .= ' AND timestamp > ? AND timestamp <= ? ORDER BY rate ASC';
@ -138,7 +138,7 @@ function get95thIn($bill_id, $datefrom, $dateto)
$mq_sql = 'SELECT count(delta) FROM bill_data WHERE bill_id = ?';
$mq_sql .= ' AND timestamp > ? AND timestamp <= ?';
$measurements = dbFetchCell($mq_sql, [$bill_id, $datefrom, $dateto]);
$measurement_95th = (round(($measurements / 100 * 95)) - 1);
$measurement_95th = (round($measurements / 100 * 95) - 1);
$q_95_sql = 'SELECT (in_delta / period * 8) AS rate FROM bill_data WHERE bill_id = ?';
$q_95_sql .= ' AND timestamp > ? AND timestamp <= ? ORDER BY rate ASC';
@ -153,7 +153,7 @@ function get95thout($bill_id, $datefrom, $dateto)
$mq_sql = 'SELECT count(delta) FROM bill_data WHERE bill_id = ?';
$mq_sql .= ' AND timestamp > ? AND timestamp <= ?';
$measurements = dbFetchCell($mq_sql, [$bill_id, $datefrom, $dateto]);
$measurement_95th = (round(($measurements / 100 * 95)) - 1);
$measurement_95th = (round($measurements / 100 * 95) - 1);
$q_95_sql = 'SELECT (out_delta / period * 8) AS rate FROM bill_data WHERE bill_id = ?';
$q_95_sql .= ' AND timestamp > ? AND timestamp <= ? ORDER BY rate ASC';
@ -293,8 +293,8 @@ function getBillingBitsGraphData($bill_id, $from, $to, $reducefactor)
$tot_period += $period;
if (++$iter >= $reducefactor) {
$out_data[$i] = round(($iter_out / $iter_period), 2);
$in_data[$i] = round(($iter_in / $iter_period), 2);
$out_data[$i] = round($iter_out / $iter_period, 2);
$in_data[$i] = round($iter_in / $iter_period, 2);
$tot_data[$i] = ($out_data[$i] + $in_data[$i]);
$ticks[$i] = $timestamp;
$i++;
@ -305,8 +305,8 @@ function getBillingBitsGraphData($bill_id, $from, $to, $reducefactor)
}//end foreach
if (! empty($iter_in)) { // Write last element
$out_data[$i] = round(($iter_out / $iter_period), 2);
$in_data[$i] = round(($iter_in / $iter_period), 2);
$out_data[$i] = round($iter_out / $iter_period, 2);
$in_data[$i] = round($iter_in / $iter_period, 2);
$tot_data[$i] = ($out_data[$i] + $in_data[$i]);
$ticks[$i] = $timestamp;
$i++;

View File

@ -122,7 +122,7 @@ if (Config::get('enable_bgp')) {
'bgpPeerDescr' => $value['bgpPeerDescr'] ?? '',
];
$affected = DeviceCache::getPrimary()->bgppeers()->where('bgpPeerIdentifier', $address)->where('vrf_id', $vrfId)->update($peers);
$seenPeerID[] = (DeviceCache::getPrimary()->bgppeers()->where('bgpPeerIdentifier', $address)->where('vrf_id', $vrfId)->select('bgpPeer_id')->orderBy('bgpPeer_id', 'ASC')->first()->bgpPeer_id);
$seenPeerID[] = DeviceCache::getPrimary()->bgppeers()->where('bgpPeerIdentifier', $address)->where('vrf_id', $vrfId)->select('bgpPeer_id')->orderBy('bgpPeer_id', 'ASC')->first()->bgpPeer_id;
echo str_repeat('.', $affected);
$vrp_bgp_peer_count += $affected;

View File

@ -128,7 +128,7 @@ if (($device['os'] == 'routeros') && ($device['version'] <= '7.6')) {
}//end foreach
}
echo PHP_EOL;
} elseif (($device['os'] == 'pbn' || $device['os'] == 'bdcom')) {
} elseif ($device['os'] == 'pbn' || $device['os'] == 'bdcom') {
echo ' NMS-LLDP-MIB: ';
$lldp_array = snmpwalk_group($device, 'lldpRemoteSystemsData', 'NMS-LLDP-MIB');
@ -161,7 +161,7 @@ if (($device['os'] == 'routeros') && ($device['version'] <= '7.6')) {
}
}//end foreach
echo PHP_EOL;
} elseif (($device['os'] == 'timos')) {
} elseif ($device['os'] == 'timos') {
echo ' TIMETRA-LLDP-MIB: ';
$lldp_array = snmpwalk_group($device, 'tmnxLldpRemoteSystemsData', 'TIMETRA-LLDP-MIB');
foreach ($lldp_array as $key => $lldp) {
@ -195,7 +195,7 @@ if (($device['os'] == 'routeros') && ($device['version'] <= '7.6')) {
}
}//end foreach
echo PHP_EOL;
} elseif (($device['os'] == 'jetstream')) {
} elseif ($device['os'] == 'jetstream') {
echo ' JETSTREAM-LLDP MIB: ';
$lldp_array = snmpwalk_group($device, 'lldpNeighborInfoEntry', 'TPLINK-LLDPINFO-MIB');
@ -259,7 +259,7 @@ if (($device['os'] == 'routeros') && ($device['version'] <= '7.6')) {
}
}
}
if (($device['os'] == 'aos7')) {
if ($device['os'] == 'aos7') {
$lldp_local = snmpwalk_cache_oid($device, 'lldpLocPortEntry', [], 'LLDP-MIB');
$lldp_ports = snmpwalk_group($device, 'lldpLocPortId', 'LLDP-MIB');
} else {
@ -270,14 +270,14 @@ if (($device['os'] == 'routeros') && ($device['version'] <= '7.6')) {
foreach ($lldp_array as $key => $lldp_if_array) {
foreach ($lldp_if_array as $entry_key => $lldp_instance) {
if (($device['os'] == 'aos7')) {
if ($device['os'] == 'aos7') {
$ifName = $lldp_local[$entry_key]['lldpLocPortDesc'];
} elseif (is_numeric($dot1d_array[$entry_key]['dot1dBasePortIfIndex'])) {
$ifIndex = $dot1d_array[$entry_key]['dot1dBasePortIfIndex'];
} else {
$ifIndex = $entry_key;
}
if (($device['os'] == 'aos7')) {
if ($device['os'] == 'aos7') {
$local_port_id = find_port_id($ifName, null, $device['device_id']);
} else {
$local_port_id = find_port_id($lldp_ports[$entry_key]['lldpLocPortId'], $ifIndex, $device['device_id']);

View File

@ -51,11 +51,11 @@ foreach ($entity_array as $entPhysicalIndex => $entry) {
echo "\n";
unset(
$physical_name,
$serial_number,
$card_array,
$card,
$entry,
$entity_array,
$id
$physical_name,
$serial_number,
$card_array,
$card,
$entry,
$entity_array,
$id
);

View File

@ -125,7 +125,7 @@ if (is_null($tblUCSObjects)) {
}
break;
// System Board - rack-unit-1/board
// System Board - rack-unit-1/board
case '1.3.6.1.4.1.9.9.719.1.9.6.1':
foreach ($array[3] as $key => $item) {
$result = [];
@ -161,7 +161,7 @@ if (is_null($tblUCSObjects)) {
}
break;
// Memory Modules - rack-unit-1/board/memarray-1/mem-0
// Memory Modules - rack-unit-1/board/memarray-1/mem-0
case '1.3.6.1.4.1.9.9.719.1.30.11.1':
foreach ($array[3] as $key => $item) {
$result = [];
@ -203,7 +203,7 @@ if (is_null($tblUCSObjects)) {
}
break;
// CPU's - rack-unit-1/board/cpu-1
// CPU's - rack-unit-1/board/cpu-1
case '1.3.6.1.4.1.9.9.719.1.41.9.1':
foreach ($array[3] as $key => $item) {
$result = [];
@ -245,7 +245,7 @@ if (is_null($tblUCSObjects)) {
}
break;
// SAS Storage Module - rack-unit-1/board/storage-SAS-2
// SAS Storage Module - rack-unit-1/board/storage-SAS-2
case '1.3.6.1.4.1.9.9.719.1.45.1.1':
foreach ($array[3] as $key => $item) {
$result = [];
@ -282,7 +282,7 @@ if (is_null($tblUCSObjects)) {
}
break;
// SAS Disks - rack-unit-1/board/storage-SAS-2/disk-1
// SAS Disks - rack-unit-1/board/storage-SAS-2/disk-1
case '1.3.6.1.4.1.9.9.719.1.45.4.1':
foreach ($array[3] as $key => $item) {
$result = [];
@ -294,7 +294,7 @@ if (is_null($tblUCSObjects)) {
// Old Firmware returns 4294967296 as 1 MB.
// The if below assumes we will never have < 1 Gb on old firmware or > 4 Pb on new firmware
if (($array[13][$key]) > 4294967296000) {
if ($array[13][$key] > 4294967296000) {
// Old Firmware
$result['string'] = $array[14][$key] . ' ' . $array[7][$key] . ', Rev: ' . $array[11][$key] . ', Size: ' . round($array[13][$key] / 4294967296000, 2) . ' GB';
d_echo('Disk: ' . $array[2][$key] . ', Raw Size: ' . $array[13][$key] . ', converted (old FW): ' . round($array[13][$key] / 4294967296000, 2) . "GB\n");
@ -330,7 +330,7 @@ if (is_null($tblUCSObjects)) {
}
break;
// LUN's - rack-unit-1/board/storage-SAS-2/lun-0
// LUN's - rack-unit-1/board/storage-SAS-2/lun-0
case '1.3.6.1.4.1.9.9.719.1.45.8.1':
foreach ($array[3] as $key => $item) {
$result = [];
@ -342,7 +342,7 @@ if (is_null($tblUCSObjects)) {
// Old Firmware returns 4294967296 as 1 MB.
// The if below assumes we will never have < 1 Gb on old firmware or > 4 Pb on new firmware
if (($array[13][$key]) > 4294967296000) {
if ($array[13][$key] > 4294967296000) {
// Old Firmware
$result['string'] = $array[3][$key] . ', Size: ' . round($array[13][$key] / 4294967296000, 2) . ' GB';
d_echo('LUN: ' . $array[2][$key] . ', Raw Size: ' . $array[13][$key] . ', converted (Old FW): ' . round($array[13][$key] / 4294967296000, 2) . "GB\n");
@ -378,7 +378,7 @@ if (is_null($tblUCSObjects)) {
}
break;
// RAID Battery - rack-unit-1/board/storage-SAS-2/raid-battery
// RAID Battery - rack-unit-1/board/storage-SAS-2/raid-battery
case '1.3.6.1.4.1.9.9.719.1.45.11.1':
foreach ($array[3] as $key => $item) {
$result = [];
@ -415,7 +415,7 @@ if (is_null($tblUCSObjects)) {
}
break;
// Fan's - rack-unit-1/fan-module-1-1/fan-1
// Fan's - rack-unit-1/fan-module-1-1/fan-1
case '1.3.6.1.4.1.9.9.719.1.15.12.1':
foreach ($array[3] as $key => $item) {
$result = [];
@ -452,7 +452,7 @@ if (is_null($tblUCSObjects)) {
}
break;
// PSU's - rack-unit-1/psu-1
// PSU's - rack-unit-1/psu-1
case '1.3.6.1.4.1.9.9.719.1.15.56.1':
foreach ($array[3] as $key => $item) {
$result = [];
@ -489,7 +489,7 @@ if (is_null($tblUCSObjects)) {
}
break;
// Adaptors - rack-unit-1/adaptor-1
// Adaptors - rack-unit-1/adaptor-1
case '1.3.6.1.4.1.9.9.719.1.3.85.1':
foreach ($array[3] as $key => $item) {
$result = [];
@ -526,7 +526,7 @@ if (is_null($tblUCSObjects)) {
}
break;
// Unknown Table, ask the user to log an issue so this can be identified.
// Unknown Table, ask the user to log an issue so this can be identified.
default:
d_echo("Cisco-CIMC Error...\n");
d_echo("Please log an issue on github with the following information:\n");

View File

@ -15,26 +15,26 @@ if ($device['os'] == 'junos') {
$ai_mib = 'AI-AP-MIB';
$ai_ig_data = snmpwalk_group($device, 'aiInfoGroup', $ai_mib);
discover_entity_physical(
$valid,
$device,
1, // entPhysicalIndex
$ai_ig_data['aiVirtualControllerIPAddress.0'], // entPhysicalDescr
'chassis', // entPhysicalClass
$ai_ig_data['aiVirtualControllerName.0'], // entPhysicalName
'Instant Virtual Controller Cluster', // entPhysicalModelName
$ai_ig_data['aiVirtualControllerKey.0'], // entPhysicalSerialNum
'0', // entPhysicalContainedIn
'Aruba', // entPhysicalMfgName
'-1', // entPhysicalParentRelPos
'Aruba', // entPhysicalVendorType
null, // entPhysicalHardwareRev
null, // entPhysicalFirmwareRev
null, // entPhysicalSoftwareRev
null, // entPhysicalIsFRU
null, // entPhysicalAlias
null, // entPhysicalAssetID
null // ifIndex
);
$valid,
$device,
1, // entPhysicalIndex
$ai_ig_data['aiVirtualControllerIPAddress.0'], // entPhysicalDescr
'chassis', // entPhysicalClass
$ai_ig_data['aiVirtualControllerName.0'], // entPhysicalName
'Instant Virtual Controller Cluster', // entPhysicalModelName
$ai_ig_data['aiVirtualControllerKey.0'], // entPhysicalSerialNum
'0', // entPhysicalContainedIn
'Aruba', // entPhysicalMfgName
'-1', // entPhysicalParentRelPos
'Aruba', // entPhysicalVendorType
null, // entPhysicalHardwareRev
null, // entPhysicalFirmwareRev
null, // entPhysicalSoftwareRev
null, // entPhysicalIsFRU
null, // entPhysicalAlias
null, // entPhysicalAssetID
null // ifIndex
);
$entity_array = snmpwalk_group($device, 'aiAccessPointEntry', $ai_mib);
$instant_index = 2;

View File

@ -78,8 +78,8 @@ foreach ($entity_array as $entPhysicalIndex => $entry) {
echo "\n";
unset(
$update_data,
$insert_data,
$entry,
$entity_array
$update_data,
$insert_data,
$entry,
$entity_array
);

View File

@ -85,24 +85,24 @@ foreach ($entity_array as $entPhysicalIndex => $entry) {
$ifIndex = array_key_exists('ifIndex', $entry) ? $entry['ifIndex'] : '';
discover_entity_physical($valid,
$device,
$entPhysicalIndex,
$entPhysicalDescr,
$entPhysicalClass,
$entPhysicalName,
$entPhysicalModelName,
$entPhysicalSerialNum,
$entPhysicalContainedIn,
$entPhysicalMfgName,
$entPhysicalParentRelPos,
$entPhysicalVendorType,
$entPhysicalHardwareRev,
$entPhysicalFirmwareRev,
$entPhysicalSoftwareRev,
$entPhysicalIsFRU,
$entPhysicalAlias,
$entPhysicalAssetID,
$ifIndex);
$device,
$entPhysicalIndex,
$entPhysicalDescr,
$entPhysicalClass,
$entPhysicalName,
$entPhysicalModelName,
$entPhysicalSerialNum,
$entPhysicalContainedIn,
$entPhysicalMfgName,
$entPhysicalParentRelPos,
$entPhysicalVendorType,
$entPhysicalHardwareRev,
$entPhysicalFirmwareRev,
$entPhysicalSoftwareRev,
$entPhysicalIsFRU,
$entPhysicalAlias,
$entPhysicalAssetID,
$ifIndex);
}//end foreach
echo "\n";

View File

@ -38,7 +38,7 @@ if (Config::get('enable_libvirt') && $device['os'] == 'linux') {
exec(Config::get('virsh') . ' -rc ' . $uri . ' list', $domlist);
foreach ($domlist as $dom) {
[$dom_id,] = explode(' ', trim($dom), 2);
[$dom_id] = explode(' ', trim($dom), 2);
if (is_numeric($dom_id)) {
// Fetch the Virtual Machine information.

View File

@ -45,7 +45,7 @@ $components = $keep;
// Begin our master array, all other values will be processed into this array.
$tblBigIP = [];
if ((snmp_get($device, 'sysModuleAllocationProvisionLevel.3.103.116.109', '-Ovqs', 'F5-BIGIP-SYSTEM-MIB')) != false) {
if (snmp_get($device, 'sysModuleAllocationProvisionLevel.3.103.116.109', '-Ovqs', 'F5-BIGIP-SYSTEM-MIB') != false) {
$gtmWideIPEntry = snmpwalk_array_num($device, '1.3.6.1.4.1.3375.2.3.12.1.2.1', 0);
if (! is_null($gtmWideIPEntry)) {
$gtmWideStatusEntry = snmpwalk_array_num($device, '1.3.6.1.4.1.3375.2.3.12.3.2.1', 0);

View File

@ -30,7 +30,7 @@ $ipForwardNb = snmp_get_multi($device, ['inetCidrRouteNumber.0', 'ipCidrRouteNum
//Get the configured max routes number
$max_routes = 1000;
if (null != (Config::get('routes_max_number'))) {
if (null != Config::get('routes_max_number')) {
$max_routes = Config::get('routes_max_number');
}

View File

@ -27,7 +27,7 @@ foreach ($pre_cache['junos_ifotn_oids'] as $index => $entry) {
$limit = null;
$warn_limit = null;
$tmp_exp = $pre_cache['junos_ifotn_oids'][$index . '.1']['jnxoptIfOTNPMCurrentFECBERExponent'];
$current = ($entry['jnxoptIfOTNPMCurrentFECBERMantissa']) * pow(10, (-$tmp_exp));
$current = $entry['jnxoptIfOTNPMCurrentFECBERMantissa'] * pow(10, -$tmp_exp);
$entPhysicalIndex = $index;
$entPhysicalIndex_measured = 'ports';
discover_sensor($valid['sensor'], 'ber', $device, $oid, $index, 'junos', $descr, $divisor, $multiplier, $limit_low, $warn_limit_low, $warn_limit, $limit, $current, 'snmp', $entPhysicalIndex, $entPhysicalIndex_measured);

View File

@ -7,19 +7,19 @@ $value = snmp_get($device, 'upsEstimatedChargeRemaining.0', '-OvqU', 'UPS-MIB');
if (is_numeric($value)) {
discover_sensor(
$valid['sensor'],
'charge',
$device,
'.1.3.6.1.2.1.33.1.2.4.0',
500,
'rfc1628',
'Battery charge remaining',
1,
1,
15,
50,
null,
101,
$value
);
$valid['sensor'],
'charge',
$device,
'.1.3.6.1.2.1.33.1.2.4.0',
500,
'rfc1628',
'Battery charge remaining',
1,
1,
15,
50,
null,
101,
$value
);
}

View File

@ -20,8 +20,8 @@
// ***** Sensors for ADVA FSP3000 R7
// *************************************************************
$multiplier = 1;
$divisor = 1000;
$multiplier = 1;
$divisor = 1000;
if (is_array($pre_cache['adva_fsp3kr7_Card'])) {
foreach (array_keys($pre_cache['adva_fsp3kr7_Card']) as $index) {

View File

@ -15,7 +15,7 @@ if (isset($oids) && $oids) {
if ($data) {
[$oid,$kind] = explode(' ', $data);
$split_oid = explode('.', $oid);
$index = $split_oid[(count($split_oid) - 1)];
$index = $split_oid[count($split_oid) - 1];
$current_oid = '.1.3.6.1.4.1.318.1.1.12.2.3.1.1.2.' . $index;
// rPDULoadStatusLoad
$phase_oid = '.1.3.6.1.4.1.318.1.1.12.2.3.1.1.4.' . $index;
@ -62,7 +62,7 @@ if (isset($oids) && $oids) {
continue;
}
$split_oid = explode('.', $oid);
$index = $split_oid[(count($split_oid) - 1)];
$index = $split_oid[count($split_oid) - 1];
$current_oid = '.1.3.6.1.4.1.318.1.1.12.2.3.1.1.2.' . $index;
// rPDULoadStatusLoad
$phase_oid = '.1.3.6.1.4.1.318.1.1.12.2.3.1.1.4.' . $index;
@ -112,7 +112,7 @@ if (isset($oids) && $oids) {
continue;
}
$split_oid = explode('.', $oid);
$index = $split_oid[(count($split_oid) - 1)];
$index = $split_oid[count($split_oid) - 1];
$descr = 'Bank ' . $banknum;
$current_oid = '.1.3.6.1.4.1.318.1.1.12.2.3.1.1.2.' . $index;
// rPDULoadStatusLoad
@ -150,7 +150,7 @@ if (isset($oids) && $oids) {
if ($data) {
[$oid,$kind] = explode(' ', $data);
$split_oid = explode('.', $oid);
$index = $split_oid[(count($split_oid) - 1)];
$index = $split_oid[count($split_oid) - 1];
$voltage_oid = '.1.3.6.1.4.1.318.1.1.26.6.3.1.6';
// rPDU2PhaseStatusVoltage
$current_oid = '.1.3.6.1.4.1.318.1.1.26.9.4.3.1.6.' . $index;
@ -238,8 +238,8 @@ if (isset($in_oids)) {
}
}
}
unset($index);
unset($data);
unset($index);
unset($data);
foreach ($oids as $index => $data) {
$type = 'apcUPS';
$descr = 'Phase ' . substr($index, -1) . ' Output';
@ -256,5 +256,5 @@ foreach ($oids as $index => $data) {
discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, $divisor, 1, null, null, null, null, $current);
}
}
unset($index);
unset($data);
unset($index);
unset($data);

View File

@ -13,7 +13,7 @@ if ($inlet_oids) {
if ($inlet_data) {
[$inlet_oid,$inlet_descr] = explode(' ', $inlet_data, 2);
$inlet_split_oid = explode('.', $inlet_oid);
$inlet_index = $inlet_split_oid[(count($inlet_split_oid) - 2)] . '.' . $inlet_split_oid[(count($inlet_split_oid) - 1)];
$inlet_index = $inlet_split_oid[count($inlet_split_oid) - 2] . '.' . $inlet_split_oid[count($inlet_split_oid) - 1];
$inlet_oid = ".1.3.6.1.4.1.13742.6.5.2.3.1.4.$inlet_index.1";
$inlet_divisor = pow(10, snmp_get($device, "inletSensorDecimalDigits.$inlet_index.rmsCurrent", '-Ovq', 'PDU2-MIB'));
$inlet_current = (snmp_get($device, "measurementsInletSensorValue.$inlet_index.1", '-Ovq', 'PDU2-MIB') / $inlet_divisor);
@ -34,7 +34,7 @@ if ($outlet_oids) {
if ($outlet_data) {
[$outlet_oid,$outlet_descr] = explode(' ', $outlet_data, 2);
$outlet_split_oid = explode('.', $outlet_oid);
$outlet_index = $outlet_split_oid[(count($outlet_split_oid) - 1)];
$outlet_index = $outlet_split_oid[count($outlet_split_oid) - 1];
$outletsuffix = "$outlet_index";
$outlet_insert_index = $outlet_index;
// outletLoadValue: "A non-negative value indicates the measured load in milli Amps"
@ -62,7 +62,7 @@ if ($outlet_oids) {
if ($outlet_data) {
[$outlet_oid,$outlet_descr] = explode(' ', $outlet_data, 2);
$outlet_split_oid = explode('.', $outlet_oid);
$outlet_index = $outlet_split_oid[(count($outlet_split_oid) - 1)];
$outlet_index = $outlet_split_oid[count($outlet_split_oid) - 1];
$outletsuffix = "$outlet_index";
$outlet_insert_index = $outlet_index;
$outlet_oid = ".1.3.6.1.4.1.13742.6.5.4.3.1.4.1.$outletsuffix.1";

View File

@ -23,7 +23,7 @@ while ($towers <= $tower_count) {
if ($infeed_data) {
[$infeed_oid,$descr] = explode(' ', $infeed_data, 2);
$split_oid = explode('.', $infeed_oid);
$infeed_index = $split_oid[(count($split_oid) - 1)];
$infeed_index = $split_oid[count($split_oid) - 1];
// infeedLoadValue
$infeed_oid = '.1.3.6.1.4.1.1718.3.2.2.1.7.' . $towers . '.' . $infeed_index;
@ -55,7 +55,7 @@ while ($towers <= $tower_count) {
if ($outlet_data) {
[$outlet_oid,$outlet_descr] = explode(' ', $outlet_data, 2);
$outlet_split_oid = explode('.', $outlet_oid);
$outlet_index = $outlet_split_oid[(count($outlet_split_oid) - 1)];
$outlet_index = $outlet_split_oid[count($outlet_split_oid) - 1];
$outletsuffix = "$towers.$infeed_index.$outlet_index";

View File

@ -18,8 +18,8 @@
//********* ADVA FSP3000 R7 Series
$multiplier = 1;
$divisor = 10;
$multiplier = 1;
$divisor = 10;
foreach ($pre_cache['adva_fsp3kr7'] as $index => $entry) {
if ($entry['entityFacilityAidString'] and $entry['pmSnapshotCurrentInputPower']) {

View File

@ -83,13 +83,13 @@ if (! empty($entity_oids)) {
if ($device['os'] === 'arista_eos') {
$descr = $entity_array[$index]['entPhysicalDescr'];
if (preg_match('/(Input|Output) (voltage|current) sensor/i', $descr) || Str::startsWith($descr, 'Power supply') || preg_match('/^(Power Supply|Hotspot|Inlet|Board)/i', $descr)) {
$descr = (ucwords($entity_array[substr_replace($index, '000', -3)]['entPhysicalDescr'] ?? ''))
$descr = ucwords($entity_array[substr_replace($index, '000', -3)]['entPhysicalDescr'] ?? '')
. ' '
. preg_replace(
'/(Voltage|Current|Power Supply) Sensor$/i',
'',
ucwords($entity_array[$index]['entPhysicalDescr'])
);
'/(Voltage|Current|Power Supply) Sensor$/i',
'',
ucwords($entity_array[$index]['entPhysicalDescr'])
);
}
if (preg_match('/(temp|temperature) sensor$/i', $descr)) {
$descr = preg_replace('/(temp|temperature) sensor$/i', '', $descr);

View File

@ -12,7 +12,7 @@ foreach (explode("\n", $oids) as $data) {
if ($data) {
[$oid,$descr] = explode(' ', $data, 2);
$split_oid = explode('.', $oid);
$index = $split_oid[(count($split_oid) - 1)];
$index = $split_oid[count($split_oid) - 1];
$oid = '.1.3.6.1.4.1.18928.1.2.2.1.9.1.3.' . $index;
$current = snmp_get($device, $oid, '-Oqv', '');

View File

@ -13,7 +13,7 @@ foreach (explode("\n", $oids) as $data) {
if ($data) {
[$oid,$kind] = explode(' ', $data);
$split_oid = explode('.', $oid);
$index = $split_oid[(count($split_oid) - 1)];
$index = $split_oid[count($split_oid) - 1];
$fan_oid = ".1.3.6.1.4.1.674.10892.5.4.700.12.1.6.1.$index";
$descr_oid = "coolingDeviceLocationName.1.$index";
$limit_oid = "coolingDeviceLowerCriticalThreshold.1.$index";

View File

@ -17,9 +17,9 @@ if (! empty($oids)) {
if (! empty($data)) {
[$oid,$descr] = explode(' = ', $data, 2);
$split_oid = explode('.', $oid);
$num_index = $split_oid[(count($split_oid) - 1)];
$num_index = $split_oid[count($split_oid) - 1];
$index = $num_index;
$part_oid = $split_oid[(count($split_oid) - 2)];
$part_oid = $split_oid[count($split_oid) - 2];
$num_index = $part_oid . '.' . $num_index;
$base_oid = '.1.3.6.1.4.1.12740.2.1.7.1.3.1.';
$oid = $base_oid . $num_index;

View File

@ -13,7 +13,7 @@ foreach (explode("\n", $oids) as $data) {
if ($data) {
[$oid,$kind] = explode(' ', $data);
$split_oid = explode('.', $oid);
$index = $split_oid[(count($split_oid) - 1)];
$index = $split_oid[count($split_oid) - 1];
if ($kind == 0) {
$fan_oid = ".1.3.6.1.4.1.10876.2.1.1.1.1.4.$index";
$descr_oid = ".1.3.6.1.4.1.10876.2.1.1.1.1.2.$index";

View File

@ -13,7 +13,7 @@ foreach (explode("\n", $oids) as $data) {
if ($data) {
[$oid,$descr] = explode(' ', $data, 2);
$split_oid = explode('.', $oid);
$index = $split_oid[(count($split_oid) - 1)];
$index = $split_oid[count($split_oid) - 1];
$oid = '.1.3.6.1.4.1.2021.13.16.3.1.3.' . $index;
$current = snmp_get($device, $oid, '-Oqv', 'LM-SENSORS-MIB');
$descr = trim(str_ireplace('fan-', '', $descr));

View File

@ -16,10 +16,10 @@ foreach ($oids as $index => $entry) {
$value = snmp_get($device, $oid, '-Oqv', 'EXTREME-SYSTEM-MIB');
$descr = "Fan Speed $modindex";
// round function used to round limit values to hundreds to avoid h/w/l limits being changed on every discovery as a change of 1rpm for fan speed would cause the limit values to change since they're dynamically calculated
$high_limit = round_Nth(($value * 1.5), 100);
$high_warn_limit = round_Nth(($value * 1.25), 100);
$low_warn_limit = round_Nth(($value * 0.75), 100);
$low_limit = round_Nth(($value * 0.5), 100);
$high_limit = round_Nth($value * 1.5, 100);
$high_warn_limit = round_Nth($value * 1.25, 100);
$low_warn_limit = round_Nth($value * 0.75, 100);
$low_limit = round_Nth($value * 0.5, 100);
if (is_numeric($value)) {
discover_sensor($valid['sensor'], 'fanspeed', $device, $oid, $index, 'extreme-fanspeed', $descr, '1', '1', $low_limit, $low_warn_limit, $high_warn_limit, $high_limit, $value);
}

View File

@ -14,7 +14,7 @@ foreach (explode("\n", $oids) as $data) {
if ($data) {
[$oid,$current] = explode(' ', $data, 2);
$split_oid = explode('.', $oid);
$index = $split_oid[(count($split_oid) - 1)];
$index = $split_oid[count($split_oid) - 1];
$oid = '.1.3.6.1.4.1.318.1.1.8.5.3.2.1.4.' . $index;
$descr = 'Input Feed ' . chr(64 + $index);
discover_sensor($valid['sensor'], 'frequency', $device, $oid, "3.2.1.4.$index", $type, $descr, $divisor, '1', null, null, null, null, $current);
@ -35,7 +35,7 @@ foreach (explode("\n", $oids) as $data) {
if ($data) {
[$oid,$current] = explode(' ', $data, 2);
$split_oid = explode('.', $oid);
$index = $split_oid[(count($split_oid) - 3)];
$index = $split_oid[count($split_oid) - 3];
$oid = '.1.3.6.1.4.1.318.1.1.8.5.4.2.1.4.' . $index;
$descr = 'Output Feed';
if (count(explode("\n", $oids)) > 1) {

View File

@ -29,9 +29,9 @@
*/
// Detect type of UPS (Signle-Phase/3 Phase)
// Number of input lines
$upsInputNumLines_oid = '.1.3.6.1.2.1.33.1.3.2.0';
$in_phaseNum = snmp_get($device, $upsInputNumLines_oid, '-Oqv');
// Number of input lines
$upsInputNumLines_oid = '.1.3.6.1.2.1.33.1.3.2.0';
$in_phaseNum = snmp_get($device, $upsInputNumLines_oid, '-Oqv');
// Single-phase system
if ($in_phaseNum == '1') {

View File

@ -12,7 +12,7 @@ foreach (explode("\n", $inlet_oids) as $inlet_data) {
if ($inlet_data) {
[$inlet_oid,$inlet_descr] = explode(' ', $inlet_data, 2);
$inlet_split_oid = explode('.', $inlet_oid);
$inlet_index = $inlet_split_oid[(count($inlet_split_oid) - 2)] . '.' . $inlet_split_oid[(count($inlet_split_oid) - 1)];
$inlet_index = $inlet_split_oid[count($inlet_split_oid) - 2] . '.' . $inlet_split_oid[count($inlet_split_oid) - 1];
$inlet_oid = ".1.3.6.1.4.1.13742.6.5.2.3.1.4.$inlet_index.23";
$inlet_divisor = pow(10, snmp_get($device, "inletSensorDecimalDigits.$inlet_index.frequency", '-Ovq', 'PDU2-MIB'));

View File

@ -15,7 +15,7 @@ foreach (explode("\n", $oids) as $data) {
if ($status == 2) {
// 2 = normal, 0 = not connected
$split_oid = explode('.', $oid);
$index = $split_oid[(count($split_oid) - 1)];
$index = $split_oid[count($split_oid) - 1];
$descr_oid = ".1.3.6.1.4.1.3854.1.2.2.1.17.1.1.$index";
$oid = ".1.3.6.1.4.1.3854.1.2.2.1.17.1.3.$index";
$warnlimit_oid = ".1.3.6.1.4.1.3854.1.2.2.1.17.1.7.$index";

View File

@ -44,7 +44,7 @@ if (! empty($dhcp_networks[$dhcp_networks_base_oid])) {
foreach ($dhcp_networks[$dhcp_networks_base_oid] as $dhcp_type_index => $ignore_this) {
if (! empty($dhcp_networks[$dhcp_networks_base_oid][$dhcp_type_index])) {
foreach ($dhcp_networks[$dhcp_networks_base_oid][$dhcp_type_index] as $index => $entry) {
$description = (explode('[', $entry));
$description = explode('[', $entry);
$data_array[$array_index]['index'] = $index;
if ($dhcp_type_index === intval($auth_dhcp_index)) {
$data_array[$array_index]['type'] = 'dhcpatriotAuthDHCP';

View File

@ -27,9 +27,9 @@
*/
// Detect type of UPS (Signle-Phase/3 Phase)
// Number of input lines
$upsInputNumLines_oid = '.1.3.6.1.2.1.33.1.3.2.0';
$in_phaseNum = snmp_get($device, $upsInputNumLines_oid, '-Oqv');
// Number of input lines
$upsInputNumLines_oid = '.1.3.6.1.2.1.33.1.3.2.0';
$in_phaseNum = snmp_get($device, $upsInputNumLines_oid, '-Oqv');
// Single-phase system
if ($in_phaseNum == '1') {

View File

@ -13,7 +13,7 @@ foreach (explode("\n", $psus) as $psu) {
[$oid, $presence] = explode(' ', $psu, 2);
if ($presence != 2) {
$split_oid = explode('.', $oid);
$current_id = $split_oid[(count($split_oid) - 1)];
$current_id = $split_oid[count($split_oid) - 1];
$current_oid = $psu_usage_oid . $current_id;
$psu_max_oid = $psu_max_usage_oid . $current_id;
$descr = 'PSU ' . $current_id . ' output';

View File

@ -13,7 +13,7 @@ if ($inlet_oids) {
if ($inlet_data) {
[$inlet_oid,$inlet_descr] = explode(' ', $inlet_data, 2);
$inlet_split_oid = explode('.', $inlet_oid);
$inlet_index = $inlet_split_oid[(count($inlet_split_oid) - 2)] . '.' . $inlet_split_oid[(count($inlet_split_oid) - 1)];
$inlet_index = $inlet_split_oid[count($inlet_split_oid) - 2] . '.' . $inlet_split_oid[count($inlet_split_oid) - 1];
$inlet_oid = ".1.3.6.1.4.1.13742.6.5.2.3.1.4.$inlet_index.5";
$inlet_divisor = pow(10, snmp_get($device, "inletSensorDecimalDigits.$inlet_index.activePower", '-Ovq', 'PDU2-MIB'));
$inlet_power = (snmp_get($device, "measurementsInletSensorValue.$inlet_index.activePower", '-Ovq', 'PDU2-MIB') / $inlet_divisor);
@ -34,12 +34,12 @@ if ($outlet_oids) {
if ($outlet_data) {
[$outlet_oid,$outlet_descr] = explode(' ', $outlet_data, 2);
$outlet_split_oid = explode('.', $outlet_oid);
$outlet_index = $outlet_split_oid[(count($outlet_split_oid) - 1)];
$outlet_index = $outlet_split_oid[count($outlet_split_oid) - 1];
$outletsuffix = "$outlet_index";
$outlet_insert_index = $outlet_index;
$outlet_oid = ".1.3.6.1.4.1.13742.4.1.2.2.1.8.$outletsuffix";
$outlet_descr = snmp_get($device, "outletLabel.$outletsuffix", '-Ovq', 'PDU-MIB');
$outlet_power = (snmp_get($device, "outletApparentPower.$outletsuffix", '-Ovq', 'PDU-MIB'));
$outlet_power = snmp_get($device, "outletApparentPower.$outletsuffix", '-Ovq', 'PDU-MIB');
if ($outlet_power >= 0) {
discover_sensor($valid['sensor'], 'power', $device, $outlet_oid, $outlet_insert_index, 'raritan', $outlet_descr, $divisor, $multiplier, null, null, null, null, $outlet_power);
}
@ -57,7 +57,7 @@ if ($outlet_oids) {
if ($outlet_data) {
[$outlet_oid,$outlet_descr] = explode(' ', $outlet_data, 2);
$outlet_split_oid = explode('.', $outlet_oid);
$outlet_index = $outlet_split_oid[(count($outlet_split_oid) - 1)];
$outlet_index = $outlet_split_oid[count($outlet_split_oid) - 1];
$outletsuffix = "$outlet_index";
$outlet_insert_index = $outlet_index;
$outlet_oid = ".1.3.6.1.4.1.13742.6.5.4.3.1.4.1.$outletsuffix.5";

View File

@ -105,8 +105,8 @@ foreach ($cmc_iii_var_table as $index => $entry) {
} elseif ($unit == '%') {
$type = 'percent';
}
$cmc_iii_sensors[$sensor_id]['type'] = $type;
break;
$cmc_iii_sensors[$sensor_id]['type'] = $type;
break;
}
}

View File

@ -23,7 +23,7 @@
* @author Ben Gibbons <axemann@gmail.com>
*/
// Input Contact discovery
// Input Contact discovery
$contacts['emu2_contacts'] = snmpwalk_group($device, 'emsInputContactStatusEntry', 'PowerNet-MIB');

View File

@ -14,7 +14,7 @@ foreach ($aos6_fan_oids as $index => $data) {
$oid = '.1.3.6.1.4.1.6486.800.1.1.1.3.1.1.11.1.2.' . $index;
$state_name = 'alaChasEntPhysFanStatus';
$current = $data['alaChasEntPhysFanStatus'];
[$revindex, $revchass, $revdata,] = explode('.', strrev($oid), 4);
[$revindex, $revchass, $revdata] = explode('.', strrev($oid), 4);
$chassis = strrev($revchass);
$indexName = strrev($revindex);
$descr = 'Chassis-' . ($chassis - 568) . " Fan $indexName";

View File

@ -53,7 +53,7 @@ if (! empty($oids)) {
if (! empty($data)) {
[$oid,$current] = explode(' = ', $data, 2);
$split_oid = explode('.', $oid);
$num_index = $split_oid[(count($split_oid) - 1)];
$num_index = $split_oid[count($split_oid) - 1];
$index = (int) cast_number($num_index);
$low_limit = 0.5;
$high_limit = 2.5;
@ -97,9 +97,9 @@ if (! empty($oids1)) {
if (! empty($data)) {
[$oid,$descr] = explode(' = ', $data, 2);
$split_oid = explode('.', $oid);
$num_index = $split_oid[(count($split_oid) - 1)];
$num_index = $split_oid[count($split_oid) - 1];
$index = (int) cast_number($num_index);
$member_id = $split_oid[(count($split_oid) - 2)];
$member_id = $split_oid[count($split_oid) - 2];
$num_index = $member_id . '.' . $num_index;
$oid = $base_oid . $num_index;
$extra = snmp_get_multi($device, $oid, '-OQne', 'EQLMEMBER-MIB', 'equallogic');
@ -142,8 +142,8 @@ if (! empty($oids_disks)) {
if (! empty($data)) {
[$oid,$descr] = explode(' = ', $data, 2);
$split_oid = explode('.', $oid);
$disk_index = $split_oid[(count($split_oid) - 1)];
$member_id = $split_oid[(count($split_oid) - 2)];
$disk_index = $split_oid[count($split_oid) - 1];
$member_id = $split_oid[count($split_oid) - 2];
$num_index = $member_id . '.' . $disk_index;
$oid = $disks_base_oid . $num_index;
$extra = snmp_get($device, $oid, '-OQne', 'EQLDISK-MIB', 'equallogic');

View File

@ -20,7 +20,7 @@ if ($device['os'] == 'hirschmann') {
foreach ($oid as $index => $entry) {
//Discover Sensors
discover_sensor($valid['sensor'], 'state', $device, $cur_oid . $index, 'hmPowerSupplyStatus' . $index, $state_name, 'Power Supply ' . $oid[$index]['hmPSID'], 1, 1, null, null, null, null, ($oid[$index]['hmPowerSupplyStatus'] ?? null), 'snmp', 'hmPowerSupplyStatus' . $index);
discover_sensor($valid['sensor'], 'state', $device, $cur_oid . $index, 'hmPowerSupplyStatus' . $index, $state_name, 'Power Supply ' . $oid[$index]['hmPSID'], 1, 1, null, null, null, null, $oid[$index]['hmPowerSupplyStatus'] ?? null, 'snmp', 'hmPowerSupplyStatus' . $index);
//Create Sensor To State Index
create_sensor_to_state_index($device, $state_name, 'hmPowerSupplyStatus' . $index);

View File

@ -13,7 +13,7 @@ foreach (explode("\n", $fans) as $fan) {
[$oid, $presence] = explode(' ', $fan, 2);
if ($presence != 2) {
$split_oid = explode('.', $oid);
$current_id = $split_oid[(count($split_oid) - 1)];
$current_id = $split_oid[count($split_oid) - 1];
$current_oid = $fan_state_oid . $current_id;
$descr = $fan_state_descr . $current_id;
$state = snmp_get($device, $current_oid, '-Oqv');
@ -45,7 +45,7 @@ foreach (explode("\n", $psus) as $psu) {
[$oid, $presence] = explode(' ', $psu, 2);
if ($presence != 2) {
$split_oid = explode('.', $oid);
$current_id = $split_oid[(count($split_oid) - 1)];
$current_id = $split_oid[count($split_oid) - 1];
$current_oid = $psu_state_oid . $current_id;
$descr = $psu_state_descr . $current_id;
$state = snmp_get($device, $current_oid, '-Oqv');

View File

@ -24,7 +24,7 @@ if (is_array($fan_trays)) {
foreach ($fan_trays as $oid => $array) {
$state = current($array);
$split_oid = explode('.', $oid);
$index = $split_oid[(count($split_oid) - 1)];
$index = $split_oid[count($split_oid) - 1];
$current_oid = "$fan_tray_oid.$index";
$entity_oid = '.1.3.6.1.2.1.47.1.1.1.1.7';

View File

@ -34,7 +34,7 @@ $serverscheck_oids = [
];
foreach ($pre_cache['serverscheck_control'] as $oid_name => $oid_value) {
if ((Str::contains($oid_name, 'name')) && (Str::contains($oid_value, ['Flooding', 'Leckage']))) {
if (Str::contains($oid_name, 'name') && Str::contains($oid_value, ['Flooding', 'Leckage'])) {
preg_match("/(\d+)/", $oid_name, $temp_x);
$tmp_oid = 'sensor' . $temp_x[0] . 'Value.0';
$current = $pre_cache['serverscheck_control'][$tmp_oid];

View File

@ -26,8 +26,8 @@ if (is_array($voss_fan)) {
foreach ($voss_fan as $oid => $array) {
$state = current($array);
$split_oid = explode('.', $oid);
$tray_num = $split_oid[(count($split_oid) - 2)];
$fan_num = $split_oid[(count($split_oid) - 1)];
$tray_num = $split_oid[count($split_oid) - 2];
$fan_num = $split_oid[count($split_oid) - 1];
$current_oid = ".1.3.6.1.4.1.2272.1.101.1.1.4.1.4.$tray_num.$fan_num";
$descr = "VOSS Tray $tray_num Fan $fan_num";
@ -47,7 +47,7 @@ if (is_array($voss_fan)) {
foreach ($fan as $oid => $array) {
$state = current($array);
$split_oid = explode('.', $oid);
$index = $split_oid[(count($split_oid) - 1)];
$index = $split_oid[count($split_oid) - 1];
$current_oid = ".1.3.6.1.4.1.2272.1.4.7.1.1.2.$index";
$descr = "VOSS Fan $index";
@ -78,7 +78,7 @@ if (is_array($power_supply)) {
foreach ($power_supply as $oid => $array) {
$state = current($array);
$split_oid = explode('.', $oid);
$index = $split_oid[(count($split_oid) - 1)];
$index = $split_oid[count($split_oid) - 1];
$current_oid = ".1.3.6.1.4.1.2272.1.4.8.1.1.2.$index";
$descr = "VOSS Power Supply $index";

View File

@ -20,8 +20,8 @@
// ***** Temperature Sensors for ADVA FSP3000 R7
// *************************************************************
$multiplier = 1;
$divisor = 10;
$multiplier = 1;
$divisor = 10;
if (is_array($pre_cache['adva_fsp3kr7_Card'])) {
foreach (array_keys($pre_cache['adva_fsp3kr7_Card']) as $index) {

View File

@ -13,7 +13,7 @@ foreach (explode("\n", $oids) as $data) {
if ($data) {
[$oid,$descr] = explode(' ', $data, 2);
$split_oid = explode('.', $oid);
$temperature_id = $split_oid[(count($split_oid) - 1)];
$temperature_id = $split_oid[count($split_oid) - 1];
$temperature_oid = ".1.3.6.1.4.1.18928.1.1.2.14.1.2.$temperature_id";
$temperature = snmp_get($device, $temperature_oid, '-Oqv', '');
$descr = "Hard disk $temperature_id";
@ -37,7 +37,7 @@ foreach (explode("\n", $oids) as $data) {
if ($data) {
[$oid,$descr] = explode(' ', $data, 2);
$split_oid = explode('.', $oid);
$index = $split_oid[(count($split_oid) - 1)];
$index = $split_oid[count($split_oid) - 1];
$oid = '.1.3.6.1.4.1.18928.1.2.2.1.10.1.3.' . $index;
$current = snmp_get($device, $oid, '-Oqv', '');

Some files were not shown because too many files have changed in this diff Show More