mirror of
https://github.com/librenms/librenms.git
synced 2024-09-21 02:18:39 +00:00
Apply fixes from StyleCI (#13224)
This commit is contained in:
parent
ad52701603
commit
258505ed44
@ -19,12 +19,15 @@
|
||||
*
|
||||
*
|
||||
* Original code:
|
||||
*
|
||||
* @author Daniel Preussker <f0o@devilcode.org>
|
||||
* @copyright 2014 f0o, LibreNMS
|
||||
* @license GPL
|
||||
*
|
||||
* Modified by:
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2019 KanREN, Inc.
|
||||
* @author Heath Barnhart <hbarnhart@kanren.net>
|
||||
*/
|
||||
@ -51,6 +54,7 @@ class AlertDB
|
||||
|
||||
/**
|
||||
* Generate SQL from Rule
|
||||
*
|
||||
* @param string $rule Rule to generate SQL for
|
||||
* @return string|bool
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2018 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,10 +18,13 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Original Code:
|
||||
*
|
||||
* @author Daniel Preussker <f0o@devilcode.org>
|
||||
* @copyright 2014 f0o, LibreNMS
|
||||
* @license GPL
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2019 KanREN, Inc.
|
||||
* @author Heath Barnhart <hbarnhart@kanren.net>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2019 KanREN, Inc.
|
||||
* @author Heath Barnhart <hbarnhart@kanren.net>
|
||||
*/
|
||||
@ -73,6 +74,7 @@ class AlertUtil
|
||||
|
||||
/**
|
||||
* Find contacts for alert
|
||||
*
|
||||
* @param array $results Rule-Result
|
||||
* @return array
|
||||
*/
|
||||
@ -193,6 +195,7 @@ class AlertUtil
|
||||
|
||||
/**
|
||||
* Check if device is under maintenance
|
||||
*
|
||||
* @param int $device_id Device-ID
|
||||
* @return bool
|
||||
*/
|
||||
@ -203,6 +206,7 @@ class AlertUtil
|
||||
|
||||
/**
|
||||
* Check if device is set to ignore alerts
|
||||
*
|
||||
* @param int $device_id Device-ID
|
||||
* @return bool
|
||||
*/
|
||||
@ -215,6 +219,7 @@ class AlertUtil
|
||||
|
||||
/**
|
||||
* Process Macros
|
||||
*
|
||||
* @param string $rule Rule to process
|
||||
* @param int $x Recursion-Anchor
|
||||
* @return string|bool
|
||||
|
@ -41,6 +41,7 @@ class RunAlerts
|
||||
{
|
||||
/**
|
||||
* Populate variables
|
||||
*
|
||||
* @param string $txt Text with variables
|
||||
* @param bool $wrap Wrap variable for text-usage (default: true)
|
||||
* @return string
|
||||
@ -76,6 +77,7 @@ class RunAlerts
|
||||
|
||||
/**
|
||||
* Describe Alert
|
||||
*
|
||||
* @param array $alert Alert-Result from DB
|
||||
* @return array|bool|string
|
||||
*/
|
||||
@ -196,6 +198,7 @@ class RunAlerts
|
||||
|
||||
/**
|
||||
* Format Elapsed Time
|
||||
*
|
||||
* @param int $secs Seconds elapsed
|
||||
* @return string
|
||||
*/
|
||||
@ -236,6 +239,7 @@ class RunAlerts
|
||||
|
||||
/**
|
||||
* Re-Validate Rule-Mappings
|
||||
*
|
||||
* @param int $device_id Device-ID
|
||||
* @param int $rule Rule-ID
|
||||
* @return bool
|
||||
@ -258,6 +262,7 @@ class RunAlerts
|
||||
|
||||
/**
|
||||
* Issue Alert-Object
|
||||
*
|
||||
* @param array $alert
|
||||
* @return bool
|
||||
*/
|
||||
@ -285,6 +290,7 @@ class RunAlerts
|
||||
|
||||
/**
|
||||
* Issue ACK notification
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function runAcks()
|
||||
@ -297,6 +303,7 @@ class RunAlerts
|
||||
|
||||
/**
|
||||
* Run Follow-Up alerts
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function runFollowUp()
|
||||
@ -381,6 +388,7 @@ class RunAlerts
|
||||
|
||||
/**
|
||||
* Run all alerts
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function runAlerts()
|
||||
@ -488,6 +496,7 @@ class RunAlerts
|
||||
|
||||
/**
|
||||
* Run external transports
|
||||
*
|
||||
* @param array $obj Alert-Array
|
||||
* @return void
|
||||
*/
|
||||
@ -576,6 +585,7 @@ class RunAlerts
|
||||
/**
|
||||
* Check if a device's all parent are down
|
||||
* Returns true if all parents are down
|
||||
*
|
||||
* @param int $device Device-ID
|
||||
* @return bool
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2018 Neil Lathwood
|
||||
* @author Neil Lathwood <gh+n@laf.io>
|
||||
*/
|
||||
|
@ -13,6 +13,7 @@ abstract class Transport implements TransportInterface
|
||||
|
||||
/**
|
||||
* Transport constructor.
|
||||
*
|
||||
* @param null $transport_id
|
||||
*/
|
||||
public function __construct($transport_id = null)
|
||||
@ -44,6 +45,7 @@ abstract class Transport implements TransportInterface
|
||||
|
||||
/**
|
||||
* Get the hex color string for a particular state
|
||||
*
|
||||
* @param int $state State code from alert
|
||||
* @return string Hex color, default to #337AB7 blue if state unrecognised
|
||||
*/
|
||||
|
@ -7,6 +7,7 @@
|
||||
* the source code distribution for details. */
|
||||
/**
|
||||
* API Transport
|
||||
*
|
||||
* @author GitStoph <https://github.com/GitStoph>
|
||||
* @copyright 2019 GitStoph
|
||||
* @license GPL
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
/**
|
||||
* Alertmanager Transport
|
||||
*
|
||||
* @copyright 2019 LibreNMS
|
||||
* @license GPL
|
||||
*/
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
/**
|
||||
* API Transport
|
||||
*
|
||||
* @author f0o <f0o@devilcode.org>
|
||||
* @author PipoCanaja (github.com/PipoCanaja)
|
||||
* @copyright 2014 f0o, LibreNMS
|
||||
|
@ -29,6 +29,7 @@
|
||||
|
||||
/**
|
||||
* Boxcar API Transport
|
||||
*
|
||||
* @author trick77 <jan@trick77.com>
|
||||
* @copyright 2015 trick77, neokjames, f0o, LibreNMS
|
||||
* @license GPL
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
/**
|
||||
* Clickatell REST-API Transport
|
||||
*
|
||||
* @author f0o <f0o@librenms.org>
|
||||
* @copyright 2015 f0o, LibreNMS
|
||||
* @license GPL
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2018 Ryan Finney
|
||||
* @author https://github.com/theherodied/
|
||||
* @contributer f0o, sdef2
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
/**
|
||||
* Dummy Transport
|
||||
*
|
||||
* @author f0o <f0o@devilcode.org>
|
||||
* @copyright 2014 f0o, LibreNMS
|
||||
* @license GPL
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
/**
|
||||
* GitLab API Transport
|
||||
*
|
||||
* @author Drew Hynes <drew.hynes@gmail.com>
|
||||
* @copyright 2018 Drew Hynes, LibreNMS
|
||||
* @license GPL
|
||||
|
@ -16,6 +16,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link http://librenms.org
|
||||
*
|
||||
* @copyright 2021 Pablo Baldovi
|
||||
* @author Pablo Baldovi <pbaldovi@gmail.com>
|
||||
*/
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
/**
|
||||
* IRC Transport
|
||||
*
|
||||
* @author f0o <f0o@devilcode.org>
|
||||
* @copyright 2014 f0o, LibreNMS
|
||||
* @license GPL
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
/**
|
||||
* Jira API Transport
|
||||
*
|
||||
* @author Aldemir Akpinar <aldemir.akpinar@gmail.com>
|
||||
* @copyright 2017 Aldemir Akpinar, LibreNMS
|
||||
* @license GPL
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
/**
|
||||
* Mail Transport
|
||||
*
|
||||
* @author f0o <f0o@devilcode.org>
|
||||
* @copyright 2014 f0o, LibreNMS
|
||||
* @license GPL
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
/**
|
||||
* Matrix Transport
|
||||
*
|
||||
* @author Raphael Dannecker (github.com/raphael247)
|
||||
* @copyright 2020 , LibreNMS
|
||||
* @license GPL
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
/**
|
||||
* Mattermost API Transport
|
||||
*
|
||||
* @author George Pantazis <gpant@eservices-greece.com>
|
||||
* @copyright 2019 George Pantazis, LibreNMS
|
||||
* @license GPL
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
/**
|
||||
* Nagios Transport
|
||||
*
|
||||
* @author f0o <f0o@devilcode.org>
|
||||
* @copyright 2014 f0o, LibreNMS
|
||||
* @license GPL
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
/**
|
||||
* OpsGenie API Transport
|
||||
*
|
||||
* @author Celal Emre CICEK <celal.emre@opsgenie.com>
|
||||
* @copyright 2017 Celal Emre CICEK
|
||||
* @license GPL
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
/**
|
||||
* PagerDuty Generic-API Transport
|
||||
*
|
||||
* @author f0o <f0o@devilcode.org>
|
||||
* @copyright 2015 f0o, LibreNMS
|
||||
* @license GPL
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
/**
|
||||
* PlaySMS API Transport
|
||||
*
|
||||
* @author f0o <f0o@librenms.org>
|
||||
* @copyright 2015 f0o, LibreNMS
|
||||
* @license GPL
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
/**
|
||||
* Pushbullet API Transport
|
||||
*
|
||||
* @author f0o <f0o@librenms.org>
|
||||
* @copyright 2015 f0o, LibreNMS
|
||||
* @license GPL
|
||||
|
@ -29,6 +29,7 @@
|
||||
|
||||
/**
|
||||
* Pushover API Transport
|
||||
*
|
||||
* @author neokjames <neokjames@gmail.com>
|
||||
* @copyright 2015 neokjames, f0o, LibreNMS
|
||||
* @license GPL
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
/**
|
||||
* API Transport
|
||||
*
|
||||
* @author ToeiRei <vbauer@stargazer.at>
|
||||
* @copyright 2017 ToeiRei, LibreNMS work based on the work of f0o. It's his work.
|
||||
* @license GPL
|
||||
|
@ -14,6 +14,7 @@
|
||||
|
||||
/**
|
||||
* API Transport
|
||||
*
|
||||
* @author Adam Bishop <adam@omega.org.uk>
|
||||
* @copyright 2020 Adam Bishop, LibreNMS
|
||||
* @license GPL
|
||||
|
@ -14,6 +14,7 @@
|
||||
|
||||
/**
|
||||
* Signal Transport
|
||||
*
|
||||
* @author kzink <kevin.zink@mpi-hd.mpg.de>
|
||||
* @copyright 2021 kzink, LibreNMS
|
||||
* @license GPL
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
/**
|
||||
* SignalWire API Transport
|
||||
*
|
||||
* @author Igor Kuznetsov <igor@oczmail.com>
|
||||
* This is modifyed Twilio class from Andy Rosen <arosen@arosen.net>
|
||||
* @license GPL
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
/**
|
||||
* API Transport
|
||||
*
|
||||
* @author f0o <f0o@devilcode.org>
|
||||
* @copyright 2014 f0o, LibreNMS
|
||||
* @license GPL
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
/**
|
||||
* SMSEagle API Transport
|
||||
*
|
||||
* @author Barry O'Donovan <barry@lightnet.ie>
|
||||
* @copyright 2017 Barry O'Donovan, LibreNMS
|
||||
* @license GPL
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
/**
|
||||
* SMSEagle API Transport
|
||||
*
|
||||
* @author Barry O'Donovan <barry@lightnet.ie>
|
||||
* @copyright 2017 Barry O'Donovan, LibreNMS
|
||||
* @license GPL
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2017 Neil Lathwood
|
||||
* @author Neil Lathwood <neil@lathwood.co.uk>
|
||||
*/
|
||||
|
@ -8,6 +8,7 @@
|
||||
*/
|
||||
/**
|
||||
* Twilio API Transport
|
||||
*
|
||||
* @author Andy Rosen <arosen@arosen.net>
|
||||
* @license GPL
|
||||
*/
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
/**
|
||||
* UKFastPSS Transport
|
||||
*
|
||||
* @author Lee Spottiswood (github.com/0x4c6565)
|
||||
* @copyright 2021, LibreNMS
|
||||
* @license GPL
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
/**
|
||||
* VictorOps Generic-API Transport - Based on PagerDuty transport
|
||||
*
|
||||
* @author f0o <f0o@devilcode.org>
|
||||
* @author laf <neil@librenms.org>
|
||||
* @copyright 2015 f0o, laf, LibreNMS
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2018 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
@ -41,6 +42,7 @@ class QueryBuilderFilter implements \JsonSerializable
|
||||
|
||||
/**
|
||||
* QueryBuilderFilter constructor.
|
||||
*
|
||||
* @param string $type alert|group
|
||||
*/
|
||||
public function __construct($type = 'alert')
|
||||
@ -160,9 +162,12 @@ class QueryBuilderFilter implements \JsonSerializable
|
||||
|
||||
/**
|
||||
* Specify data which should be serialized to JSON
|
||||
*
|
||||
* @link https://php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed data which can be serialized by <b>json_encode</b>,
|
||||
* which is a value of any type other than a resource.
|
||||
*
|
||||
* @since 5.4.0
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2019 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2018 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
@ -458,9 +459,12 @@ class QueryBuilderParser implements \JsonSerializable
|
||||
|
||||
/**
|
||||
* Specify data which should be serialized to JSON
|
||||
*
|
||||
* @link https://php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed data which can be serialized by <b>json_encode</b>,
|
||||
* which is a value of any type other than a resource.
|
||||
*
|
||||
* @since 5.4.0
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2018 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
@ -176,6 +177,7 @@ trait ActiveDirectoryCommon
|
||||
/**
|
||||
* Generate a user array from an AD LDAP entry
|
||||
* Must have the attributes: objectsid, samaccountname, displayname, mail
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @param array $entry
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2017 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -16,6 +16,7 @@
|
||||
|
||||
/**
|
||||
* libreNMS HTTP-Authentication and LDAP Authorization Library
|
||||
*
|
||||
* @author Maximilian Wilhelm <max@rfc2324.org>
|
||||
* @copyright 2016 LibreNMS, Barbarossa
|
||||
* @license GPL
|
||||
|
@ -279,6 +279,7 @@ class LdapAuthorizer extends AuthorizerBase
|
||||
|
||||
/**
|
||||
* Get the full dn with auth_ldap_prefix and auth_ldap_suffix
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @return string
|
||||
@ -291,6 +292,7 @@ class LdapAuthorizer extends AuthorizerBase
|
||||
/**
|
||||
* Set auth_ldap_suffix ou according to $username dn
|
||||
* useful if Config::get('auth_ldap_wildcard_ou) is set
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @return false|true
|
||||
@ -318,10 +320,12 @@ class LdapAuthorizer extends AuthorizerBase
|
||||
|
||||
/**
|
||||
* Get the ldap connection. If it hasn't been established yet, connect and try to bind.
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @param bool $skip_bind do not attempt to bind on connection
|
||||
* @return false|resource
|
||||
*
|
||||
* @throws AuthenticationException
|
||||
*/
|
||||
protected function getLdapConnection($skip_bind = false)
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2018 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://librenms.org
|
||||
*
|
||||
* @copyright 2017 Adam Bishop
|
||||
* @author Adam Bishop <adam@omega.org.uk>
|
||||
*/
|
||||
|
@ -18,7 +18,9 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @license GPL
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @author f0o <f0o@devilcode.org>
|
||||
* @copyright 2014 f0o, LibreNMS
|
||||
* @copyright 2017 Tony Murray
|
||||
@ -91,6 +93,7 @@ class TwoFactor
|
||||
|
||||
/**
|
||||
* Generate Secret Key
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function genKey()
|
||||
@ -160,6 +163,7 @@ class TwoFactor
|
||||
|
||||
/**
|
||||
* Generate HOTP (RFC 4226)
|
||||
*
|
||||
* @param string $key Secret Key
|
||||
* @param int|bool $counter Optional Counter, Defaults to Timestamp
|
||||
* @return string
|
||||
@ -195,6 +199,7 @@ class TwoFactor
|
||||
|
||||
/**
|
||||
* Generate 2fa URI
|
||||
*
|
||||
* @param string $username
|
||||
* @param string $key
|
||||
* @param bool $counter if type is counter (false for time based)
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2019 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2015 Aaron Daniels <aaron@daniels.id.au>
|
||||
* @author Aaron Daniels <aaron@daniels.id.au>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2016 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2017 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
@ -66,6 +67,7 @@ class Config
|
||||
|
||||
/**
|
||||
* Reload the config from files/db
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function reload()
|
||||
@ -105,6 +107,7 @@ class Config
|
||||
|
||||
/**
|
||||
* Load the user config from config.php
|
||||
*
|
||||
* @param array $config (this should be self::$config)
|
||||
*/
|
||||
private static function loadUserConfigFile(&$config)
|
||||
@ -316,6 +319,7 @@ class Config
|
||||
|
||||
/**
|
||||
* Get the full configuration array
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getAll()
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2018 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
@ -73,6 +74,7 @@ class Eloquent
|
||||
|
||||
/**
|
||||
* Set the strict mode for the current connection (will not persist)
|
||||
*
|
||||
* @param bool $strict
|
||||
*/
|
||||
public static function setStrictMode($strict = true)
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2018 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2019 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2020 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2020 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2020 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2020 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
@ -49,6 +50,7 @@ abstract class BaseDatastore implements DatastoreContract
|
||||
|
||||
/**
|
||||
* Record statistics for operation
|
||||
*
|
||||
* @param Measurement $stat
|
||||
*/
|
||||
protected function recordStatistic(Measurement $stat)
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2018 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
@ -61,6 +62,7 @@ class Datastore
|
||||
|
||||
/**
|
||||
* Datastore constructor.
|
||||
*
|
||||
* @param array $datastores Implement DatastoreInterface
|
||||
*/
|
||||
public function __construct($datastores)
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2020 Tony Murray
|
||||
* @copyright 2017 Falk Stern <https://github.com/fstern/>
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2020 Tony Murray
|
||||
* @copyright 2014 Neil Lathwood <https://github.com/laf/ http://www.lathwood.co.uk/fa>
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2020 Tony Murray
|
||||
* @copyright 2017 Yacine Benamsili <https://github.com/yac01/librenms.git>
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2020 Tony Murray
|
||||
* @copyright 2014 Neil Lathwood <https://github.com/laf/ http://www.lathwood.co.uk/fa>
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2018 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
@ -187,6 +188,7 @@ class Rrd extends BaseDatastore
|
||||
* Where $options is an array, each entry which is not a number is replaced with "U"
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @param string $filename
|
||||
* @param array $data
|
||||
* @return array|string
|
||||
@ -351,10 +353,12 @@ class Rrd extends BaseDatastore
|
||||
* Generates and pipes a command to rrdtool
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @param string $command create, update, updatev, graph, graphv, dump, restore, fetch, tune, first, last, lastupdate, info, resize, xport, flushcached
|
||||
* @param string $filename The full patth to the rrd file
|
||||
* @param string $options rrdtool command options
|
||||
* @return array the output of stdout and stderr in an array
|
||||
*
|
||||
* @throws \Exception thrown when the rrdtool process(s) cannot be started
|
||||
*/
|
||||
private function command($command, $filename, $options)
|
||||
@ -410,10 +414,12 @@ class Rrd extends BaseDatastore
|
||||
* Determines if --daemon and -O should be used
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @param string $command The base rrdtool command. Usually create, update, last.
|
||||
* @param string $filename The full path to the rrd file
|
||||
* @param string $options Options for the command possibly including the rrd definition
|
||||
* @return string returns a full command ready to be piped to rrdtool
|
||||
*
|
||||
* @throws FileExistsException if rrdtool <1.4.3 and the rrd file exists locally
|
||||
*/
|
||||
public function buildCommand($command, $filename, $options)
|
||||
@ -529,6 +535,7 @@ class Rrd extends BaseDatastore
|
||||
|
||||
/**
|
||||
* Remove RRD file(s). Use with care as this permanently deletes rrd data.
|
||||
*
|
||||
* @param string $hostname rrd subfolder (hostname)
|
||||
* @param string $prefix start of rrd file name all files matching will be deleted
|
||||
*/
|
||||
@ -551,6 +558,7 @@ class Rrd extends BaseDatastore
|
||||
*
|
||||
* @param string $options
|
||||
* @return string
|
||||
*
|
||||
* @throws \LibreNMS\Exceptions\FileExistsException
|
||||
* @throws \LibreNMS\Exceptions\RrdGraphException
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2020 Thomas Berberich
|
||||
* @author Thomas Berberich <sourcehhdoctor@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2017 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
@ -55,6 +56,7 @@ class Processor extends Model implements DiscoveryModule, PollerModule, Discover
|
||||
|
||||
/**
|
||||
* Processor constructor.
|
||||
*
|
||||
* @param string $type
|
||||
* @param int $device_id
|
||||
* @param string $oid
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2017 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
@ -202,6 +203,7 @@ class Sensor implements DiscoveryModule, PollerModule
|
||||
|
||||
/**
|
||||
* Get the table for this sensor
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTable()
|
||||
@ -380,6 +382,7 @@ class Sensor implements DiscoveryModule, PollerModule
|
||||
* @param array $sensors
|
||||
* @param array $prefetch
|
||||
* @return array
|
||||
*
|
||||
* @internal param $device
|
||||
*/
|
||||
protected static function processSensorData($sensors, $prefetch)
|
||||
@ -594,6 +597,7 @@ class Sensor implements DiscoveryModule, PollerModule
|
||||
* 'unit' - units used by this class 'dBm' for example
|
||||
* 'icon' - font awesome icon used by this class
|
||||
* )
|
||||
*
|
||||
* @param bool $valid filter this list by valid types in the database
|
||||
* @param int $device_id when filtering, only return types valid for this device_id
|
||||
* @return array
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2017 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
@ -124,6 +125,7 @@ class WirelessSensor extends Sensor
|
||||
* 'unit' - units used by this class 'dBm' for example
|
||||
* 'icon' - font awesome icon used by this class
|
||||
* )
|
||||
*
|
||||
* @param bool $valid filter this list by valid types in the database
|
||||
* @param int $device_id when filtering, only return types valid for this device_id
|
||||
* @return array
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2017 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
@ -379,6 +380,7 @@ class YamlDiscovery
|
||||
* @param string $mib
|
||||
* @param string|null $mibdir
|
||||
* @return string numeric oid
|
||||
*
|
||||
* @throws \LibreNMS\Exceptions\InvalidOidException
|
||||
*/
|
||||
public static function oidToNumeric($oid, $device = null, $mib = 'ALL', $mibdir = null)
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2020 Thomas Berberich
|
||||
* @author Thomas Berberich <sourcehhdoctor@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2020 Thomas Berberich
|
||||
* @author Thomas Berberich <sourcehhdoctor@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2019 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2017 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2018 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2019 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2016 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2018 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2019 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2020 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2016 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2016 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2016 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
@ -40,6 +41,7 @@ class HostUnreachableException extends \Exception
|
||||
|
||||
/**
|
||||
* Add additional reasons
|
||||
*
|
||||
* @param string $message
|
||||
*/
|
||||
public function addReason($message)
|
||||
@ -49,6 +51,7 @@ class HostUnreachableException extends \Exception
|
||||
|
||||
/**
|
||||
* Get the reasons
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getReasons()
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2016 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2016 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2017 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2018 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2016 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2017 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2019 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2017 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2020 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2016 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2020 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2020 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2017 Robrecht Plaisier
|
||||
* @author Robbrecht Plaisier <librenms@mcq8.be>
|
||||
*/
|
||||
|
@ -12,6 +12,7 @@ interface Authorizer
|
||||
*
|
||||
* @param array $credentials
|
||||
* @return true throws an Exception on failure
|
||||
*
|
||||
* @throws AuthenticationException thrown if the username or password is invalid
|
||||
*/
|
||||
public function authenticate($credentials);
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2018 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2017 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2019 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user