[XML] ApacheStats version 0.4
Moderators: Developers, Moderators
-
- Posts: 42
- Joined: Wed Dec 10, 2003 7:19 am
[XML] ApacheStats version 0.4
Hello Everyone!
After numerous bugs and simplifications, I thought it would be prudent to put out a newer release of apachestats.
It now uses LWP by default to keep things simple, but a high-speed version is also provided. The templates have been cleaned up significantly, and there is a new graph for threads - busy/idle threads expressed as % of total threads. See the documentation for further details.
I'm attaching the intro readme.txt:
==============================================
ApacheStats v 0.4 - Copyright Rolf Poser - GNU Public License
RELEASED 20 May 2004
Please see the various documents in the "docs/" subdirectory.
Notably, the docs/TOC.txt tells you where to find what information.
Yes, all of this documentation will be made available in html form
eventually. But for now, it is content before form!
Thanks -- Rolf. (rolf@stasolutions.co.za)
QUICK INSTALL GUIDE:
=====================
(NOTE: a more detailed version of this is in docs/INSTALL.txt)
For those that can't wait to read through all of the finer detail:
(0. Do you have perl > 5.x and cacti > 0.8.5a ? This is fairly important!)
1. Pick a script - the default ws_apachestats.pl should be good for most
people (see docs/TUNING.txt for a high-speed version).
2. Copy the script to $cacti_path/scripts and make sure to name it
"ws_apachestats.pl".
3. Ensure that the apache server you are targeting has the ExtendedStatus On
and has permissions to allow for queries (look for /server-status).
4. Import the host xml file for apachestats from the xml directory.
5. Define a new graph and enter the hostname information as per usual (I'm
assuming you know how cacti works).
5. Have a cup of coffee - the graphs will only get created and populated after
two cycles of cacti querying the web server (~10 minutes on system).
6. You're welcome to post questions for help on the message board at
www.raxnet.net/board if you get stuck, although I can't promise to always be
responsive.
ApacheStats v 0.4 - Copyright Rolf Poser - GNU Public License
After numerous bugs and simplifications, I thought it would be prudent to put out a newer release of apachestats.
It now uses LWP by default to keep things simple, but a high-speed version is also provided. The templates have been cleaned up significantly, and there is a new graph for threads - busy/idle threads expressed as % of total threads. See the documentation for further details.
I'm attaching the intro readme.txt:
==============================================
ApacheStats v 0.4 - Copyright Rolf Poser - GNU Public License
RELEASED 20 May 2004
Please see the various documents in the "docs/" subdirectory.
Notably, the docs/TOC.txt tells you where to find what information.
Yes, all of this documentation will be made available in html form
eventually. But for now, it is content before form!
Thanks -- Rolf. (rolf@stasolutions.co.za)
QUICK INSTALL GUIDE:
=====================
(NOTE: a more detailed version of this is in docs/INSTALL.txt)
For those that can't wait to read through all of the finer detail:
(0. Do you have perl > 5.x and cacti > 0.8.5a ? This is fairly important!)
1. Pick a script - the default ws_apachestats.pl should be good for most
people (see docs/TUNING.txt for a high-speed version).
2. Copy the script to $cacti_path/scripts and make sure to name it
"ws_apachestats.pl".
3. Ensure that the apache server you are targeting has the ExtendedStatus On
and has permissions to allow for queries (look for /server-status).
4. Import the host xml file for apachestats from the xml directory.
5. Define a new graph and enter the hostname information as per usual (I'm
assuming you know how cacti works).
5. Have a cup of coffee - the graphs will only get created and populated after
two cycles of cacti querying the web server (~10 minutes on system).
6. You're welcome to post questions for help on the message board at
www.raxnet.net/board if you get stuck, although I can't promise to always be
responsive.
ApacheStats v 0.4 - Copyright Rolf Poser - GNU Public License
- Attachments
-
- apachestats-0.4.zip
- ApacheStats - includes scripts, docs and xml host template
- (21.75 KiB) Downloaded 8543 times
Re: [XML] ApacheStats version 0.4
Rolf, thanks again for your restless work - you are a maniac !!Rolf Poser wrote:... 0.4...
So trying to do also something, providing you at least with some testing output, since coding is for me still " dreamland"
It works now with parameter "localhost" and "127.0.0.1" for me. Going on to test it - Great work again from you !!
Greets
[url=http://stef.funpic.de/index.html]Stef.s small Fan Page[/url]
Free your brain with trashing away MS - no pain, no torture, no troubles of learning Linux can compete with your Freedom using it.
Free your brain with trashing away MS - no pain, no torture, no troubles of learning Linux can compete with your Freedom using it.
-
- Posts: 42
- Joined: Wed Dec 10, 2003 7:19 am
Thanks !
Testtest:
You're welcome!
Actually I'd been stalling on releasing 0.3 for a few months - been very busy with "real" (i.e. the stuff that pays the bills) work.
I realised that part of the problem was my sucky understanding of cacti templates and that the ones released with 0.2 weren't working for many people (i.e. the hostname wasn't being substituted). Also, the more I can include in the documentation, the less of a pain it is for someone trying to figure out what's wrong.
Thanks again for your assistance - I appreciate all comments, since this is my first real open source project. (My second one is Squidstats which I'll hopefully update to release 0.2 this weekend.)
Thanks,
Rolf.
PS: I don't really qualify as a seasoned programmer - most of what you see in apachestats is code that was contributed by others to this project...
Maybe 10% is mine. (OK the documentation is all mine, but that doesn't count as code.)
You're welcome!
Actually I'd been stalling on releasing 0.3 for a few months - been very busy with "real" (i.e. the stuff that pays the bills) work.
I realised that part of the problem was my sucky understanding of cacti templates and that the ones released with 0.2 weren't working for many people (i.e. the hostname wasn't being substituted). Also, the more I can include in the documentation, the less of a pain it is for someone trying to figure out what's wrong.
Thanks again for your assistance - I appreciate all comments, since this is my first real open source project. (My second one is Squidstats which I'll hopefully update to release 0.2 this weekend.)
Thanks,
Rolf.
PS: I don't really qualify as a seasoned programmer - most of what you see in apachestats is code that was contributed by others to this project...
Maybe 10% is mine. (OK the documentation is all mine, but that doesn't count as code.)
Re: Thanks !
THXRolf Poser wrote:Testtest:
You're welcome!
Of course - the bills, bills - i have tooo much, tooActually I'd been stalling on releasing 0.3 for a few months - been very busy with "real" (i.e. the stuff that pays the bills) work.
That's more than many others have, including me - so the respect and honor is YOURS. So i hope to provide, one time to come, also something useful here .I realised that part of the problem was my sucky understanding of cacti templates and that the ones released with 0.2 weren't working for many people (i.e. the hostname wasn't being substituted). Also, the more I can include in the documentation, the less of a pain it is for someone trying to figure out what's wrong.
Thanks again for your assistance - I appreciate all comments, since this is my first real open source project. (My second one is Squidstats which I'll hopefully update to release 0.2 this weekend.)
Thanks,
Rolf.
PS: I don't really qualify as a seasoned programmer - most of what you see in apachestats is code that was contributed by others to this project...
Maybe 10% is mine. (OK the documentation is all mine, but that doesn't count as code.)
My biggest problem is: Having been a mere, dumb MS Slut (:oops: sorry) with all shitty stuff MCE, MCNE etc. Now i am glad and proud, i've been able to leaf that disease behind. So still a lot to learn, but as i always say: never give up ...
BTW., Rolf, i have posted and afterwards deleted questions regarding the poss. to "graph" and "log" ports usage, like i've seen some around.
IMHO it would be not a hard task, since it could be done with maybe "netstat -t or -n | grep -c SOEMTHING", but the standard unix_tcp_connections.pl does not make a difference between specific ports, like port:21 port:22 and s.o. - so having a neat and nice graph showing connections for FTP, SSH, HTTP etc. - i 've tested today a lil bit around, but i'm stuck at getting a result of splitting the specific ports.
Have you seen somewhere a script, dealing with this feature ?
Back to your 0.4 - have it now running, not facing any error, or problem so far.
Have Lynx also on my test system, already tested both versions, Wget and Lynx - proving your "performance" results.
On my server, 1.2 GHz, 256 KB Ram, SuSE 9.0 wget is simply the fastest option, so far .
Again, greets to you
[url=http://stef.funpic.de/index.html]Stef.s small Fan Page[/url]
Free your brain with trashing away MS - no pain, no torture, no troubles of learning Linux can compete with your Freedom using it.
Free your brain with trashing away MS - no pain, no torture, no troubles of learning Linux can compete with your Freedom using it.
-
- Posts: 42
- Joined: Wed Dec 10, 2003 7:19 am
I've just written one:
testest
I've just released a tool that does some or perhaps all of what you're looking for.
In this forum you should find SocketStats-0.1
Good luck
Rolf.
I've just released a tool that does some or perhaps all of what you're looking for.
In this forum you should find SocketStats-0.1
Good luck
Rolf.
Re: I've just written one:
i'm already "on the run" !! Will look and search for it, of course.Rolf Poser wrote:...
I've just released a tool that does some or perhaps all of what you're looking for...In this forum you should find SocketStats-0.1...Good luck Rolf.
Will also post results later ! Big thanks
Re: I've just written one:
i'm already "on the run" !! Will look and search for it, of course.I've just released a tool that does some or perhaps all of what you're looking for...In this forum you should find SocketStats-0.1...Good luck Rolf.
Will also post results later ! Big thanks
, not logged in thx SF
[url=http://stef.funpic.de/index.html]Stef.s small Fan Page[/url]
Free your brain with trashing away MS - no pain, no torture, no troubles of learning Linux can compete with your Freedom using it.
Free your brain with trashing away MS - no pain, no torture, no troubles of learning Linux can compete with your Freedom using it.
A quick stats script for Apache2
Hello,
I adjusted the script from the scripts page to work with apache2 and be less cryptic (1 doc line, plus output naming)
Have some fun with it
I adjusted the script from the scripts page to work with apache2 and be less cryptic (1 doc line, plus output naming)
Have some fun with it
Re: A quick stats script for Apache2
Hello Norbert, which script and where to find ? Greets Stef.norbert wrote:Hello,
I adjusted the script from the scripts page to work with apache2 and be less cryptic (1 doc line, plus output naming)
Have some fun with it
[url=http://stef.funpic.de/index.html]Stef.s small Fan Page[/url]
Free your brain with trashing away MS - no pain, no torture, no troubles of learning Linux can compete with your Freedom using it.
Free your brain with trashing away MS - no pain, no torture, no troubles of learning Linux can compete with your Freedom using it.
-
- Posts: 9
- Joined: Sat Sep 13, 2003 3:46 pm
- Location: Los Angeles, CA
A suggestion...
I've come across the problem that if a host is down, the wget process will hang there longer than 5 minutes and throw the entire cactid process out of control. So, I added -t 3 and -T 5 to the wget options to change the number of retries from unlimited to 3 and the timeout to 5 seconds.
-=Kevin=-
-=Kevin=-
Last edited by irishpadres on Sun Aug 15, 2004 10:59 am, edited 1 time in total.
-
- Posts: 9
- Joined: Sat Sep 13, 2003 3:46 pm
- Location: Los Angeles, CA
You would modify the ws_apachestats.pl script and change the $RETRIEVER variable from
$RETRIEVER="/usr/bin/wget --user-agent=\"ApacheStats\/0.4 wget\/1.8\" -q -O -";
to
$RETRIEVER="/usr/bin/wget --user-agent=\"ApacheStats\/0.4 wget\/1.8\" -q -O - -t 3 -T 5";
-t is the number of retries
-T is the number of seconds for all timeout values (dns, connect, and read)
$RETRIEVER="/usr/bin/wget --user-agent=\"ApacheStats\/0.4 wget\/1.8\" -q -O -";
to
$RETRIEVER="/usr/bin/wget --user-agent=\"ApacheStats\/0.4 wget\/1.8\" -q -O - -t 3 -T 5";
-t is the number of retries
-T is the number of seconds for all timeout values (dns, connect, and read)
-
- Posts: 42
- Joined: Wed Dec 10, 2003 7:19 am
Thanks !
Thank you very much !
I'll add this to the next version of ApacheStats.
Regards,
Rolf.
I'll add this to the next version of ApacheStats.
Regards,
Rolf.
Very nice script and templates. Thanks for sharing them
I'm using Cacti 0.86 and Apache2 and found it working with the directive
allow from 127.0.0.1
The only thing that fooled me at first, was rrdtools complaining about all graphs and CDEFs. It turned out to be some problem with the template import. In the graph templates for the stats I had to step into each "Graph Template Item" which uses any collected data (like CDEFs) and simply save it again or otherwise the datasource wouldn't even be added to the "Graph Items Input" list.
Best regards,
Entity
I'm using Cacti 0.86 and Apache2 and found it working with the directive
allow from 127.0.0.1
The only thing that fooled me at first, was rrdtools complaining about all graphs and CDEFs. It turned out to be some problem with the template import. In the graph templates for the stats I had to step into each "Graph Template Item" which uses any collected data (like CDEFs) and simply save it again or otherwise the datasource wouldn't even be added to the "Graph Items Input" list.
Best regards,
Entity
Who is online
Users browsing this forum: No registered users and 0 guests