Commit Graph

19973 Commits

Author SHA1 Message Date
Jellyfrog
f271019f6c Add a validation for checking if the scheduler is running (#14987) 2023-04-24 10:04:50 +02:00
Tony Murray
e1b6fd0165 Fix more refactor errors (#14998) 2023-04-23 20:33:50 -05:00
Tony Murray
2271e29e03 Fix billing error introduced by #14979 (#14996)
Fixes #14994
2023-04-23 13:23:54 -05:00
Tony Murray
265906b44c Fix some undefined constants (#14993)
* Fix undefined constants
These have been broken for a long time.  Likely they are unused.

* Fix undefined constants
These have been broken for a long time.  Likely they are unused.
2023-04-22 10:37:20 -05:00
Santiago Z
e815bbb81d [About] Link to LinkedIn (#14991) 2023-04-21 21:14:33 -05:00
Tony Murray
a15a27da3a Fix scale_rigid accidentally being set to false (#14992) 2023-04-21 21:08:35 -05:00
Tony Murray
3fe3db747c Refactor billing (#14979)
* Refactor common billing code into a namespace
Prevents issues of usages where the code hasn't been loaded.

* remove redundant Billing in method names

* remove accidental duplication

* more use statements

* Style fixes
2023-04-21 19:52:47 -05:00
Justin Lentz
53f66e0c2c Allow device ignore to be set via API (#14985)
* Missing Fillables

* StyleCI

* Update Device.php
2023-04-21 15:38:58 -05:00
Tony Murray
2ddfba51dd Set ping_perf scale_min to 0 (#14989)
And allow scale_min, scale_max, and scale_rigid to be set via url parameter
2023-04-20 22:30:32 -05:00
dependabot[bot]
7ee09ee16a Bump guzzlehttp/psr7 from 2.4.4 to 2.5.0 (#14986)
Bumps [guzzlehttp/psr7](https://github.com/guzzle/psr7) from 2.4.4 to 2.5.0.
- [Release notes](https://github.com/guzzle/psr7/releases)
- [Changelog](https://github.com/guzzle/psr7/blob/2.5/CHANGELOG.md)
- [Commits](https://github.com/guzzle/psr7/compare/2.4.4...2.5.0)

---
updated-dependencies:
- dependency-name: guzzlehttp/psr7
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-20 20:53:46 -05:00
VoipTelCH
8733589f6a Enabled disabling a device via api (#14983) 2023-04-19 09:50:42 -05:00
Jellyfrog
cee100bf44 Fix routes after Laravel9 (#14977) 2023-04-17 22:41:09 +02:00
ollb
d40c3be75d Fix cisco dbm sensors port link on discovery (NCS55A2) (#13965)
* Fix cisco dbm sensors port link on discovery (NCS55A2)

dBm sensors were not linked to port on Cisco NCS55A2 platform (iosxr)
causing false alarms triggered by optical modules in administratively shut down ports.

* Delete iosxr_ncs55a2.json

* Create iosxr_ncs55a2.json

* Renew test/data/iosxr_ncs55a2.json

* Delete and recreate test/data/iosxr_ncs55a2.json

With command :

  ./scripts/save-test-data.php -o iosxr -v ncs55a2 -m os,ports,processors,mempools,sensors

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2023-04-17 11:08:52 -05:00
Jellyfrog
0a351b49fd Laravel 9.x Shift (#14504)
* Move `resources/lang` folder

* Shift registered middleware

* Remove `fruitcake/laravel-cors` dependency

* Streamline `$commands` property

* Upgrade to Flysystem 3.0

* Shift core files

* Convert `optional()` to nullsafe operator

* Remove unnecessary `$model` property

* Convert route options to fluent methods

Laravel 8 adopts the tuple syntax for controller actions. Since the old options array is incompatible with this syntax, Shift converted them to use modern, fluent methods.

* Convert deprecated `$dates` property to `$casts`

* Shift config files

* Default config files

In an effort to make upgrading the constantly changing config files
easier, Shift defaulted them and merged your true customizations -
where ENV variables may not be used.

* Bump Laravel dependencies

* Use `<env>` tags for configuration

`<env>` tags have a lower precedence than system environment variables making it easier to overwrite PHPUnit configuration values in additional environments, such a CI.

Review this blog post for more details on configuration precedence when testing Laravel: https://jasonmccreary.me/articles/laravel-testing-configuration-precedence/

* Fix error provider

* Match new symfony syntax

* Match upstream syntax

* Fix route syntax

* generate composer.lock

* Sync back configs

* routes

* composer

* Fix more flare

* fix cors

* sync lang

* Apply fixes from StyleCI (#14517)

Co-authored-by: StyleCI Bot <bot@styleci.io>

* bump larastan

* update packages

* wip

* Temporarily lower phpstan level

* Update phpstan.neon

* wip

* wip

* wip

* Apply fixes from StyleCI (#14592)

Co-authored-by: StyleCI Bot <bot@styleci.io>

* test

* Update CiHelper.php

* Update test.yml

* Update CiHelper.php

* Update CiHelper.php

* Apply fixes from StyleCI (#14616)

Co-authored-by: StyleCI Bot <bot@styleci.io>

* test?

* fix phpstan problems

* dont run snmpsim on github ci

* Fix whitespace

* More whitespace

* More whitespace ???

* I think the space broke it

* fix the reset of the whitespace

* hard code auth guard

---------

Co-authored-by: Shift <shift@laravelshift.com>
Co-authored-by: StyleCI Bot <bot@styleci.io>
Co-authored-by: Tony Murray <murraytony@gmail.com>
2023-04-17 06:51:35 -05:00
otkd
8941153c58 Update Copyright year to 2023 in README.md (#14972) 2023-04-17 06:50:57 -05:00
Nick Peelman
8a64526e34 Fix a bug when creating test data; if a community contained the strin… (#14739)
* Fix a bug when creating test data; if a community contained the string 'snmp', it would cause test data to not be generated.

Add line start/end anchors, and search for specific SNMP commands, instead of a snmp<wildcard>, and a couple of other minor tweaks...

* Fix unwanted 'g'
2023-04-16 13:42:26 -05:00
AdamB
519fc00367 Change ESXi port naming to be stable (#14639)
* Change ESXi port naming to be stable

Currently every time discovery runs against ESXi, the port names change generating a lot of log spam.

This is because ESXi uses this as the ifDescr:
```Device vmnic1000202 at 01:00.0 nmlx4_en```

The poller parses this, and extracts the interface name, whereas discovery does not, causing the interface names to flip every 6 hours.
https://github.com/librenms/librenms/blob/22.10.0/includes/polling/ports.inc.php#L578-L580

This change gives the discovery process the same behaviour, so the naming is now stable.

* Try to fix test data with a squash

* vcsa test data

* Synthesise VCSA ifName, use it in place of ifDescr

* Refresh test data

* Update ports.inc.php

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2023-04-16 12:58:38 -05:00
Tony Murray
52f5f10231 Fix some lint issues (#14962) 2023-04-15 09:02:41 -05:00
Tony Murray
a70d10af19 Fix vsolution discovery yaml (#14970)
* Fix vsolution discovery yaml
Fetching too much data and incorrect config for scalar values.

* revert json changes

* one sensor_prev

* fix

* revert all changes
2023-04-14 23:11:01 -05:00
Stef
0430f6acb1 Cisco QFP polling fixes (#14961)
* fix cisco-qfp Division by zero

* fix percentage calc

* linting

* another zero in RRD. the (int) might be consequential errors and should hurt...

* no float for average_package

* Update includes/polling/cisco-qfp.inc.php

Co-authored-by: Tony Murray <murraytony@gmail.com>

* Add floor

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2023-04-14 22:11:36 -05:00
mtentilucci
b6572e0acc Add support for Trellix ATD devices (#14965)
* Add support for Trellix ATD devices

- Add discovery for mlos ATD devices
- Monitor various OIDs related to ATD system health and status
- Add required MIBs
- Add test data

* add json test data

* Rename MCAFEE-SMI to MCAFEE-INTRUVERT-SMI

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2023-04-14 19:34:43 -05:00
Tony Murray
6a769fc7a4 Fix Tait Tnadmin Processor discovery (#14969) 2023-04-14 18:26:38 -05:00
Schylar Utley
056305c3c3 Add support for Alpha CXC HP Controller (#14829)
* add support for Alpha CXC HP Controller

* add num_oids, fix formatting

* fix typo

* Rename cxc_cxc.snmprec to cxc.snmprec

* Create ALPHA-RESOURCE-MIB

* Create ALPHA-RECTIFIER-SYS-MIB

* Create cxc.json

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2023-04-14 18:04:42 -05:00
Kevin Zink
5d7b0e8dc8 Correct PowerConsumed SI Units in Overview (#14425)
* Correct PowerConsumed SI Units in Overview

Workaround to convert PowerConsumed SI Display Units from kkWh to MWh. Better way would be to directly save the data in Wh instead of kWh. But we don't know the impact jet.

* Fix style
2023-04-14 17:34:03 -05:00
Tony Murray
0cdda100e7 Fix Raisecom Processor (#14968)
* Fix Raisecom Processor
Had the same problem as ROS #14966

* Missed oid update
2023-04-14 17:12:35 -05:00
Justin Lentz
b9cc630dbc Stacked graphs on zoom to speed (#14928)
* Update generic_data.inc.php

* Update functions.inc.php

* Update generic_data.inc.php

* Update functions.inc.php

* Update functions.inc.php

* Update generic_data.inc.php

* Update graphs.inc.php

* Make Murrant Happy ;)

* Update generic_data.inc.php

* Update generic_data.inc.php

* Update graphs.inc.php

* Update graphs.inc.php
2023-04-14 16:48:30 -05:00
Tony Murray
cafdec6285 Remove unused port fields (#14963)
* Remove unused port fields
(and set vlan to default to null)

* Update test data for deleted fields

* update vlan to null

* missed field removals

* More correct migration

* Update new data

* restore accidental deletions
2023-04-14 16:47:26 -05:00
Tony Murray
d83ba61408 Fix Legacy vars Processing (#14967)
if a var was set to 0, it would be set to "yes" instead of 0
2023-04-14 16:46:56 -05:00
Tony Murray
49056da4a0 Fix Raisecom ROS processor collection (#14966)
Was origionally intended to use the 1 minute values, but was discovering the one second value and polling the twoHour value
Was also restricted to only one CPU.
Now discovers and polls all CPUs at the oneMin avg
2023-04-14 15:22:55 -05:00
mtentilucci
04217269a4 Expand discovery of gigavue os (#14933)
* Expand discovery of gigavue os

- Expand discovery so all Gigamon products are discovered
- Query for hardware version using GIGAMON-SNMP-MIB::model.0 OID if present
- Add more Gigamon gigavue test data

* Create gigavue_hc2.json

Looks like there was no json file before...

* update gigavue_hc2.json

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2023-04-14 07:12:44 -05:00
AdamB
55b167562e Implement authentication for Redis/Sentinel (#14805)
* Implement ACL support for redis (and sentinel)

Currently, sentinel only works with anonymous connections.
Some parameters are passed when using sentinel, however these are
dropped on the floor.
This encapsulates them as py-redis expects, and passes them correctly.

* Pass username

* Differentiate duplicate error messages

* Actually pass var

* Docs and requirement bump

* Lint

* Consistency

* More lint

* Lint harder

* Doc Updates
2023-04-14 07:11:44 -05:00
JStandiford
3362e0ee7b fortivoice: add version, hardware and serial collection (#14956)
* Update fortivoice.yaml

Add in pulling in device hardware and software info

* Add files via upload

* Add files via upload

* merge test data

* Delete fortivoice_fortivoice.snmprec

* Update fortivoice.json

* Update fortivoice.json

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2023-04-12 10:11:49 -05:00
Tony Murray
e9c08e21a5 Fix more divide by zero issues (#14954)
* Fix more divide by zero issues
fixes: 14932

* Round to the nearest integer, then cast

* Fix up dhcpatriot
23.4.1
2023-04-11 13:44:45 -05:00
Kevin Zink
cde4d6a09f Add link to hosts mgmt (ipmi) interface (#14905)
* Add link to hosts mgmt (ipmi) interface

* Fix Style

* Fix style

* Fix Lint

* Update DeviceController.php

Mgmt > IPMI
2023-04-10 18:58:50 -05:00
maticomba
6c7fda9833 Solves error in discovering services module (#14939)
* Solves error discovering services module

* Removing trailing spaces

* Allow in device group scopes to accept an array

* Fix and optimize queries a little

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2023-04-10 13:26:26 -05:00
Tony Murray
d09c5540ed Fix SnmpQuery and max_oid (#14955)
If the snmpget had less oids than the max, it would run them one at a time instead of all together.
2023-04-10 12:07:32 -05:00
pjroehl
2b1f6a743d Add discovery of NVT Phybridge FLEX24 (#14913)
* Add discovery of NVT Phybridge FLEX24

* Update phybridge-flex.yaml

Added FLEX-24 Switch under sysDescr

* Test Data phybridge-flex_flex-24 json and snmprec
2023-04-10 11:12:12 +02:00
PipoCanaja
228c4ca78d bug - wrong type in ports.inc.php (#14952)
Yet another of these :) 

```
[2023-04-07T19:55:28.777810+02:00] production.ERROR: Error polling ports module for xxxxxxxxxx. TypeError: Unsupported operand types: string - int in /opt/librenms/includes/polling/ports.inc.php:785
Stack trace:
#0 /opt/librenms/includes/polling/functions.inc.php(339): include()
#1 /opt/librenms/poller.php(126): poll_device(Array, false)
#2 {main}  
[2023-04-07T19:55:28.780705+02:00] production.ERROR: Unsupported operand types: string - int {"exception":"[object] (TypeError(code: 0): Unsupported operand types: string - int at /opt/librenms/includes/polling/ports.inc.php:785)"} 
```
2023-04-07 14:09:57 -05:00
Arjen Zonneveld
72ed398835 Update commands.php (#14946)
Fix typo
2023-04-07 13:38:32 -05:00
Tony Murray
3380122733 Poller perf: add per device average (#14940)
* Poller perf: add per device
Fix min, avg, and current values

* Fix up previous

* Fix style

* Rename to device average, we don't calculate min and max, but rather the min/max of the average.
2023-04-07 13:27:12 -05:00
SourceDoctor
93f270155f snmp-scan filter for dns resolved devices (#14934)
* snmp-scan filter for dns resolved devices

* .

* add console arguments
2023-04-07 13:24:18 -05:00
Stef
74c627270a Set focus tp Global Search form if user presses Ctrl-F (#14947) 2023-04-07 13:05:39 -05:00
Michał Margula
4465de874d Update Install-LibreNMS.md (#14949)
Added two lines clarifying what needs to be run and what needs to be added to config file as it  might confuses people. Removed FLUSH PRIVILEGES which is unnecessary when using GRANT. It would be required when updating privileges directly -- https://dev.mysql.com/doc/refman/8.0/en/privilege-changes.html
2023-04-07 13:04:47 -05:00
mtentilucci
b09f5f63e4 Add Nutanix AOS discovery (#14950)
* Add Nutanix AOS Discovery

- Add basic discovery configuration
- Add Nutanix .svg icon and logo
- Add test data

* fix yaml style nutanix-aos.yaml
2023-04-07 13:02:41 -05:00
mtentilucci
698b9ee48c Add Rubrik Discovery (#14951)
- Add basic discovery
- Add Rubrik .svg icon and logo
- Add test data
2023-04-07 13:01:30 -05:00
Tony Murray
8809779b82 RouterOS runtime quirk on first discovery (#14945)
(assume version is > 6.47 if it isn't fetched yet)

fixes #14935
2023-04-06 21:09:31 -05:00
Justin Lentz
df31be30c1 Cleanup enable bgp setting (#14931)
* remove logic in module

* remove enable_bgp logic

* remove enable_bgp logic

* remove enable_bgp logic

* remove enable_bgp logic

* remove enable_bgp definition

* remove enable_bgp logic

* Remove enable_bgp documentation

* StyleCI

* StyleCI

* StyleCI

* StyleCI

* StyleCI

* StyleCI

* StyleCI

* StyleCI

* StyleCI

* StyleCI
2023-04-06 21:01:21 -05:00
cjwbath
bbe752b24a Add initial OS detection for LoadBalancer.org (#14902)
* Add initial OS detection for LoadBalancer.org

* Match on Linux sysObjectID first for efficiency

Co-authored-by: Tony Murray <murraytony@gmail.com>

* Add test for loadbalancer OS detection

* Add test for loadbalancer OS detection - fix author

* Add test for loadbalancer OS detection

* Add test for loadbalancer OS detection - fix author

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
Co-authored-by: Chris Ware <cjw26@bath.ac.uk>
2023-04-06 19:58:14 -05:00
Dan Baker
a340672e86 Added graphing of DDoS-protection related OIDs for PAN-OS (#14847) 2023-04-06 19:11:16 -05:00
Dan Baker
7173205039 Added sensor support for older APC InfraStruXure PDUs (#14944) 2023-04-06 19:09:45 -05:00