[collectd-changes] collectd, the system statistics collection daemon: Changes to 'collectd-4.4'
Florian Forster
octo at verplant.org
Tue Feb 10 21:40:55 CET 2009
contrib/php-collection/browser.js | 578 ++++++++
contrib/php-collection/config.php | 58 +
contrib/php-collection/definitions.local.php | 79 +
contrib/php-collection/definitions.php | 2039 ++++++++++++++++++++++++++
contrib/php-collection/functions.php | 755 ++++++++++
contrib/php-collection/graph.php | 210 +++
contrib/php-collection/index.php | 253 ++++
7 files changed, 3972 insertions(+), 0 deletions(-)
New commits:
commit b2491d8cc416955fb0df16b74a28f218a2dedc01
Author: Bruno Prémont <bonbons at linux-vserver.org>
Date: Tue Feb 10 21:38:23 2009 +0100
contrib/php-collection: Save/load graph list and fix HTTPS handling.
Hi,
An update to the graphing interface. (incremental patch attached)
This fixes security complaint by a few browsers when page is accessed
via HTTPS and also makes sure the graphs and lists will load if HTTP
and HTTPS paths differ.
Thanks to Mullet- for spotting this issue.
In addition to the fix above this patch adds support for saving
current graph list to a cookie and appending graph list read from
cookie to the currently displayed list.
A future extension would be to allow saving/loading named graph lists
so multiple list can coexist (pretty useful when monitoring multiple
servers/services)
Bruno
commit a019b6c8144745db63c599680bd693ac02f11666
Author: Bruno Prémont <bonbons at linux-vserver.org>
Date: Tue Feb 10 21:35:44 2009 +0100
contrib/php-collection: Add a PHP frontend for graph generation.
Hi,
Attached is a patch with a set of PHP files for a complete graphing
environment for collectd-generated RRDs.
Before generating a graph with rrdtool it can tell collectd to flush
the RRDs that are about to be used.
The interface is built with dynamic HTML.
It provides following options:
- host selection
-> plugin selection
--> plugin instance selection
---> type selection
----> type instance selection (or meta graph)
- linear / logarithmic Y-scale
- verbose / minimal legend
- [Add Graph] [Remove all Graphs] [Refresh Graphs]
For each displayed graph:
- Move above previous graph
- Refresh graph
- Remove graph
- Move below following graph
I tested on following browsers:
- Firefox-3.0
- Safari-3.2 (Win32)
- Konqueror (KDE-4.1.3)
- Webkit (webkit-gtk-0_p40220)
- Internet Explorer (6, 7, 8rc - CSS layout issues with <8)
Dependencies:
- PHP-5 (might run with PHP-4)
> GD suport for error images
> Ability to execute rrdtool binary
> Unix socket for FLUSH support
- RRDTool (rrdtool graph, rrdtool info)
TODO: complete/improve graph definitions in definitions.php
though there is code to generate basic graph for any RRD of
unknown type, so definitions are rather a matter of color,
DS combination and stacking.
Bruno
File listing with short description:
- config.php
(configuration)
- functions.php
(common functions)
- definitions.php
(graph definitions for most? types from types.db
- based on collection.cgi)
- definitions.local.php
(place for site-local graph definitions, e.g. for
unixsock, tail, snmp generated RRDs)
- index.php
(main page)
- graph.php
(page returning the graph's PNG image)
- browser.js
(whole bunch of Javascript logic to show/hide/update graphs)
Not included are a few images:
- collectd-logo.png
(16x16, e.g. use collectd.org's favicon)
- favicon.png
(e.g. use the one in share/collection*)
- refresh.png
- move-up.png
- move-down.png
- delete.png
(16x16 take matching ones from your system's action-icons)
More information about the collectd-changes
mailing list