collectd-web
                                
                                
                                
                                    collectd-web copied to clipboard
                            
                            
                            
                        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
                                    
                                    
                                    
                                
Update:
The Gentoo package for "collectd-web" is v0.4.0. I noticed that burried in github is a release for 0.4.1. The diff was interesting, so I manually installed 0.4.1 on top of Gentoo's 0.4.0. Many of the graphs that previously did not work are not rendering correctly. Great!
However, "md" still does not render (no image, and apache error log is silent). I know that collectd is putting data into the RRD file (verified with strace and manual use of rrdtools).
Hi dennis, thanks for you ticket. yes the main difference of 0.4.0 and 0.4.1 is that i had added compatibility with collectd 5.x so that should have solved the problem. the fact that md is not working might be because there is no graphdef right now. wanna give it a try ?
I used 0.4.1 on my ubuntu 12.04 and users and ntpd show no graph in collectd-web still
collection.modified.cgi: RRDs::graph: No DS called 'value' in '/var/lib/collectd/rrd/localhost/ntpd/frequency_offset-loop.rrd' at /home/collectd-web/collectd-web/cgi-bin/collection.modified.cgi line 839.
collection.modified.cgi: RRDs::graph: No DS called 'value' in '/var/lib/collectd/rrd/localhost/users/users.rrd' at /home/collectd-web/collectd-web/cgi-bin/collection.modified.cgi line 839.
                                    
                                    
                                    
                                
I've observed this issue with the Fedora EPEL packages under CentOS. The collection 3 cgi script just displays an empty page for the user/entropy plugin.
The script writes following messages to the apache error log:
[Thu Sep 25 00:57:16.286513 2014] [cgi:error] [pid 23227] [client ::1:59941] AH01215: RRDs::graph failed: No DS called 'users' in '/var/lib/collectd/rrd/example.org/users/users.rrd
[Thu Sep 25 00:58:29.798802 2014] [cgi:error] [pid 23228] [client ::1:59942] AH01215: RRDs::graph failed: No DS called 'entropy' in '/var/lib/collectd/rrd/example.org/entropy/entropy.rrd'
The versions of the used packages are:
Name        : collectd-web
Version     : 5.4.1
Release     : 1.el7
Architecture: x86_64
Source RPM  : collectd-5.4.1-1.el7.src.rpm
Name        : collectd
Version     : 5.4.1
Release     : 1.el7
Architecture: x86_64
Source RPM  : collectd-5.4.1-1.el7.src.rpm
Apparently, the installed /etc/collection.conf uses non-matching data-source names.
When I change the names (cf. following patch) the graphs are displayed by the cgi as expected:
--- a/collection.conf
+++ b/collection.conf
@@ -241,7 +241,7 @@ GraphWidth 400
   RRDFormat "%4.0lf"
 </Type>
 <Type entropy>
-  DataSources entropy
+  DataSources value
   DSName entropy Entropy bits
   RRDTitle "Available entropy on {hostname}"
   RRDVerticalLabel "Bits"
@@ -644,7 +644,7 @@ GraphWidth 400
   Scale 0.001
 </Type>
 <Type users>
-  DataSources users
+  DataSources value
   DSName users Users
   RRDTitle "Users ({type_instance}) on {hostname}"
   RRDVerticalLabel "Users"