Commit Graph

19994 Commits

Author SHA1 Message Date
eskyuu
ce0734ff5d Added support for user timezones and user browser timezone by default (incomplete) (#13626)
* Added support for user timezones and user browser timezone byt default

* Formatting fixes

* Use the timezone for alert log display

also added validation for the timezone because it's being used in SQL.

* Formatting fixes

* Added return type

* Formatting"

* Update the latency graphs to use the user timezone

* Simplify the web routes config

* Update phpstan to ignore type error

* Fixed up the phpstan config

* Reverse phpstan change

* Re-apply phpstan override

* Remove the option to unset the session timezone

* Formatting fix

* Update outge and event logs to use session timezone

* Fix route for the timezone control

* Made the timezone more dynamic

* Fix a logic error that was stopping the timezone from being set automatically on login

* Prevent getPref from being called twice

* again prevent getPref double call

* getPref double call

* Fixed typo made during merge

* Fixed merge error in phpstan-baseline.neon

* Change spaces to tabs in phpstan-baseline.neon

* Update error count

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2023-05-09 10:24:48 -05:00
bnerickson
56e9fa3742 Adding linux_config_files application support (#14776) 2023-05-09 10:23:49 -05:00
Jellyfrog
a27a53cc03 Telegram: Fix undefined array key (#15025) 2023-05-09 07:35:12 -05:00
cjsoftuk
927446db7b Fix Firebrick mempool polling (#15022)
* Add support for Firebrick memory monitoring.

* Add mempool testing for Firebrick.

* We have to specify the OID by numeric, because otherwise it assumes it's some kind of indexed table.

* Specify by OID.

* Fix test result data for the FB mempools.x

* Firebrick reports in KB.

* Fix precision in the tests.
2023-05-02 14:02:50 -05:00
cjsoftuk
bc310cffec WIP: Add support for memory monitoring on Firebrick platform (#15021)
* Add support for Firebrick memory monitoring.

* Add mempool testing for Firebrick.
2023-05-02 07:12:09 -05:00
Jellyfrog
7e8e11f097 phpstan: new baseline (#15015)
* phpstan: new baseline

* wip
2023-04-28 17:13:55 +02:00
Olen
7ec37561c5 Ensure irc fifo-file is shared between dispatcher and core containers (#14647)
* Ensure fifo-file is shared between dispatcher container and core container

* Fix config path
2023-04-28 09:03:24 -05:00
Shao Yu-Lung (Allen)
741d93c2a5 feat: Agent support OS Updates (#14687) 2023-04-28 08:49:04 -05:00
jlo-lirmm
41ae162223 php implode arg mismatch (#15014)
php implode arg mismatch
2023-04-28 15:44:22 +02:00
Tony Murray
5c25cece48 Convert the inventory page to Laravel (#15004)
* Convert the inventory page to Laravel
Fix several XSS issues (hopefully no new ones snuck in)
Small improvement to the SelectController to allow filtering by filterFields()

* style fixes

* Fix lint issues

* Fix part device filter
2023-04-28 07:51:41 -05:00
Tony Murray
75f8fe214f Slightly better OS module test output (#15001)
* Slightly better OS module test output
Maybe faster
Remove forced --debug in phpunit

* No assertions is ok

* Use always true assert instead

* Restore route poller module skip

* Sneaky whitespace
2023-04-27 14:49:52 -05:00
Jellyfrog
b0998b99a4 Adopt anonymous migrations (#15005)
Co-authored-by: Shift <shift@laravelshift.com>
2023-04-26 19:01:55 -05:00
Tony Murray
22f947c066 Test PHP 8.2 and MariaDB 10.11 (#15007) 2023-04-26 10:14:24 +02:00
Tony Murray
8a630edb38 Fix language selector (#15003) 2023-04-25 23:10:37 -05:00
Tony Murray
2f39917f3b Fix up icr-os outdated test data (#15006)
* Fix up icr-os outdated test data

* fix sensor data too
2023-04-25 20:53:17 -05:00
David Willingham
121c8ffba1 Fix spelling error in Graylog section (#15002) 2023-04-25 16:18:24 -05:00
Mathias Bøhn Grytemark
204abe0cf2 add advantech icr-os for advantech routers (#14171) 2023-04-25 07:54:41 -05:00
Michał Margula
e946452bbf Update Smokeping.md (#14999)
Updating Smokeping integration manual to be in line with main installation manual (mostly filename).
2023-04-25 07:19:14 -05:00
Félix Bouynot
3f723622da Update OAuth-SAML.md (#15000) 2023-04-25 07:17:23 -05:00
Justin Lentz
8c96a391c9 Clarify Alert Notify Settings (#14974)
* Update print-alert-rules.php

* Update print-alert-rules.php

Was hoping to avoid word wrap with notify, but can't be avoided, so changing to notification
2023-04-24 18:57:13 -05:00
Tony Murray
8891a1bc6d Fix SSO login (#14997)
* Fix SSO login

* like this?
2023-04-24 11:05:15 -05:00
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