16851 Commits

Author SHA1 Message Date
9c8af206b8 Alert Rule label fix (#11137)
* New Alert Rule label fix

* title as well

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2020-02-12 16:55:43 -06:00
f02dbc5794 Fix android-chrome icons (#11136)
* All of the images in html/images/manifest.json 404 because the src specified was relative
* The resulting URL was /images/images/android-chrome-192x192.png (which does not exist). The files are in /images/.
* This fix adds a leading / to the src members, which effectively uses the correct path (e.g. /images/android-chrome-192x192.png)
* For reference, when using web manifests for icons, https://developer.mozilla.org/en-US/docs/Web/Manifest/icons
  "If src is a relative URL, the base URL will be the URL of the manifest."
* librenmsv1.blade.php uses asset('images/manifest.json'); many other blades use it.  This fix applies to all of these views.

/opt/librenms/resources/views/about/index.blade.php
/opt/librenms/resources/views/auth/2fa.blade.php
/opt/librenms/resources/views/auth/deny-demo.blade.php
/opt/librenms/resources/views/auth/external-auth-failed.blade.php
/opt/librenms/resources/views/auth/login.blade.php
/opt/librenms/resources/views/auth/public-status.blade.php
/opt/librenms/resources/views/device-group/create.blade.php
/opt/librenms/resources/views/device-group/edit.blade.php
/opt/librenms/resources/views/device-group/index.blade.php
/opt/librenms/resources/views/layouts/legacy_page.blade.php
/opt/librenms/resources/views/locations.blade.php
/opt/librenms/resources/views/settings/index.blade.php
/opt/librenms/resources/views/user/authlog.blade.php
/opt/librenms/resources/views/user/create.blade.php
/opt/librenms/resources/views/user/edit.blade.php
/opt/librenms/resources/views/user/index.blade.php
/opt/librenms/resources/views/user/preferences.blade.php
/opt/librenms/resources/views/vue.blade.php
/opt/librenms/resources/views/map/device-dependency.blade.php
2020-02-12 21:19:12 +01:00
3db0542458 Default alert rules remove Devices up/down (#11124)
* Default alert rules remove Devices up/down

removed the Devices up/down as the default alert rule. This can be confusing to new users. We already have the alert for SNMP and one for ICMP defaulted.

* Update alert_rules.json
2020-02-12 19:54:00 +01:00
5bfc44f812 Location based Alert Rule (#11128)
* Location base Alert Rule

* travis fix
2020-02-12 12:53:26 -06:00
dfd6f2d3b6 Aruba Controller ->Correct AP Power value (#11122)
* Correct AP Power value

* Added test data

* Added json test data
2020-02-12 18:24:33 +01:00
2a4b890604 Move Cisco mibs back to their folders (#11127) 2020-02-12 18:22:52 +01:00
15d2d9851a Move FOUNDRY mibs into their folder (#11126)
* Clean Foundry MIBS

* Clean Foundry MIBS
2020-02-12 18:21:53 +01:00
23b589a6c7 Move JANITZA mibs into its folder (#11125) 2020-02-12 18:21:18 +01:00
53dc564ef5 Puppet Agent Monitoring (#10827)
* puppet agent monitoring

* change position of last run graph

* device overview panel

* updating documentation

* mouseover for Overview Dashboard

* adding blank line for code climate
2020-02-12 08:26:02 +01:00
95820bf5d4 Improve Huawei VRP bgp discovery (#11054)
* vrp bgp rewrite

VRP BGP code isolated and VRF aware

Ipv6 peer and afi typo

* mib-update

* avoid malformed OIDs in discovery

* Restore BGP4 MIB calls for some Campus devices

* CodeClimate
2020-02-11 20:54:12 +01:00
3b8e6c619e Change Poller time validation (#11108) 2020-02-11 20:32:54 +01:00
286b3dc338 fixed unix-agent polling bug where the called method can't be found (#11102) 2020-02-11 19:14:11 +01:00
c8fab3a13f Add alert_rule filtering to API ROUTE "list_alerts" (#11109)
* Add alert_rule filtering to API ROUTE "list_alerts"

* move alert_rule filter before "order by"

* $_GET to $request->get

* spacing

* multiple empty-lines
2020-02-11 19:04:55 +01:00
6fe840dc8d Added steps to split DB off to its own server (#11130)
I struggled to get this working, so thought I would add my steps to the FAQ to help future users. Thanks to @murrant for the step about the .env file, that was the last piece of the puzzle.

Co-authored-by: Hans Erasmus <erasmushans27@gmail.com>
2020-02-11 15:49:16 +01:00
19a82e1500 Fix inventory page hostname/sysname and default generate_device_link behaviour (#11114)
* Fix inventory page hostname and default behaviour on generate_device_link
* force test re-run
* space
* simplify

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2020-02-10 12:07:27 +01:00
c2dfe7b21c Renovated Alert Rules (#11115)
* Change select order from id to name

* added example icmp/snmp down rules given by @kkrumm1

* Renovated Alert Rules

* Defaulted sort by name
* Moved top buttons and results selector outside of table and aligned them with pull-left and pull-right
* Collapsed '#' (ID) into 'Type' and added titles for the icons
* Added Devices and Transports columns for each rule
* Moved Extra column next to transports
* Added icons for Enabled when a user does not have global admin
* Changed row_# variable to rule_id_#
* Some 'else' cleanup
* Added various title tags for more information when hovering
* Moved pagination outside of table and align it with pull-left and added a bootgrid style summary pulled-right
* Added table & th tags for bootgrid (but didn't turn it on)

* code climate, round 1

* code climate, round 2

* add hrefs for device & device group edit

* added trailing slash for device-groups/../edit/

* prevent #name conflict with transport modal

* add hrefs for transport & transport group edit

* use popover consistently

* code climate, round 3

* removed unused variables

* code climate, round 4

* popover variables

* reload after successful delete

* more informative feedback

* use toastr, not #message, & don't reload

* added license header & fail faster if not admin

* use (more informative) ajax error message

* delete confirmation with alert name in the modal

* print each device per line

* add href for all devices

* refresh status & enabled data-content when/if a rule is turned on/off

* use DRY style per @SourceDoctor (& my) preference); codeclimate meh

* point devices popover to the right
2020-02-10 02:06:12 +01:00
06b9ace0fb device: Correct ups-nut sensors (#11113)
* Change ups-nut sensors
* Revert the dd-wrt files
2020-02-09 20:47:03 +01:00
63b812356d GitHub - Add the ScreenShot hint in the PR Template (#11119)
* GitHub - Add the ScreenShot hint in the PR Template

* revert the version

checking if the tests are now running correctly without this version constraints
2020-02-09 19:29:15 +01:00
083afd1422 device: Add serial number to Epson printer (#11111)
* Add serial to Epson printer
* add Testdata
2020-02-09 18:28:44 +01:00
81454ee585 Fix documentation build (#11116)
* Add "markdown<3.2" to deploy-docs.sh

* pymdown-extensions<6.3
2020-02-09 15:54:06 +01:00
ffddfd0901 mark assigned default poller group (#11112) 2020-02-09 15:44:08 +01:00
385f5e0bc1 device: Support for Teldat routers (#11118)
* teldat base

* HW and version

* tests

* typo

* typo
2020-02-09 15:28:15 +01:00
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
f8ce4df0f8 Add Janitza Power Sensors (#11110)
* Add Janitza Power Sensors

* Fix testdata from previos bug
2020-02-07 09:11:46 +01:00
6285caba52 Hide devices added for devices that existed before #11104 (#11107)
* Migrate devices.inserted to allow null values and set existng row values to null

* Hide Device Added for devices that existed before https://github.com/librenms/librenms/pull/11104

* Don't display any date that stats with a zero

* make schema match migration
2020-02-06 05:44:04 -06:00
c380921d4b Speed up canAccessDevice/devicesForUser (#10992)
Relying on filtering on user_id/device_id with laravel/arrays is slow.
By splitting the cache on user_id, we can utilize faster array functions
2020-02-05 18:00:08 -06:00
bf3522614c Add a space for times like '1 minute' (#11105)
* Add a space for short times like '1 minute'

* codeclimate, round 1
2020-02-05 17:58:52 -06:00
b2d660efd8 Adding support for Cisco SB SX550X-24F switch (#11098)
* Adding support for Cisco SB SX550X-24F switch

This pull request adds support for Cisco Small Business SX550X-24F switch by adding sysObjectID .1.3.6.1.4.1.9.6.1.1001 in the ciscosb discovery module.

* Added ciscosb_sx550x-24f.snmprec file

* Added ciscosb_sx550x-24f.json

* Updated ciscosb_sx550x-24f.json

* update ciscosb_sx550x-24f.snmprec

* Collected new ciscosb_sx550x-24f.snmprec file

* updated test data
2020-02-06 00:35:21 +01:00
9dc404c194 Add Serialnumber to HP and Konica printers (#11106) 2020-02-05 23:47:06 +01:00
79bdbe91b5 Show when a device was added and last discovered (#11104)
* Add inserted column to devices table

* Added schema for devices.inserted

* Show when a device was added and last discovered

* Added collection rule for "Device added within the last 60 minutes"
2020-02-05 14:06:43 -06:00
ac84eea243 MPLS Route discovery - Wrong variable assignation order (#11103)
Interfaces are not discovered for MPLS routes because of wrong order in the commands (read before variable being initilized)
2020-02-05 18:26:42 +01:00
4e18e8b5c1 Added rittal-cmc (LCP Plus) (#11091)
* Added rittal-cmc (LCP Plus)

skip_values opperand 'not_in_array' returns an error in pre-commit but in principal it's running. Can someone help?

1) LibreNMS\Tests\YamlTest::testDiscoveryDefinitionSchema
rittal-cmc.yaml does not validate. Violations:
[modules.sensors.fanspeed.data[0].skip_values[0].value] Array value found, but an integer or a string is required
[modules.sensors.temperature.data[0].skip_values[0].value] Array value found, but an integer or a string is required
[modules.sensors.temperature.data[1].skip_values[0].value] Array value found, but an integer or a string is required
[modules.sensors.temperature.data[2].skip_values[0].value] Array value found, but an integer or a string is required
[modules.sensors.temperature.data[3].skip_values[0].value] Array value found, but an integer or a string is required

* fix  Scrutinizer Inspection

* fix  codeclimate

* fix typo

* Update discovery_schema.json

To allow arrays in comparisons

* Control structures

* fix the pre-fix issues

* Typo in copy/paste

* Update rittal-cmc.json

* Unit1,2,3,4 and new snmprec, json have not changed

* Update rittal-cmc.json

Correct JSON data

* typo copy paste

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2020-02-05 13:23:54 +01:00
6e9329b4a9 Change log for 1.60 Release (#11099) 1.60 2020-02-04 10:29:59 +00:00
02bc15c206 Asterisk app: add IAX2 peer graphs (#11078)
* Asterisk app: add IAX2 peer graphs

* It's an entirely new graph and will not break existing graphs.
* The asterisk extend script must be updated to provide the appropriate poller data.
* The PR for librenms-agent/snmp/asterisk is here: https://github.com/librenms/librenms-agent/pull/274

* code climate, round 1

* clarified unit text

* code climate, round 2

* changes needed to properly generate test data

* linux_asterisk-v1 test data
2020-02-03 18:47:27 +01:00
051ca6503f Remove also associations on scheduled maintenance deletion (#11093) 2020-02-03 11:26:44 -06:00
6d9deedcc1 Maintenance Mode for a complete Location (#11089)
* Maintenance mode for a complete location

* updatedatabase query

* updatedatabase query

* add missing select
2020-02-03 11:26:08 -06:00
07f3c91e6c Revert ironware BGP-peers changes from PR #10941 (#11096)
* Revert ironware BGP-peers changes from PR #10941.

* Regenerate test data without BGP4V2-MIB support.

* Initialise $local_ip

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2020-02-03 14:32:45 +01:00
c07678d55f Mark Devices in Maintenance Mode (#11092)
* Mark Devices in Maintenance Mode

* code climate fix
2020-02-02 08:33:01 -06:00
ee72fa4d3c Added WUT Humidity and Temperature Sensors (#11053)
* Added WUT 57606,57613,57720

* Added os wut-*

* fixed MIB Names and try to generalize wut

* more general sysObjectID mapping, and mib directory

* Delete WUT-57606-MIB

* Delete WUT-57613-MIB

* Delete WUT-57720-MIB

* Rename wut-57613.snmprec to wut_57613.snmprec

* Rename wut-57720.snmprec to wut_57720.snmprec

* Rename wut-57606.snmprec to wut_57606.snmprec

* Delete wut-57606.yaml

* Delete wut-57720.yaml

* Delete wut-57613.yaml

* Delete wut-57606.yaml

* Delete wut-57720.yaml

* Delete wut-57613.yaml

* Update wut.yaml

* Try to correct the Temperature part

This should work for temperature, according to MIB. Pressure and Humidity are not described in this mibfile, so we cannot poll them.

* change wut.yaml

* Add and fix wut_57720

* after ./scripts/save-test-data.php ?

* Add test data

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2020-02-01 23:29:05 +01:00
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
398d5fe2b7 Fixed missing PoE graphs for Cisco devices (#11087)
* Fixed missing PoE graphs for Cisco devices where portIfIndex can't be retrieved from CISCO-STACK-MIB

* Codeclimate & Travis error corrections

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2020-02-01 11:01:36 +01:00
36388e25ea Show Alert Detail for Applications (#11088)
* alert detail for applications

* add link on alert application
2020-01-31 17:59:56 -06:00
1535d6589d mock.snmp.inc.php: Fix snmptranslate exception (#11085)
* Running ./scripts/pre-commit.php -p -u [-m applications] fails all tests that have 1.3.6.1.4.1.8072 with messages similar to ...

Exception: Could not translate oid: NET-SNMP-EXTEND-MIB::nsExtendOutput1Line."distro"
Tried: snmptranslate -IR -On NET-SNMP-EXTEND-MIB::nsExtendOutput1Line."distro" -M /opt/librenms/mibs

* OIDs with double quotes must be single quoted.  All OID translations work with single quotes, regardless.
2020-01-31 15:07:45 +01:00
d893acccda remove redundant information from alert fallback detail (#11081) 2020-01-31 05:42:46 -06:00
f0cdf7314b Don't dnslookup if overwrite IP is configured (#11084)
* don't dnslookup if fix IP assigned

* change if statement
2020-01-31 05:38:39 -06:00
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
dc60edd8bf Include maintainers in release notes (#11002)
* Include maintainers in release notes
Use GraphQL to pull in the exact data we need

* remove changelog

* Update LibreNMS/Util/GitHub.php

Co-Authored-By: Jellyfrog <Jellyfrog@users.noreply.github.com>

* Update LibreNMS/Util/GitHub.php

Co-Authored-By: Jellyfrog <Jellyfrog@users.noreply.github.com>

* style fixes

Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
2020-01-30 06:15:03 -06:00
67b28ec4cd Fix Air Fiber port stats (#11079)
* Fix Air Fiber port stats
Define OS port polling includes in a standard way.
Move Air Fiber code to os port polling include.

* Update snmp data

* fix accidental change

* Some formatting fixes

* should be null
2020-01-30 05:40:58 -06:00
0a34322877 Do not strip tags when markdown is in use. (#11075)
Markdown supports limited HTML tags, which can help enrich messages.
Additionally, eliminate extra whitespace when markdown is used as that
will have weird output effects.
2020-01-29 05:59:23 -06:00
3f53eed245 alert.inc.php: Fix missing ACK & Notes modals (#11076)
* BUG: From a device page, click Alerts and attempt to ACK or add a Note.  Nothing happens because the modals are not on the page.
* This patch corrects pages/device/alert.inc.php to include both modal/alert_notes.inc.php and modal/alert_ack.inc.php
2020-01-27 20:02:28 -06:00