Commit Graph

16860 Commits

Author SHA1 Message Date
PipoCanaja
fc280ffb08 Revert "Alert Detail Ping Latency (#11140)" (#11149)
This reverts commit 082a1ee079.
2020-02-14 11:46:56 +01:00
gabrielRojasNew
f023be1edf Document add and remove parents from API (#11148) 2020-02-13 23:58:01 +01:00
gabrielRojasNew
b47decdb00 Added add and remove parents for device from the V0 API (#11100)
* Added add and remove parents for device from the V0 API

* Fixed some minors errors (white spaces and lack of them, an unnecesary else)

* Added missing }

* Reducing cognitive complexity

* Further reduced cognitive complexity and added a check if parent device existed (it blew up when it did not)

* Refactored the code and fixed bugs (that i created) when deviceIds or parentIds where nonexistent

* Fixed } not on a new line issue

* Empty space removed

* Deleted lines added by mistake to composer.json

* removed a comma  that broke composer.json

* added the missing element in composer.json

* Added optional ids to del_parents_fom_host

Updated del_parents_from_host() so it can accept parent(s) id(s) to delete, if none given it deletes all it's parents.

* Fixing code issues on del_parents_from_host

Refactored and solved small issues with del_parents_from_host

* Refactored code del_parents_from_host

Refactored del_parents_from_host() in order to comply with the projects standard

* Added one space

Added missing whitespace

* refactoring for better readability
2020-02-13 22:28:43 +01:00
Atroskelis
2bd17690ba Added yum-config-manager to Remi install (#11033)
Hello,

If you follow the original Rumi config, the path to the binaries are not changed, so you cannot do php -v after the yum install line. 

If you install the yum-package-manager then apply the repo, all php packages become rumi php packages.

I hope the yum install line is correct, as i've tried to edit it and i hope i didnt miss any packages.
2020-02-13 22:22:41 +01:00
SourceDoctor
5d2d82059b Alert Rule default update (#11143) 2020-02-13 22:10:40 +01:00
PipoCanaja
1da33c61a0 Correct RFC1213 route discovery (#11144) 2020-02-13 20:52:09 +01:00
SourceDoctor
1ca49a532f Change Device, Group, Location - order (#11141) 2020-02-13 12:50:18 +01:00
SourceDoctor
082a1ee079 Alert Detail Ping Latency (#11140)
* Alert Detail Ping Latency

* link to ping graph
2020-02-13 10:18:00 +01:00
SourceDoctor
a9bf92057f Ping Latency Check to Alert Collection (#11139) 2020-02-13 00:52:46 +01:00
SourceDoctor
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
Joseph Tingiris
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
Kevin Krumm
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
SourceDoctor
5bfc44f812 Location based Alert Rule (#11128)
* Location base Alert Rule

* travis fix
2020-02-12 12:53:26 -06:00
joseUPV
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
PipoCanaja
2a4b890604 Move Cisco mibs back to their folders (#11127) 2020-02-12 18:22:52 +01:00
PipoCanaja
15d2d9851a Move FOUNDRY mibs into their folder (#11126)
* Clean Foundry MIBS

* Clean Foundry MIBS
2020-02-12 18:21:53 +01:00
PipoCanaja
23b589a6c7 Move JANITZA mibs into its folder (#11125) 2020-02-12 18:21:18 +01:00
SourceDoctor
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
PipoCanaja
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
joseUPV
3b8e6c619e Change Poller time validation (#11108) 2020-02-11 20:32:54 +01:00
Alexander Holzapfel
286b3dc338 fixed unix-agent polling bug where the called method can't be found (#11102) 2020-02-11 19:14:11 +01:00
Guillermo
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
SourceDoctor
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
Mathieu Poussin
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
Joseph Tingiris
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
Kevin Zink
06b9ace0fb device: Correct ups-nut sensors (#11113)
* Change ups-nut sensors
* Revert the dd-wrt files
2020-02-09 20:47:03 +01:00
PipoCanaja
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
Kevin Zink
083afd1422 device: Add serial number to Epson printer (#11111)
* Add serial to Epson printer
* add Testdata
2020-02-09 18:28:44 +01:00
PipoCanaja
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
SourceDoctor
ffddfd0901 mark assigned default poller group (#11112) 2020-02-09 15:44:08 +01:00
PipoCanaja
385f5e0bc1 device: Support for Teldat routers (#11118)
* teldat base

* HW and version

* tests

* typo

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

* Fix testdata from previos bug
2020-02-07 09:11:46 +01:00
Joseph Tingiris
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
Jellyfrog
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
Joseph Tingiris
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
Pluppo
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
Kevin Zink
9dc404c194 Add Serialnumber to HP and Konica printers (#11106) 2020-02-05 23:47:06 +01:00
Joseph Tingiris
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
PipoCanaja
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
Kevin Zink
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
Neil Lathwood
6e9329b4a9 Change log for 1.60 Release (#11099) 1.60 2020-02-04 10:29:59 +00:00
Joseph Tingiris
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
SourceDoctor
051ca6503f Remove also associations on scheduled maintenance deletion (#11093) 2020-02-03 11:26:44 -06:00
SourceDoctor
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
Martijn Schmidt
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
SourceDoctor
c07678d55f Mark Devices in Maintenance Mode (#11092)
* Mark Devices in Maintenance Mode

* code climate fix
2020-02-02 08:33:01 -06:00
Kevin Zink
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
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
Albert Siersema
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