ApacheStats 0.8.2 (multiple RRD, Low hdd, Script Server)

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Code: Select all

LoadModule status_module modules/mod_status.so
must be available

Code: Select all

#
# ExtendedStatus controls whether Apache will generate "full" status
# information (ExtendedStatus On) or just basic information (ExtendedStatus
# Off) when the "server-status" handler is called. The default is Off.
#
ExtendedStatus On

Code: Select all

#
# Allow server status reports generated by mod_status,
# with the URL of http://servername/server-status
# Change the ".example.com" to match your domain to enable.
#
<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from <place your url here>
</Location>
Dennis B
Posts: 3
Joined: Wed Apr 02, 2008 8:30 am

Post by Dennis B »

RCK wrote:If this is the case, update your php version to 5.2.5
So does this template actually require PHP 5.2.5? I got PHP 4.4.8 - latest version of the PHP 4 branch - and the graphs are empty. It wasn't clear from your message if PHP 5.2.5 was ever a requirement for this script to work.
Thanks.
Dennis B
Posts: 3
Joined: Wed Apr 02, 2008 8:30 am

Post by Dennis B »

Just for the record, it's working fine on PHP 4.4.8. Thanks.
webbo
Posts: 3
Joined: Fri Apr 18, 2008 3:39 pm

Truncated

Post by webbo »

Hi.
I have Cacti running with the ApacheStats08 template, and a couple of others.
All the graphs for Apache get truncated after about 3 days. In other words:
if i'm collecting data since Monday and today is Friday, the graph only goes back to Wednesday not Monday, while all other templates go back to the day they were installed.

Any Ideas? I'm all out!
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please show a screenshot of a weekly graph and the Data Source Debug for the data source used in this graph. Did you resize the rrd file lately?
Reinhard
webbo
Posts: 3
Joined: Fri Apr 18, 2008 3:39 pm

Post by webbo »

gandalf wrote:Please show a screenshot of a weekly graph and the Data Source Debug for the data source used in this graph. Did you resize the rrd file lately?
Reinhard
Nope didn't resize any rrds. It chops all the Apache graphs...
###############################################
Data Source Debug

/usr/bin/rrdtool create \
/var/www/cacti/rra/apache_-_rs01_threads_26.rrd \
--step 300 \
DS:threadS:GAUGE:600:0:500 \
DS:thread_W:GAUGE:600:0:500 \
DS:threadR:GAUGE:600:0:500 \
DS:threadL:GAUGE:600:0:500 \
DS:threadK:GAUGE:600:0:500 \
DS:threadI:GAUGE:600:0:500 \
DS:threadG:GAUGE:600:0:500 \
DS:threadD:GAUGE:600:0:500 \
DS:threadC:GAUGE:600:0:500 \
DS:threadW:GAUGE:600:0:500 \
RRA:AVERAGE:0.5:1:600 \
RRA:MAX:0.5:1:600 \
###############################################
Attachments
Thread Details
Thread Details
1.png (32.18 KiB) Viewed 15119 times
webbo
Posts: 3
Joined: Fri Apr 18, 2008 3:39 pm

Re: Truncated

Post by webbo »

webbo wrote:Hi.
I have Cacti running with the ApacheStats08 template, and a couple of others.
All the graphs for Apache get truncated after about 3 days. In other words:
if i'm collecting data since Monday and today is Friday, the graph only goes back to Wednesday not Monday, while all other templates go back to the day they were installed.

Any Ideas? I'm all out!
Never mind, found it!
The Weekly, Monthly, and Yearly Associated RRA's in the Data Templates have to be selected in addition to the Daily RRAs.
wasmum
Posts: 7
Joined: Thu Jan 12, 2006 5:55 pm

how about https and vhosts

Post by wasmum »

Any information on how to configure for Vhosts and secure sites? I have it working for a unsecured site just fine...

Thanks!
sander815
Posts: 13
Joined: Tue Aug 17, 2004 2:30 am

Post by sander815 »

[root@csserver scripts]# php ss_apache_stats.php 127.0.0.1 cpuload
Content-type: text/html
X-Powered-By: PHP/4.3.9

[root@csserver scripts]#

-----------

does that mean apache doesn't have mopd_status enabled?
kunatz
Posts: 1
Joined: Wed Jul 16, 2008 5:16 am
Contact:

Post by kunatz »

hi forums,

what if the webserver which should be monitored doesn't handle snmp requests?
also when i run the script ss_apache_stats.php as root i get several information, but not as the cacti user. so no graphs are created.

please help me
User avatar
mahuani
Cacti User
Posts: 72
Joined: Tue Nov 01, 2005 2:10 pm
Location: Lafayette, LA
Contact:

Post by mahuani »

Thanks!

I had lost the script I wrote that went though the database and fixed it.
loxus
Posts: 10
Joined: Sun Aug 06, 2006 7:13 am

Re: how to enable the server status of apache

Post by loxus »

victormilk2002 wrote:As I also came across the same problem, could you teach me how to enable the server status of apache? Thanks
http://letmegooglethatforyou.com/?q=ser ... che+how-to

:D
davep345
Posts: 1
Joined: Wed Nov 26, 2008 12:14 pm

getting import errors

Post by davep345 »

Hello,

I have the following error when I try to import the host_template

Error: XML: Hash version does not exist.

#rpm -qa |grep cacti
cacti-0.8.7b-2.el5.rf

#php -v
PHP 5.2.6 (cli) (built: May 7 2008 00:50:43)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

Ideas?

Thanks for any replys,
codemann
Posts: 5
Joined: Mon Dec 08, 2008 3:31 pm

Post by codemann »

I can't get the graphs to show, this is what debug logging shows me :

Code: Select all

12/10/2008 06:40:02 PM - PHPSVR: Poller[0] DEBUG: INC: 'path_cacti/scripts/ss_apache_stats.php' FUNC: 'ss_apache_stats' PARMS: 'hostname cpuload'
12/10/2008 06:40:02 PM - PHPSVR: Poller[0] WARNING: PHP Script File to be included, does not exist
12/10/2008 06:40:02 PM - PHPSVR: Poller[0] WARNING: Function does not exist
12/10/2008 06:40:02 PM - CMDPHP: Poller[0] Host[2] DS[28] WARNING: Result from SERVER not valid.  Partial Result: WARNING: Function do
12/10/2008 06:40:02 PM - CMDPHP: Poller[0] Host[2] DS[28] SERVER: path_cacti/scripts/ss_apache_stats.php ss_apache_stats hostname cpuload, output: U
12/10/2008 06:40:02 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (28, 'apache_cpuload', '2008-12-10 18:40:01', 'U')"
Anybody knows what this means?
steve457
Posts: 1
Joined: Sat Jan 10, 2009 5:57 pm

Post by steve457 »

Thanks for these scripts. I am having a slight problem with graphs D and F. (Bytes/Hit and Thread detail %). I found the following errors when viewing the graph in Graph Management with debugging turned on. Any ideas what is causing this error?

Code: Select all

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Webserver - Apache Stats - D - Bytes / Hit" \
--base=1024 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bytes per hit" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/lib/cacti/rra/webserver_apache_total_kbytes_58.rrd":apache_total_kbytes:AVERAGE \
DEF:b="/var/lib/cacti/rra/webserver_apache_total_kbytes_58.rrd":apache_total_kbytes:MAX \
DEF:c="/var/lib/cacti/rra/webserver_apache_total_hits_57.rrd":apache_total_hits:AVERAGE \
DEF:d="/var/lib/cacti/rra/webserver_apache_total_hits_57.rrd":apache_total_hits:MAX \
CDEF:cdefa=a,UN,0,a,100000,GT,0,a,IF,IF \
CDEF:cdefc=b,UN,0,b,100000,GT,0,b,IF,IF \
CDEF:cdefe=cdefb,0,EQ,0,cdefa,1024,*,cdefb,/,IF,0,1000000,LIMIT \
CDEF:cdefbc=a,0,0,LIMIT \
CDEF:cdefbg=c,0,0,LIMIT \
 \
 \
 \
 \
AREA:cdefe#4123A1FF:"Bytes / Hit"  \
AREA:cdefe#4123A1FF:"Bytes / Hit"  \
GPRINT:cdefe:LAST:"Current\:%8.2lf %s"  \
GPRINT:cdefe:LAST:"Current\:%8.2lf %s"  \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefe:MAX:"Maximum\:%8.2lf %s\n"  \
GPRINT:cdefe:MAX:"Maximum\:%8.2lf %s\n"  \
LINE2:cdefbc#FF0000FF:"kBytes"  \
GPRINT:a:LAST:"     Current\:%8.2lf %s"  \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:b:MAX:"Maximum\:%8.2lf %s\n"  \
LINE2:cdefbg#00FF00FF:"Hits"  \
GPRINT:c:LAST:"       Current\:%8.2lf %s"  \
GPRINT:c:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:d:MAX:"Maximum\:%8.2lf %s\n" 

RRDTool Says:

ERROR: invalid rpn expression in: cdefb,0,EQ,0,cdefa,1024,*,cdefb,/,IF,0,1000000,LIMIT
Here is my php version info:

Code: Select all

PHP 5.2.4-2ubuntu5.4 with Suhosin-Patch 0.9.6.2 (cli) (built: Nov 25 2008 22:10:31) 
Copyright (c) 1997-2007 The PHP Group
I am using cacti version 0.8.7b
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests