Coder Social home page Coder Social logo

httpdss / collectd-web Goto Github PK

View Code? Open in Web Editor NEW
247.0 14.0 72.0 1.53 MB

Collectd-web is a web-based front-end for RRD data collected by collectd

Home Page: http://collectdweb.appspot.com

License: GNU General Public License v2.0

Perl 0.37% Shell 1.56% Python 2.61% CSS 26.27% PHP 0.36% JavaScript 68.83%

collectd-web's Introduction

Collectd-web

The main objective of this is to develop an easy to use and customizable web interface for Collectd (Resource monitoring software). Two days of research where enough to realize that collectd didn't have a real frontend and the one bundled with the backend was really made for testing purposes, so much of the usability and strength of statistics was left aside.

Installation

You must have a path containing each host's files in a separate sub-directory, named according to the host.

For example,

/etc/collectd/collectd-web/localhost/

In this case, your datadir will be '/etc/collectd/collectd-web/'. Create /etc/collectd/collection.conf with the content:

datadir: "/etc/collectd/collectd-web/"

For Debian-based linux distribution

Install the following dependencies

apt-get install librrds-perl libjson-perl libhtml-parser-perl

Using the webserver

Give collectd-web a try! Execute the standalone web server and you are done:

python runserver.py

License

Collectd-web is licensed under the GNU General Public License (GPL), version 2 or later. The full licensing terms are available in the file "COPYING".

This package includes jQuery which is licensed under the GPL version 2 and the MIT license. For more information on jQuery's license, visit their homepage at: <http://jquery.org/license>

collectd-web's People

Contributors

bernd avatar bpkroth avatar dguerri avatar elmer avatar ewindisch avatar francois2metz avatar gebi avatar httpdss avatar insom avatar jktjkt avatar kivosak avatar neverpanic avatar pixie79 avatar rhettg avatar rocketraman avatar s19n avatar sodor avatar xdissent avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

collectd-web's Issues

Clearer installation and configuration

Installation and configuration should be easier:
This is what i found out so far, by trail and error (except there were no errors shown =))
Requires JSON module from cpan.
Requires apache2-mod-perl2.

Specify Default Plot Duration

I'd like to be able to specify a default plot duration. For example, from a single hour to a day.

After looking through the code I have been focusing my attention on base.js, specifically here:

} else {
        $selected_plugin = $(this).html();
        $(".graph-imgs-container").html('');
        $.getJSON('cgi-bin/collection.modified.cgi?action=graphs_json;plugin=' $
            $graph_json = data;
            create_graph_list("hour", data.hour);
            $('#graph-container').html(get_graph_main_container($selected_host)$

            lazy_check();
        });

by changing it to

} else {
        $selected_plugin = $(this).html();
        $(".graph-imgs-container").html('');
        $.getJSON('cgi-bin/collection.modified.cgi?action=graphs_json;plugin=' $
            $graph_json = data;
            create_graph_list("day", data.day);
            $('#graph-container').html(get_graph_main_container($selected_host)$

            lazy_check();
        });

But this does not seem to work. Specifically it it does not produce plots; no errors in the web browser or the Apache logs. Perhaps you could give me a quick overview on where to focus my effort so I can pull this off?

Thanks!

Add ruler

Be able to show a ruler in order to trace values at a specified time

Several graphs (ntpd, entrophy, users) not working (No DS called 'xxx' in yyy.rrd)

Gentoo Linux.
Latest available "collectd" (5.3.0) and "collectd-web" (0.4.0) for Gentoo portage
Fresh RRD files (I installed yesterday, 2013-07-23)

Several plugins simple show no graph in collectd-web. Clicking on some generate errors in apache's log file (ntps, entrophy, users), but other report no errors (and no graphs) (df, md), and others are not even visible in the list of plugins under the hostname (bind). Apache log output is shown below.

ostara cgi-bin # equery l '*collectd*'
 * Searching for *collectd* ...
[IP-] [  ] app-admin/collectd-5.3.0:0
[IP-] [  ] www-apps/collectd-web-0.4.0:0.4.0
ostara ~ # grep ^Load /etc/collectd.conf
LoadPlugin syslog
LoadPlugin aggregation
LoadPlugin bind
LoadPlugin cpu
LoadPlugin cpufreq
LoadPlugin df
LoadPlugin disk
LoadPlugin entropy
LoadPlugin ethstat
LoadPlugin interface
LoadPlugin load
LoadPlugin md
LoadPlugin memcached
LoadPlugin memory
LoadPlugin ntpd
LoadPlugin rrdtool
LoadPlugin swap
LoadPlugin uptime
LoadPlugin users
LoadPlugin vmem

Short example:

collection.modified.cgi: RRDs::graph: No DS called 'entropy' in '/var/lib/collectd/rrd/Ostara/entropy/entropy.rrd' at /usr/share/webapps/collectd-web/0.4.0/hostroot/cgi-bin/collection.modified.cgi line 838.
ostara ~ # rrdtool info /var/lib/collectd/rrd/Ostara/entropy/entropy.rrd  | grep -v ^rra
filename = "/var/lib/collectd/rrd/Ostara/entropy/entropy.rrd"
rrd_version = "0003"
step = 10
last_update = 1374683967
header_size = 3496
ds[value].index = 0
ds[value].type = "GAUGE"
ds[value].minimal_heartbeat = 20
ds[value].min = 0.0000000000e+00
ds[value].max = 4.2949672950e+09
ds[value].last_ds = "185.000000"
ds[value].value = 1.2950000000e+03
ds[value].unknown_sec = 0
ostara ~ # grep "collection.modified.cgi" /var/log/apache2/ssl_error_log  | cut -c86- | sed -e 's/, referer.*//g' | sort -u | grep ^collection.modified.cgi
collection.modified.cgi: RRDs::graph: No DS called 'entropy' in '/var/lib/collectd/rrd/Ostara/entropy/entropy.rrd' at /usr/share/webapps/collectd-web/0.4.0/hostroot/cgi-bin/collection.modified.cgi line 838.
collection.modified.cgi: RRDs::graph: No DS called 'percent' in '/var/lib/collectd/rrd/127.0.0.1/memcached-local/percent-hitratio.rrd' at /usr/share/webapps/collectd-web/0.4.0/hostroot/cgi-bin/collection.modified.cgi line 838.
collection.modified.cgi: RRDs::graph: No DS called 'ppm' in '/var/lib/collectd/rrd/Ostara/ntpd/frequency_offset-loop.rrd' at /usr/share/webapps/collectd-web/0.4.0/hostroot/cgi-bin/collection.modified.cgi line 838.
collection.modified.cgi: RRDs::graph: No DS called 'seconds' in '/var/lib/collectd/rrd/Ostara/ntpd/time_offset-169.229.70.183.rrd' at /usr/share/webapps/collectd-web/0.4.0/hostroot/cgi-bin/collection.modified.cgi line 838.
collection.modified.cgi: RRDs::graph: No DS called 'seconds' in '/var/lib/collectd/rrd/Ostara/ntpd/time_offset-199.102.46.73.rrd' at /usr/share/webapps/collectd-web/0.4.0/hostroot/cgi-bin/collection.modified.cgi line 838.
collection.modified.cgi: RRDs::graph: No DS called 'seconds' in '/var/lib/collectd/rrd/Ostara/ntpd/time_offset-24.25.4.103.rrd' at /usr/share/webapps/collectd-web/0.4.0/hostroot/cgi-bin/collection.modified.cgi line 838.
collection.modified.cgi: RRDs::graph: No DS called 'seconds' in '/var/lib/collectd/rrd/Ostara/ntpd/time_offset-67.18.187.111.rrd' at /usr/share/webapps/collectd-web/0.4.0/hostroot/cgi-bin/collection.modified.cgi line 838.
collection.modified.cgi: RRDs::graph: No DS called 'seconds' in '/var/lib/collectd/rrd/Ostara/ntpd/time_offset-error.rrd' at /usr/share/webapps/collectd-web/0.4.0/hostroot/cgi-bin/collection.modified.cgi line 838.
collection.modified.cgi: RRDs::graph: No DS called 'seconds' in '/var/lib/collectd/rrd/Ostara/ntpd/time_offset-loop.rrd' at /usr/share/webapps/collectd-web/0.4.0/hostroot/cgi-bin/collection.modified.cgi line 838.
collection.modified.cgi: RRDs::graph: No DS called 'users' in '/var/lib/collectd/rrd/Ostara/users/users.rrd' at /usr/share/webapps/collectd-web/0.4.0/hostroot/cgi-bin/collection.modified.cgi line 838.
collection.modified.cgi: RRDs::graph: invalid rpn expression in: _nnl at /usr/share/webapps/collectd-web/0.4.0/hostroot/cgi-bin/collection.modified.cgi line 2879
collection.modified.cgi: Use of uninitialized value $inst_name in concatenation (.) or string at /usr/share/webapps/collectd-web/0.4.0/hostroot/cgi-bin/collection.modified.cgi line 2843.
collection.modified.cgi: \tmain::action_show_graph('Ostara', 'bind', 'global-memory_stats', 'memory', undef) called at /usr/share/webapps/collectd-web/0.4.0/hostroot/cgi-bin/collection.modified.cgi line 912
collection.modified.cgi: \tmain::main() called at /usr/share/webapps/collectd-web/0.4.0/hostroot/cgi-bin/collection.modified.cgi line 60
collection.modified.cgi: \tmain::meta_graph_generic_stack('HASH(0xc3c860)', 'ARRAY(0xc3cda0)') called at /usr/share/webapps/collectd-web/0.4.0/hostroot/cgi-bin/collection.modified.cgi line 2977
collection.modified.cgi: \tmain::meta_graph_generic_stack('HASH(0xc3c918)', 'ARRAY(0xc3ce58)') called at /usr/share/webapps/collectd-web/0.4.0/hostroot/cgi-bin/collection.modified.cgi line 2977
collection.modified.cgi: \tmain::meta_graph_generic_stack('HASH(0xc3cc00)', 'ARRAY(0xc3d140)') called at /usr/share/webapps/collectd-web/0.4.0/hostroot/cgi-bin/collection.modified.cgi line 2977
collection.modified.cgi: \tmain::meta_graph_memory('Ostara', 'bind', 'global-memory_stats', 'memory', undef) called at /usr/share/webapps/collectd-web/0.4.0/hostroot/cgi-bin/collection.modified.cgi line 799
collection.modified.cgi: \tmain::read_config() called at /usr/share/webapps/collectd-web/0.4.0/hostroot/cgi-bin/collection.modified.cgi line 876
collection.modified.cgi: open (/etc/collectd/collection.conf): No such file or directory at /usr/share/webapps/collectd-web/0.4.0/hostroot/cgi-bin/collection.modified.cgi line 64

add scroll to hosts

Bruno Marcondes posted this on the wave:

I have a suggestion for collectd-web. In my case I have more then 200 hosts and so the left Hosts windows get too big, it would be nice if it has a defults limit for the number of hosts it displays and a scroll bar to show the rest of it.

XML Parsing Error: junk after document element

I have a test collectd daemon master running on one Ubuntu 64-bit server and one test collectd client running on 32-bit Ubuntu server pushing data to master machine. Right now I need to have usable web GUI to display collectd-web and found yours, therefore curious to try on. Right now I have an issue when trying to set up apache to use collectd-web on master machine. The error are shown below:

XML Parsing Error: junk after document element
Location: http://ramudu.logic.com/collweb/cgi-bin/collection.modified.cgi
Line Number 2, Column 1
:<div id="hosts-container" class="ui-widget-content ui-corner-bottom ^ "><input title="Filter by host" type="text" class="title" id="host-filter"/><ul>

How to fix this?

Document graph menu options

Carsten wrote:

The buttons floating next to the current graph do not work (except
"X") and their purpose is not documented. For X, the result is not
remembered in any way. Furthermore, it's kind of distracting to have
something move around following my mouse.

Trouble with the bind plugin

Hello Kenneth.

I've started using your Collectd-web, and I like it. cpu, df, load, and memory work as expected.

I do have a problem with Collectd-web (version cloned this morning from Github) and collectd-4.10.1. I'm using the bind plugin (http://collectd.org/wiki/index.php/Plugin:BIND).

The plugin apparently correctly creates the RRD files; rrdtool info says they look ok.

In Collectd-web, I am offerred to click on the bind plugin, upon which a mass of broken image (img src) links are produced, except one: hostname/bind-global-memory_stats/memory.

I have a feeling it has something to do with how you recognize what type to use for an RRD file; could that be right?

I'm including a list of files produced by the bind plugin in my current configuration; perhaps you can see what's wrong at a glance. :-)

