ApacheStats 0.6 (PHP Script Server Version)
Moderators: Developers, Moderators
A few issues:
1. I installed the new version of ss_apache_stats.php because my "Hits/s" graph stopped working a few days ago. The new version seems to have fixed that, and those are graphing again.
However, the "Bytes/request" graph is reporting zero now. I'm not sure what information I can provide to help debug this.
2. "Thread Details" and "Thread Details %" have never worked. I think this may be related to the following entry in the cacti log, which appears every time the poller runs:
12/18/2006 11:00:02 PM - CMDPHP: Poller[0] Host[6] DS[144] WARNING: Result from SERVER not valid. Partial Result:
Host 6 is the local machine (where apache is running) and data source 144 is the apache statistics template for localhost (<path_rra>/coruscant_apache_idle_workers_144.rrd). Again, I don't know what else to say to help debug this.
1. I installed the new version of ss_apache_stats.php because my "Hits/s" graph stopped working a few days ago. The new version seems to have fixed that, and those are graphing again.
However, the "Bytes/request" graph is reporting zero now. I'm not sure what information I can provide to help debug this.
2. "Thread Details" and "Thread Details %" have never worked. I think this may be related to the following entry in the cacti log, which appears every time the poller runs:
12/18/2006 11:00:02 PM - CMDPHP: Poller[0] Host[6] DS[144] WARNING: Result from SERVER not valid. Partial Result:
Host 6 is the local machine (where apache is running) and data source 144 is the apache statistics template for localhost (<path_rra>/coruscant_apache_idle_workers_144.rrd). Again, I don't know what else to say to help debug this.
Happily:mahuani wrote:Is anyone willing to post their "<host>/server-status?auto" page?
Code: Select all
Total Accesses: 6283
Total kBytes: 71090
CPULoad: .000315536
Uptime: 44369
ReqPerSec: .141608
BytesPerSec: 1640.7
BytesPerReq: 11586.2
BusyServers: 1
IdleServers: 4
Scoreboard: _W___...............
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Write a simple script_server script to read the contents into an array using the following sorta not finished code:
Good luck
TheWitness
Code: Select all
function apache_dude($host) {
/* sortof like a wget, but easier. It load's into an array */
$apache_stats = file("http://$host/server-status?auto");
/* process the array */
if (sizeof($apache_stats)) {
foreach($apache_stats as $stat) {
$stat_array = explode(":", $stat);
switch (trim($stat_array[0])) {
case "Total Accesses"
$total_accesses = $stat_array[1];
brea;
case "CPULoad":
$cpuload = $stat_array[1];
break;
...
}
/* return the formatted information */
return $blah . ":" $blah . " " . $blah . ":" $blah;
}else{
return $not_good . ":" . $not_good ...;
}
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Graph issue
Hi,
First, thanks for the great data source + graph
I have my poller set to 1 minute, so my issue may come from there : I've set the step to 60, and the heartbeat to 120 (which should both be correct if I understood everything).
The issue is that the graphs are not continous - as on the following images.
Anyone got a hint ?
NB : Other graphs seems normal.
First, thanks for the great data source + graph
I have my poller set to 1 minute, so my issue may come from there : I've set the step to 60, and the heartbeat to 120 (which should both be correct if I understood everything).
The issue is that the graphs are not continous - as on the following images.
Anyone got a hint ?
NB : Other graphs seems normal.
- Attachments
-
- Non-continuous Apache graph (last 6 hours)
- apache-graph.png (149.33 KiB) Viewed 14595 times
-
- Posts: 9
- Joined: Fri Feb 09, 2007 8:20 am
my apache does not supply the cpu load ;(
i do have the extended status on and all other graphs seem to graph and besides the little bug that the graph template supplies u with a lot of duplicate rrd's (not nice when u try to add a lot of apache server;( ) all seems to work fine.
it this a apache version thing?
i do have the extended status on and all other graphs seem to graph and besides the little bug that the graph template supplies u with a lot of duplicate rrd's (not nice when u try to add a lot of apache server;( ) all seems to work fine.
it this a apache version thing?
Troubles with Apache template
Hi all,
first of all THANK YOU for this amazing script !!!
I just want to mention my troubles with installation.
My steps:
*/ I downloaded ss_apache_stats
*/ I imported template
*/ I ran ss_apache_stats.php from CLI (command line) and I got correct result
No problem with these.
Unfortunately graphs were not displayed. I had a look into cacti.log and there were lines like:
04/04/2007 10:30:02 AM - PHPSVR: Poller[0] WARNING: Function does not exist
04/04/2007 10:30:02 AM - CMDPHP: Poller[0] Host[4] DS[75] WARNING: Result from SERVER not valid. Partial Result:
04/04/2007 10:30:02 AM - CMDPHP: Poller[0] Host[4] DS[74] WARNING: Result from SERVER not valid. Partial Result: WARNING: Function do
04/04/2007 10:30:02 AM - PHPSVR: Poller[0] WARNING: Function does not exist
04/04/2007 10:30:02 AM - PHPSVR: Poller[0] WARNING: Function does not exist
04/04/2007 10:30:02 AM - CMDPHP: Poller[0] Host[4] DS[73] WARNING: Result from SERVER not valid. Partial Result: Warning: include_onc
04/04/2007 10:30:02 AM - PHPSVR: Poller[0] WARNING: Function does not exist
04/04/2007 10:30:02 AM - CMDPHP: Poller[0] Host[4] DS[72] WARNING: Result from SERVER not valid. Partial Result:
After some time I found that the problem is in FILE PERMISSION! There was missing READ access for group and others. After change all works fine.
Hope this could help someone.
Thanks again for nice script,
Milan
first of all THANK YOU for this amazing script !!!
I just want to mention my troubles with installation.
My steps:
*/ I downloaded ss_apache_stats
*/ I imported template
*/ I ran ss_apache_stats.php from CLI (command line) and I got correct result
No problem with these.
Unfortunately graphs were not displayed. I had a look into cacti.log and there were lines like:
04/04/2007 10:30:02 AM - PHPSVR: Poller[0] WARNING: Function does not exist
04/04/2007 10:30:02 AM - CMDPHP: Poller[0] Host[4] DS[75] WARNING: Result from SERVER not valid. Partial Result:
04/04/2007 10:30:02 AM - CMDPHP: Poller[0] Host[4] DS[74] WARNING: Result from SERVER not valid. Partial Result: WARNING: Function do
04/04/2007 10:30:02 AM - PHPSVR: Poller[0] WARNING: Function does not exist
04/04/2007 10:30:02 AM - PHPSVR: Poller[0] WARNING: Function does not exist
04/04/2007 10:30:02 AM - CMDPHP: Poller[0] Host[4] DS[73] WARNING: Result from SERVER not valid. Partial Result: Warning: include_onc
04/04/2007 10:30:02 AM - PHPSVR: Poller[0] WARNING: Function does not exist
04/04/2007 10:30:02 AM - CMDPHP: Poller[0] Host[4] DS[72] WARNING: Result from SERVER not valid. Partial Result:
After some time I found that the problem is in FILE PERMISSION! There was missing READ access for group and others. After change all works fine.
Hope this could help someone.
Thanks again for nice script,
Milan
Hello all
wired things, after installation all looks fine but all graphs are blank with 'nan' records.
In system i have:
cacti0.8.6i works on cmd.php, apache2, php5..
I think system permissions are ok, couse on cacti debig mode see resoults.
That same when i start screen on command line..
To be sure i set all php restrictions, safe_mode off, register_globalls on, without resoults, same nothing.
Cacti dont put into logs any errors, but graphs are blank..
Any help?
Greetz,
Alex.
wired things, after installation all looks fine but all graphs are blank with 'nan' records.
In system i have:
cacti0.8.6i works on cmd.php, apache2, php5..
I think system permissions are ok, couse on cacti debig mode see resoults.
Code: Select all
04/18/2007 04:49:59 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/catest/rra/7606_apache_idle_workers_74.rrd --template apache_total_hits:apache_total_kbytes:apache_cpuload:apache_busy_workers:apache_idle_workers:thread_W:threadS:threadR:threadW:threadK:threadD:threadC:threadL:threadG:threadI:thread_O 1176907798:1866:11250:.686896:1:11:11:0:0:1:0:0:0:0:0:0:244
OK u:0.00 s:0.00 r:0.25
To be sure i set all php restrictions, safe_mode off, register_globalls on, without resoults, same nothing.
Cacti dont put into logs any errors, but graphs are blank..
Any help?
Greetz,
Alex.
ApacheStats 0.6 install
Hi,
I am a linux newbi I have apache running on a remote server and cacti on my local machine.
What should i enable to get ApacheStats 0.6 working and graphing it into the cacti.
Any suggestions.
Cheers,
Shail
I am a linux newbi I have apache running on a remote server and cacti on my local machine.
What should i enable to get ApacheStats 0.6 working and graphing it into the cacti.
Any suggestions.
Cheers,
Shail
Here on debian the same thin. cli runs fine but graphs are empty and the rrd files contains only NaN.flakpyro wrote:Im also having this issue on CentOS 4.4 Apache 2.0.52, when i run it in a terminal it works fine but in cacti my graphs are empty. Any ideas?
php: 5.2.0-10
apache2: 2.2.3-4
Output cli:
apache_busy_workers:7 apache_idle_workers:4 thread_W:4 threadS:0 threadR:0 threadW:1 threadK:6 threadD:0 threadC:0 threadL:0 threadG:0 threadI:0 thread_O:245
Output: status
ww-data@server02:~$ lynx -dump http://127.0.0.1/server-status?auto
BusyWorkers: 4
IdleWorkers: 6
Scoreboard: .K__W__KK__........................................................
...............................................................................
...............................................................................
...............................
Who is online
Users browsing this forum: No registered users and 0 guests