Commit Graph

430 Commits

Author SHA1 Message Date
Tony Murray
e80a385b7f RRDtool dual process (remote creation/check) (#4104)
* Prepare for dual rrdtool processes
Disabled at this time
Split out rrdtool version checks into rrdtool_create_command()
Tests for rrdtool_create_command()
Fixes a few small issues.

* Enable dual process and remote rrd check/creation

* remove full path for remote commands

* Doc updates
minor fix to rrdtool_tune()

* Set up bootstrap for phpunit
Fix issues with FileExistsException

* Attempt to fix phpunit

* Fix classloader and bootstrap to use full paths only (not depending on $config)

* Fix phpunit tests, config.php does not exist.
2016-08-22 16:32:05 +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
Neil Lathwood
e09f5c552c Merge pull request #3800 from murrant/rrd-create-remote
RRD Cleanup: centralize rrd_exists check, utilize data_update() and rrd_name()
2016-08-10 18:44:45 +01:00
Tony Murray
eadeeb9409 Fix addHost force_add logic
Use boolean where we can
Fixes #4001
2016-08-09 15:13:42 -05:00
Tony Murray
68303a96da Merge remote-tracking branch 'upstream/master' into rrd-create-remote 2016-08-08 20:23:15 -05: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
ead28f6acd Merge remote-tracking branch 'upstream/master' into rrd-create-remote 2016-08-07 08:22:32 -05:00
Tony Murray
231bb52ed1 Accidental inclusion. 2016-08-02 08:08:20 -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
Tony Murray
97daf3dd54 Merge remote-tracking branch 'upstream/master' into rrd-create-remote 2016-08-01 10:18:28 -05:00
laf
7855aeb00c Updated strstr to stristr in is_port_valid function 2016-07-30 15:50:44 +01:00
Tony Murray
1f5cfe283e Merge remote-tracking branch 'upstream/master' into rrd-create-remote 2016-07-18 15:58:56 -05:00
Tony Murray
a1ab19047e Merge remote-tracking branch 'upstream/master' into rrd-create-remote 2016-07-07 21:28:47 -05:00
Tony Murray
57650e4ffc Remove nfs requirement for distributed poller (with rrdtool 1.5+)
Use data_update instead of rrd_update/rrd_create and influx_update
Centralize rrd file check so we can check against a remote rrdcached server too
Use rrd_name() to generate rrd file names
2016-07-07 21:10:06 -05:00
laf
55c886b08e Fix conflict 2016-07-07 19:11:13 +01:00
laf
eb58daa207 Scrut fixes 2016-07-07 19:10:37 +01:00
laf
e20281aefd Added support for Juniper optic sensors 2016-06-29 00:14:21 +01:00
laf
110dcae4c9 Added device_id to eventlog table 2016-06-18 02:09:22 +01:00
laf
e5e1e89331 Sanity check the in/out_delta value, if it's out of the range of the
ifSpeed then we use the previous value
2016-06-15 16:25:14 +00:00
laf
8a46c7611d Add support for stopping devices being added with duplicate sysNames 2016-05-02 20:20:29 +00:00
laf
fe928c2dff No need for base_url here 2016-04-30 14:04:24 +00:00
pblasquez
170672c3b8 Fix indentation 2016-04-29 17:43:28 -07:00
pblasquez
ba48567f19 Added bad ifName and ifAlias regex matching
Allow user to ignore interfaces based on regex matching of ifName and
ifAlias values
2016-04-28 15:36:13 -07:00
David Bell
933e163222 Corrected more formatting. I don't like your coding style! :) 2016-04-19 11:53:06 +01:00
David Bell
f9fda59abd Corrected formatting. 2016-04-19 11:45:03 +01:00
David Bell
a988e83df7 Version 2 of sending the correct data to influx. Also catching the exception that would stop updates working. 2016-04-12 10:01:20 +01:00
Rosiak
763f0fd24f silly bug 2016-03-09 22:13:57 +01:00
Rosiak
7c8806f784 Fix create_state_index function
Shouldn’t be compared to false, but null instead.
2016-03-08 21:45:18 +01:00
Tony Murray
ade3c81570 Need global $config to be able to access it. 2016-02-29 11:26:03 -06:00
Tony Murray
8400962130 Fix os images with subdirectories in url
Fix #3118
Obviously, the answer to the question in the code is yes
2016-02-29 11:20:03 -06:00
Rosiak
5a831c6dbc Check if it exists in table before inserting 2016-02-27 16:23:58 +01:00
Rosiak
d030e959df Scrut fix 2016-02-26 23:56:54 +01:00
Rosiak
928fd70ced Proper State Monitoring 2016-02-26 23:40:34 +01:00
Tony Murray
f8f895e5b1 Make sure port_assoc_mode is an int before inserting a device into the db.
fixes #3090
2016-02-26 08:05:07 -06:00
Tony Murray
484f39cd70 Populate device icon in the database
The icon field was originally set up as an override for the display option but the only way to set it currently is directly in the DB afaik.
Populate the icon field during discovery, this should move a little execution from page display time to discovery time.
v2
2016-02-23 23:44:51 -06:00
Neil Lathwood
758facd4bf Merge pull request #2958 from murrant/calix
Calix Support
2016-02-09 20:06:27 +00:00
Neil Lathwood
5f0c150d42 Merge pull request #2946 from murrant/oxidized_group_versions
Fix oxidized versioning + groups
2016-02-09 19:25:22 +00:00
Tony Murray
f177dd6608 Merge branch 'master' into calix 2016-02-08 14:20:14 -06:00
Tony Murray
1d796fecfe Add a generic way to allow empty ifDescr on ports for an OS. 2016-02-08 13:58:03 -06:00
Tony Murray
8eda8e0bfc Fix Oxidized node reloading. 2016-02-05 16:29:42 -06:00
Tony Murray
4aa9838eda add discover, polling and mibs.
work around empty ifDesc
2016-02-05 14:26:06 -06:00
Robert (KHobbits)
028b4300ba Slow polling loop 2016-02-02 11:36:49 +00:00
KHobbits
f2bad9816b Attempt to scare away scrutinizer issues. 2016-02-02 01:05:29 +00:00
KHobbits
5ebe6b44c0 Code clean up 2016-02-02 00:56:19 +00:00
KHobbits
92a7e5796d Add ./validate.php -m rrdcheck
This will loop through rrd files and highlight any corrupt files.
2016-02-01 23:29:37 +00:00
Maximilian Wilhelm
8c704f7bdf Allow editing port association mode of a device.
Add a select box to the device SNMP edit page in the WebUI to update
  the port association mode of a device.

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
2016-01-26 13:50:00 +01:00
Paul Gear
1aad82c73c Merge pull request #2836 from laf/issue-2833
Added eventlog to show when device has been removed
2016-01-22 10:25:44 +10:00
Neil Lathwood
abf2fc0ba5 Merge pull request #2740 from paulgear/unified-data-storage-rrd-influx
First cut at unified data storage for rrdtool & influxdb
2016-01-21 23:31:09 +00:00
laf
e03031e793 Added eventlog to show when device has been removed 2016-01-21 23:12:18 +00:00
laf
47ff913baa Updated for Scrut fix 2016-01-18 12:54:25 +00:00