Thanks for your help.

    ./bind-_default-resolver_stats
    ./bind-_default-resolver_stats/dns_query-IPv4.rrd
    ./bind-_default-resolver_stats/dns_query-IPv6.rrd
    ./bind-_default-resolver_stats/dns_query-retry.rrd
    ./bind-_default-resolver_stats/dns_rcode-rx-EDNS0Fail.rrd
    ./bind-_default-resolver_stats/dns_rcode-rx-FORMERR.rrd
    ./bind-_default-resolver_stats/dns_rcode-rx-NXDOMAIN.rrd
    ./bind-_default-resolver_stats/dns_rcode-rx-OTHER.rrd
    ./bind-_default-resolver_stats/dns_rcode-rx-SERVFAIL.rrd
    ./bind-_default-resolver_stats/dns_resolver-DNSSEC-attempt.rrd
    ./bind-_default-resolver_stats/dns_resolver-DNSSEC-fail.rrd
    ./bind-_default-resolver_stats/dns_resolver-DNSSEC-negokay.rrd
    ./bind-_default-resolver_stats/dns_resolver-DNSSEC-okay.rrd
    ./bind-_default-resolver_stats/dns_response-IPv4.rrd
    ./bind-_default-resolver_stats/dns_response-IPv6.rrd

    ./bind-_default-resolver_stats/dns_response-lame.rrd
    ./bind-_default-resolver_stats/dns_response-mismatch.rrd
    ./bind-_default-resolver_stats/dns_response-truncated.rrd
    ./bind-_default-zone-ix_dnsbl_manitu_net_IN
    ./bind-_default-zone-ix_dnsbl_manitu_net_IN/dns_query-authorative.rrd
    ./bind-_default-zone-ix_dnsbl_manitu_net_IN/dns_query-dropped.rrd
    ./bind-_default-zone-ix_dnsbl_manitu_net_IN/dns_query-dupliate.rrd
    ./bind-_default-zone-ix_dnsbl_manitu_net_IN/dns_query-failure.rrd
    ./bind-_default-zone-ix_dnsbl_manitu_net_IN/dns_query-nonauth.rrd
    ./bind-_default-zone-ix_dnsbl_manitu_net_IN/dns_query-recursion.rrd
    ./bind-_default-zone-ix_dnsbl_manitu_net_IN/dns_query-referral.rrd
    ./bind-_default-zone-ix_dnsbl_manitu_net_IN/dns_rcode-tx-FORMERR.rrd
    ./bind-_default-zone-ix_dnsbl_manitu_net_IN/dns_rcode-tx-NOERROR.rrd
    ./bind-_default-zone-ix_dnsbl_manitu_net_IN/dns_rcode-tx-NXDOMAIN.rrd
    ./bind-_default-zone-ix_dnsbl_manitu_net_IN/dns_rcode-tx-NXRRSET.rrd
    ./bind-_default-zone-ix_dnsbl_manitu_net_IN/dns_rcode-tx-SERVFAIL.rrd
    ./bind-_default-zone-ix_dnsbl_manitu_net_IN/dns_reject-authorative.rrd
    ./bind-_default-zone-ix_dnsbl_manitu_net_IN/dns_reject-recursive.rrd
    ./bind-_default-zone-ix_dnsbl_manitu_net_IN/dns_reject-transfer.rrd
    ./bind-_default-zone-ix_dnsbl_manitu_net_IN/dns_reject-update.rrd
    ./bind-_default-zone-ix_dnsbl_manitu_net_IN/dns_request-BadEDNSVer.rrd
    ./bind-_default-zone-ix_dnsbl_manitu_net_IN/dns_request-BadSIG.rrd
    ./bind-_default-zone-ix_dnsbl_manitu_net_IN/dns_request-EDNS0.rrd
    ./bind-_default-zone-ix_dnsbl_manitu_net_IN/dns_request-IPv4.rrd
    ./bind-_default-zone-ix_dnsbl_manitu_net_IN/dns_request-IPv6.rrd
    ./bind-_default-zone-ix_dnsbl_manitu_net_IN/dns_request-SIG0.rrd
    ./bind-_default-zone-ix_dnsbl_manitu_net_IN/dns_request-TCP.rrd
    ./bind-_default-zone-ix_dnsbl_manitu_net_IN/dns_request-TSIG.rrd
    ./bind-_default-zone-ix_dnsbl_manitu_net_IN/dns_response-EDNS0.rrd
    ./bind-_default-zone-ix_dnsbl_manitu_net_IN/dns_response-SIG0.rrd
    ./bind-_default-zone-ix_dnsbl_manitu_net_IN/dns_response-TSIG.rrd
    ./bind-_default-zone-ix_dnsbl_manitu_net_IN/dns_response-normal.rrd
    ./bind-_default-zone-ix_dnsbl_manitu_net_IN/dns_response-truncated.rrd

    ./bind-global-memory_stats
    ./bind-global-memory_stats/memory-BlockSize.rrd
    ./bind-global-memory_stats/memory-ContextSize.rrd
    ./bind-global-memory_stats/memory-InUse.rrd
    ./bind-global-memory_stats/memory-Lost.rrd
    ./bind-global-memory_stats/memory-TotalUse.rrd
    ./bind-global-opcodes
    ./bind-global-opcodes/dns_opcode-QUERY.rrd
    ./bind-global-qtypes
    ./bind-global-qtypes/dns_qtype-A.rrd
    ./bind-global-qtypes/dns_qtype-ANY.rrd
    ./bind-global-qtypes/dns_qtype-DNSKEY.rrd
    ./bind-global-qtypes/dns_qtype-NS.rrd
    ./bind-global-qtypes/dns_qtype-TXT.rrd
    ./bind-global-server_stats
    ./bind-global-server_stats/dns_query-authorative.rrd
    ./bind-global-server_stats/dns_query-dropped.rrd
    ./bind-global-server_stats/dns_query-dupliate.rrd
    ./bind-global-server_stats/dns_query-failure.rrd
    ./bind-global-server_stats/dns_query-nonauth.rrd
    ./bind-global-server_stats/dns_query-recursion.rrd
    ./bind-global-server_stats/dns_query-referral.rrd
    ./bind-global-server_stats/dns_rcode-tx-FORMERR.rrd
    ./bind-global-server_stats/dns_rcode-tx-NOERROR.rrd
    ./bind-global-server_stats/dns_rcode-tx-NXDOMAIN.rrd
    ./bind-global-server_stats/dns_rcode-tx-NXRRSET.rrd
    ./bind-global-server_stats/dns_rcode-tx-SERVFAIL.rrd
    ./bind-global-server_stats/dns_reject-authorative.rrd
    ./bind-global-server_stats/dns_reject-recursive.rrd
    ./bind-global-server_stats/dns_reject-transfer.rrd
    ./bind-global-server_stats/dns_reject-update.rrd
    ./bind-global-server_stats/dns_request-BadEDNSVer.rrd
    ./bind-global-server_stats/dns_request-BadSIG.rrd
    ./bind-global-server_stats/dns_request-EDNS0.rrd
    ./bind-global-server_stats/dns_request-IPv4.rrd
    ./bind-global-server_stats/dns_request-IPv6.rrd
    ./bind-global-server_stats/dns_request-SIG0.rrd
    ./bind-global-server_stats/dns_request-TCP.rrd
    ./bind-global-server_stats/dns_request-TSIG.rrd
    ./bind-global-server_stats/dns_response-EDNS0.rrd
    ./bind-global-server_stats/dns_response-SIG0.rrd
    ./bind-global-server_stats/dns_response-TSIG.rrd
    ./bind-global-server_stats/dns_response-normal.rrd
    ./bind-global-server_stats/dns_response-truncated.rrd
    ./bind-global-zone_maint_stats
    ./bind-global-zone_maint_stats/dns_notify-rejected.rrd
    ./bind-global-zone_maint_stats/dns_notify-rx-IPv4.rrd
    ./bind-global-zone_maint_stats/dns_notify-rx-IPv6.rrd
    ./bind-global-zone_maint_stats/dns_notify-tx-IPv4.rrd
    ./bind-global-zone_maint_stats/dns_notify-tx-IPv6.rrd
    ./bind-global-zone_maint_stats/dns_opcode-AXFR-IPv4.rrd
    ./bind-global-zone_maint_stats/dns_opcode-AXFR-IPv6.rrd
    ./bind-global-zone_maint_stats/dns_opcode-IXFR-IPv4.rrd
    ./bind-global-zone_maint_stats/dns_opcode-IXFR-IPv6.rrd
    ./bind-global-zone_maint_stats/dns_opcode-SOA-IPv4.rrd
    ./bind-global-zone_maint_stats/dns_opcode-SOA-IPv6.rrd
    ./bind-global-zone_maint_stats/dns_transfer-failure.rrd
    ./bind-global-zone_maint_stats/dns_transfer-success.rrd

