Commit Graph

718 Commits

Author SHA1 Message Date
Jellyfrog
232b9a414c
Apply fixes from StyleCI (#13201) 2021-09-07 20:33:54 -05:00
martinberg
d49e6d7acc
Make curl follow redirects (#13051) 2021-07-17 17:21:01 +02:00
ottorei
69397ea70f
ISIS-adjacency polling support (#12461)
* init

* Add adjacency polling support

* Format messages

* Fix prints

* Apply fixes from StyleCI

* Fix schema

* Schema fix

* Alert rule example

* Remove display format

* Change option order

* Add test data

* Add test data

* Test data

* Review fixes

* Remove duplicate MIB-file

* Add cleanup

* Fix

* Print fix

* Remove extra cleanup

* Revert "Remove duplicate MIB-file"

This reverts commit 4b3cf8127c.

* Remove unneeded MIB-files

* Add check for empty array

* Apply fixes from StyleCI

* Review fixes

* StyleCI

* StyleCI

* Apply fixes from StyleCI

* typo

* Update function calls on pages

* Linting fixes

* Apply fixes from StyleCI

* Discovery module

* Add discovery module

* Apply fixes from StyleCI

* Update example alert rule

Co-authored-by: ottorei <ottorei@users.noreply.github.com>
Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2021-06-10 19:42:34 -05:00
Tony Murray
df5096e449
Install: Validate database before migrating (#12867)
* Validate database during install
Needed to remove usages of legacy functions in the validation

* Fix output, restore real versions
2021-05-13 07:18:54 -05:00
PipoCanaja
fff8b8e832
Collect OUI Database and do OUI lookups (#12842)
* first draft

refresh time

refresh time

* return codes

style

style

* presentation

* Exception details

more

fix

fix

* add tooltips

fixes for dns display

* create WebUI config option

languages

* refresh data every 7 to 11 days, keep it 15 days max

* 'Ports' and 'Port' ARP table

* Stp page support

style

style

* fix dnsname column finding when vendor is added/removed

fix dnsname column finding when vendor is added/removed

* nac vendor column

nac

* filter fields to reduce size of AJAX reply

filter fields to reduce size of AJAX reply

* fix typo on dns column detection

* default enabled
2021-05-10 14:56:48 -05:00
Tony Murray
61c89794e4
Remove debug globals (#12811)
* Remove $debug global
and $vdebug global
makes these variables more accessible and protects from collisions.

* the on boot set sends application as the first parameter, just handle that

* Relocate other debug related functions

* Log debug to stdout

* Wrong output

* remove stupid constants

* Fix lint and style issues
2021-04-29 22:42:18 -05:00
Tony Murray
526bc695d5
Alert rule delay/interval empty = 0 (#12804)
The alert rule delay was falling back to the default delay of 300s if the input box was empty.   Most people would assume empty = 0, so make it match user's expectations.
2021-04-28 15:31:45 -05:00
Jellyfrog
edb36fd69d
More cleanups (#12715)
* PHPDoc

* Replace Auth > Illuminate\Support\Facades\Auth

* Return inside when()

* use str_replace correct

* Misc

* dead code

* use int $port

* styleci
2021-04-08 08:14:49 -05:00
Jellyfrog
c147be4505
Revert "Remove snmp2ipv6 (#12683)" (#12725)
This reverts commit f5f72dd398.
2021-04-08 14:57:17 +02:00
Tony Murray
f5f72dd398
Remove snmp2ipv6 (#12683)
* Remove snmp2ipv6

* Fill in bgpPeerRemoteAddr too update test data
2021-04-07 16:57:57 -05:00
Tony Murray
2b6b8df4b5
Fix printer state error (#12681) 2021-03-30 15:26:01 -05:00
Tony Murray
1c379dcd05
Remove legacy function calls (#12651)
* massive inlines

* fix style and wtf

* remove rrdtool.inc.php include

* fix CommonFunctions namespace issues

* looking for missing class space, fix undefined class issues

* style fixes
2021-03-29 00:25:30 +02:00
Jellyfrog
e00eba327d
Re-implement Printer as a class based module (#12605)
* Re-implement Printer as a class based module

* Rename toner table

* wip

* wip

* Rename to printersupplies

* Fixes

* Rename

* wip

* wip
2021-03-27 10:09:14 -05:00
Kevin Zink
54f1ac2f67
PHP8 Bug in printChangedStats (#12639)
array_sum(): Argument #1 ($array) must be of type array, null given
2021-03-21 12:50:40 +01:00
Tony Murray
61316ce2cc
PHP 8 fixes (#12528)
* port related errors

* more fixes

* fix storage count

* add tests for php8

* style

* only need not empty

* aix fixes....

* storage WIP

* fix aix discovering hrstorage
fix db test adding .gitkeep
fix os modules when discovery only

* fix aos processors wrong oid

* fix mempool number casting

* fix aos7 cpu

* use + 0 cast instead of floatval()

* more verbose error on invalid json

* remove invalid data in json

* actually fix the json

* correct json error fix

* cast_number() function
fix aruba-instant and aos6 bugs exposed by new function, probably more...

* fix a-f
fix inadequate sort for component data

* fix global port poll time

* fix mempools precent 0, route count, ntp const

* fix schleifenbauer liberal current usage

* further number casting refinement

* vrp

* fix tests

* fix arbos

* warn cleanups adjust to :: change

* fix ciena-sds

* fix drac

* fix dell-rpdu anddlink

* fix and improve arubaos
better error when getting an array in Processor

* fix atenpdu, add missing arubaos files

* aruba-instant to yaml
apparently I didn't need to do this, the diff just looks really odd
It did add ranged sub-index replacements

* docker app, was completely wrong... fixed

* fix sentry4 divide by 0...

* fixed root issue, remove check

* nicer cidr in ipv6 code

* remove bogus enuxus battery bank skip_values

* Fix InfluxDB tests

* remove extra import

* fix other style issues.

* influx "style" fixes
2021-03-12 18:10:14 -06:00
Tony Murray
6e19805bcb
remove legacy json format function (#12583)
* remove legacy json format function

* remove silly use
2021-03-04 14:55:41 +01:00
Tony Murray
8b105ba162
GPS coordinates from device (#12521)
* GPS coords from device
in yaml or php
define for epmp, airos, and airos-af-ltu
quirk for airos bug with - in the middle of the number

* style fixes

* revert airos-af-ltu mempool change

* fix imports

* add epmp test data... more improvements to come there.

* don't stagger geocoding now that this is moved to discovery
also, no need to check OSDiscovery since the base implements it.

* fix json data

* fixed
2021-02-14 20:36:55 -06:00
Jellyfrog
20b4215204
Swich links to https (#12511)
* Switch librenms links to https

* Convert librenms links in comments

* Switch gnu.org url to https

* switch php urls to https
2021-02-09 00:29:04 +01:00
Tony Murray
9ad60ac76d
Fix js injections issues in device overview (#12475)
Thanks to @weev on Discord for reporting the issue
2021-01-27 22:09:13 -06:00
SourceDoctor
76ab814647
only add new outage entry if Device status changed (#12309)
* only add new outage entry if Device status changed

* .
2020-11-08 22:15:29 -06:00
Tony Murray
25722bbbd5
Faster initial database creation (#12297)
* Faster initial database creation
Add db dumps to improve initial db migration
On my test system 13s -> 7s, a 46% reduction.
Should help out a lot on systems like RPi

* lnms schema:dump command

--snapshots saves db snapshots, otherwise it saves the yaml

* fix style

* fix timezones...

* not working with in-memory db yet
remove build.sql
2020-11-06 01:19:15 +01:00
ottorei
599c423532
Optional availability calculation mode to allow planned maintenance (#12218)
* Add an optional availability calculation mode

* Style fixes

* Review fixes

* Variable fix

* Style fixes

* Style fixes

* Style fixes

* Add additional status check, remove uptime

* Style fix

* Style fix

* Fix extra database update

* Style fix

* Style fix
2020-10-28 02:05:19 +01:00
ottorei
40479ce36a
Update only latest Null Value Row in Outages Table (#12206)
* Fix multiple null-values on outages

Fixes a specific issue where multiple null-values on device_outages-table prevent updating the correct outage details

* Fix multiple null-values on outages

Fixes a specific issue where multiple null-values on device_outages-table prevent updating the correct outage details
2020-10-11 23:55:06 +02:00
Tony Murray
1e4702fa4f
Support multiple daily process locking backends with distributed polling (#11896)
* Implement locks in the file cache

* Replace custom locks

* implement restore lock
Used when re-hydrating

* remove legacy use statements

* Add class descriptions

* Fix style

* Default to database cache driver

* missed cache_locks table
prevent chicken-egg issue

* style fixes

* Remove custom file lock implementation

* missed items from file cache

* Update schema definition
hmm, other schema noise must be from manual modification as this is generated from a freshly migrated db.

* require predis, it is pure python, so no harm in adding

* and set predis as the default client
2020-10-07 07:36:35 -05:00
Tony Murray
88b40c3d6c
All os detection now uses Yaml (#12186)
* All os detection now uses Yaml
Move OS detection code into the Core module.
Defer all OS with snmp queries.
Add snmpwalk option.
Port ubnt and mobileiron to yaml.

* Silly ide refactor
2020-10-05 14:26:37 +02:00
Jellyfrog
29f45ca352
Apply fixes from StyleCI (#12124) 2020-09-21 15:59:34 +02:00
Jellyfrog
0d56bbd946
Apply fixes from StyleCI (#12123) 2020-09-21 15:51:53 +02:00
Jellyfrog
82f43cb98d
Apply fixes from StyleCI (#12120) 2020-09-21 15:40:17 +02:00
Tony Murray
000b8e0f7c
Improve mib_dir setting consistency (#12069)
yaml os discovery now respects the os mib_dir definition
mib_dir now only allows strings, not arrays
changed schema validation to account for that
consolidated dell mibs, no reason for them to be spread out
2020-09-08 12:55:29 +02:00
SourceDoctor
427878dcaa
Availability Calculation for all Devices (#12004)
* Availability Calculation for all Devices

* remove not more need uptime column
2020-08-28 13:01:54 +02:00
SourceDoctor
e9427720b2
Cleanup Database Tables on Host Deletion (#12012) 2020-08-17 10:34:35 +02:00
kleinem86
a4f5af069c
Added Proxy support for Api Transport (#11968) 2020-07-29 16:00:55 +02:00
SourceDoctor
4e6a7291a2
Device Availability Calculation (#11784)
* Device Availability Calculation

* Travis fix

* .

* schema corrections

* flexible duration

* travis

* .

* .

* .

* .

* remove not needed code

* line Text to RRD

* update humantime

* .

* only set up again if device was marked as down

* set RRD area transparency

* save uptime also, to keep last availability as good as possible

* file description correction

* look for outages even if uptime > duration
2020-06-22 22:57:30 +02:00
PipoCanaja
15fe63d6b1
Feature: skip_value can check OID existance (#11822)
* exists for skip_values

* AR routers are using another logic for SFPs Power

* schemas

* tests
2020-06-14 09:21:22 -05:00
arrmo
67cb7b4dc3
Remove int width from db schema (MySQL 8) (#11725)
* Remove width from db schema

* Update to address DEFAULT_GENERATED validation, and push new schema

* Only remove width from integer types

* Build from fresh db

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-05-30 17:06:53 -05:00
Tony Murray
5fc3fcb9e8
Make migrations work in SQLite (#11643)
* WIP Sqlite

Down methods don't work either, avoid them with refresh for now.

WIP persistent support

WIP db_schema

WIP db_schema 2

Update new migrations...

revert dump_db_schema changes for now, too much difference.

fix migrations on mysql

fix up some more items, this should be our target schema
lots of index renames and a two misc changes

index rename WIP

index rename WIP

another round

fix up new schema changes

try case insensitive fix

Trying tests WIP

fix down methods

DBSetupTest working (uses mysql)

Test sqlite migrations work

* Properly validate sqlite output

* revert glue changes, should be separate PR

* remove dusk workaround

* remove unused variables

* import

* sqlite capitalization

* Revert some refresh tests

* testing_mysql back to testing
2020-05-22 16:49:21 -05:00
Tony Murray
f1320b6510
Speed up tests by skipping pings (#11642)
* Mock fping for module tests, there is no need.
Removes some wait time.

* fixup some rrd disabling code

* oops
2020-05-19 22:08:41 -05:00
Tony Murray
d5a52ca4eb
Fix various issues with loading os definitions (#11640)
* Ping only device doesn't display
if os was set to something, ping os wasn't loaded and we try to get overview graphs from it.

* Fix snmp_disable device page load error
When other os is set.

* Revamp os setting loading
the only safe way to access is Config::getOsSetting()

* Remove getOsSetting fallback behavior
Most instances don't use it and it can have unexpected results Config::getOsSetting('blah', 'group') == 'librenms'

* refactor and remove unneeded load_os/loadOs calls now since getOsSetting automatically loads it.

* restore unix overview graphs, they are different
small cleanups

* fix
2020-05-19 14:35:32 -05:00
Tony Murray
b573c9ef73
Implement OS specific information discovery (#11446)
* Implement OS specific information discovery
That way it doesn't have to be fetched during polling
Also improve discovery process, os is only detected once, in the core module.
EXA is the test os, a couple improvements there.

* Use local variable, then unset it so we don't pollute.

* fix style issues

* test and other fixes

* attribute update fixes

* Update exa data, need new source data

* null missing "os" values

* fix ftos odd character

* fix ftos odd character

* only null for new style or we will reset to null every discovery

* Move device observer to own class

* Handle location, relocate event logging

* update exa e7-2 data

* update ird test data, apparently unicode is now working.

* update Linux ntc, now uses correct icon

* Only load all os on the web, also, we can't load existing the the database isn't connected.

* only for devices that have a location

* revert ftos test data apparently

* revert ird
2020-05-14 11:27:59 -05:00
Mathieu Poussin
fc391090e1
BGP Polling: Add error code management (#11424)
* BGP Polling: Add error code polling

* Rework describe_bgp_error_code and fix bgp error fields migration

* Add real test data for IOS-XR and Arista EOS
2020-04-24 22:47:20 -05:00
Lars Elgtvedt Susaas
b3d1b97a3b
Addhost tests (#11385)
* Create addhostCliTest.php

Added test for addhost.php cli tool

* Added test for addhost function

Added tests and fixed code in order for the function to be able to run with default parameter

* Create addhostTest.php

added tests for addhost function

* Update addhostCliTest.php

Changed from testing addhost.php to Artisan command 'device:add'

* remove delhost exec

* remove delhost

* Remove isn't needed, transactions are used.

* Remove unneeded, transactions are used.

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-04-19 17:36:01 -05:00
Tony Murray
1c08c11a77
Remove Laravel helpers (#11428)
* Remove Laravel helpers

* Replace qualifier with import
2020-04-18 00:37:56 +02:00
Tony Murray
e4b49f59f6
Delete ports via eloquent event (#11354)
* Delete ports via eloquent event
Chunk delete during purge all operations so we don't use too much memory.

* protect against missing device

* fix whitespace

* fetch less from the database when deleting a device's ports
fix output
2020-04-16 09:19:58 -05:00
Tony Murray
790ef61b0d
Small test speedup (#11411)
Use Log::event() inside log_event()
Mock Log::event() in module tests to prevent writing to the database.
2020-04-11 19:53:25 -05:00
Alexandre L
a4cf77b26b
Fix device creation using overwrited ip (#11388)
* Fix device creation using overwrited ip

`deviceArray` was creating a device missing the `overwrite_ip` field, so it was not used by `isSNMPable`

* Fix device creation using overwrited ip

Part 2: Fix using not yet set variable

* Fix device creation using overwrited ip

Part 3: remove double space

* Useless commit to trigger Travis
2020-04-08 11:47:40 +02:00
Dan Langille
5c163a4a2f
Stop using {} for arrays (#11319)
This avoids this message in ./validate.php - line numbers differ because I'm on 1.61

PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /usr/local/www/librenms/includes/functions.php on line 1833
PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /usr/local/www/librenms/includes/functions.php on line 2336
2020-03-21 14:49:15 -05:00
Tony Murray
df16de9d2f
Refactor Datastores to allow future improvements. OpenTSDB Tags. (#11283)
* Datastores to object oriented code, using the Laravel IoC container

Change instantiation
better DI
move OpenTSDB

Small re-orgs

remove unused stuff

Fix graphs and other scripts

Use DI for all except rrd

fix up connection error handling

Add tests, fix up a "few" things
Add Config::forget()

Style fixes

Don't reference legacy code

remove accidental code paste

Add datastores phpunit groups

some tests

* rebase fixes

* some test fixes

* shorter tests

* shorter tests

* Don't except when rrdtool can't be started.

* restore tests

* fix rrd tests

* fix iterable change upstream

* fix isValidDataset

* fix invalid data bug

* fix mysql incorrect ds

* fix issue with data that is too long

* use regular data_update()

* Use log facade

* OpenTSDB mis-ordered arguments fix

* Making a singleton with different options makes different singletons.  Just use the global config settings to disable datastores.

* only filter tags for datastores that won't it don't modify the tags permanently

* Update copyrights to include original authors.

* Stats for all datastores

* Fix mysql sends different rrd / other ds names

* fix snmp last stats not initialized
remove unused function

* remove unused function and move single use function closer to its use

* InfluxDB does not need to update null or U values.
Skip write if all fields are empty

* Fix smart value checks

* fix style issues

* Make sure port data is stored the same way as before for Graphite and OpenTSDB
Add ifIndex tag to all to be compatible

* Missed rrdtool_tune() call

* Test update WIP

* OpenTSDB now includes tags

* fix style
2020-03-16 09:17:58 -05:00
Tony Murray
7fe895bd08
Revert "Refactor datastores to classes (#9179)" (#11273)
This reverts commit e5dad7a64e.
2020-03-11 07:52:52 -05:00
Tony Murray
e5dad7a64e
Refactor datastores to classes (#9179)
* Datastores to object oriented code, using the Laravel IoC container

Change instantiation
better DI
move OpenTSDB

Small re-orgs

remove unused stuff

Fix graphs and other scripts

Use DI for all except rrd

fix up connection error handling

Add tests, fix up a "few" things
Add Config::forget()

Style fixes

Don't reference legacy code

remove accidental code paste

Add datastores phpunit groups

some tests

* rebase fixes

* some test fixes

* shorter tests

* shorter tests

* Don't except when rrdtool can't be started.

* restore tests

* fix rrd tests

* fix iterable change upstream

* fix isValidDataset

* fix invalid data bug

* fix mysql incorrect ds

* fix issue with data that is too long

* use regular data_update()

* Use log facade

* OpenTSDB mis-ordered arguments fix

* Making a singleton with different options makes different singletons.  Just use the global config settings to disable datastores.

* only filter tags for datastores that won't it don't modify the tags permanently

* Update copyrights to include original authors.

* Stats for all datastores

* Fix mysql sends different rrd / other ds names

* fix snmp last stats not initialized
remove unused function

* remove unused function and move single use function closer to its use

* InfluxDB does not need to update null or U values.
Skip write if all fields are empty

* Fix smart value checks

* fix style issues
2020-03-10 19:08:00 -05:00
wikro
6a897b5c4a
PHP hashes are case sensitive. (#11151)
* PHP hashes are case sensitive.

* Make naming consistent

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-02-18 16:16:04 +01:00
Joseph Tingiris
fda335d7ec
If device_perf is inserted and the ping was successful then update the devices last_ping timestamp (#11117) 2020-02-09 08:19:30 -06:00
Martijn Schmidt
a64bd45dbc
Update IronWare sensors & bgp-peers discovery, allow skip_values to target a specific index appended to the OID (#10941)
* Migrate ironware sensor discovery from php to yaml.

* More sensors, add grouping.

* dynamic_discovery_get_value() becomes getValueFromData()

* Target a specific index with skip_values.

* Improve Brocade BGP session discovery/polling

This commit allows for the correct discovery of BGP sessions
with 32-bit ASNs, IPv6 neighbors using the BGP4V2-MIB which is
based on draft-ietf-idr-bgp4-mibv2-11 and also polls for IPv4
unicast received routes through the FOUNDRY-SN-BGP4-GROUP-MIB.

Copied most of the code from PR#8877 by @Mikeburke14, cleaned
up the code a little bit to match the normal LibreNMS style,
and fixed bgpPeers_cbgp discovery as well as polling for the
ipv4.unicast neighbors.

Note that older Brocade IronWare firmware versions are known
to have multiple defects relating to the BGP4V2-MIB which
might result in certain missing non-established neighbors.

Related vendor defect numbers:

- DEFECT000633962
-- Symptom: The OID bgp4V2PeerAdminStatus does not return the
            correct value
-- Reported: NI 05.7.00
-- Resolved: NI 05.8.00g

- DEFECT000583319
-- Symptom: SNMP polling on bgp4V2PeerTable (OID brcdIp.3.5.1.1.2)
            does not display all the BGP entries
-- Reported: NI 05.6.00
-- Resolved: NI 05.8.00e

- DEFECT000550309
-- Symptom: SNMP polling on bgp4V2PeerTable (OID brcdIp.3.5.1.1.2)
            does not display the full information
-- Reported: NI 05.7.00
-- Resolved: NI 05.8.00c

* Add ironware CER & ICX platform test data.

* Re-add ironware.json compatible with current master branch.
2020-02-01 23:28:03 +01:00
SourceDoctor
7950893cd1
Alternate Poller IP instead of Hostname (#10981)
* optional alternative poller ip

* add missing schema update

* .

* enhance API Call 'add_device' with overwrite_ip key

* .

* .

* updating docs
2020-01-30 06:20:30 -06:00
LEV82
9ce7c83caa Add bad_ifoperstatus for filtering interfaces having a status for example 'notPresent' (#10977)
* Add bad_ifoperstatus for filtering interfaces having a status for example notPresent

* Add bad_ifoperstatus for filtering interfaces having a status for example notPresent

* Add bad_ifoperstatus for filtering interfaces having a status for example notPresent
2020-01-24 05:58:01 -06:00
SourceDoctor
4232bf2f36 API Call for triggering Device discovery (#10861) 2019-12-08 22:17:27 +01:00
PipoCanaja
bf181b9dc2
Added support for routing table collection in discovery (#10182)
* Clean broken VRF lite code
* Change DB table for route discovery
* Add VRF simple support
* add port_id to db and discovery
* static-fy the translation arrays
* sort and search cleaning
* Sorting refactor and validation
* formatItem shortened
* Handle ifIndex==0 meaning no next hop defined (MPLS)
* Sync all create/updates
* purge in daily
* remove old route table
* get rid of inetCidrRouteNextHop_device_id
* fix wonky column orders
* add route snmprec
* fix sorting by interface
* Move to new config
* rename to route the new table
* Properly display ipv6 compressed addresses
* Translation before merge ./lnms translation:generate
* Update manifest
2019-11-17 16:30:43 +01:00
Tony Murray
dec9a498ee Updated device cache support (#10795)
* Device Cache
also some additional device related models

* attribs from cache

* replace common attribute functions

* remove legacy cache usage
tidy up some collection manipulation
remove some unused or single use functions

* cleanup some items

* always return a device, to prevent bugs

* clear device cache when testing after each test

* fix double assignment

* Clean up function to take advantage of null object
2019-11-14 21:56:06 +00:00
louis-oui
0b01daa84c Do not purge alert_log table entries that have a matching active alert in alerts table (#10744)
* https://github.com/librenms/librenms/issues/10686

* Do not purge alert_logs table when there is a matching active alert in alerts table

* Do not purge alert_log table when there is a matching active alert in alerts table

* Do not purge alert_log table entries that has a matching active alert in alerts table

* Update daily.php

* Do not purge alert_log table entries that has a matching active alert in alerts table

* Do not purge alert_log table entries that has a matching active alert in alerts table

* Update functions.php

Missing }

* Do not purge alert_log table entries that has a matching active alert in alerts table

* Do not purge alert_log table entries that has a matching active alert in alerts table

* Do not purge alert_log table entries that has a matching active alert in alerts table

* Add deleting history of active alert_logs more than ? days

* Commit to replay CI

* Commit to replay CI
2019-11-05 14:49:09 +01:00
Jellyfrog
8e1a7d75a4 Always sort indexes in dump_db_schema (#10732)
This avoids unnecessary diffs when MySQL outputs in different order
2019-10-22 13:50:41 +00:00
Tony Murray
699aa8a042
Consolidate configuration settings and implement dynamic webui settings (#9809)
* initial db/defaults dump

* numeric values

* Remove $config['time']

* Use config_definitions.json

* try setting definition as a complete array

* a little more

* fix format

* WIP converting dynamic setting pages

* rewriting the webui

* remove legacy and add translations

* finish email section

* improve navigation
update js a bit

* Import the remaining existing settings

* Update backend still some wip
migration

* fix config loading (db not overriding defaults)

* some cleanup

* more array collapsing

* update settings

* Settings search

* add purge settings to ui, order groups and sections

* collapse more arrays

* Auth definitions WIP

* remove needless slash escapes

* add warning to json

* moving settings from defaults.inc

* remove slow_statistics

* Move rrdtool settings to the poller section

* Use translations more consistently

* removing more settings from defaults.inc.php

* show setting name in tooltip

* allow help text to be shown on mobile

* disable settings that are set in config.php

* Implement undo and reset to default.

* Vue.js functional

* Vue.js WIP

* Implement tabs component

* accordion WIP

* lodash ver update

* two items

* Accordion somewhat working

* hash navigation

* Refine Accordion

* Fix up tab styling a bit

* Cleaner tab selected property
Hide html while loading

* spinner?

* Icon support
property for accordion to active

* WIP

* Tabs/Sections from ajax

* Setting Component skeletons

* Dynamic Component resolution

* Basic functionality

* toggle class

* Refactor components

* translate tabs and accordions

* simple array attempt

* improve readonly tooltip

* array styling

* array value editing

* organize snmp info

* Handle initial tab/section in url

* Use Laravel to parse tab/section, dump old

* Draggable array entries

* v-tooltip, for clickable (and touch) help tooltips
disable draggable

* Navigation WIP

* Navigation WIP

* groups computed

* filter settings

* fix event reference

* vue.js i18n initial

* missing description = just setting name

* en fallback

* tidy up the language support and js generation

* persist value to db

* fix issue with 0

* Delete settings from DB instead of setting them to default

* ldap-groups
fixup style

* Default dashboard selection

* fix array of options instead of object

* allow custom validation for settings

* translate options in SettingSelect

* SNMP v3 WIP

* fix setting arrays

* Split persist out of set

* Hook up events for SNMP v3 Auth
correct Config::persist behaviour with arrays

* dependent settings (primitive for now)
actually update the settings values in the LibrenmsSettings component

* more complex "when" behaviour

* remove un-needed seeder

* add poller_modules.cisco-qfp

* remove en.json (disable warning)

* don't set default for log_dir or log_file, otherwise it won't be processed correctly

* Fix module order
add some missing settings

* more config corrections

* correct graphs
correct loading values set to null (although it should have no difference)
remove project_name_version

* Add nfsen settings.  Docs are very confusing, so might have flubbed something
remove option for array definition of select option as numeric indexes messes it up

* Correct more upstream config differences

* Config cleanup after a bunch of merges.

* Fixes

* add version tags to js/css files
remove old js

* Print out full settings list read-only

* Add http_proxy setting
fix indents in config_definitions.json

* repeaters default is 0 (aka 20)

* cleanups

* rewrite the dynamic config docs

* add language docs

* Don't show snmp v3 auth add/remove if disabled by config.php
2019-10-16 21:22:05 +00:00
Tony Murray
1f483c5318 Fixed duplicate ping response causing false down (#10692)
* Fix duplicate ping response showing false down
Log event that duplicate was detected
Escape fping cli parameters
add unit test

* Update FpingTest.php
2019-10-16 09:36:54 +01:00
SourceDoctor
2e2c329e9c automatically cleanup plugin-table from removed plugins (#10533)
* automatically cleanup plugin-table from removed plugins

* Update functions.php

* mis-placed bracket
2019-08-27 12:47:04 -05:00
Tony Murray
e99f421511
Remove legacy auth usage of $_SESSION (#10491)
* Remove auth use of $_SESSION

Will break plugins that depend on $_SESSION, Weathermap was already fixed.
Port them to use Auth::check()/Auth::user()/Auth:id()

* revert accidental replacement
2019-08-05 14:16:05 -05:00
PipoCanaja
71da38cdf5 Added skip_values operator and documentation (#10419)
* more operators

* os_schema

* discovery_schema

* doc

* doc
2019-07-09 15:47:02 +01:00
Tony Murray
f3ba8947f7
Use Config helper (#10339)
remove usage of global variable
2019-06-23 00:29:12 -05:00
Tony Murray
27bc9a1cfb
Fix hytera_h2f bug (#10281) 2019-05-30 09:56:27 -05:00
Tony Murray
c9748b166e
More url helper fixes (#10241)
* More url helpers
graph links
ajax search

* Fix for non-Laravel pages using the url helper

* fix widget settings
2019-05-21 08:50:45 -05:00
PipoCanaja
a2d378e0be Display Up/Down time in Device List (#9951)
* First attempt of Up/Down time

* First attempt of Up/Down time

* Moved to Time::formatInterval()

* cleaning

* last polled in casts

* Cleaning the variants of formatUptime()

* Cleaning in ./html/includes/dev-overview-data.inc.php

* Cleaning in ./html/includes/dev-overview-data.inc.php

* Cleaning in ./html/includes/dev-overview-data.inc.php

* updated includes/polling/core.inc.php

* updated includes/alerts.inc.php

* clean accessors
2019-03-17 21:09:58 -05:00
Tony Murray
cb005210d2
Resubmit #9608 (#9941)
* Reorganize trap tests

* Testing db DRIVER to prevent .env from interfering

* New code to detect if Laravel is booted.  Hopefully more reliable.

* WIP external test process

* revert module test helper

* Use .env in Eloquent::boot()

* Fix test database settings loading

* fix undefined classes
(didn't find the one I needed)

* Fix incorrect Config usages
And RrdDefinition return type

* fix .env loading

* use the right DB

* slightly more accurate isConnected

* Move db_name to DBSetupTest specifically

* restore $_SERVER in AuthSSOTest

* missed item

* WIP

* tear down in the correct order.

* some testing cleanups

* remove check for duplicate event listener, it's not working right

* Don't need this change anymore

* Implement Log::event to replace legacy function log_event()

* fix port tests

* fix up tests

* remove pointless TrapTestCase class

* fix style

* Fix db config not being merged...

* skip env check for tests

* defer database operations until after Laravel is booted.

* don't include dbFaciale...

* redundant use
2019-03-12 23:59:03 -05:00
Tony Murray
eb648a1d6f
Revert "Changes to improve testing (#9608)" (#9937)
This reverts commit d1a0ccda46.
2019-03-12 00:49:14 -05:00
Tony Murray
d1a0ccda46
Changes to improve testing (#9608)
* Reorganize trap tests

* Testing db DRIVER to prevent .env from interfering

* New code to detect if Laravel is booted.  Hopefully more reliable.

* WIP external test process

* revert module test helper

* Use .env in Eloquent::boot()

* Fix test database settings loading

* fix undefined classes
(didn't find the one I needed)

* Fix incorrect Config usages
And RrdDefinition return type

* fix .env loading

* use the right DB

* slightly more accurate isConnected

* Move db_name to DBSetupTest specifically

* restore $_SERVER in AuthSSOTest

* missed item

* WIP

* tear down in the correct order.

* some testing cleanups

* remove check for duplicate event listener, it's not working right

* Don't need this change anymore

* Implement Log::event to replace legacy function log_event()

* fix port tests

* fix up tests

* remove pointless TrapTestCase class

* fix style
2019-03-11 22:59:39 -05:00
Tony Murray
e677d4b63e
Fix incorrect icon sometimes (#9887)
* Fix icon finding
Also fix os suggest not loading all OS.

* Fix os that would have missing icon under the new code (and one under the old code)

* forgot icon
2019-03-01 23:06:01 -06:00
Felicián Hoppál
942dc65122 Update to PHPMailer 6.0 (PHP 7.3 support) (#9818) 2019-02-15 00:53:41 -06:00
Tony Murray
0b802d6571
Fix for failed sql query during db dump (#9815) 2019-02-13 13:19:45 -06:00
Tony Murray
61a48fbdd2
Fix schema validation and os def cache invalidation (#9789) 2019-02-06 10:53:25 -06:00
Tony Murray
590c488d74
Rewrite devices page backend (and a little frontend) (#9726)
* Implement devices table data output

* initial filter

* Add select2 filters
improve table header layout
improve init_select2

* bump versions to be safe

* add group filtering
fix location sorting

* allow filter value morphing

* add missing state filter

* remove the old devices endpoint
2019-01-25 15:31:33 -06:00
Tony Murray
9ad492ce19
Better IP exists feedback when adding a device (#9697)
* Better IP exists feedback when adding a device

* Use Eloquent, push query into function and rename function.
2019-01-19 12:46:03 -06:00
Erik
a6451860fc Fix if discover (#9643)
* fix_if_discover

* Update ports.inc.php

* Fixed overwriting IfDescr and IfAlias overwriting

* removed whitespace

* added ifname, ifalias and ifdescr copy if it is emtpy or null

* removed ifAlias from update to prevent overwrite

* removed ifName and ifDescr from update to prevent overwrite

* added is_port_valid before doing copy actions between ifDescr,ifAlias&ifName also added back ifDescr&ifName update

* Update ports.inc.php

* Update functions.php

* Update ports.inc.php

* Update exa_e7-2.json

* Update fortigate.json
2019-01-19 11:48:30 -06:00
Tony Murray
10f6eac677
Validate database constraints (#9670)
* Validate database constraints

* Fix some differences with migrations

* Update functions.php
2019-01-17 08:59:42 -06:00
Tony Murray
a991270fa7
Fix dbSchema 1000 skipping schema files (#9685) 2019-01-17 08:53:32 -06:00
Paul Heinrichs
ebe2ecf524 Laravel migrations (#8868)
* Add migrations and seeds

* Fix spacing validation issues

* Fix linting

* Update tabs to spaces

* Update daily and install process

* Make build-base.php use the new migrations if empty or at dbschema 1000.
Seed 1000 into the database.
Temp fix for the route table index length (this table basically isn't used...)

* Fix typo in seed.
Hard code legacy schema checks to version 1000 (999 would have worked as is)

* Port association table no longer exists

* Make database validate again

* DB schema, remove as many DB::statement as possible

* update migrations
add librenms cli entry point (artisan)
update validate to check laravel migrations

* remove statements from users migration

* Fix up daily.sh and the 1000 migration

* Update migrations to current state
Take advantage of environment variables to set DB credentials.

* Fix style issues

* Update schema

* fix test db collation

* Fix migration table definition

* update db migrations

* Update migrations

* Update stats callback.  Just count the total migrations applied.

* Update 1000.sql.

* update migrations

* remove the graph type seeder, it is no longer needed

* update docs

* fix whitespace

* remove extra schema

* update tests

* fix sort

* add message

* dbSchema should actually be 1000

* add character set to db create

* Fix some artisan issues

* Update schema
2019-01-14 06:44:23 -06:00
Tony Murray
daffa7e274
Eventlog updates (#9633)
* Eventlog updates
remove host from eventlog table, retain in api
allow most fields nullable

* updated schema

* revert auth for legacy log_event function
safer check in the model

* add function modifiers
2019-01-10 00:52:00 -06:00
Tony Murray
5cdc49df1b
Hook up librenms cli debug (#9632)
* Hook up librenms cli debug

* forgot to add function exists check, good travis-ci :)
2019-01-09 19:36:32 -06:00
Jose Augusto Cardoso
aa25b2b47a NAC Polling (Network Access Control) (#9227)
* RouterOS wireless sensors update (#9401)

* bug-fix and new features

Fixed incorrect OID for rate, renamed rate to TX-Rate as per update from mikrotik.

Added support for link distance

* Fixed indent issue

* Added support for using Transport name in templates (#9411)

* Added ability to sort alert schedules by status (#9257)

Signed-off-by: Rémy Jacquin <remy@remyj.fr>

* Converted Polling From Ports to New Module (cisco-nac)

* Converted Polling From Ports to New Module (cisco-nac)

* Fixed alert util (#9428)

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.

* Fixed AlertUtil - again (#9429)

* Update BEGEMOT-HAST-MIB (#9427)

FIX: 
Due to a missing import and the uppercase after some SYNTAX this mib is not bein compiled correctly everywhere.
For example the one from Horizon OpenNMS fails with some errors 
ERROR: Cannot find symbol UNSIGNED32, Source: BEGEMOT-HAST-MIB.txt, Row: 321, Col: 17

The proposed change prevent the errors.

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.

* Fixing Travis CI and Code Climate Issues

* Fixing Travis CI and Code Climate Issues

* Fixing Travis CI and Code Climate More Issues

* Fixing Travis CI and Code Climate More Issues

* Fixes delta calculation for bgpPeers_cbgp metrics (#9431)

The values in the $peer['c_update'][$oid] array are set only if they have
changed. If the value has not changed, then zero is substituted for real
values, which leads to incorrect calculation of delta values and records
in the database:

SELECT AcceptedPrefixes,AcceptedPrefixes_prev,AcceptedPrefixes_delta
FROM bgpPeers_cbgp
WHERE device_id=115;

| AcceptedPrefixes | AcceptedPrefixes_prev | AcceptedPrefixes_delta |
|------------------|-----------------------|------------------------|
|               21 |                    21 |                    -21 |

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.

* Improve Junos state sensor discovery (#9426)

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [X] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.

Tested on MX and EX series, works fine.
Skip slots that are empty and pull all sensors in jnxFruTable, data from old code is preserved.

* Added alerts schedule notes into device notes (#9258)

* Add alerts schedule notes into device notes

Signed-off-by: Rémy Jacquin <remy@remyj.fr>

* Update preferences.inc.php

* Show port description and dns name in FDB table (#9370)

- Added Port Description field to FDB Table
- Added DNS Name field to FDB Table
- Fixed sorting by port in FDB Table

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.

* Update draytek.inc.php (#9432)

* Removed unnecessary model checks in HiveOS Wireless (#9409)

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.

* Added format field to Telegram Messages (#9404)

* Add format field to Telegram Messages

Added Telegram field to send formatted messages as Mardown or HTML

* Update Telegram.php

* Correct Mistypo.

* Correct mistypo

* Correct Mistypo

* Correct mistypo

* Update Transports.md

* Add Format field on Telegram Examples

* Change Telegram Format field to type select

* Add "blank" option to Format field

* Update Telegram.php

* Update Telegram.php

* Update Telegram.php

* Disable page refresh on health sensors pages, autorefresh most tables (#9386)

* Disable page refresh on health sensors pages
Refresh all bootgrid tables every 5 minutes

* Update legacy_index.php

* Update librenmsv1.blade.php

* Style cleanup in hiveos file (#9440)

Fix code style check for https://github.com/librenms/librenms/pull/9438

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.

* Ensure the checks for ASA context devices are strict (#9441)

* Show visually in webui + cli when using deprecated templates or transports (#9413)

* Show visually in webui + cli when using deprecated templates or transports

* Fixed query

* Added Bing geocode lookup support (#9434)

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.

* Added ScreenOS Syslog Hook (#9438)

* Add ScreenOS Syslog Hook

Adds Syslog Hook for ScreenOS
https://community.librenms.org/t/juniper-screenos-syslog-hook/6146

* Update Syslog.md

* Update syslog-notify-oxidized.php

* Discovery YAML. Do not implicitly append $index (#9315)

Require it explicitly. Makes it easier to understand and matches the style of other values

Questionable YAML changes (either broken before or now broken):
secureplatform: haStatCode
ptp600: receiveModulationMode

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.

* Update Syslog.md (#9443)

Fixed the screenOS output added in #9438 which was confusing mkdocs output. Refer to the docs currently https://docs.librenms.org/Extensions/Syslog/ - It's all mashed up at the bottom

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.

* Fix ping.php poller groups setting
confusion between dispatch(new PingCheck($groups)) and PingCheck::dispatch($groups)

* Replaced Other to Disabled on Metod Column

* Replaced Other to Disabled on Metod Column

* Removed Extra Character < on Authz Icon

* Removed Extra Character < on Authz Icon

* Created sql-schema (261)

* Created sql-schema (261)

* Update docs for virtual images (#9456)

* Added Traffic to the Windows OS overlib graph (#9445)

WebUI: added Traffic to the Windows OS overlib graph

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [X] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.

* Update World-Map.md to include pros/cons (#9442)

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [ ] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.

* Added allow ipv6 address localhost nginx-status docs (#9458)

Following the modification of the SNMP Nginx agent (e0dcd4a064), linux distributions make requests in IPV6, so you must allow ::1 


DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.

* Fixed altering transport mapping in rules clearing all mappings (#9455)

* Change unpolled devices toast to be based on rrd step (#9391)

* Change unpolled devices toast to be based on rrd step

* Update message

Change it back to 3x

* Added resources/links and devices/hostname/links API calls for xDP (#9444)

* api: Add list_links and get_link api calls

Signed-off-by: Misha Komarovskiy <zombah@gmail.com>

* api: Add get_links api call

Signed-off-by: Misha Komarovskiy <zombah@gmail.com>

* Update detection for Allied and Radlan OS (#9454)

"1.3.6.1.4.1.207.1.4.128" is currently reporting as allied, when it should be reporting as radlan.

Refer to https://community.librenms.org/t/allied-telesis-discovery/6189/8

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.

* Updated HiveOS wireless detection (#9459)

* Added ability to record traceroutes for devices down due to ICMP (#9457)

* Added ability to record traceroutes for devices down due to ICMP

* Update Templates.md

* Updated schema

* Update dev-overview-data.inc.php

* Filter email options based on backend in Alert settings (#9461)

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.

* Update Configuration.md

* Updated detection for AKCP devices (#9460)

* Updated support for Avocent devices (#9462)

* Updated support for Avocent devices

* Add ACS8048 hardware to json

* Update avocent.inc.php

* Update avocent_8000.json

* Syslog name translation (#9463)

* Check to see if a host exists in a lookup table to translate received name to what LibreNMS knows

* Added some documentation on how this is configured

* Use \LibreNMS\Config instead of accessing $config directly

* Fix codeclimate finding: Additional blank lines after USE statement

* murrant suggested a much cleaner way of doing this!

* fix snmp engine time (#9470)

* Added more sensors for IRD (PBI Digital Decoder) (#9339)

* added over bitrate graph

* added bitrate

* added more state sensors

* Update ird.snmprec

* Update ird.json

* Update Ird.php

* Update Ird.php

* Update Ird.php

* Update ird.json

* Updated json test data

* Update ird.snmprec

* Updated json data

* fix test value

* fix num_oid

* Add new sysDescr string for AlliedWare Plus products. (#9430)

* Add new sysDescr string for AlliedWare Plus products.

Release 5.4.8-2.1 of AlliedWare Plus will change the format of the
sysDescr string. This patch updates Allied Telesis yaml files to work with
this change.

Signed-off-by: Luuk Paulussen <luuk.paulussen@alliedtelesis.co.nz>

* save-test-data.php: Use correct variable for 'os' argument.

Signed-off-by: Luuk Paulussen <luuk.paulussen@alliedtelesis.co.nz>

* Create awplus_5.4.8-2.json

* Update awplus_5.4.8-2.json

* add a tool for working with JSON apps (#9084)

* add initial work on script for working with json apps

* finish the code portion

* -h now done

* rename it to be slightly more accurate

* make hash key strings

* exit if -a is not present

* now exit after checking the file if -s or -t is given

* now properly add the applications key

* snmp_max_oid per Os support and snmpv1 multi_oid fix (#9343)

* Added snmp_max_oid config at Os level.

* Added check for snmpv1 on multi_oid requests.

* Check  device_oid_limit on multi get

* Use array_chunk

* Update snmp.inc.php

* remove dump, unused variable and extra plodes

* per device settings should take priority over OS

* Update Settings.md

* don't discard the data :P

* fixing option to let user pick saved test data filename, exit if ther… (#9242)

* fixing option to let user pick saved test data filename, exit if there are many os/variant combination for a single output filename

* fixing style issues

* Update save-test-data.php

* Update save-test-data.php

* Add support for Firebrick Hardware (#9403)

* Added support for Firebrick devices

* Added support for Firebrick devices

* Update firebrick.inc.php

* Update firebrick.inc.php

* Update firebrick.svg

* Update firebrick.svg

* Added SNMP Check

* Added SVG View Box

* Display XML in config tab

* Update firebrick.svg

* Update firebrick.yaml

* Update showconfig.inc.php

* Create firebrick.json

* Check sysDescr for JunOS version. (#9247)

* Cisco: change notKnown status to unknown and not warning (#9222)

* Cisco: change notKnown status to unknown and not warning

* Update cisco.inc.php

* Improve the Logical Checking if Data Exist on DB

* Improve the Logical Checking if Data Exist on DB

* Update SQL-Schema File Name

* Update SQL-Schema File Name

* add app for getting status of TCP connections for specified services (#8090)

* add the poller for portactivity

* add the ability to get monitor ports for portactivity

* add the graphs for displaying stuff for the portactivity app

* add the portactivity app page

* update the docs for Portactivity

* remove extra line

* minor doc update for Portactivity

* add update_application line

* convert to use json_app_get

* convert curly brackets to square

* style fix

* remote error, errorString, and version after they stop being important so they are not processed

* add alert rule examples

* add the poller for portactivity

* add the ability to get monitor ports for portactivity

* add the graphs for displaying stuff for the portactivity app

* add the portactivity app page

* update the docs for Portactivity

* remove extra line

* minor doc update for Portactivity

* add update_application line

* convert to use json_app_get

* convert curly brackets to square

* style fix

* remote error, errorString, and version after they stop being important so they are not processed

* add alert rule examples

* remove dump of get_portactivity_ports function added during rebase

* update to the current json_app_get

* add portactivity snmprec

* add the portactivity test data

* whoops bad merge when rebasing... fix

* minor formatting cleanup and add a missing comma

* fix some odditities with what one of the tests is doing

* whoops... include the use for the exception

* set the response to okay

* attempt to make snmpsim array check happy again

* the json now lints

* more making metric testing happy

* one more update to make travis-ci happy

* now flattens arrays also add array_flatten

* rename array_flatten to data_flatten as pre-commit chokes on it as laravel has something similarly named

* go through and properly add all the metrics

* tested with the newest one and it works

* whoops, clean up json and remove prototype that was used when putting it together

* doh! make it happy with laravel now

* see if a minor changing in formatting for the numbers makes the polling unit test happy

* order them properly

* remove a comma

* a few more minor fixes

* Replace dbFetchRows to dbFetchRow on Some Exist Checks

* Replace dbFetchRows to dbFetchRow on Some Exist Checks

* Fix Some Code Climate Issues

* Fix Some Code Climate Issues

* Fixed More Code Climate Issues

* Fixed More Code Climate Issues

* Fix do not include template text in HTML page (#9476)

* Fixed $speed lenght in port parser when > 32 characters (#9479)

* Fix global read check for demo account (#9482)

* Improve documentation for service plugins (#9414)

* Begin adding preinstalled plugin documentation.

Also add information about how the titles of the plugins are displayed and detected.
Make page visible on the websites Table of Contents.

* Add note about plugin loading based on file name.

* Added all monitoring-plugins URLs.

* Format URLs on the service plugin docs list.

* Correct a URL on the plugins list.

* Removed leftover text from plugin list docs.

* Add pkg-nagios-plugins-contrib plugins to docs.

* Add DSA pkg-nagios-plugins-contrib plugins to docs

* Added a few missing lines of pkg-nagios-plugins-contrib text.

* Remove links plugins we dont have URL for.

Add a few more pkg-nagios-plugins-contrib ones.

* Remove list. Point to the main sources directly.

* order by sensor_descr aswell (#9478)

Sort sensors by sensor_descr

* Fix os additional information for some that were broke (#9466)

* Fix os additional information for several OS.
$poll_device is not available, use $device

* fix draytek test data

* Fixed Procera ports ifIndex and ports added by the poller (#9384)

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.

* Change group owner for php/session for CentOS 7 nginx install (#9393)

By default on CentOS 7, /var/lib/php/session is root:root.

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.

* Refactored and update Location Geocoding (#9359)

- Fix location so it is a regular database relation (this allows multiple devices to be accurately linked to one location and saves api calls)
- Parse coordinates from the location more consistently
- Add settings to webui
- ~~Used [PHP Geocoder](http://geocoder-php.org/), which has lots of backends and is well tested. (also includes reverse and geoip)~~
- Google Maps, Bing, Mapquest, and OpenStreetMap supported initially.
- Default to OpenStreetMap, which doesn't require a key.  They will liberally hand out bans if you exceed 1 query per second though.
- All other Geocoding APIs require an API key. (Google requires a credit card on file, but seems to be the most accurate)
- Update all (I think) sql queries to handle the new structure
- Remove final vestiges of override_sysLocation as a device attribute
- Update existing device groups and rules in DB
- Tested all APIs with good/bad location, no/bad/good key, and no connection.
- Cannot fix advanced queries that use location

This blocks #8868

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.

* Added Aprisa support (#9435)

* Created 4RF Aprisa XE support

* Made requesed change by @laf

* cleanup

* Fix sensor index and add test data

* Added support for Waystream products (#9481)

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [X ] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.

This has been running in two production networks for > 3 months without any issues.

* Marathon detection

* support for Marathon based UPSs

* added Marathon Power logo

* testing marathon ups

* Fix for #9485 (#9486)

* Fix for #9485

* Update ajax_search.php

* Testing Maraton ups device type

* Fix issues cause by new location and other misc (#9490)

* Fix issues cause by new location and other misc
fix some queries so we return devices with null locations
remove unnecessary query of all ports on ports page lists
make locations menu available to non-admins for the legacy menu
fix a few issues with the old network-map

* fix graphs

* fix oxidized query

* added rfc1628 compat and removed discovery file

* small changes to verbiage

* Changes to display

* Fixed test on over section

* Removed Current graph.  Not available from this device.

* Locations UI and editing (#9480)

* Better handling of errors
Mapquest seems to return the center of the US on error.......

* Editable locations WIP

* Change to bootgrid ajax table WIP

* Graphs working, using handlebars
update js libs
add current location button

* remove sql query, change icon

* Add the map to the device view, only when gps is expanded.
Allow edit on device page, share js code

* fix chevron rotation, improve click area

* extra warning

* fix overview layout (remove containers)

* fix style

* fix html divs, change collapse ui a bit
move css, update css/js versions

* start zoomed out on new locations

* don't double load scripts, zoom to 17

* fix php-md errors, remove unused use statement

* improve non-admin experience

* Move locations page to Laravel
More functions in Url and Html util classes
reduce code duplication

* translation buttons too

* fix whitespace

* move formatters to the frontend

* small changes

* disable traffic for locations with no devices

* change down 0 to green from gray

* missing "

* Fix paginate all

* working fix for paginate all

* allow sort by counts

* fix down sort

* a little safety

* Don't call the function twice

* btn-xs

* Added json test data

* Fix locations page search (#9501)

* Add bing layer to leaflet (#9497)

Also, polyfill for IE used by both bing and google maps

* Change locations default sort order (#9502)

* changed variable name to resolve issue with Gitlab transport

* removed else to satisfy codeclimate checks

* changed tabs to spaces

* added CISCO-NAC-TC-MIB

* added CISCO-NAC-TC-MIB

* Added changelog for 1.46 release (#9510)

* Add additional composite index to speed up display of pages where a device has a lot of syslogs. In our environment, this took page loads for some devices from over 60 seconds to nearly instant

* Forgot to add db_schema.yaml in previous commit

* Update cucs mib to fix warnings (#9517)

* Added HPE Comware temperature limit (#9518)

Changed the Temperature High threshold for a HPE Comware Switch to the values provided by snmp.
This means the actual threshold configured in the switch is used over any predefined/auto calculated thresholds by LibreNMS.


DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.

* Added Comtrol device detection (#9491)

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.

* Fixed integers fields in alert rules to be string (#9496)

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.

* Focus and select location on override (#9503)

* Focus and select location on override

* Submit location on enter key

* SAF CFM wireless device support (#9450)

* Added support for SAF CFM L4 wireless device

* Added copyright statement according to LibreNMS documentation

* Added snmp test data and excluded some discover modules from os definition

* Style issue fixed

* More descriptive function

* MIB file rename

* Rename MIB file and change other files accordingly

* Added test data

* Removed debug statement

* Last checks

* Style changes

* Style changes

* Style changes

* Style changes

* Code restructure to make it more readable

* Fixed error in foreach

* Style issues

* Formatting of states within Yaml changed to make it more readable

* Omit default arguments

* Better code and modules only in CFM-M4P-MUX

* Chaged cfml4 to cfm

* Update Sensor.php

* Update Sensor.php

* Better handling of scientific numbers

* Better handling of scientific numbers

* New test data

* Correction on handling trailing zeros

* Different way of cleaning the numbers based on Tony's input

* Audiocodes initial support (#9508)

* Create audiocodes family with very basic sensors

* audiocode polling php and test files

* audiocode polling php and test files

* audiocode test files

* audiocode cleaning

* tests with selective polling disabled

* GitHub test script updates  (#9507)

* GitHub test script updates
add --reject to apply so it will skip binary files since GitHub does not create diffs for them correctly
Add new directories to the removal cleanup. Remove non-existant ones.

* Cleaner way to apply skip png files explicitly.
That way patches are still atomic.

* [UI] Fix last column of table (#9506)

* [UI] Fix last column of table

* move td outside of if and remove else

* Add Device Dragonwave Harmony Enhanced (#9499)

* Add Dragonwave Harmony Enhanced MC Device

* Remove single quote from null and 10 divisor

* Update and rename HarmonyEnhancedMc.php to HarmonyEnhanced.php

* Rename harmony-enhanced-mc.yaml to harmony-enhanced.yaml

* Update and rename harmony-enhanced-mc.yaml to harmony-enhanced.yaml

* Rename harmony-enhanced-mc.inc.php to harmony-enhanced.inc.php

* Rename harmony-enhanced-mc.snmprec to harmony-enhanced.snmprec

* Update HarmonyEnhanced.php

* Update HarmonyEnhanced.php

* Update HarmonyEnhanced.php

* Update HarmonyEnhanced.php

* More Code Climate Fixes

* Create harmony-enhanced.json

* Dynamic_discovery_get_value in can_skip_sensor to use all oids in skip_values (#9495)

* Use of dynamic_discovery_get_value in can_skip_sensor in order to use all available oids in skip_values

* Use LibreNMS\Device\YamlDiscovery code instead of keeping duplicated function can_skip_sensor

* Fix Travis errors

* Device management fall back to http if https isn't available.
Adds a slight delay on management clicking, may be blocked by popup blocker...

* Updated harmony OS poller to use multi get (#9525)

* docs: fix images doc (#9527)

There is no capital I in the password...

* fix error when location is missing from the DB (#9523)

* get geolocation at first poll (#9522)

* get geolocation at first poll

based on the logic of code, we will have to wait 2 days from adding new device for lat and lng to be updated

* Update Location.php

* Update Location.php

* Fixed Typo in YamlDiscovery.php (#9530)

Hi,

As far as I understand the code, it seems that array_reduce should be array_replace in this line, isn't it ?

PipoCanaja

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [X] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.

* Fixed alert log showing only green instead of all by default (#9529)

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.

By default, when you access Alert History it was showing only OK (Green) ones instead of all. You had to hit filter to show them.

* Fixed customers page (#9521)

move customers table backend to Laravel

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.

* Added detection if this is a git based install or not. (#9379)

Not sure about the warning or text.

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.

* Change snmp-scan heading (#9492)

* Fixed plugins using d_echo (#9498)

Move d_echo to helpers.php and include in autoload
Don't remove from common.php yet to be extra safe.

* Use Eloquent for DB access
Move print-nac into nac.inc.php
Rename module to generic nac, If implemented for other OS later this can be extended but the name should be the same
Add items required for testing

* Use Eloquent for DB access
Move print-nac into nac.inc.php
Rename module to generic nac, If implemented for other OS later this can be extended but the name should be the same
Add items required for testing

* test github

* test github

* test git

* test git

* Added Network Access Control polling and store on DB

* Added Network Access Control polling and store on DB

* Added NAC tab on device page

* Added NAC tab on device page

* Added NAC tab page on device main page

* Added NAC tab page on device main page

* Fixed Auth ID data parsing

* Fixed Auth ID data parsing

* Filter Device ID on NAC Tab page

* Filter Device ID on NAC Tab page

* Converted IP Address form HEX to DEC format

* Converted IP Address form HEX to DEC format

* Formated grid on NAC print page

* Formated grid on NAC print page

* Added AuthC status

* Added AuthC status

* removed useless lines

* removed useless lines

* Fix some typos

* Fix some typos

* Fix Code Climate Issues

* Fix Code Climate Issues

* Fixed more Code Climate Issues

* Fixed more Code Climate Issues

* Fixed more Code Climate Issues

* Fixed more Code Climate Issues

* converted dbQuery() to dbUpdate()

* converted dbQuery() to dbUpdate()

* Fixed more Code Climate Issues

* Fixed more Code Climate Issues

* Removed Hex to Dec test codes

* Removed Hex to Dec test codes

* removed unused classes

* removed unused classes

* Change my own IP Hex to Dec conversion to IP::fromHexString Class

* Change my own IP Hex to Dec conversion to IP::fromHexString Class

* CLA Signature

* CLA Signature

* Merge all dbUpdate on only one call

* Merge all dbUpdate on only one call

* Replaced Table to Bootgrid

* Replaced Table to Bootgrid

* Converted Polling From Ports to New Module (cisco-nac)

* Converted Polling From Ports to New Module (cisco-nac)

* Fixing Travis CI and Code Climate Issues

* Fixing Travis CI and Code Climate Issues

* Fixing Travis CI and Code Climate More Issues

* Fixing Travis CI and Code Climate More Issues

* Replaced Other to Disabled on Metod Column

* Replaced Other to Disabled on Metod Column

* Removed Extra Character < on Authz Icon

* Removed Extra Character < on Authz Icon

* Improve the Logical Checking if Data Exist on DB

* Improve the Logical Checking if Data Exist on DB

* Replace dbFetchRows to dbFetchRow on Some Exist Checks

* Replace dbFetchRows to dbFetchRow on Some Exist Checks

* Fix Some Code Climate Issues

* Fix Some Code Climate Issues

* Fixed More Code Climate Issues

* Fixed More Code Climate Issues

* added CISCO-NAC-TC-MIB

* added CISCO-NAC-TC-MIB

* Use Eloquent for DB access
Move print-nac into nac.inc.php
Rename module to generic nac, If implemented for other OS later this can be extended but the name should be the same
Add items required for testing

* Use Eloquent for DB access
Move print-nac into nac.inc.php
Rename module to generic nac, If implemented for other OS later this can be extended but the name should be the same
Add items required for testing

* no way to set device attrib and no need...

* no way to set device attrib and no need...

* add db schema

* add db schema

* fix link in device page, links for ports

* fix link in device page, links for ports

* Use ajax for table

* Use ajax for table

* fix tests

* fix tests

* change the columns to find existing entries to port_id and PortAuthSessionDomain

* change the columns to find existing entries to port_id and PortAuthSessionDomain

* Update 274.sql

* Update 274.sql

* Reorder Columns on NAC Page to Better Presentation

* Reorder Columns on NAC Page to Better Presentation

* rename database columns and update schema

* rename database columns and update schema

* add iftype to test data, rename variable

* add iftype to test data, rename variable

* correct types...

* correct types...

* Update 274.sql

* Update 274.sql

* order capture output

* Add model observer for nicer discovery output

* Add copyright to poller module

* Handle multiAuth, multiDomain and normal modes seperatly for determining unique entries.

* Use mac_address as the unique identifier

* update index

* Improve the data variety a bit

* remove accidental schema
2018-12-19 21:18:30 -06:00
Tony Murray
3e35ee0e7d Refactored and update Location Geocoding (#9359)
- Fix location so it is a regular database relation (this allows multiple devices to be accurately linked to one location and saves api calls)
- Parse coordinates from the location more consistently
- Add settings to webui
- ~~Used [PHP Geocoder](http://geocoder-php.org/), which has lots of backends and is well tested. (also includes reverse and geoip)~~
- Google Maps, Bing, Mapquest, and OpenStreetMap supported initially.
- Default to OpenStreetMap, which doesn't require a key.  They will liberally hand out bans if you exceed 1 query per second though.
- All other Geocoding APIs require an API key. (Google requires a credit card on file, but seems to be the most accurate)
- Update all (I think) sql queries to handle the new structure
- Remove final vestiges of override_sysLocation as a device attribute
- Update existing device groups and rules in DB
- Tested all APIs with good/bad location, no/bad/good key, and no connection.
- Cannot fix advanced queries that use location

This blocks #8868

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.
2018-11-28 22:49:18 +00:00
Alan Gregory
c78f92a4c2 snmp_max_oid per Os support and snmpv1 multi_oid fix (#9343)
* Added snmp_max_oid config at Os level.

* Added check for snmpv1 on multi_oid requests.

* Check  device_oid_limit on multi get

* Use array_chunk

* Update snmp.inc.php

* remove dump, unused variable and extra plodes

* per device settings should take priority over OS

* Update Settings.md

* don't discard the data :P
2018-11-21 13:25:39 -06:00
Neil Lathwood
ceea9d4981 Added ability to record traceroutes for devices down due to ICMP (#9457)
* Added ability to record traceroutes for devices down due to ICMP

* Update Templates.md

* Updated schema

* Update dev-overview-data.inc.php
2018-11-19 09:58:59 -06:00
Tony Murray
3e4315c158 Don't output non-fatal errors from legacy web pages. (#9208)
DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
2018-09-15 14:16:30 +01:00
TheGreatDoc
31e931d8ee
Merge pull request #9180 from murrant/astext-dns
ignore dns errors when fetching astext
2018-09-12 16:00:25 +02:00
Tony Murray
e8cf6bb385
Fix API auth issues (#9185)
* Fix API auth issues
Api access page now creates tokens with the correct ID.
Correctly creates users for legacy user tokens.
Fix Ldap comparison
Laravel Util class to make code easier to access/read

* More api access page fixes

* fix style
2018-09-11 22:36:52 -05:00
Tony Murray
32a7c50189
Use Laravel authentication (#8702)
* Use Laravel for authentication
Support legacy auth methods
Always create DB entry for users (segregate by auth method)

Port api auth to Laravel

restrict poller errors to devices the user has access to

Run checks on every page load.  But set a 5 minute (configurable) timer.
Only run some checks if the user is an admin

Move toastr down a few pixels so it isn't as annoying.

Fix menu not loaded on laravel pages when twofactor is enabled for the system, but disabled for the user.
Add two missing menu entries in the laravel menu

Rewrite 2FA code
Simplify some and verify code before applying

Get http-auth working
Handle legacy $_SESSION differently.  Allows Auth::once(), etc to work.

* Fix tests and mysqli extension check

* remove duplicate Toastr messages

* Fix new items

* Rename 266.sql to 267.sql
2018-09-11 07:51:35 -05:00
Tony Murray
ec1b6060eb ignore dns errors when fetching astext 2018-09-10 21:40:41 -05:00
PipoCanaja
3f806fdff3 WebUI: Oxidized Device List: Link to config and refreshDevice Btn (#9129)
* WebUI: Direct link to oxidized config from list, oxidized refresh device capability

* WebUI: Direct link to oxidized config from list, oxidized refresh device capability

* Move oxidized_node_update in functions.php to avoid code duplication

* Update refresh-oxidized-node.inc.php

* Update functions.php
2018-09-04 19:09:27 -05:00
Mark Nagel
9311c75a49 Enable and catch exceptions for PHPMailer to gather error messages. (#9132)
DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
2018-09-02 23:45:39 +01:00
Tony Murray
f5f964fd65
Email debug (#9123)
* print email debug info when sending

* Actually list the emails, not the names
2018-08-31 20:48:04 -05:00
Tony Murray
f90d0637c0 Additional debug output when sending/testing email (#9120)
DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
2018-08-31 23:44:50 +01:00
Tony Murray
3268fca4cf Set ip to null when a device is renamed (#9112)
Oddly this doesn't check if the target hostname exists in the database, so that is left to the caller.  (likely the target rrd directory will exist).

If we wanted to check that in function this I'd probably covert it to Exception errors so we could signal the different types of failures.

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
2018-08-30 20:38:29 +01:00
Tony Murray
e9ff8c48b6 Fixed IN db queries (#9077)
Most were fine as they hardcoded the in into the query.
Change them all to use PDO properly.
Did not fix IRCBot, they are are all hardcoded.

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
2018-08-26 13:42:21 +01:00
Tony Murray
a2e33efba8 Use PDO for MySQL queries (#8935)
Gut dbFacile
mres() now does nothing... could have some vulnerable queries, but most are ok

TODO
- [x] IRC client broke
- [x] Install broke

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
2018-08-17 21:29:20 +01:00
Tony Murray
c57f60644d Add a check for a failed dns query in get_astext() (#9020)
DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
2018-08-17 18:17:45 +01:00