diff options
author | Peter Wu | 2014-08-10 14:01:43 +0200 |
---|---|---|
committer | Peter Wu | 2014-08-10 14:10:53 +0200 |
commit | 13bfffb34cd0385124d4084a66d49471cb457b6c (patch) | |
tree | c736c1addb5c00ff18c39deb34a548adfffabeb0 /README.md | |
parent | Merge (a)sync code, reformat CGP.js (diff) | |
download | apt-panopticon_cgp-13bfffb34cd0385124d4084a66d49471cb457b6c.zip apt-panopticon_cgp-13bfffb34cd0385124d4084a66d49471cb457b6c.tar.gz apt-panopticon_cgp-13bfffb34cd0385124d4084a66d49471cb457b6c.tar.bz2 apt-panopticon_cgp-13bfffb34cd0385124d4084a66d49471cb457b6c.tar.xz |
Add README file
Documents requirements, installation instructions (obsoleting
doc/INSTALL) and performance hints. Added a nginx server configuration
example that optimises for performance.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..d4f3c52 --- /dev/null +++ b/README.md | |||
@@ -0,0 +1,78 @@ | |||
1 | Collectd Graph Panel (CGP) | ||
2 | ========================== | ||
3 | Collectd Graph Panel (CGP) is a graphical web-based front-end for visualizing | ||
4 | RRD collected by [collectd][collectd], written in the PHP language. | ||
5 | |||
6 | The latest version of CGP can be found on https://github.com/pommi/CGP. When you | ||
7 | have improvements or fixes, do not hesitate to send a pull request! | ||
8 | |||
9 | Requirements | ||
10 | ------------ | ||
11 | CGP has the following hard requirements: | ||
12 | |||
13 | - Web server with PHP 5.0 support. | ||
14 | - `rrdtool` program, expected at `/usr/bin/rrdtool` (can be changed in the | ||
15 | configuration file, `$CONFIG['rrdtool']`). | ||
16 | - `shell_exec` must not be disabled through the [`disable_functions` ini | ||
17 | directive][ini.disable_functions]. It must allow execution of the `rrdtool` | ||
18 | program. | ||
19 | |||
20 | The following software is optional, but nevertheless highly recommended: | ||
21 | |||
22 | - [PHP JSON extension][php-json]: for a finer representation of the data in the | ||
23 | graph. These representations can be found in the `plugins/` directory. | ||
24 | - Web browser with `canvas` support such as IE 9+, Firefox, Chrome, Opera 9+. | ||
25 | Optional unless you use `$CONFIG['graph_type'] = 'canvas'`. | ||
26 | |||
27 | Installation and configuration | ||
28 | ------------------------------ | ||
29 | CGP is designed to run out of the box. If you want to modify some configuration | ||
30 | settings, please create `conf/config.local.php` to overrule the settings from | ||
31 | `conf/config.php`. | ||
32 | |||
33 | In a default configuration, the server will execute `rrdtool` to draw PNG | ||
34 | graphs. These pictures are static and can put quite a burden on the server. For | ||
35 | more flexibility, set `$CONFIG['graph_type'] = 'canvas'`. This will make web | ||
36 | browsers download the RRD files and allows the user to zoom and move though the | ||
37 | history using their pointer device. | ||
38 | |||
39 | See [doc/nginx.conf](doc/nginx.conf) for an example configuration for the nginx | ||
40 | web server. The `.htaccess` file in the top-level directory can serve as a guide | ||
41 | for Apache configuration. | ||
42 | |||
43 | Performance tips | ||
44 | ---------------- | ||
45 | Although the default configuration "just works", you can further improve your | ||
46 | set up to reduce data usage and CPU time: | ||
47 | |||
48 | - Enable gzip compression and caching (for at least RRD data files, SVG | ||
49 | pictures and Javascript files. The canvas graph type downloads each RRD data | ||
50 | file which are quite large (considering their quantity). Savings of 70% - 80% | ||
51 | can be achieved for RRD data files. | ||
52 | - Set `$CONFIG['rrd_url']` to a directory directly accessible by the web server | ||
53 | such that it can provide better cache control than PHP. | ||
54 | - Instead of the default `png` graph type, consider `canvas` to relieve the web | ||
55 | server. This moves the image processing to the client that views the picture. | ||
56 | - Disable the `open_basedir` setting of PHP, or at least put the RRD data dir | ||
57 | in the beginning. When enabled, PHP (at least 5.5.14) scans though every | ||
58 | path component which is quite costly if you have over 100 RRD files and a | ||
59 | deep directory hierarchy. 17 seconds was observed for four path components | ||
60 | (with `.` at the end), this dropped down to 4.8 seconds when prepending the | ||
61 | RRD data directory to the beginning. When disabled, processing took less than | ||
62 | a second. | ||
63 | |||
64 | License | ||
65 | ------- | ||
66 | CGP is released under the terms of GPL version 3. See [doc/LICENSE](doc/LICENSE) | ||
67 | for the full license text. | ||
68 | |||
69 | Acknowledgements | ||
70 | ---------------- | ||
71 | CGP is authored by Pim van den Berg with contributions from many other people. | ||
72 | |||
73 | Canvas support depends on jsrrdgraph by Manuel Luis, | ||
74 | https://github.com/manuelluis/jsrrdgraph | ||
75 | |||
76 | [collectd]: http://collectd.org/ | ||
77 | [ini.disable_functions]: http://php.net/ini.core#ini.disable-functions | ||
78 | [php-json]: http://php.net/json | ||