lighttpd rrds chart

Hi,

I am using lighttpd to output it stats to rrd. These can be viewed by collectd-web with the following patch applied:

git diff
diff --git a/cgi-bin/collection.modified.cgi b/cgi-bin/collection.modified.cgi
index 1424f92..4489d47 100755
--- a/cgi-bin/collection.modified.cgi
+++ b/cgi-bin/collection.modified.cgi
@@ -2893,8 +2893,35 @@ sub load_graph_definitions {
'GPRINT:rt_max:MAX:%4.1lf ms Max,',
'GPRINT:rt_avg:LAST:%4.1lf ms Last'

],

  • lighttpd => [
  •        'DEF:binraw={file}:InOctets:AVERAGE',
    
  •        'DEF:binmaxraw={file}:InOctets:MAX',
    
  •        'DEF:binminraw={file}:InOctets:MIN',
    
  •        'DEF:bout={file}:OutOctets:AVERAGE',
    
  •        'DEF:boutmax={file}:OutOctets:MAX',
    
  •        'DEF:boutmin={file}:OutOctets:MIN',
    
  •        'CDEF:bin=binraw,-1,*',
    
  •        'CDEF:binmax=binmaxraw,-1,*',
    
  •        'CDEF:binmin=binminraw,-1,*',
    
  •        'CDEF:binminmax=binmaxraw,binminraw,-',
    
  •        'CDEF:boutminmax=boutmax,boutmin,-',
    
  •        'AREA:binmin#ffffff:',
    
  •        'STACK:binmax#f00000:',
    
  •        'LINE1:binmin#a0a0a0:',
    
  •        'LINE1:binmax#a0a0a0:',
    
  •        'LINE2:bin#efb71d:incoming',
    
  •        'GPRINT:bin:MIN:%.2lf',
    
  •        'GPRINT:bin:AVERAGE:%.2lf',
    
  •        'GPRINT:bin:MAX:%.2lf',
    
  •        'AREA:boutmin#ffffff:',
    
  •        'STACK:boutminmax#00f000:',
    
  •        'LINE1:boutmin#a0a0a0:',
    
  •        'LINE1:boutmax#a0a0a0:',
    
  •        'LINE2:bout#a0a735:outgoing',
    
  •        'GPRINT:bout:MIN:%.2lf',
    
  •        'GPRINT:bout:AVERAGE:%.2lf',
    
  •        'GPRINT:bout:MAX:%.2lf',
    
  •    ],
    

    };
    $GraphDefs->{'if_multicast'} = $GraphDefs->{'ipt_packets'};
    $GraphDefs->{'if_tx_errors'} = $GraphDefs->{'if_rx_errors'};
    diff --git a/cgi-bin/graphdefs.cgi b/cgi-bin/graphdefs.cgi
    index 2b4a002..fcfcf36 100755
    --- a/cgi-bin/graphdefs.cgi
    +++ b/cgi-bin/graphdefs.cgi
    @@ -1561,6 +1561,34 @@ sub load_graph_definitions
    'GPRINT:stat_max:MAX:Max: %2.lf',
    'GPRINT:stat_ave:LAST:Last: %2.lf\j'
    ],

  •    lighttpd => [
    
  •        'DEF:binraw={file}:InOctets:AVERAGE',
    
  •        'DEF:binmaxraw={file}:InOctets:MAX',
    
  •        'DEF:binminraw={file}:InOctets:MIN',
    
  •        'DEF:bout={file}:OutOctets:AVERAGE',
    
  •        'DEF:boutmax={file}:OutOctets:MAX',
    
  •        'DEF:boutmin={file}:OutOctets:MIN',
    
  •        'CDEF:bin=binraw,-1,*',
    
  •        'CDEF:binmax=binmaxraw,-1,*',
    
  •        'CDEF:binmin=binminraw,-1,*',
    
  •        'CDEF:binminmax=binmaxraw,binminraw,-',
    
  •        'CDEF:boutminmax=boutmax,boutmin,-',
    
  •        'AREA:binmin#ffffff:',
    
  •        'STACK:binmax#f00000:',
    
  •        'LINE1:binmin#a0a0a0:',
    
  •        'LINE1:binmax#a0a0a0:',
    
  •        'LINE2:bin#efb71d:incoming',
    
  •        'GPRINT:bin:MIN:%.2lf',
    
  •        'GPRINT:bin:AVERAGE:%.2lf',
    
  •        'GPRINT:bin:MAX:%.2lf',
    
  •        'AREA:boutmin#ffffff:',
    
  •        'STACK:boutminmax#00f000:',
    
  •        'LINE1:boutmin#a0a0a0:',
    
  •        'LINE1:boutmax#a0a0a0:',
    
  •        'LINE2:bout#a0a735:outgoing',
    
  •        'GPRINT:bout:MIN:%.2lf',
    
  •        'GPRINT:bout:AVERAGE:%.2lf',
    
  •        'GPRINT:bout:MAX:%.2lf',
    
  •    ],
    
    };
    } # load_graph_definitions

