ApacheStats 0.8.2 (multiple RRD, Low hdd, Script Server)
Moderators: Developers, Moderators
-
- Posts: 28
- Joined: Fri May 08, 2009 11:34 am
Apache Stats graphing issue?
Hi,
I just did a new install of Cacti 0.8.7e on a fedora 10 installation with all patches. I have installed the plug-in Architecture 1.6 and followed instructions to successfully get Cacti up and running. My issue arises when I attempt to use Apache Stats Templates for Graphing. When I import the Graphs (I have already successfully fixed Graphs D and F) and add them to my devices I get odd behavior. I can successfully get up to two host using these graphs and graphing. When I attempt to add more devices these graphs get added but never graph. I get a mixture of "nan" or just "0" for output with no graphing.
Troubleshooting that I have done:
- assigned the correct permissions for the rra and log directory (chmod cactiuser:root)
- I have imported and attempted to use both apachestats version 0.8.1 and 0.8.2 templates
- deleted apache stats graphs, did a rrdclean, and deleted any remnants from the rra folder.
- disabled all plugins
- re-installed Cacti 0.8.7e including dropping of database and re-creating
- check that the correct ip for each device's snmp is pointing to the cacti server
- tested and check that server-status and all dependencies are enables for each device.
NOTE: thes same devices that I am trying to get apache stats to graph are being successfully grpahed by cacti's stndards graph templates?? So wierd??
Also I have successfully installed Cacti on a Windows system running Apache Stats 0.8.1 and these same devices are graphing successfully
Any Thought or ideas for what could be going on here?
I just did a new install of Cacti 0.8.7e on a fedora 10 installation with all patches. I have installed the plug-in Architecture 1.6 and followed instructions to successfully get Cacti up and running. My issue arises when I attempt to use Apache Stats Templates for Graphing. When I import the Graphs (I have already successfully fixed Graphs D and F) and add them to my devices I get odd behavior. I can successfully get up to two host using these graphs and graphing. When I attempt to add more devices these graphs get added but never graph. I get a mixture of "nan" or just "0" for output with no graphing.
Troubleshooting that I have done:
- assigned the correct permissions for the rra and log directory (chmod cactiuser:root)
- I have imported and attempted to use both apachestats version 0.8.1 and 0.8.2 templates
- deleted apache stats graphs, did a rrdclean, and deleted any remnants from the rra folder.
- disabled all plugins
- re-installed Cacti 0.8.7e including dropping of database and re-creating
- check that the correct ip for each device's snmp is pointing to the cacti server
- tested and check that server-status and all dependencies are enables for each device.
NOTE: thes same devices that I am trying to get apache stats to graph are being successfully grpahed by cacti's stndards graph templates?? So wierd??
Also I have successfully installed Cacti on a Windows system running Apache Stats 0.8.1 and these same devices are graphing successfully
Any Thought or ideas for what could be going on here?
-
- Posts: 28
- Joined: Fri May 08, 2009 11:34 am
Apache Stats graphing issue?
This is what I am getting when trying to run the script manually against a one of the problem devices with Apache Server-status enabled (I have confirmed that I can access the device's server status page from a browser)
# /usr/bin/php -q ss_apache_stats.php 172.18.100.25
PHP Warning: file_get_contents(http://172.18.100.25/server-status?auto): failed to open stream: HTTP request failed! in /var/www/html/cacti/scripts/ss_apache_stats.php on line 79
thread_W:0 threadS:0 threadR:0 threadW:0 threadK:0 threadD:0 threadC:0 threadL:0 threadG:0 threadI:0 thread_O:0
I ran this script with root.
This is the output of running against one of the two devices that is graphing:
/usr/bin/php -q ss_apache_stats.php 172.17.100.75
apache_total_hits:2197510 apache_total_kbytes:33215290 apache_busy_workers:3 apache_idle_workers:247 thread_W:247 threadS:0 threadR:0 threadW:2 threadK:1 threadD:0 threadC:0 threadL:0 threadG:0 threadI:0 thread_O:1670
# /usr/bin/php -q ss_apache_stats.php 172.18.100.25
PHP Warning: file_get_contents(http://172.18.100.25/server-status?auto): failed to open stream: HTTP request failed! in /var/www/html/cacti/scripts/ss_apache_stats.php on line 79
thread_W:0 threadS:0 threadR:0 threadW:0 threadK:0 threadD:0 threadC:0 threadL:0 threadG:0 threadI:0 thread_O:0
I ran this script with root.
This is the output of running against one of the two devices that is graphing:
/usr/bin/php -q ss_apache_stats.php 172.17.100.75
apache_total_hits:2197510 apache_total_kbytes:33215290 apache_busy_workers:3 apache_idle_workers:247 thread_W:247 threadS:0 threadR:0 threadW:2 threadK:1 threadD:0 threadC:0 threadL:0 threadG:0 threadI:0 thread_O:1670
Well, you found the problem !
Your cacti install looks perfect, but the php script is not able to grab the value from the 172.18.100.25 webpage.
For me it's one configuration problem into your apache.
You can check if the apache installation is giving you the server-status webpage on your cacti server with text browser like:
w3m http://172.18.100.25/server-status?auto
lynx http://172.18.100.25/server-status?auto
If you can't see the webpage, it's the apache fault on 172.18.100.25
- check if the mod_status is loaded
- check if you activate it in config file
Your cacti install looks perfect, but the php script is not able to grab the value from the 172.18.100.25 webpage.
For me it's one configuration problem into your apache.
You can check if the apache installation is giving you the server-status webpage on your cacti server with text browser like:
w3m http://172.18.100.25/server-status?auto
lynx http://172.18.100.25/server-status?auto
If you can't see the webpage, it's the apache fault on 172.18.100.25
- check if the mod_status is loaded
- check if you activate it in config file
Code: Select all
<IfModule mod_status.c>
ExtendedStatus On
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1
Allow from your_cacti_ip_here
</Location>
</IfModule>
Cacti: 0.8.7g | Spine: 0.8.7g
Plugins: RRDclean - Weathermap - Thold - Realtime
My Template: ApacheStats 0.8.2 (multiple RRD, Low disk usage, Script Server)
Plugins: RRDclean - Weathermap - Thold - Realtime
My Template: ApacheStats 0.8.2 (multiple RRD, Low disk usage, Script Server)
-
- Posts: 28
- Joined: Fri May 08, 2009 11:34 am
Apache Stats graphing issue?
I checked that mod_status is loaded and it is activate in config file.
Further I have Apachestats graphing from my windows cacti server. So it is gathering Apache stats data and graphing it. It just doesn't want to graph from my Linux Cacti host.
I have added the Linux Cacti host in my SNMP properties for host 172.18.100.25 Graphs show up with mainly 0's but never graph.
This is driving me crazy trying to figure out what could be the problem??
Further I have Apachestats graphing from my windows cacti server. So it is gathering Apache stats data and graphing it. It just doesn't want to graph from my Linux Cacti host.
I have added the Linux Cacti host in my SNMP properties for host 172.18.100.25 Graphs show up with mainly 0's but never graph.
This is driving me crazy trying to figure out what could be the problem??
What are the output of :
w3m http://172.18.100.25/server-status?auto
lynx http://172.18.100.25/server-status?auto
w3m http://172.18.100.25/server-status?auto
lynx http://172.18.100.25/server-status?auto
Cacti: 0.8.7g | Spine: 0.8.7g
Plugins: RRDclean - Weathermap - Thold - Realtime
My Template: ApacheStats 0.8.2 (multiple RRD, Low disk usage, Script Server)
Plugins: RRDclean - Weathermap - Thold - Realtime
My Template: ApacheStats 0.8.2 (multiple RRD, Low disk usage, Script Server)
-
- Posts: 28
- Joined: Fri May 08, 2009 11:34 am
Apache Stats graphing issue?
Both are giving me the correct statics:
Total Accesses: 1634013
Total kBytes: 55545741
Uptime: 12190775
ReqPerSec: .134037
BytesPerSec: 4665.73
BytesPerReq: 34809.3
BusyWorkers: 3
IdleWorkers: 247
Scoreboard: ___________________________________________________________
Total Accesses: 1634013
Total kBytes: 55545741
Uptime: 12190775
ReqPerSec: .134037
BytesPerSec: 4665.73
BytesPerReq: 34809.3
BusyWorkers: 3
IdleWorkers: 247
Scoreboard: ___________________________________________________________
-
- Posts: 28
- Joined: Fri May 08, 2009 11:34 am
pache Stats graphing issue?
Any thoughts/Help on this?
Why can I only get one host to successfully graph using the Apache stats templates and then the rest not don't want to graph?
Why would I be getting "Partial Result: U" on the remaining host graphs for Apache Stats?
Why can I only get one host to successfully graph using the Apache stats templates and then the rest not don't want to graph?
Why would I be getting "Partial Result: U" on the remaining host graphs for Apache Stats?
apachestat hack for ssl with self signed certs
Hi all,
This is a quick hack that permits server-status on SSL (443) with self signed certs. It might be handy for people looking to monitor https sites.
It is(very) inspired by the curl change proposed by solefald earlier in this post.
This is a quick hack that permits server-status on SSL (443) with self signed certs. It might be handy for people looking to monitor https sites.
It is(very) inspired by the curl change proposed by solefald earlier in this post.
Code: Select all
$url = "https://$host/server-status?auto";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
$result = curl_exec($ch);
//$result = file_get_contents("$url");
Code: Select all
To check how many consolidation function your have, go to "Management" -> "Data Sources" -> "RRAs", then edit the 4 archives and see how many lines are selected. You only need the "AVERAGE" line here.
EDIT:
And will apache-stats report data for the whole apache or just for the vhost?
I have a couple of named vhosts and would like to have stats for the whole machine.
And what does mean the "m" when I view the hits, it says 400m hits, cant be 400.000 Hits i guess.
greetings
.h
your answer : This setting applies to the entire server, and cannot be enabled or disabled on a virtualhost-by-virtualhost basis. The collection of extended status information can slow down the server.Heiko wrote: And will apache-stats report data for the whole apache or just for the vhost?
I have a couple of named vhosts and would like to have stats for the whole machine.
And what does mean the "m" when I view the hits, it says 400m hits, cant be 400.000 Hits i guess.
greetings
.h
ref:http://httpd.apache.org/docs/2.0/mod/mod_status.html
Re: ApacheStats 0.8.2 (multiple RRD, Low hdd, Script Server)
Hi,
I'm new in this forum, so sorry if my query have already have asked.
I am searching a good apache graph with hits by second in real time but with this example:
Is it possible to have an apache graph with :
- total number of HTTP request
- number of HTTP request < 1 sec
- number of HTTP request > 15 sec (for example)
?
Thanks
I'm new in this forum, so sorry if my query have already have asked.
I am searching a good apache graph with hits by second in real time but with this example:
Is it possible to have an apache graph with :
- total number of HTTP request
- number of HTTP request < 1 sec
- number of HTTP request > 15 sec (for example)
?
Thanks
-
- Posts: 11
- Joined: Mon Apr 04, 2011 4:01 pm
Re: ApacheStats 0.8.2 (multiple RRD, Low hdd, Script Server)
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.
Report this post
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.
Report this post
Re: ApacheStats 0.8.2 (multiple RRD, Low hdd, Script Server)
Does it support cacti0.8.7g + PA 2.8 on windows xp?
After I installed, there is no data on the graph, and I had enabled the server-status in the httpd.conf。
I open the Apache error log file, it says:
I noticed that there is such line in the "ss_apache_stats.php" file.
I donn't know how to make it work on Windows, anybody can help me?
After I installed, there is no data on the graph, and I had enabled the server-status in the httpd.conf。
Code: Select all
LoadModule status_module modules/mod_status.so
Code: Select all
[Wed May 25 07:19:14 2011] [error] [client 127.0.0.1] File does not exist: C:/AppServ/www/server-status
Code: Select all
$url = "http://$host/server-status?auto";
Who is online
Users browsing this forum: No registered users and 1 guest