Commit Graph

183 Commits

Author SHA1 Message Date
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
laf
33415796bd Re-enable the ability to run a disabled module manually 2016-07-11 12:28:54 +01:00
Carlin Mische
ebe42a023d Changed snmp access failed logging to reflect that host could be unreachable too 2016-07-10 20:34:10 -05:00
Carlin Mische
f90b2aa7ff Fixed using undefined variable in discovery failure logging 2016-07-07 00:01:24 -05:00
Carlin J Mische
bc642dcc39 Fixed style and capitalization on log messages 2016-07-01 09:53:28 -05:00
Carlin J Mische
e596953fe6 Modified discover_new_device() function to always log why discovery of a new host fails 2016-06-30 16:28:54 -05:00
laf
6ba32ebe5c Fix for polling/discovery function issue 2016-06-24 15:32:19 +01:00
laf
5d16cdb20a Fixed errors from scrut/murrant 2016-06-22 19:10:33 +01:00
laf
246664d1f9 Updated module run time to be limited to 5 decimal places 2016-06-21 01:44:50 +01:00
laf
558dfb2344 Pretty up the discovery process output 2016-06-21 00:59:43 +01:00
Tony Murray
b37d0f2e9e Draw graphs for avtech switch state. 2016-06-06 19:17:19 -05:00
Tony Murray
807e3dfe61 Fix avtech switch type sensors 2016-06-06 15:33:41 -05:00
Tony Murray
9393c0e716 Fixes for the Avtech sensor state 2016-06-04 10:09:43 -05:00
Tony Murray
f4cfd61aef Capitalize state descriptions 2016-06-03 21:48:24 -05:00
Tony Murray
b54f449ed8 Add Avtech switch support 2016-06-03 21:44:21 -05:00
Søren Rosiak
edd3d61fc8 Fix typo.. 2016-06-02 18:59:43 +02:00
Paul Heinrichs
499a23e372 Adjusted canopy sensor high/low limits 2016-04-06 08:20:10 -04:00
Paul Heinrichs
a13d148fb1 Added Signal Sensor 2016-03-22 10:37:07 -04:00
Rosiak
f1bb532d30 check_valid_sensors - Correction
#3229
2016-03-12 23:27:21 +01:00
Tony Murray
eb9281ff10 Fixes for Avtech
Trim quotes from description
Correct sensor type
Allow sensor id of 0
Correct indexes for sensors
2016-03-09 12:34:29 -06:00
Tony Murray
13260ce152 Move avtech_add_sensor function to includes/discovery/functions.php
allow type to be specified
else if -> elseif
2016-03-05 08:33:14 -06:00
HenocKA
6a51746bb7 bug correction 2016-02-10 17:45:05 +01:00
HenocKA
7a00d913a1 update branch 2016-02-06 06:52:21 +01:00
HenocKA
8a3d14f9e2 Correct data duplication on discovering cisco vrf lite 2016-02-02 12:21:45 +01:00
HenocKA
0ac8f584b2 discoverying and polling VRF 2016-01-26 15:22:49 +01:00
laf
427c4f07c6 Added ability to ignore device sensors from entity mib 2016-01-25 22:37:38 +00:00
Mike Rostermund
e2d1a8e7d9 Replaced custom utime() function with microtime(true) 2016-01-08 13:33:32 +01:00
Mike Rostermund
a1261a0aeb Replace utime() for microtime(true) 2016-01-08 08:41:12 +01:00
Mike Rostermund
51d2e32c36 Print runtimes for each individual polling and discovery module. 2016-01-07 12:04:51 -08:00