Hope this help others.

Mark

Freetext description for Graphs

Would be really nice if in the plugin configuration I can give a freetext name to the respective graph to replace 'coretemp-isa-0000/temperature-temp1' with 'Main CPU: Core 1 Temperature'

Overflow in apache graph?

Hi,

the graph for the traffic of Apache (httpd) only allows value up to 1 GBit/sec. My server is doing roughly 1,5 GBit/sec on average, so most of the time the graph shows no value. Is this a collectd-web problem? Is it a collectd bug?

The stats in question can be seen here:
http://ftp.halifax.rwth-aachen.de/~cotto/

Thanks,
Carsten

Issue no hosts listed when using with apache (standalone works ok)

Hi,

I installed collectd-web following instructions :
tar xvjf collectd-web-X.X.X.tar.bz
mv collectd-web-X.X.X collectd-web
cp -a ./collectd-web /var/www/

then added the following to /etc/collectd/collections.conf
datadir: "/opt/collectd_data/rrd/"
libdir: "/usr/lib/collectd/"

collectd writes the rrdfiles to that directory :
/opt/collectd_data/rrd/host1
/opt/collectd_data/rrd/host2
etc..

extracts from /etc/collectd/collectd.conf:
(begin extracts)

BaseDir "/var/lib/collectd"
PluginDir "/usr/lib/collectd"

