Commit Graph

103 Commits

Author SHA1 Message Date
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
Tony Murray
56bb0d2b97 fix: support hosts added by ipv6 without DNS #5567 2017-01-24 21:48:03 +00:00
David Bell
755860fec5 Improve the formating of some graphs (#5507) 2017-01-24 09:53:38 +00:00
Neil Lathwood
af0534f721 Revert "fix: possible additional fix for non-terminating rrdtool processes." 2016-09-24 15:52:35 +01:00
Tony Murray
37dba71101 fix: possible additional fix for non-terminating rrdtool processes.
Sends the quit command to the process, but doesn't call close as that can block the php process.
When the process exits all objects are destroyed and Proc::terminate() is called, this will terminate 15 then kill 9.
2016-09-23 16:47:14 -05:00
Tony Murray
833f509c36 Add type comments to the Proc objects in rrdtool.inc.php (#4383) 2016-09-09 07:29:02 +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
200e670315 Fix defunct process issues: create Proc class (#4210)
* Proc class
Encapsulate processes in a class, when they go out of scope, we can use the __destruct() process to make sure the process terminates.

* Fix rrdtool_last checks failing

* Don't close rrdtool in rrd_graph
Try to start rrdtool process if they haven't been started yet
Remove some extra debug output

* phpdocs added
several cleanups
should still be functioning the same
Only open one  rrdtool process for graph.php
2016-08-26 07:50:29 +01:00
Tony Murray
111d967e7d Fix remote rrdtool_check_rrd_exists() calls (#4196)
It was comparing with the full name when rrdcached only printed out the relative name.
Thanks mikmak on irc for lots of troubleshooting.
2016-08-24 22:42:50 +01:00
Tony Murray
228857d2da Use proc_terminate instead of proc_close to protect against zombies (#4178) 2016-08-23 15:23:55 +01:00
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
7941768933 Quick and dirty fix for #4102
Real fix is in #4104
2016-08-19 10:25:38 -05:00
Tony Murray
96e05cad0e Missed $vdebug in merge 2016-08-17 16:05:15 -05:00
Tony Murray
4f1a50a36e Make it easy to check for $debug condition for c_echo 2016-08-17 16:00:43 -05:00
Tony Murray
21514f1b69 Merge remote-tracking branch 'upstream/master' into rrd-check 2016-08-17 15:52:18 -05:00
Neil Lathwood
fdaad2e6ca Merge pull request #4075 from murrant/rrdoutput
Clean up rrdtool output
2016-08-17 21:05:20 +01:00
Tony Murray
aa8294bfce c_echo
Console_color2 helper.
If $console_color isn't instantiated, remove the color directives and print.
2016-08-16 20:01:22 -05:00
Tony Murray
4a152dab7b Fix rrdtool_check_rrd_exists() by removing the broken remote check.
Maybe this can be re-implemented at a later time.
2016-08-16 19:07:01 -05:00
Tony Murray
2528171e0a Clean up rrdtool output
Output the command before other print statements
Only output raw rrdtool output with the -v switch
Line return and plurality
2016-08-15 20:40:57 -05:00
Vladislav Solovei
ea7e02c66b -O does not exists in RRDTool < 1.4.3 (CentOS 6 uses 1.3.8 by default).
Checking RRD existence with file_exists() if RRDTool ver. < 1.5
2016-08-16 01:20:49 +03:00
Vladislav Solovei
de058b82ca -O does not exists in RRDTool < 1.4.3 (CentOS 6 uses 1.3.8 by default).
Checking RRD existence with file_exists() if RRDTool ver. < 1.5
2016-08-15 23:49:58 +03:00
Vladislav Solovei
fe948a7aad Removed -O parameter from rrdtool command line.
-O does not exists in RRDTool < 1.4.3 (CentOS 6 uses 1.3.8 by default).
Checking RRD file existence with rrdtool_check_rrd_exists() instead.
2016-08-15 18:32:49 +03:00
Vladislav Solovei
4c324cb5b3 Removed -O parameter from rrdtool command line.
-O does not exists in RRDTool < 1.4.3 (CentOS 6 uses 1.3.8 by default).
Checking RRD file existence with file_exists() instead.
2016-08-15 12:41:32 +03:00
Tony Murray
1949f2f4ea Proxmox rrd fix
Attempt to fix proxmox rrd naming. Create a separate function to generate it's file names.
2016-08-12 11:05:58 -05:00
Tony Murray
78723db9ea rrdtool.inc.php: Remove unused functions
Always force -O with create
Mark rrdtool() as internal
A little PSR-2 and whitespace cleanup
2016-08-09 09:31:45 -05:00
Tony Murray
837e360d5f Always send rrd create 2016-08-06 23:53:26 -05:00
Tony Murray
668c08193e Try to flush the output stream before we check it. 2016-08-03 16:40:31 -05:00
Tony Murray
ca89d7484a Update the rrdtool timeout to 5 seconds.
This should be adequate for most deployments.
2016-08-03 16:05:28 -05:00
Tony Murray
8d950a4ed7 More compact debug output.
RRDC_USER is not used in the systemd unit file (this isn't how you set an environment variable), so remove it.
2016-07-25 20:12:40 -05:00
Tony Murray
e3772e2653 Don't use $config['rrdcached_dir'] anymore, always use relative directories when using rrdcached.
Wait for output on every command, this prevents input left in the buffer from messing up subsequent commands.
It doesn't seem like there is a penalty, but I'd have to do more testing.
2016-07-25 16:24:09 -05:00
Tony Murray
c43f533b55 Sometimes the output streams already contain output, so we don't get the output we expect.
Clear those output buffers, but only when we care about it.
2016-07-21 11:27:19 -05:00
Tony Murray
0a8acc7649 Check for file missing string anywhere in stdout or stderr 2016-07-18 13:30:39 -05:00
Tony Murray
dd9e19d9ed Fix slow poller debug (waiting for output)
More robust rrdtool_check_rrd_exists() check
Line return after outputting the rrd command for easier to read debug output
Updated some phpdoc comments in rrdtool.inc.php
2016-07-15 12:21:09 -05:00
Tony Murray
01cfb960d1 Fix sensors rrd name issue
Use last instead of first, as last won't flush rrdcached
Only stream_select if timeout > 0
Attempt to fix mysql
2016-07-08 22:58:36 -05:00
Tony Murray
c5c5469179 Fix rrdtool_check_rrd_exists() 2016-07-08 14:35:00 -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
Paul Gear
7528453941 Remove null message on rename 2016-01-22 09:39:26 +10:00
Paul Gear
33091034d2 Record RRD renames in event log 2016-01-15 21:49:58 +10:00
Paul Gear
a78fac6d05 Allow ['rrd_def'] to be array or string 2016-01-15 21:49:58 +10:00
Paul Gear
ee75253310 Build in automated RRD file renaming 2016-01-15 21:49:58 +10:00
Paul Gear
3831ad3f45 First cut at unified data storage for rrdtool & influxdb
As a side-effect, this adds InfluxDB support for MIB-based polling.
2016-01-15 21:49:57 +10:00
Paul Gear
3fb5210d21 Make formatting changes consistent 2016-01-02 07:10:43 +10:00
Paul Gear
2558aa9bda Fix up some funky formatting; add/tidy end-of-function markers to reduce diff churn 2016-01-02 07:10:43 +10:00
Paul Gear
8a20ad4896 Move rrd handling functions into includes/rrdtool.inc.php; add backwards compatibility with file naming in old version of MIB-based polling 2016-01-02 07:10:42 +10:00
laf
48fab36592 Check that $fields has value 2015-12-08 15:17:53 +00:00
laf
e75fc4b8b1 Future proofed 2015-12-08 13:53:38 +00:00
laf
55d3242bd6 Updated version checking in rrdtool() function 2015-12-02 19:21:01 +00:00
laf
78a688fc47 Updated rrdtool call for tune command 2015-12-01 21:53:12 +00:00
laf
253b27d403 More updates to tune rrdfiles 2015-11-17 05:14:41 -08:00
laf
84863586b5 rrdtune code 2015-11-17 02:20:23 -08:00