Commit Graph

25 Commits

Author SHA1 Message Date
Tony Murray
c79b187d72 Poller rewrite (Try 2) (#13525)
* core WIP

* try to finish up

* trim space too
and a couple of cleanups

* update test data

* put escapes back

* another net-snmp difference

* correct copy paste error

* WIP

* Use new code YAY

* a tiny bit more

* Kind of working

* Handle manual modules correctly

* convert core to modern module

* Only save metrics if modules is not overridden

* correct module exists check

* database error handling

* debug handling

* restore bad changes

* Introduce Actions
 RunAlertRulesAction
 UpdateDeviceGroupsAction

* tweaks to output

* Fix some issues in outside code

* Style fixes

* fixes to module status checks

* typehints!

* Use logger only and DI

* OS module not named correctly

* Work on quiet output a bit more

* generically don't change output when disabling debug if the driver is already stack

* Fix missing $device variable for legacy os polling
Fix missing dbFacile functions when no legacy modules polled in RunAlertRulesAction

* restore legacy os module shim

* use the new poller code for tests

* PollingDevice event

* Fix some issues and enable/disable error reporting around legacy modules

* typehints

* fully update baseline

* Use Process for version commands so we don't leak debug output.

* don't detect rrdtool version in ci every time

* style fixes

* Warning fixes

* more fixes

* re-update baseline

* remove diff noise

* fix up alerts

* Catch exceptions in device ip lookup

* Revert accidental snmp.inc.php poller target change
(should have been ?: not ??)
2021-11-17 19:23:55 -06:00
Tony Murray
f8764ddcb5 Revert "Poller command rewrite (#13414)" (#13524)
This reverts commit 1752d1efd4.
2021-11-16 21:40:29 -06:00
Tony Murray
1752d1efd4 Poller command rewrite (#13414)
* core WIP

* try to finish up

* trim space too
and a couple of cleanups

* update test data

* put escapes back

* another net-snmp difference

* correct copy paste error

* WIP

* Use new code YAY

* a tiny bit more

* Kind of working

* Handle manual modules correctly

* convert core to modern module

* Only save metrics if modules is not overridden

* correct module exists check

* database error handling

* debug handling

* restore bad changes

* Introduce Actions
 RunAlertRulesAction
 UpdateDeviceGroupsAction

* tweaks to output

* Fix some issues in outside code

* Style fixes

* fixes to module status checks

* typehints!

* Use logger only and DI

* OS module not named correctly

* Work on quiet output a bit more

* generically don't change output when disabling debug if the driver is already stack

* Fix missing $device variable for legacy os polling
Fix missing dbFacile functions when no legacy modules polled in RunAlertRulesAction

* restore legacy os module shim

* use the new poller code for tests

* PollingDevice event

* Fix some issues and enable/disable error reporting around legacy modules

* typehints

* fully update baseline

* Use Process for version commands so we don't leak debug output.

* don't detect rrdtool version in ci every time

* style fixes

* Warning fixes

* more fixes

* re-update baseline

* remove diff noise

* fix up alerts
2021-11-16 16:59:46 -06:00
Jellyfrog
2fc3a21211 Apply fixes from StyleCI (#12121) 2020-09-21 15:43:38 +02: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
Hayden
7c770a99d8 Fix 10853 os specific syslocation (#11082)
* added functionality to set sysLocation override in $os.inc.php files

* php styling fixes

* updated docs for location override in $os.inc.php

* patch poweralert.inc.php to use $location override

* added location override for enexus (Eltek)

* update phpdoc for set_device_location()

* converged location code in core.inc.php to use set_device_location()

* added new snmprec test data for enexus os

* Travis test data

* remove enexus_smartpacks2 test data

* Revert "remove enexus_smartpacks2 test data"

This reverts commit 36c8fc7036.

* updated enexus_smartpacks2 test data with generic syslocation

* kick travis CI

* kick travis CI
2020-04-02 23:28:12 +02:00
Tony Murray
f3ba8947f7 Use Config helper (#10339)
remove usage of global variable
2019-06-23 00:29:12 -05:00
Neil Lathwood
b4da5de452 refactor: Centralised the updating of device logo #5873 (#5874) 2017-02-14 12:56:16 +00:00
Richard Mayhew
e4f48e661e Add additional eventlog severity levels (#5879) 2017-02-13 22:32:02 +00:00
Richard Mayhew
5bfd23e7eb webui: New eventlog severity classification (#5830)
* New event log severity model

* Revert "New event log severity model"

This reverts commit 0783527af8.

* New event log severity model

* Fixed spaces vs tabs

* Learning the format requirements

* Learning the format requirements

* Moved the colours in to the stylesheet

* change SQL file to stop conflicting

* refactor log_event so severity isn't last, but reference is.

* keep having to move the file due to new PR conflicts

* Revert "keep having to move the file due to new PR conflicts"

This reverts commit f3030e7218.

* extended support to dashboard and eventlog page

* formatting
2017-02-12 22:41:05 +00:00
Neil Lathwood
2e235b27c6 fix: Various variables will all be updated if they are blank #5811 (#5836) 2017-02-10 14:42:46 -06:00
Neil Lathwood
009281773f Updated poll_device and os module to prettify output (#4740)
* Updated poll_device and os module to prettify output

* Move line return
2016-10-13 20:41:53 -05:00
Tony Murray
9284bc60ff Update code in includes to be PSR-2 compliant (#4220)
refactor: Update code in /includes to be psr2 compliant #4220
2016-08-28 18:32:58 +01:00
Job Snijders
ebd0f6fc35 Apply "Squiz" code style on old (pre-2014) files 2015-07-11 16:12:35 +02:00
Adam Amstrong
b273e04241 /// -> //
git-svn-id: http://www.observium.org/svn/observer/trunk@3240 61d68cd4-352d-0410-923a-c4978735b2b8
2012-05-25 12:24:34 +00:00
Adam Amstrong
cacf913a55 # -> / for phpdoc
git-svn-id: http://www.observium.org/svn/observer/trunk@3239 61d68cd4-352d-0410-923a-c4978735b2b8
2012-05-25 11:29:53 +00:00
Adam Amstrong
ba28732c3b ports sort done in php
git-svn-id: http://www.observium.org/svn/observer/trunk@3238 61d68cd4-352d-0410-923a-c4978735b2b8
2012-05-25 10:34:01 +00:00
Tom Laermans
b56d3d6320 remove support for GIF OS-icons, but add support to override OS icon through database, suitable for radlan devices and probably/possibly other OEMables
git-svn-id: http://www.observium.org/svn/observer/trunk@3087 61d68cd4-352d-0410-923a-c4978735b2b8
2012-04-24 22:50:15 +00:00
Tom Laermans
b32d925779 improve hp procurve version detection
git-svn-id: http://www.observium.org/svn/observer/trunk@3034 61d68cd4-352d-0410-923a-c4978735b2b8
2012-04-13 23:10:32 +00:00
Tom Laermans
392d97bf73 syntaxer run
git-svn-id: http://www.observium.org/svn/observer/trunk@2966 61d68cd4-352d-0410-923a-c4978735b2b8
2012-04-05 16:37:46 +00:00
Adam Amstrong
7bfc8babbf fix ios version detection
git-svn-id: http://www.observium.org/svn/observer/trunk@2917 61d68cd4-352d-0410-923a-c4978735b2b8
2012-03-20 23:56:40 +00:00
Adam Amstrong
bd243db6dc potentially break all cisco versioning :P
git-svn-id: http://www.observium.org/svn/observer/trunk@2912 61d68cd4-352d-0410-923a-c4978735b2b8
2012-03-20 16:50:16 +00:00
Adam Amstrong
bc0cdd2415 move poller.php (inc os/system) to db* (and others, but poller is biggest change)
git-svn-id: http://www.observium.org/svn/observer/trunk@2298 61d68cd4-352d-0410-923a-c4978735b2b8
2011-05-13 11:42:26 +00:00
Adam Amstrong
00121fd3f8 fixes to new poller
git-svn-id: http://www.observium.org/svn/observer/trunk@2233 61d68cd4-352d-0410-923a-c4978735b2b8
2011-05-03 21:46:25 +00:00
Adam Amstrong
b11ad816aa poller overhaul. system/os split into modules. each device is wrapped in poll_device(). this probably breaks everything for you. adios, little datums.
git-svn-id: http://www.observium.org/svn/observer/trunk@2231 61d68cd4-352d-0410-923a-c4978735b2b8
2011-05-03 21:17:04 +00:00