Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


[XML] ApacheStats version 0.4
Goto page 1, 2, 3, 4  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
Rolf Poser



Joined: 10 Dec 2003
Posts: 42

PostPosted: Wed May 19, 2004 5:34 pm    Post subject: [XML] ApacheStats version 0.4 Reply with quote

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



apachestats-0.4.zip
 Description:
ApacheStats - includes scripts, docs and xml host template

Download
 Filename:  apachestats-0.4.zip
 Filesize:  21.75 KB
 Downloaded:  6656 Time(s)

Back to top
testtest



Joined: 17 May 2004
Posts: 25
Location: Europe

PostPosted: Thu May 20, 2004 9:55 am    Post subject: Re: [XML] ApacheStats version 0.4 Reply with quote

Rolf Poser wrote:
... 0.4...
Rolf, thanks again for your restless work - you are a maniac !!

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
Back to top
Rolf Poser



Joined: 10 Dec 2003
Posts: 42

PostPosted: Thu May 20, 2004 10:16 am    Post subject: Thanks ! Reply with quote

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.)
Back to top
testtest



Joined: 17 May 2004
Posts: 25
Location: Europe

PostPosted: Thu May 20, 2004 10:50 am    Post subject: Re: Thanks ! Reply with quote

Rolf Poser wrote:
Testtest:

You're welcome!


THX

Quote:
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.


Of course - the bills, bills - i have tooo much, too

Quote:
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.)

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 .
My biggest problem is: Having been a mere, dumb MS Slut ( 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
Back to top
Rolf Poser



Joined: 10 Dec 2003
Posts: 42

PostPosted: Thu May 20, 2004 4:22 pm    Post subject: I've just written one: Reply with quote

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.
Back to top
Guest






PostPosted: Thu May 20, 2004 6:48 pm    Post subject: Re: I've just written one: Reply with quote

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.

i'm already "on the run" !! Will look and search for it, of course.
Will also post results later ! Big thanks
Back to top
testtest



Joined: 17 May 2004
Posts: 25
Location: Europe

PostPosted: Thu May 20, 2004 6:51 pm    Post subject: Re: I've just written one: Reply with quote

Quote:
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'm already "on the run" !! Will look and search for it, of course.
Will also post results later ! Big thanks

, not logged in thx SF
Back to top
norbert



Joined: 25 May 2004
Posts: 1

PostPosted: Tue May 25, 2004 9:02 am    Post subject: A quick stats script for Apache2 Reply with quote

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
Back to top
testtest



Joined: 17 May 2004
Posts: 25
Location: Europe

PostPosted: Tue May 25, 2004 10:45 am    Post subject: Re: A quick stats script for Apache2 Reply with quote

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

Hello Norbert, which script and where to find ? Greets Stef.
Back to top
Roderik



Joined: 07 Dec 2003
Posts: 6

PostPosted: Mon Jul 26, 2004 12:15 pm    Post subject: Reply with quote

works great! thx
Back to top
irishpadres



Joined: 13 Sep 2003
Posts: 9
Location: Los Angeles, CA

PostPosted: Thu Aug 05, 2004 7:31 am    Post subject: A suggestion... Reply with quote

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=-


Last edited by irishpadres on Sun Aug 15, 2004 10:59 am; edited 1 time in total
Back to top
Guest






PostPosted: Sun Aug 15, 2004 1:19 am    Post subject: Reply with quote

Hi Irishpadres
where do yo uadd these variables exactly? I think I need these variables to stop cacti showing blank images
Back to top
irishpadres



Joined: 13 Sep 2003
Posts: 9
Location: Los Angeles, CA

PostPosted: Sun Aug 15, 2004 10:58 am    Post subject: Reply with quote

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)
Back to top
Rolf Poser



Joined: 10 Dec 2003
Posts: 42

PostPosted: Sun Aug 15, 2004 12:39 pm    Post subject: Thanks ! Reply with quote

Thank you very much !

I'll add this to the next version of ApacheStats.

Regards,
Rolf.
Back to top
Entity



Joined: 02 Oct 2004
Posts: 8

PostPosted: Mon Nov 15, 2004 1:37 pm    Post subject: Reply with quote

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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Goto page 1, 2, 3, 4  Next
Page 1 of 4

 



Powered by phpBB © 2001, 2005 phpBB Group