DataDir "/opt/collectd_data/rrd"

Include "/etc/collectd/filters.conf"
Include "/etc/collectd/thresholds.conf"
Include "/etc/collectd/collection.conf"

(end extracts)

when I run:
host1:/var/www/collectd-web# python runserver.py localhost 80

I can goto http://localhost (without "/collectd-web")
and I see the UI, with the list of hosts

when I kill the server, and start apache
I can goto http://localhost/collectd-web
and I can see the UI, but there are no hosts listed

so it seems, when running in apache under /collectd-web ... it does not find the rrd files?

Missing timespan

The timespan for generating graphs is missing from the interface.
The CGI script supports this feature

Set a default font

Setting a default font like Monospace needs to be done cuz somehow pango can make errors with rrdtool.

Ability to refresh graphs

Carsten wrote:

There is no such thing as auto-refresh or the possibility to manually
refresh (Ctrl+R or using plugins like "Reload Every"). After each
reload, the empty start page is shown. Clicking again on the plugin's
link does not reload the page.

This is a missing feature which i will add to the ticket system. this will have 3 options:

  • refresh manually all shown graphs
  • refresh manually only selected graphs
  • refresh manually a single graph

Quick solution until this gets done: select the plugin you wanna see and to refresh the plugin select another plugin like "memory" which has only one graph and then click back the plugin you where on before [NASTY SOLUTION]

Support for graphs with negative values (think temperature)

Hi collectd-web team
I'm running collectd to save temeperatures around the house. Unfortunately the default RRD arguments prevent any negative numbers from being shown on the graph.
The array in the file 'collection.modified.cgi' should be adjusted like this:
our @RRDDefaultArgs = (
'-w', '500', '-h', '160','--alt-autoscale','--alt-y-grid',
'--slope-mode', '--font', 'TITLE:10:', '--font', 'AXIS:8:', '--font', 'LEGEND:8:',
'--font', 'UNIT:8:', '-c', 'BACK#FF000000',
'-c', 'SHADEA#FF000000', '-c', 'SHADEB#FF000000', '-i');

Best regards, Lars.

PS: If possible I would like to volunteer on this project as a developer. Anyone interested?

iptables graph value wrong

Hello.
Is there a reason that the iptables packet graph should be multiplied by 8 ?
I found this while comparing data showed by collection3 and collectd-web

Here is a patch that should fix this problem:

