lighttpd Statistics - 1.0
Moderators: Developers, Moderators
lighttpd Statistics - 1.0
Hi,
This package provides a script server script and cacti templates
for graphing statistics for a lighttpd webserver [1].
These templates are based on the work of Rolf Poser (ApacheStats) [2],
using the version ApacheStats 0.6 (PHP Script Server Version) by
mahuani [3].
As lighttpd does not provide all informations in "?auto" mode of
the server status page and the variables are not named the same way,
I reimplemented the script server script and copied the existing
templates.
Note: the query script needs PHP 5.
Regards,
Matthias
[1] http://www.lighttpd.net/
[2] http://forums.cacti.net/about4028.html
[3] http://forums.cacti.net/about17995.html
This package provides a script server script and cacti templates
for graphing statistics for a lighttpd webserver [1].
These templates are based on the work of Rolf Poser (ApacheStats) [2],
using the version ApacheStats 0.6 (PHP Script Server Version) by
mahuani [3].
As lighttpd does not provide all informations in "?auto" mode of
the server status page and the variables are not named the same way,
I reimplemented the script server script and copied the existing
templates.
Note: the query script needs PHP 5.
Regards,
Matthias
[1] http://www.lighttpd.net/
[2] http://forums.cacti.net/about4028.html
[3] http://forums.cacti.net/about17995.html
- Attachments
-
- lighttpd_stats_1.0.tar.gz
- (13.5 KiB) Downloaded 4005 times
Thanks a lot Moo.
However, I have a little problem.
I run Cacti on CentoOS5 with PHP 5.1.6, MySQL 5.0.22 and lighttpd 1.4.15 fcgi installed.
When I do:
nothing is returned.
If I do:
I get:
Is there something I should edit in ss_lighttpd_stats.php?
I use a soft link to point the /usr/lib/cacti/scripts to /var/www/html/stats/scripts directory.
Thanks for your input.
However, I have a little problem.
I run Cacti on CentoOS5 with PHP 5.1.6, MySQL 5.0.22 and lighttpd 1.4.15 fcgi installed.
When I do:
Code: Select all
php /usr/lib/cacti/scripts/ss_lighttpd_stats.php localhost
If I do:
Code: Select all
php /usr/lib/cacti/scripts/ss_fping.php localhost
Code: Select all
min:0.0600 avg:0.0733 max:0.1000 dev:0.0125 loss:0.0000
I use a soft link to point the /usr/lib/cacti/scripts to /var/www/html/stats/scripts directory.
Thanks for your input.
Hi Teck,
Sorry about my delay, I was quite busy lately
You can enable it by activating "mod_status" module and url config in lighttpd.conf:
Greetz,
Matthias
Sorry about my delay, I was quite busy lately
TECK wrote: When I do:nothing is returned.Code: Select all
php /usr/lib/cacti/scripts/ss_lighttpd_stats.php localhost
Usually, you don't have to edit something in the script itself. Just make sure the server status page is accessible - when calling with localhost this would be http://localhost/server-statusTECK wrote: Is there something I should edit in ss_lighttpd_stats.php?
I use a soft link to point the /usr/lib/cacti/scripts to /var/www/html/stats/scripts directory.
You can enable it by activating "mod_status" module and url config in lighttpd.conf:
Code: Select all
server.modules += ("mod_status")
status.status-url = "/server-status"
Matthias
Thanks for the info. Ya, the module was disabled.
Is there a way not to enable the status page? I really don't want to show users the server status.
I wonder if just enabling the status module will fix it. I will try it tonight and let you know.
As you can see I follow this thread... I guess I'm the only one?
Nobody posted anything related to this issue... yet.
Can't wait to use the lighty stats on Cacti.
Thanks one more time for your support.
Is there a way not to enable the status page? I really don't want to show users the server status.
I wonder if just enabling the status module will fix it. I will try it tonight and let you know.
As you can see I follow this thread... I guess I'm the only one?
Nobody posted anything related to this issue... yet.
Can't wait to use the lighty stats on Cacti.
Thanks one more time for your support.
No, the poller script grabs the information out of this page. But you can limit the access to allow only specific IP addresses, virtual host or whatever, like:TECK wrote:Is there a way not to enable the status page? I really don't want to show users the server status.
Code: Select all
$HTTP["remoteip"] == "127.0.0.0/8" {
status.status-url = "/server-status"
}
Thanks for the info mOo.
However, I encountered the cacti bug for empty comments:
http://bugs.cacti.net/view.php?id=938
in the bytes/request template. I looked at the xml file and I cannot find the comments tag?
What is the tag that defines a comment?
However, I encountered the cacti bug for empty comments:
http://bugs.cacti.net/view.php?id=938
Code: Select all
RRDTool Says:
ERROR: Expected some arguments after 'COMMENT:'
Code: Select all
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Localhost - Lighttpd Network Traffic (bytes/request)" \
--base=1024 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bytes per request" \
--slope-mode \
DEF:a="/var/www/html/stats/rra/localhost_busy_servers_12.rrd":total_kbytes:AVERAGE \
DEF:b="/var/www/html/stats/rra/localhost_busy_servers_12.rrd":total_hits:AVERAGE \
CDEF:cdefa=a,UN,0,a,100000,GT,0,a,IF,IF \
CDEF:cdefb=b,UN,0,b,100000,GT,0,b,IF,IF \
CDEF:cdefc=cdefb,0,EQ,0,cdefa,1024,*,cdefb,/,IF,0,1000000,LIMIT \
CDEF:cdefg=a,0,0,LIMIT \
CDEF:cdefba=b,0,0,LIMIT \
COMMENT:"" \
COMMENT:"" \
AREA:cdefc#4123A1:"Bytes / Request" \
GPRINT:cdefc:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefc:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefc:MAX:"Maximum\:%8.2lf %s\n" \
LINE2:cdefg#FF0000:"kBytes" \
GPRINT:a:LAST:" Current\:%8.2lf %s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:a:MAX:"Maximum\:%8.2lf %s\n" \
LINE2:cdefba#00FF00:"Hits" \
GPRINT:b:LAST:" Current\:%8.2lf %s" \
GPRINT:b:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:b:MAX:"Maximum\:%8.2lf %s\n"
error while importing the template
Error: XML: Hash version does not exist.
I get this when I try to import the template.
any ideas?
I get this when I try to import the template.
any ideas?
when running the script from command line I get
lighttpd_total_hits:695144 lighttpd_total_kbytes:4683115 lighttpd_uptime:263647 lighttpd_busy_servers:2
but when trying to graph in cacti I get
7/17/2007 10:35:05 AM - CMDPHP: Poller[0] Host[26] DS[515] WARNING: Result from SERVER not valid. Partial Result: WARNING: Function do
07/17/2007 10:35:05 AM - PHPSVR: Poller[0] WARNING: Function does not exist
lighttpd_total_hits:695144 lighttpd_total_kbytes:4683115 lighttpd_uptime:263647 lighttpd_busy_servers:2
but when trying to graph in cacti I get
7/17/2007 10:35:05 AM - CMDPHP: Poller[0] Host[26] DS[515] WARNING: Result from SERVER not valid. Partial Result: WARNING: Function do
07/17/2007 10:35:05 AM - PHPSVR: Poller[0] WARNING: Function does not exist
-
- Posts: 2
- Joined: Sat Jul 21, 2007 5:41 am
Great!
Great work!
Thanks for this module, your instructions were clear and worked fine (thanks to the other users for asking questions too )
Thanks for this module, your instructions were clear and worked fine (thanks to the other users for asking questions too )
-
- Posts: 2
- Joined: Sat Jul 21, 2007 5:41 am
actually, it's broken :)
good point! turns out i posted too soon!
the graphs turned up and i assumed they were waiting for data, but the data never comes ...
i do have the stats path enabled... and manual query on the command line works .. but the graphs never get any data on them.
the graphs turned up and i assumed they were waiting for data, but the data never comes ...
i do have the stats path enabled... and manual query on the command line works .. but the graphs never get any data on them.
-
- Posts: 5
- Joined: Thu Feb 08, 2007 2:16 am
Great work, thx.
Just one thing bugs me:
It's meant to be "kbytes/s" in your graph template, not "kbits/s", isn't it?
At least that ss_lighttpd_stats.php script returns "kbytes/s"
As everybody should know,
Just one thing bugs me:
It's meant to be "kbytes/s" in your graph template, not "kbits/s", isn't it?
At least that ss_lighttpd_stats.php script returns "kbytes/s"
As everybody should know,
Code: Select all
1kbit/s != 1kbyte/s
Realize that this thread is a little older, but I had a question. Internal policy requires that our sites all use SSL connections. I believe this requirement is breaking the function of the script to gather stats.
If I connect via Firefox to the results page, I'm prompted by the SSL cert, but ultimately get the status page.
I reviewed the PHP script but it's not apparent to me where a change might be required. Any tips?
Thanks,
joey
If I connect via Firefox to the results page, I'm prompted by the SSL cert, but ultimately get the status page.
I reviewed the PHP script but it's not apparent to me where a change might be required. Any tips?
Thanks,
joey
Who is online
Users browsing this forum: No registered users and 2 guests