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    


ApacheStats 0.6 (PHP Script Server Version)
Goto page Previous  1, 2, 3, 4
 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
Panther_1



Joined: 08 May 2007
Posts: 28
Location: NRW, Germany

PostPosted: Tue May 08, 2007 12:55 pm    Post subject: Reply with quote

So now it works better for me but I thing there is still something brocken.



1. Why is the script not using the ReqPerSec, BytesPerSec, BytesPerReq
which it could get from the server-status?auto


lynx -dump http://127.0.0.1/server-status?auto
Total Accesses: 2251
Total kBytes: 30271
CPULoad: .330624
Uptime: 7752
ReqPerSec: .290377
BytesPerSec: 3998.65
BytesPerReq: 13770.5
BusyWorkers: 5
IdleWorkers: 5
Scoreboard: _K_KKWK_.__........................................................
...............................................................................
...............................................................................
...............................

2. The XMl file seems to be broken. The hits / s don't have an data_source.
Back to top
Panther_1



Joined: 08 May 2007
Posts: 28
Location: NRW, Germany

PostPosted: Tue May 08, 2007 1:23 pm    Post subject: Reply with quote

Apache Statistics - Thread Details has also no data sources so it can't work
Back to top
Panther_1



Joined: 08 May 2007
Posts: 28
Location: NRW, Germany

PostPosted: Tue May 08, 2007 1:48 pm    Post subject: Reply with quote

hy,

so I have modifed the ss_apache_stats.php that it does output all variables:

To get it working you must put somthing like this in your apache config:

[code]
<IfModule mod_status.c>
#
# Allow server status reports generated by mod_status,
# with the URL of http://servername/server-status
# Change the ".example.com" to match your domain to enable.
#
ExtendedStatus On
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
</IfModule>
[code]

The modiefied php file is attached.
Now somebody maust make new xml files. I'm new with cacti so I must first read the documentation. I will try it in the next day's. But it would be nice if somebody is faster.



[/code]



ss_apache_stats.php.zip
 Description:

Download
 Filename:  ss_apache_stats.php.zip
 Filesize:  1.63 KB
 Downloaded:  865 Time(s)

Back to top
Daniel15



Joined: 15 Sep 2006
Posts: 7
Location: Melbourne, Australia

PostPosted: Mon Jul 02, 2007 9:10 pm    Post subject: Reply with quote

Hi guys,
I'm using the one Cacti installation and ApacheStats to graph three different Apache installations on three different hosts, but the graphs aren't working as intended. Here's what I'm experiencing:
Host 1: CPU Load and Hits/s graphs are blank, all others work.
Host 2: CPU Load and Hits/s work, all others are blank.
Host 3: None work.

All three hosts are set up the exact same way. The Apache config is set up as so:
Quote:

<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 66.79.167.131
</Location>
ExtendedStatus on


The script works fine if I run it via CLI. Any ideas?

Edit: I could not get this one working, so I deleted it and replaced it with the one in the [XML] successor to apachestats 0.4 topic (this one seems to work perfectly)
Back to top
shail_2007



Joined: 18 Jul 2007
Posts: 4

PostPosted: Wed Jul 18, 2007 10:43 am    Post subject: How to get ss_apache_stats.php working Reply with quote

Hi all,
I am new to cacti and linux, can you please help me on this one.
Ii have imported the xml files and ss_apache_stats.php copied to <path_cacti>/scripts/. php is compiled with curl.
The script works fine on command line

root@aquarium:/var/www/htdocs/cacti/scripts# /usr/bin/php -q ss_apache_stats.php 192.168.1.125
apache_total_hits:456 apache_total_kbytes:1662 apache_cpuload:.0173231 apache_busy_workers:2 apache_idle_workers:6 thread_W:6 threadS:0 threadR:0 threadW:1 threadK:1 threadD:0 threadC:0 threadL:0 threadG:0 threadI:0 thread_O:248

I have other hosts being monitored by SNMP and can you please tell me how to configure cacti, to get it graphing apache.

Please tell me what steps i am missing.

Thanks
Shail
Back to top
shail_2007



Joined: 18 Jul 2007
Posts: 4

PostPosted: Wed Jul 18, 2007 11:26 am    Post subject: Re: How to get ss_apache_stats.php working Reply with quote

HI All,
How do i add a device without specifying the snmp information for ss_apache_stats.php working.

many thanks
shail
Back to top
akos.maroy



Joined: 14 Jul 2009
Posts: 9

PostPosted: Tue Jul 14, 2009 2:49 am    Post subject: how to install this script? Reply with quote

can someone point me a to a few steps on how to install this thing?

where to put what file, what to set in the Cacti UI

would be very helpful...
Back to top
disH



Joined: 22 May 2008
Posts: 33

PostPosted: Wed Nov 25, 2009 10:28 pm    Post subject: perl Issues? Reply with quote

Can someone help me shed light on my graphs suddenly could stop working?
I'm out of idea's why cacti says there is no ouput



cacti result:
Code:

11/26/2009 10:25:03 AM - SPINE: Poller[0] Host[78] ERROR: Empty result [127.0.0.1]: 'perl /usr/share/cacti/site/scripts/ws_apachestats.pl 127.0.0.1' 
11/26/2009 10:25:03 AM - SPINE: Poller[0] Host[78] DS[523] SCRIPT: perl /usr/share/cacti/site/scripts/ws_apachestats.pl 127.0.0.1, output: U 
11/26/2009 10:25:03 AM - SPINE: Poller[0] Host[78] ERROR: Empty result [127.0.0.1]: 'perl /usr/share/cacti/site/scripts/ws_apachestats.pl 127.0.0.1' 
11/26/2009 10:25:03 AM - SPINE: Poller[0] Host[78] DS[522] SCRIPT: perl /usr/share/cacti/site/scripts/ws_apachestats.pl 127.0.0.1, output: U 
11/26/2009 10:25:03 AM - SPINE: Poller[0] Host[78] ERROR: Empty result [127.0.0.1]: 'perl /usr/share/cacti/site/scripts/ws_apachestats.pl 127.0.0.1' 
11/26/2009 10:25:03 AM - SPINE: Poller[0] Host[78] DS[521] SCRIPT: perl /usr/share/cacti/site/scripts/ws_apachestats.pl 127.0.0.1, output: U 
11/26/2009 10:25:03 AM - SPINE: Poller[0] Host[78] ERROR: Empty result [127.0.0.1]: 'perl /usr/share/cacti/site/scripts/ws_apachestats.pl 127.0.0.1' 
11/26/2009 10:25:03 AM - SPINE: Poller[0] Host[78] DS[520] SCRIPT: perl /usr/share/cacti/site/scripts/ws_apachestats.pl 127.0.0.1, output: U 
11/26/2009 10:25:03 AM - SPINE: Poller[0] Host[78] ERROR: Empty result [127.0.0.1]: 'perl /usr/share/cacti/site/scripts/ws_apachestats.pl 127.0.0.1' 
11/26/2009 10:25:03 AM - SPINE: Poller[0] Host[78] DS[519] SCRIPT: perl /usr/share/cacti/site/scripts/ws_apachestats.pl 127.0.0.1, output: U 
11/26/2009 10:25:03 AM - SPINE: Poller[0] Host[78] ERROR: Empty result [127.0.0.1]: 'perl /usr/share/cacti/site/scripts/ws_apachestats.pl 127.0.0.1' 
11/26/2009 10:25:03 AM - SPINE: Poller[0] Host[78] DS[518] SCRIPT: perl /usr/share/cacti/site/scripts/ws_apachestats.pl 127.0.0.1, output: U 
11/26/2009 10:25:03 AM - SPINE: Poller[0] Host[78] ERROR: Empty result [127.0.0.1]: 'perl /usr/share/cacti/site/scripts/ws_apachestats.pl 127.0.0.1' 
11/26/2009 10:25:03 AM - SPINE: Poller[0] Host[76] DS[514] SCRIPT: perl /usr/share/cacti/site/scripts/ws_apachestats.pl 127.0.0.1, output: U 
11/26/2009 10:25:03 AM - SPINE: Poller[0] Host[76] ERROR: Empty result [127.0.0.1]: 'perl /usr/share/cacti/site/scripts/ws_apachestats.pl 127.0.0.1' 
11/26/2009 10:25:02 AM - SPINE: Poller[0] Host[30] DS[648] SCRIPT: perl /usr/share/cacti/site/scripts/linux_memory.pl SwapFree:, output: U 

rrd's:
Code:

-rw-rw-r-- 1 www-data www-data  611592 2009-11-26 10:30 myserv_svc_threads_cached_533.rrd
-rw-rw-r-- 1 www-data www-data 1627352 2009-11-23 15:05 myserv_svc_thread_w_518.rrd
-rw-rw-r-- 1 www-data www-data 1627352 2009-11-23 15:05 myserv_svc_thread_w_519.rrd
-rw-rw-r-- 1 www-data www-data 1627352 2009-11-23 15:05 myserv_svc_thread_w_520.rrd
-rw-rw-r-- 1 www-data www-data 1627352 2009-11-23 15:05 myserv_svc_thread_w_521.rrd
-rw-rw-r-- 1 www-data www-data 1627352 2009-11-23 15:05 myserv_svc_thread_w_522.rrd
-rw-rw-r-- 1 www-data www-data 1627352 2009-11-23 15:05 myserv_svc_thread_w_523.rrd
-rw-rw-r-- 1 www-data www-data 1627352 2009-11-25 19:50 myserv_svc_thread_w_524.rrd


command line result:
Code:

www-data@myserv:/usr/share/cacti/site/scripts$ id
uid=33(www-data) gid=33(www-data) groups=33(www-data)

www-data@myserv:/usr/share/cacti/site/scripts$ ./linux_memory.pl SwapFree:
2936960

www-data@myserv:/usr/share/cacti/site/scripts$ ./ws_apachestats.pl 127.0.0.1
apache_total_hits:69678 apache_total_kbytes:364578 apache_busy_workers:3 apache_idle_workers:0 thread_O:253 threadC:0 threadD:0 threadG:0 threadI:0 threadK:2 threadL:0 threadR:0 threadS:0 threadW:1 thread_W:0 apache_cpuload:.0612246
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 Previous  1, 2, 3, 4
Page 4 of 4

 



Powered by phpBB © 2001, 2005 phpBB Group