[Release] Load Monitor 0.1 - Your server loads in a fancy chart :)

Data loss bug in this setting ( CMD_PLUGINS_ADMIN/load_monitor/settings.html ):
"Maximum days to remember loads" (0 = all, more days = more space)

But 0 deletes all the data.
See scripts/add.php Line 151.
 
Last edited:
A couple of other notes:
* There's a lot more information than I first realized. Mouse over any vertex in the chart and click to get a full report for that time.
* Sets some permissions to world writable 777, unnecessarily I assume.
 
More notes. The 777 is needed for initial setup with SQLite which is very picky about creating databases.

Two fixes for scripts/add.php :

Line 58:
PHP:
$save['swap_cached'] = trim(str_replace('k cached', '', $swapData[3]));
+// stop PHP warning emailed to root (unknown index):
+$save['tasks'] = array();
+//
$taskData = array_slice($data, 7);

Line 151:
PHP:
$db->exec('INSERT INTO loads (`' . implode('`,`', $fields) . '`) VALUES(' . implode(',', $values) . ')');
+// stop data loss if maxRemember set to 0 (never delete):
+if ( $config['maxRemember'] > 0 )
+//
 $db->exec('DELETE FROM loads WHERE DATE(created) < "' . date('Y-m-d', strtotime('-' . $config['maxRemember'] . ' days')) . ' "');

I also have a bunch of enhancements I can post externally, but I'm not sure how the licensing works. This script was posted without license text, just one line in admin/index.html: "© Future Vision"
 
Warning: Only CentOS 6, 7 are fully supported and tested. Potentially can work under current Debian versions (not tested though).


A big preview image added into Readme now here https://github.com/poralix/load_monitor/

Available here:

- https://github.com/poralix/load_monitor/blob/master/load_monitor.png
- https://github.com/poralix/load_monitor/blob/master/load_monitor_widget.png


Installation process with git:

Code:
cd /usr/local/directadmin/plugins/
git clone https://github.com/poralix/load_monitor.git
cd load_monitor/scripts/
./install.sh

Then go to the plugin settings and update:

- Maximum days to remember loads: default 91 (0 = all, more days = more space)
- Maximum task entries to save: default 91 (0 = all, more tasks = more space)
- Save interval in minutes: default 1

91 days of data with 1 minutes intervals might take up to 2Gb disk space and more.


Please feel free to use it and let us know your thoughts and ideas for improvements.
 
Last edited:
Hello Alex.

No sorry, I decided not to install it because we already have Munin installed, and I don't see the real difference or benefit compared to Munin yet.
And at this moment we only have 1 Centos 7 server, mainly used for radio streams which the owner rather not has me testing things on, because it also contains a big city radio station which also broacasts over cable and air.
I know nothing will crash by installing this, but since I'm only maintaining it, it's not my decision.

If there was a patched Centos 6 version, I could test on another server, which is also live with customers, but I can install such things on it.
 
Hi Alex,

I did :)
It is working perfectly, one suggestioin for now is that the graph should take the full width of the them rather than have a pre-defined size.
For the bottom part of the report, it is showing every 2 minutes numbers (ex: 16:00 16:02 16:04 and so on), owuldn't be better to have something little more clear? (ex. 5 mins distance?)

Also, I am not sure what would be the difference between "Maximum days to remember loads" and "Maximum task entries to save"

And last thing, I would change the 00:00 - 23:59 dropdown voice to be "Entire Day" or something like that :)

Beside those minor things, I would say it is working pretty well :)

Thanks or the effort!
Andrea
 
Thanks. Well the original version should work fine under Directadmin with CentOS 6, I believe. Originally the plugin was patched to work with CentOS 7, as it failed.

The plugin does not replace munin, the munin is very good. What I most like of it the plugin saves and can show results of `top` at any recorded moment.

Hello @Andrea,

Thank you for your feedback. The plugin collects two types of data:

- server load, you can change number days under
"Maximum days to remember loads"
- a list of running processes, you can change number of days under "Maximum task entries to save"

Until now we did not change the plugin's interface much. I have ideas on how we can improve navigation and I don't like the ranges as they exist now too ))) I would do something more Zabbix-like, not too sure yet.

Full width under Evolution skin you mean? OK, agreed. I will check what can be done here.
 
Last edited:
Hi Alex,

Thanks :)

I still don't use Evolution Skin.. my bad.. I should give it a try now that is out :D

I am using the CyberAdmin Skin at the moment :)

Cheers
 
That's clear. Originally the plugin was developed under Enhanced skin which has a limited width. I will check how to make a dynamic width. I've just only checked the plugin on a wide-screen, and see what you mean. Thank you for the suggestion.
 
Thanks. Well the original version should work fine under Directadmin with CentOS 6, I believe.
Thank you, but I don't like things which are not maintained anymore. And we still have munin. So I'll wait a bit. Good chance I'm allowed to put it on the Centos 7 server later on this year.
 
Tested on CentOS 6 and I can now confirm the latest patched version can be used on CentOS 6 too.
 
Hello Alex.

I just installed this on my DA Centos 6 system by following the instructions in post #49.
However, now a green number 1 is showing next to "Plugin Manager". When I click on it, I see Loadmonitor has installed, active and can update set to yes. So everything looks fine.

How do I get rid of that get rid of the green 1?

When I selected the plugin and selected "activate" and put in my password I got an access denied.
Reason was that I installed it as root and the directory still had root as owner. So maybe you can add the chown line to the end of the instructions, for users with less ssh knowledge maybe.
Code:
chown diradmin:diradmin load_monitor/ -R
this way it was possible to do things via the DA panel again (like activating).
 
Richard,

It is the install.sh script to set correct permissions and ownership. Are you sure you've executed it?

What version number do you see there? It should be the latest 0.2.5.
 
Back
Top