diff -Naur trunk//collection.modified.cgi new//collection.modified.cgi
--- trunk//collection.modified.cgi  2010-09-28 15:01:03.000000000 +0200
+++ new//collection.modified.cgi    2010-09-28 15:00:39.000000000 +0200
@@ -1603,12 +1603,9 @@
         ipt_packets => [
             '-v',
             'Packets/s',
-            'DEF:min_raw={file}:value:MIN',
-            'DEF:avg_raw={file}:value:AVERAGE',
-            'DEF:max_raw={file}:value:MAX',
-            'CDEF:min=min_raw,8,*',
-            'CDEF:avg=avg_raw,8,*',
-            'CDEF:max=max_raw,8,*',
+            'DEF:min={file}:value:MIN',
+            'DEF:avg={file}:value:AVERAGE',
+            'DEF:max={file}:value:MAX',
             "AREA:max#$HalfBlue",
             "AREA:min#$Canvas",
             "LINE1:avg#$FullBlue:Packets/s",

Thanks,
Alessandro

Installation problems

Hi, I'm hoping you will be able to help. I've installed collectd, pointed a client to my server and moved the rrd to collectd-web. Loading the web page I get an empty 'Hosts' panel and nothing else.

My apache2 error log reports this:

[Fri Nov 16 15:35:51 2012] [error] [client 192.168.1.17] [Fri Nov 16 15:35:51 2012] collection.modified.cgi: BEGIN failed--compilation aborted at /var/www/collectd-web/cgi-bin/collection.modified.cgi line 29., referer: http://192.168.1.20/collectd-web/ [Fri Nov 16 15:39:38 2012] [error] [client 192.168.1.17] Can't locate JSON.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.12.4 /usr/local/share/perl/5.12.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.12 /usr/share/perl/5.12 /usr/local/lib/site_perl .) at /var/www/collectd-web/cgi-bin/time.cgi line 23., referer: http://192.168.1.20/collectd-web/ [Fri Nov 16 15:39:38 2012] [error] [client 192.168.1.17] BEGIN failed--compilation aborted at /var/www/collectd-web/cgi-bin/time.cgi line 23., referer: http://192.168.1.20/collectd-web/ [Fri Nov 16 15:39:38 2012] [error] [client 192.168.1.17] Premature end of script headers: time.cgi, referer: http://192.168.1.20/collectd-web/ [Fri Nov 16 15:39:38 2012] [error] [client 192.168.1.17] [Fri Nov 16 15:39:38 2012] collection.modified.cgi: Can't locate JSON.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.12.4 /usr/local/share/perl/5.12.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.12 /usr/share/perl/5.12 /usr/local/lib/site_perl .) at /var/www/collectd-web/cgi-bin/collection.modified.cgi line 29., referer: http://192.168.1.20/collectd-web/ [Fri Nov 16 15:39:38 2012] [error] [client 192.168.1.17] [Fri Nov 16 15:39:38 2012] collection.modified.cgi: BEGIN failed--compilation aborted at /var/www/collectd-web/cgi-bin/collection.modified.cgi line 29., referer: http://192.168.1.20/collectd-web/

Any help would be greatly appreciated.

Support for Custom Graphs

Currently I am editing collection.modified.cgi and graphdefs.cgi to support some custom rrd files. Is there any interest in having these functions call a third file with custom graph definitions?

Time range graphing

Be able to select a date-time range and show resultant graphs.
[Originally proposed by octo]

Ipad display issue

I have been using this on the ipad and it all works ok execpt the bar that displays the options for switching between hours, days etc seems to float and then get fixed over some of the graphs so you can not see them.

It would be better if this bar was fixed to the top or bottom / both ends of the page.

Thanks

Mark

Graph defs for mysql plugin missing

In graphdefs.cgi, definitions for the following collections seem to be missing:

  • mysql_locks
  • mysql_log_position

At the moment, collectd-web shows me only three broken image placeholders.

Add Select All/None

Add the ability to select graphs and the opts to select all of them or none.

sidemenue not working

Hi,

From the sidemenue for the graphs just the "export" and "remove" button is working.
neither the time stepper nor the zoom works.

collectd-web: 7a56319
verified with chrome 7 and firefox 3.6

michael

Cache generated images

I'm running collectd-web on a rather low-powered device and it takes a long while to generate rrd graphs (disk stats take up to 10 minutes to generate fully).

It'd be nice if collectd-web would cache the generated rrd images for 5-10 minutes (or longer) so browsing around the graphs wouldn't cause them to be regenerated every time.

Config

Okay - I'm lost.

I have configd working fine and installed in /opt/collectd

(Version 5 built from source)

The RRD files from my host are located in /opt/collectd/var/lib/collectd/myhostname - which is the default location for the RRD plugin in the collectd configuration file.

I have collectd-web installed in /var/www/collectd-web - and it's working fine. I can browse to http://myhostname/collectd-web/ and I see the collectd-web application fine (apache settings are all okay and I cloned the git repository into this directory).

Can you please tell me how the collectd-web application is supposed to find the RRD data files?

Best,

Tony

GraphDefs Customization

the idea on this feature is to get those perl graphdefs, send them via json to the client, and make them available for modifications.
After a new graphdef has been created or customized on the client side, the user can send a request to get that specific graph he/she defined on client side.

collectd-web trying to access one level deeper

DocumentRoot: /var/www/site
collectd-web is installed at: /var/www/site/collectd-web

I get the following error from apache2 error.log

[Wed Jan 02 15:11:32 2013] [error] [client 10.0.0.175] File does not exist: /var/www/site/collectd-web/collectd-web, referer: https://site/collectd-web/

"Hosts" list and "Available Plugins" list work, but no graph at all.

Previous version has no issue.

Many graphs missing

Hi,

First a BIG THX for collectd-web, finally a nice looking graph browser for collectd :)!

Just wanted to report that several graphs are missing.

missing graphs:
whole postgresql
mysql
uptime
ntpd
df extended (ReportReserved / ReportInodes)
processes extended (stats about dedicated processes)

collectd-web 7a56319
os: debian squeeze

michael

no text in graph(RRDs::graph: failed to load Monospace)

there are errors in the output

