no hosts

484 views
Skip to first unread message

CaBaz

unread,
Apr 29, 2011, 8:25:39 PM4/29/11
to Collectd-web Users
I'm trying to setup collecd-web but somehow my collection.conf isn't
parsed.

check_deps.sh says all looks ok and cgi scripts run fine.

For every line in collection.conf i get a message in my log:
GET /cgi-bin/collection.modified.cgi?action=hostlist_json HTTP/1.1"
200 -
Cannot parse line: DataDir "/var/lib/collectd/rrd/", referer:
http://192.168.1.50/collectd-web/
Cannot parse line: GraphWidth 400, referer: http://192.168.1.50/collectd-web/
Cannot parse line: <Type apache_bytes>, referer: http://192.168.1.50/collectd-web/
Cannot parse line: DataSources count, referer: http://192.168.1.50/collectd-web/
Cannot parse line: DSName "count Bytes/s", referer: http://192.168.1.50/collectd-web/
Cannot parse line: RRDTitle "Apache Traffic", referer:
http://192.168.1.50/collectd-web/
Cannot parse line: RRDVerticalLabel "Bytes/s", referer:
http://192.168.1.50/collectd-web/
Cannot parse line: RRDFormat "%5.1lf%s", referer: http://192.168.1.50/collectd-web/
Cannot parse line: Color count 0000ff, referer: http://192.168.1.50/collectd-web/
Cannot parse line: </Type>, referer: http://192.168.1.50/collectd-web/
...

The collection.conf looks like this:
DataDir "/var/lib/collectd/rrd/"
GraphWidth 400
#UnixSockAddr "/var/run/collectd-unixsock"
<Type apache_bytes>
DataSources count
DSName "count Bytes/s"
RRDTitle "Apache Traffic"
RRDVerticalLabel "Bytes/s"
RRDFormat "%5.1lf%s"
Color count 0000ff
</Type>

Is this the correct layout of collection.conf ?
using centos5.6, collectd-4.10

Regards,
cabaz

Kenneth Belitzky

unread,
Apr 29, 2011, 9:19:11 PM4/29/11
to Collectd-web Users
Hey CaBaz!
could you try using a collection.conf which only has this content:

DataDir "/var/lib/collectd/rrd/"

are hosts still missing ?

Regards,
Kenny

CaBaz

unread,
Apr 29, 2011, 10:14:18 PM4/29/11
to Collectd-web Users
Hi Kenny,

I tried your suggestion, but still my log shows (both standalone/
apache):
Cannot parse line: DataDir "/var/lib/collectd/rrd/", referer:
http://192.168.1.50/collectd-web/

If i try it on the command line:
# perl collection.modified.cgi
Cannot parse line: DataDir "/var/lib/collectd/rrd/"
Content-Type: application/xhtml+xml; charset=utf-8
Cache-Control: no-cache
<div><p>No host defined</p></div>

I searched the collection.modified.cgi script and the first matchline
contains a ":" which wasn't in my collection.conf.
After adding it the list of hosts showed up.

Perhaps you could do a sanity check on the collection file in
check_deps.sh.

Cheers,
Cabaz

Kenneth Belitzky

unread,
Apr 30, 2011, 1:19:06 AM4/30/11
to Collectd-web Users
great debugging CaBaz! and thx for idea on sanity check! i'll add it
for next update

Cheerz!
Reply all
Reply to author
Forward
0 new messages