More Apache Statistics

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

Moderators: Developers, Moderators

Post Reply
rolf

More Apache Statistics

Post by rolf »

Hello:

There is a previously contributed apache statistics analysis script that attempts to grab the requests/second from the server-status page.

Only problem is, mod_status is built to average the requests/sec out
over its entire uptime. :(

So I did some scratching around, and found a different way to get
hold of the stats, and expanded the available stats returned.

I'm including the new script and the data/graph templates I'm using.

I'm using the latest release of cacti (0.8.4), so if something breaks, perhaps you want to start looking at an upgrade?

This is based on the original script, although very little remains of it.
Thanks to Brian / RK or whoever originally wrote it. 8)


The stats that are given are:

1. Hits/second
2. kBytes/second
3. Busy/Idle/Total threads

I've put some more information into the script file, so you may want
to look at it in more detail....

Have fun,
:D Rolf.
Attachments
unix_apachestats-0.1.zip
(6.54 KiB) Downloaded 1460 times
khemir
Posts: 27
Joined: Sun May 12, 2002 12:56 am
Location: Guadalajara, Jalisco, Mexico
Contact:

Workers vs Servers

Post by khemir »

Hi,
Is correct Workers, becouse i dont have... vs i find servers ej:
Total Accesses: 2754335
Total kBytes: 18203279
CPULoad: .098829
Uptime: 466604
ReqPerSec: 5.90294
BytesPerSec: 39948.6
BytesPerReq: 6767.57
BusyServers: 3 <<<<<<<<<<<<---------- Busy
IdleServers: 8 <<<<<<<<<<<<----------Idle

Apache 1.3.29
Define ternura...
Guest

Post by Guest »

Any idea why i'm getting this in my /var/log/httpd/error_log everytime I refresh the page. I imported the data template and the the other three and then added them to my local host template. The graphs are showing up as X's on the web interface. What did i miss?

ERROR: can't parse '#FF0000:Busy'
ERROR: can't parse '#7EE600:kBytes/sec'
ERROR: can't parse '#C0C0C0:Hits/sec'
ERROR: can't parse '#FF0000:Busy'
ERROR: can't parse '#C0C0C0:Hits/sec'
ERROR: can't parse '#7EE600:kBytes/sec'
Guest

Post by Guest »

This is the results of the import of the Access XML template right after the Data template imported successfully with no errors. The remaining two templates Kbytes and Thread Details also imported with similar errors.

--------------------------------
Cacti has imported the following items:

Graph Template

[success] Unix - Apache Statistics - Accesses [new]
+ Unmet Dependency: (Data Template Item) total_accesses
+ Unmet Dependency: (GPRINT Preset) Normal
----------------------------------
memdy
Posts: 2
Joined: Sat Dec 06, 2003 10:25 pm
Location: Earth

Post by memdy »

not sure if this was changed during my download or if it's in the original, but I think it's what is wiping out my graphs. I'll pull it down again.

in the Data XML file that gets imported first this line doesn't appear to be quite right.

<input_string>perl <path_cacti>/scripts/unix_apachestats.pl <hostname></input_string>
Rolf Poser

Apache 1.3

Post by Rolf Poser »

Khemir:

Sorry about that -- it seems that the naming convention was different for earlier versions of Apache -- probably because they changed the threading model between version 1 and version 2.

Change what the perl script is looking for as a temporary fix.

Will try to put a note into the readme in future releases.

Thanks for letting me know.

Regards,
Rolf.
Rolf Poser

Sorry - exports were corrupted

Post by Rolf Poser »

Sorry folks - the other woes all seem to be related with the fact that the imports didn't seem to work so well.

Will release a new version together with exports that I will have tested first.

Sorry for the inconvenience....

Rolf.
Rolf Poser

ApacheStats 0.2

Post by Rolf Poser »

Hello!

Thank you for all of your patience with the first release!

Please take a look at:

http://www.raxnet.net/board/viewtopic.php?p=9691#9691

for an updated version. The update should fix all or most of the problems that were brought to my attention here in addition to some new functionality (Bytes/Request graph).

If you are upgrading, I would suggest that you delete graph and data templates as well as data sources, graphs etc.. that are associated with the first version. Loading the new release over the old may cause weird side-effects since the first version was so buggy.

Please read through the README.txt file in the new release for further details on installation.

Hope this helps!!

Thanks,
Rolf.
Guest

Post by Guest »

Hi, I have change my import.php with import patch then import graphs but i still have erreur :

ERROR: can't parse '#AAABA1:Hits/sec'

And when i execute unix_apachestats.pl in my shell i got only this

apache_total_hits: apache_total_kbytes: apache_busy_workers: apache_idle_workers:

My perms of file are :

-rw-r--r-- 1 root root 1.1k Dec 31 08:28 unix_apachestats.pl

I have put in my httpd.conf files extended status.

So what i must to do fix thanks, and sorry for my english
Guest

Post by Guest »

Hi, I have change my import.php with import patch then import graphs but i still have erreur :

ERROR: can't parse '#AAABA1:Hits/sec'

And when i execute unix_apachestats.pl in my shell i got only this

apache_total_hits: apache_total_kbytes: apache_busy_workers: apache_idle_workers:

My perms of file are :

-rw-r--r-- 1 root root 1.1k Dec 31 08:28 unix_apachestats.pl

I have put in my httpd.conf files extended status.

So what i must to do fix thanks, and sorry for my english
Guest

Post by Guest »

Ok my commande vi ssh works but i still couldn't get work graphs
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests