Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
litebito opened this issue Apr 29, 2013 · 2 comments
Open

Comments

@litebito
Copy link

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?

@marbru
Copy link

marbru commented Nov 10, 2013

I had this issue as well. It was happening because apache was not processing the cgi scripts. You have to modify the configuration in sites-enabled with the AllowOverride all directive so that it will pick up the cgi configuration present in the .htaccess file on the cgi-bin folder.

The docs (http://collectdweb.appspot.com/documentation/) have some info on this. If you just do this:

<Directory /var/www/collectd-web>
  AllowOverride all
</Directory>

it should work (after you restart apache). Make sure you also have mod_cgi installed, or it won't work either. You can check it's working if you load one of the cgi scripts, and see if it resolves to an xml response instead of showing the raw script contents:

http://localhost/collectd-web/cgi-bin/collection.modified.cgi

Hope this helps!

@sillekyatha
Copy link

To people who has failed to list the 'hosts' on collectd-web GUI, this might also be one of the problem where the 'our $Config' under 'collectd-web/cgi-bin/collection.modified.cgi collection.modified.cgi' file should be changed to appropriate path where the collectd.conf file exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants