Hello,
Am running:
cacti version 0.8.7g
OS: CentOS release 5.2
PHP: PHP 5.1.6
--------
Am having issue with apache stats template!!
I was able to configure ApacheStats 0.6 (PHP Script Server Version) to use port 80 (http://hostname/server-status?auto)
Also am trying to use the same template for port 443 (https://hostname/server-status?auto)
The problem am facing is that, each time I tried to use "data template" and "data input method" are made for port 443, it fail to graph.
When i turn on the debug mode, everything came back ok
-----
This is the cacti php server script:
<path_cacti>/scripts/ss_https_apache_stats.php ss_apache_stats <hostname>
This is the error am receiving from log file:
"CMDPHP: Poller[0] ERROR: ApacheStats08 - Host parameter missing, can not continue"
-----------------
Example of the RRDTool from debug mode:
RRDTool Command:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title='hostname port 443 - Apache Statistics - Bytes / Request' \
--base=1024 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label='bytes / hit' \
--slope-mode \
--font TITLE:9: \
--font AXIS:8: \
--font LEGEND:8: \
--font UNIT:8: \
DEF:a="/web/cacti/rra/hostname_port_443_apache_total_hits_21582.rrd":apache_total_kbytes:AVERAGE \
DEF:b="/web/cacti/rra/hostname_port_443_apache_total_hits_21582.rrd":apache_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 \
\
\
AREA:cdefc#4123A1FF:"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#FF0000FF:"kBytes" \
GPRINTLAST:" Current\:%8.2lf %s" \
GPRINTAVERAGE:"Average\:%8.2lf %s" \
GPRINTMAX:"Maximum\:%8.2lf %s\n" \
LINE2:cdefba#00FF00FF:"Hits" \
GPRINTLAST:" Current\:%8.2lf %s" \
GPRINTAVERAGE:"Average\:%8.2lf %s" \
GPRINTMAX:"Maximum\:%8.2lf %s\n" \
COMMENT:" Represents the number of bytes per hit\n" \
COMMENT:" based on ApacheStats v0.4 - Rolf Poser\n"
--------------------------------
As anyone use cacti apache stats for port 443 together with port 80 on same cacti ? Since there is no apache stats template for port 443, have search the internet could find any.
Any suggestion or comments will be appreciated.
Thanks
cacti user.
Cacti apache stats graph not displaying any data
Moderators: Developers, Moderators
-
- Posts: 11
- Joined: Mon Apr 04, 2011 4:01 pm
-
- Posts: 11
- Joined: Mon Apr 04, 2011 4:01 pm
Re: Cacti apache stats graph not displaying any data
After some twistings, working with co-worker to the debug and testing, finally get cacti apache stats to work for both port 80 and 443.
The only thing that was change was some modification to this script by graphing apache stats for port 443 if port 80 fails.
I have attached the zip file that include the original Apache template and modified script
Please kindly post your comments.
Thanks
rock1000773
Cacti guru
The only thing that was change was some modification to this script by graphing apache stats for port 443 if port 80 fails.
I have attached the zip file that include the original Apache template and modified script
Please kindly post your comments.
Thanks
rock1000773
Cacti guru
- Attachments
-
- SS_Apache_Stats.zip
- This zip file include 2 optional apache stats templates and the modified php script:
cacti_host_template_webserver_apache_5min.xml
cacti_host_template_webserver_apache_30sec.xml
ss_apache_stats.php - (25.98 KiB) Downloaded 434 times
Re: Cacti apache stats graph not displaying any data
Any ideas how to graph both, 80 and 443 ports (non-SSL and SSL) on the same server if all ports provide correct data?
Thanks.
Thanks.
-
- Posts: 11
- Joined: Mon Apr 04, 2011 4:01 pm
Re: Cacti apache stats graph not displaying any data
Hid3,hid3 wrote:Any ideas how to graph both, 80 and 443 ports (non-SSL and SSL) on the same server if all ports provide correct data?
Thanks.
First you have to enable extendedstatus in your apache config file usually in /etc/httpd/conf/httpd.conf.
Also allow port 80 and port 443 on the same server. Once you setup entendedstatus on port 80 and 443, you can use the ss_apache_stats.php script to graph both port http://forums.cacti.net/viewtopic.php?f ... 02#p220102
you can test if both port are working by
$curl http://hostname
$curl https://hostname
Note: To setup apache stats on port 80 and 443 is another topics
Thanks
Who is online
Users browsing this forum: No registered users and 4 guests