Commit Graph

211 Commits

Author SHA1 Message Date
Tony Murray
e005f78211 newdevice: detect more devices as Comware (#6386)
* newdevice: improve comware detection
Only some H3C Comware devices were detected as comware, detect them all.

* Update the test data

FYI, C1234 was just a nonsense string
2017-04-13 10:52:07 +01:00
Neil Lathwood
1bbbaff58b refactor: Moved ifLabel -> cleanPort and updated the usage (#6288)
* refactor: Moved ifLabel -> cleanPort and updated the usage

* added list of tags allowed

* few updates as per comments from @murrant

* Added simple unit tests

* double display for javascript popover

* Remove ifNameDescr() function
Fix realtime port page

* remove accidental temp code

* Remove double display calls in ajax tables
2017-04-04 08:08:23 +01:00
Tony Murray
ea5a4b3586 fix: attempt to fix several bugs with sensor limits and incorrect detection (#6176) 2017-03-12 14:56:56 +00:00
Tony Murray
6993bd122c fix: sensors not being removed from database (#6169) 2017-03-12 00:03:04 +00:00
Neil Lathwood
38cebc5fd7 feature: Added better BGP support for Arista (#6046)
* feature: Added better BGP support for Arista
2017-03-11 23:16:49 +00:00
FTBZ
1d80a0d2a6 fix: Fix Generex voltage sensor divisor (#6156)
* Fix Generex votage sensor divisor and add an exclusion option

* Allow OID to be used to figure out if we need to change the divisor.

* Missed current and found bugs while I was there.

* Use returns swap oid logic
2017-03-09 21:47:58 -06:00
FTBZ
6f2ba2b45b Fix Generex load sensor divisor (#6155) 2017-03-09 14:10:25 -06:00
Neil Lathwood
ecc5b5f5db Update sensor_type (#6108) 2017-03-06 16:37:12 -06:00
Neil Lathwood
339cda3775 fix: Old / duplicate sensors would never be removed, this is fixed by setting the $type correctly #6044 (#6079) 2017-03-06 15:39:56 +00:00
Neil Lathwood
aa24fb62be fix: Do not try and only include files once when they are needed again! #5881 (#6053) 2017-03-01 17:06:11 -06:00
Neil Lathwood
38168832a6 refactor: Centralise device up/down check and use in disco #5862 (#5897)
* refactor: Centralise device up/down check and use in disco #5862

* Remove extra indentation
2017-02-15 15:22:09 +00:00
Neil Lathwood
1e2ab73239 tidy up some more eventlog things (#5885)
* tidy up some more eventlog things

* update sql file
2017-02-14 12:06:01 +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
3944185379 update tripplite divisor for certain versions #5364 (#5794) 2017-02-10 18:38:51 -06:00
Neil Lathwood
21898a3c29 Disco / Poller tidy up + Added display of module mem usage (#5778)
* tidyup + added mem usage for poller modules

* tidied up discovery modules

* fix sensors
2017-02-07 22:54:30 -06:00
Søren Rosiak
414efb3539 refactor: Various Code Cleanup (#5777)
* refactor: Various Code Cleanup

* moar
2017-02-05 22:37:08 +00:00
Neil Lathwood
d4e8c54516 refactor: Tidy up sensor discovery (#5550)
* refactor: Tidy up sensor discovery

* more files

* removed uneeded files

* updated array check

* updates for linux/supermicro

* small changes

* Update linux.inc.php

* Add supermicro temps back to linux.inc.php

* No need for is_file on rfc1628.inc.php, it exists

* Revert rfc1628 change

* Fix whitespace...

* rebased

* fixed $valid data not being passed to new sensors() function
2017-02-03 06:39:38 -06:00
Tony Murray
ab03af889a fix: hostnames returned by discovery protocols with trailing dot (#5571) 2017-01-24 21:56:51 +00:00
Neil Lathwood
32da1bceea fix: Changing device type now is persistant (#5529) 2017-01-22 09:49:13 +00:00
Neil Lathwood
8557f2df41 newdevice: APC Environmental monitoring units #5140 2017-01-18 08:48:33 +00:00
Neil Lathwood
7d27b4ec9a fix: Fix toner detection discovery #5391 (#5410)
* fix: Fix toner detection

* final fix for toner detection

* update $sql variable
2017-01-13 09:30:39 -06:00
Neil Lathwood
d5296319fb refactor: MySQL strict and query fixes (#5338)
* refactor: MySQL strict and query fixes

* moved sql file
2017-01-13 06:47:16 -06:00
Neil Lathwood
569a3b4a8b fix: Detect device type changes and update #5271 (#5390) 2017-01-11 10:36:04 -06:00
Tony Murray
b3f6218359 fix: os type and group not being set (#5357) 2017-01-09 08:16:09 +00:00
Neil Lathwood
da5783d917 feature: Add mysql failed query logging + fixed queries that break ONLY_FULL_GROUP_BY (#5327)
* feature: Add mysql failed query logging + fixed queries that break ONLY_FULL_GROUP_BY

* fix all schema errors and update system
2017-01-07 11:32:38 -06:00
Neil Lathwood
c3d678b112 Discovery fix (#5304) 2017-01-04 08:12:13 +00:00
Neil Lathwood
7f5c555ba5 refactor: Move mib based polling into yaml config files (#5234)
* refactor: More mib based polling into yaml config files

* doc update

* Update MIB-based-polling.md
2017-01-03 11:12:39 -06:00
Neil Lathwood
f5a16be0e3 refactor: Move OS definitions into yaml files (#5189) 2016-12-23 17:53:19 +00:00
Neil Lathwood
87de5607df refector: centralised check for ignore storage devices #5075 (#5076)
refector: Centralised check for ignore storage devices #5075
2016-11-30 22:50:29 +02:00
Tony Murray
db240cb4eb refactor: Collection and output of db and snmp stats (#5049) 2016-11-23 06:57:19 +00:00
Vitali Kari
8841eece94 feature: Adds support for enabling / disabling modules per OS (#4963)
* fixes #4946
first try, should be checked first
only discovery first

* add OS modules status indication

* add debug output
add os poller module support

* fix some whitespaces

* fix missing semicolon

* fix some whitespaces

* Modify the modules page

It now shows unset for unset device settings.
Also, `$os_module_status = $config['os'][$device['os']]['poller_modules'][$module];` doesn't work like you would expect. Fix that behavior.

* Fix mangled tabs

* optimize debug output
add docs

* text highlighting

* Streamline docs #1
* Update docs
* Spell out Global, OS, Device.
2016-11-13 13:46:05 -06:00
Tony Murray
74f89978fc refactor: toner support (#4795) 2016-10-15 00:14:18 +01:00
crcro
b867d3dd05 fix: apc load, runtime and current sensors (#4780)
fix: APC load, runtime and current sensors
2016-10-13 19:03:46 +03:00
crcro
5c761eb1c7 Updated toner discovery (#4637) 2016-10-03 17:49:23 +01:00
crcro
4bb435ee21 poweralert divisor fix for voltages (#4639) 2016-09-27 20:40:15 +01:00
Tony Murray
74a8822034 Clean up discover_x functions debug output. (#4610) 2016-09-27 20:18:12 +01:00
crcro
2474b3e654 removed unused param from function descr 2016-09-21 00:25:26 +03:00
crcro
25b3e16f56 removed from function 2016-09-20 21:18:38 +03:00
crcro
33f3109aee more flexibility for divisor value 2016-09-20 03:11:56 +03:00
Neil Lathwood
3ae96e2a37 Centralised code for poweralert divisor checks 2016-09-18 19:38:31 +01:00
Neil Lathwood
7dec670494 refactor: Updated a lot of references to LibreNMS - copyright still left intact (#4339) 2016-09-08 08:12:23 -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
Tony Murray
b8e9b2d917 Implement an autoloader (#4140)
* Implement an autoloader

When cleaning up classes for psr2, things got a bit unwieldy, so I implemented a class autoloader.
I created a PSR-0 compliant LibreNMS directory and moved all classes there that made sense.
Implemented LibreNMS\ClassLoader which supports adding manual class mappings

This reduces the file includes needed and only loads classes when needed.

* Add teh autoloader to graph.php

* Add a small bit of docs
Fix incomplete class in includes/discovery/functions.inc.php
2016-08-21 14:07:14 +01:00
Tony Murray
f3fc6f2906 Use Exceptions
Use exceptions for addHost()
Gets rid of silly mixed return and only returns the device_id.  Throwing an exception if we run into any issues.
Slightly modifies api add host output again to include device_id
2016-08-07 12:16:40 -05:00
Tony Murray
66bed276c2 Reconstruct addHost() so it is easier to understand
Update addHost() to return either device_id or a string
modify print_error(), print_message() to allow for $quiet variable
Only call addHost() once in addhost.php, if the snmp version isn't set, addHost will cope
Fix up snmp-scan.php and discovery-protocols.inc.php to detect when a device already exists
change in ip_exists() to make it more readable
2016-08-02 00:31:27 -05:00
laf
d722bb6943 Update use of max repeaters to save mysql queries 2016-07-30 15:11:29 +01:00
Søren Rosiak
5ca2eab0dc Merge pull request #3823 from laf/device-type-discovery 2016-07-21 22:14:00 +02:00
Neil Lathwood
121781ce9a Merge pull request #3759 from Misch-/master
Always log why discovery fails
2016-07-11 19:02:51 +01:00
laf
0ec980c1cd Moved the device type discovery to before it is needed 2016-07-11 12:33:09 +01:00