101.40.140.49 - - [22/Dec/2012 00:58:13] "GET /cgi-bin/collection.modified.cgi?action=show_graph;plugin=cpu;type=cpu;plugin_instance=7;host=122.11.71.26;timespan=hour;start=23:58%20Dec%2021%202012;end=00:58%20Dec%2022%202012; HTTP/1.1" 200 -
[Sat Dec 22 00:58:13 2012] collection.modified.cgi: RRDs::graph: failed to load Monospace at /home/work/local/src/collectd-web/cgi-bin/collection.modified.cgi line 3155
[Sat Dec 22 00:58:13 2012] collection.modified.cgi:     main::meta_graph_generic_stack('HASH(0x799b900)', 'ARRAY(0x79dd0c0)') called at /home/work/local/src/collectd-web/cgi-bin/collection.modified.cgi line 3207
[Sat Dec 22 00:58:13 2012] collection.modified.cgi:     main::meta_graph_cpu(122.11.71.26, 'cpu', 7, 'cpu', 'ARRAY(0x7379da0)') called at /home/work/local/src/collectd-web/cgi-bin/collection.modified.cgi line 799
[Sat Dec 22 00:58:13 2012] collection.modified.cgi:     main::action_show_graph(122.11.71.26, 'cpu', 7, 'cpu', 'undef') called at /home/work/local/src/collectd-web/cgi-bin/collection.modified.cgi line 912
[Sat Dec 22 00:58:13 2012] collection.modified.cgi:     main::main() called at /home/work/local/src/collectd-web/cgi-bin/collection.modified.cgi line 60
101.40.140.49 - - [22/Dec/2012 00:58:13] CGI script exit status 0x200

how to solve the problem?

RRDs::graph: failed to load Monospace

Installation/Configuration

1.) Setting collectd's datadir in collection.conf to collectd-web's directory ( eg., /var/www/collectd-web), doesn't work. Collectd still writes its data to the default directory (/var/lib/collectd/rrd).
Not an issue fpr collectd-web, but I thought you should be notified. So to make collectd write to a different directory, one should edit the RRDTool Plugin in collectd.conf to reflect a different directory. Experienced this with collectd 4.9.1 on Debian.

  1. After that's taken care of, and collectd is succesfully writing its data under collectd-web/, collectd-web interface doesn't show much except a Hosts field. No plugins or hosts to pick from. And I am really lost there. I have tried both the stable tarball and code from github.

  2. Just to make sure that my apache config was ok, I tried using the standalone python server, with the same behavior. You can see the messages:

Collectd-web server running at http://127.0.0.1:8888/
localhost - - [06/Sep/2010 12:45:52] "GET / HTTP/1.1" 200 -
localhost - - [06/Sep/2010 12:45:52] "GET /media/css/blueprint/screen.css HTTP/1.1" 200 -
localhost - - [06/Sep/2010 12:45:52] "GET /media/css/blueprint/print.css HTTP/1.1" 200 -
localhost - - [06/Sep/2010 12:45:52] "GET /media/css/custom-theme/jquery-ui-1.8.custom.css HTTP/1.1" 200 -
localhost - - [06/Sep/2010 12:45:52] "GET /media/css/base.css HTTP/1.1" 200 -
localhost - - [06/Sep/2010 12:45:52] "GET /media/js/jquery-1.4.2.min.js HTTP/1.1" 200 -
localhost - - [06/Sep/2010 12:45:52] "GET /media/js/jquery.livequery.js HTTP/1.1" 200 -
localhost - - [06/Sep/2010 12:45:52] "GET /media/js/jquery-ui-1.8.custom.min.js HTTP/1.1" 200 -
localhost - - [06/Sep/2010 12:45:52] "GET /media/js/jquery.jclock.js HTTP/1.1" 200 -
localhost - - [06/Sep/2010 12:45:52] "GET /media/js/external/TimeSpan-1.2.min.js HTTP/1.1" 200 -
localhost - - [06/Sep/2010 12:45:52] "GET /media/js/jquery.validate.pack.js HTTP/1.1" 200 -
localhost - - [06/Sep/2010 12:45:52] "GET /media/js/base.js HTTP/1.1" 200 -
localhost - - [06/Sep/2010 12:45:52] "GET /media/js/graph-menu.js HTTP/1.1" 200 -
localhost - - [06/Sep/2010 12:45:52] "GET /media/images/loading.gif HTTP/1.1" 200 -
localhost - - [06/Sep/2010 12:45:52] "GET /media/css/custom-theme/images/ui-bg_gloss-wave_35_f6a828_500x100.png HTTP/1.1" 200 -
localhost - - [06/Sep/2010 12:45:52] "GET /media/css/custom-theme/images/ui-bg_highlight-soft_100_eeeeee_1x100.png HTTP/1.1" 200 -
localhost - - [06/Sep/2010 12:45:53] "GET /cgi-bin/collection.modified.cgi?action=hostlist_json HTTP/1.1" 200 -
Traceback (most recent call last):
File "/usr/lib/python2.6/CGIHTTPServer.py", line 255, in run_cgi
os.execve(scriptfile, args, os.environ)
OSError: [Errno 13] Permission denied
localhost - - [06/Sep/2010 12:45:53] CGI script exit status 0x7f00
localhost - - [06/Sep/2010 12:45:53] "GET /cgi-bin/time.cgi HTTP/1.1" 200 -
Traceback (most recent call last):
File "/usr/lib/python2.6/CGIHTTPServer.py", line 255, in run_cgi
os.execve(scriptfile, args, os.environ)
OSError: [Errno 13] Permission denied
localhost - - [06/Sep/2010 12:45:53] CGI script exit status 0x7f00
localhost - - [06/Sep/2010 12:45:55] "GET /media/images/shortcut-icon.png HTTP/1.1" 200 -

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.