uno wrote:Hi.
I am using this script+template to graph an apache server status.
My problem is that the cpu load and all the"threads" graphs are empty and show nan for all values. I can see in the cacti log that the script gets the correct values from Apache.
Server-status:Cacti log:Code: Select all
Total Accesses: 22599 Total kBytes: 1847842 CPULoad: .000292752 Uptime: 75149 ReqPerSec: .300723 BytesPerSec: 25179.2 BytesPerReq: 83728.9 BusyWorkers: 2 IdleWorkers: 18 Scoreboard: ._____.__..._.K._._W.._.__....___..._.._..........
Code: Select all
10/05/2010 02:30:17 PM - SPINE: Poller[0] Host[158] TH[1] DS[4232] SS[4] SERVER: /usr/local/cacti/scripts/ss_apache_stats.php ss_apache_stats hostname, output: apache_total_hits:22355 apache_total_kbytes:1825947 apache_cpuload:.000373747 apache_busy_workers:23 apache_idle_workers:18 thread_W:18 threadS:0 threadR:0 threadW:2 threadK:15 threadD:0 threadC:6 threadL:0 threadG:0 threadI:0 thread_O:215
[XML] successor to apachestats 0.4
Moderators: Developers, Moderators
Re: [XML] successor to apachestats 0.4
I noticed that the thread detail and thread detail % graphs work if I don't have ExtendedStatus On. But then the remaining graphs don't work, of course. The output looks correct for both, except some return data is missing when ExtendedStatus is off.
Re: [XML] successor to apachestats 0.4
I met another question, all graphs work fine except the CPU load, there is no data on the graph. I manually execute the rrdtool command as the following:
The result is:
I had checked the log, it says:
I donn't know what had happened? I hope somebody can help me.
My environment is cacti 0.8.7g + PA v2.8 on windows xp and the apache server is installed on the localhost.
Code: Select all
C:\rrdtool>rrdtool fetch c:\AppServ\www\netvisual\rra\apache_web_server_apache_cpuload_17.rrd AVERAGE
Code: Select all
...
1306902600: nan
1306902900: nan
1306903200: nan
1306903500: 0.0000000000e+00
1306903800: nan
1306904100: nan
1306904400: nan
1306904700: nan
Code: Select all
06/01/2011 01:17:01 PM - CMDPHP: Poller[0] Host[3] DS[17] WARNING: Result from SERVER not valid. Partial Result: U
My environment is cacti 0.8.7g + PA v2.8 on windows xp and the apache server is installed on the localhost.
Re: [XML] successor to apachestats 0.4
Please perform this and post its result:ocoralan wrote:I had checked the log, it says:Code: Select all
06/01/2011 01:17:01 PM - CMDPHP: Poller[0] Host[3] DS[17] WARNING: Result from SERVER not valid. Partial Result: U
% perl ws_apachestats.pl <your_hostname>
Re: [XML] successor to apachestats 0.4
Hi,
I have apache installed in /apps/apache folder. httpd.conf and all logs files are the in /apps/apache. Do i need to make any change in the script to refer to those locations? Rightnow i am not getting any out put in the graph. I am using cacti 0.8.7g.
Regards,
Vijay
I have apache installed in /apps/apache folder. httpd.conf and all logs files are the in /apps/apache. Do i need to make any change in the script to refer to those locations? Rightnow i am not getting any out put in the graph. I am using cacti 0.8.7g.
Regards,
Vijay
- Attachments
-
- Apache Stat Graph
- Apache_Stats.png (24.06 KiB) Viewed 7841 times
Re: [XML] successor to apachestats 0.4
Hello everyone.
I'm using the apachestats described in the very first post.
I have noticed that the author says it uses 7 .rrd files to hold the same data. Was there any update on that to get rid of 6 'duplicate' files? Is there any manual way to get rid of them?
Thanks!
I'm using the apachestats described in the very first post.
I have noticed that the author says it uses 7 .rrd files to hold the same data. Was there any update on that to get rid of 6 'duplicate' files? Is there any manual way to get rid of them?
Thanks!
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: [XML] successor to apachestats 0.4
No, this can"t be solved on the template side.hid3 wrote:Was there any update on that to get rid of 6 'duplicate' files?
Yes, and this should be described more than once already. Shortly speaking, delete all superfluous data sources and keep only one of them. Then change the generated graph definitions and point those "invalid" data source references to those that have been left.Is there any manual way to get rid of them?
R.
Re: [XML] successor to apachestats 0.4
Thanks for quick reply. I've found the two ways of getting rid of the duplicate RRDs on the very 1st page of discussion. However, it's really worth to mention I have had some problems with all of this. So here's the problem and how to solve it:gandalf wrote:Yes, and this should be described more than once already. Shortly speaking, delete all superfluous data sources and keep only one of them. Then change the generated graph definitions and point those "invalid" data source references to those that have been left.
R.
I had tens of (apache) servers monitored. Many of them had THolds for Hits/sec and some other graphs (THold woks really strange with Apache Stats; when an alert is issued, a message in e-mail comes with 'CPU Load' graph regardless of what is actually over a threshold but that's another story). What I did was go to Data sources, select particular server and change all data sources to one file. I did this for all servers. RRDClean plugin took care of the useless files. The problem is that THold started acting strange: it did not update the threshold values after each poll besides the values were out of norm and NOT representing any real data.
After much digging here and there I tried to to this: I came back to Data Sources of each server and found the original Data Source and it's file. I changed the file to 'nonexistent.rrd'; that allowed me to see which actually graph had the 'original file' which I duplicated to all Data Sources on each particular server. Knowing it, I restored the 'nonexistent' back to original. Then go to Graph management and delete ALL (webserver) graphs on particular server EXCEPT the 'original' one. Select to delete all Data Sources when asked. After that, add missing graphs via the Add button in Graph Management section, one by one.
Done. Re-add any spoiled/deleted thresholds. Now everything works awesome and you'll end up in a little saved disk space (in my case it was nearly 30 GBs).
Re: [XML] successor to apachestats 0.4
hello,
my config :
i m using u template that's greeat !!
some graph :
thanks.
maybe u know why the graph of the Thread Scoreboard is all value at nought ?
well
but i want using it with ssh : http://forums.cacti.net/viewtopic.php?f=6&t=26478
well i need to duplicate your data Input Methods to change the script command :
Uploaded with ImageShack.us
well i need to change data input :
by
so i want add two date input one by ssh and other by ur method.
so please explain me how to add the new data input with duplicated your data input.
thanks
my config :
Code: Select all
Date Thu, 08 Dec 2011 13:50:49 +0100
Cacti Version 0.8.7h
Cacti OS unix
SNMP Version NET-SNMP version: 5.4.2.1
RRDTool Version RRDTool 1.3.x
Hosts 18
Graphs 130
Data Sources Script/Command: 31
SNMP: 18
SNMP Query: 69
Script Query: 1
Script - Script Server (PHP): 1
Script Query - Script Server: 13
Total: 133
some graph :
thanks.
maybe u know why the graph of the Thread Scoreboard is all value at nought ?
well
but i want using it with ssh : http://forums.cacti.net/viewtopic.php?f=6&t=26478
well i need to duplicate your data Input Methods to change the script command :
Uploaded with ImageShack.us
well i need to change data input :
Code: Select all
perl <path_cacti>/scripts/ws_apachestats.pl <hostname>
Code: Select all
ssh catiuser@<hostname> -p <port> "script_ws_apache.sh"
so please explain me how to add the new data input with duplicated your data input.
thanks
Re: [XML] successor to apachestats 0.4
I am having the same issue that others are having, where the Threads % graph shows values correctly, but the details show 0s. If you click on the graph, then the details are displayed correctly. This is on Cacti .8.7 i with all updates installed.
Then when you click on the graph, you see the values.
Then when you click on the graph, you see the values.
Re: [XML] successor to apachestats 0.4
I have set this up for my remote webserver but i get erors in the cacti log.
If i run from command line it works fine and i can see the results
the following works from command line
Here is the warning in cacti
Can anyone help?
If i run from command line it works fine and i can see the results
the following works from command line
Code: Select all
/usr/bin/wget --user-agent=\"ApacheStats\/0.4 wget\/1.8\" -q -O - -t3 -T5 http://www.domain.com/server-status?auto
Total Accesses: 17767
Total kBytes: 195038
CPULoad: .0358505
Uptime: 136651
ReqPerSec: .130017
BytesPerSec: 1461.53
BytesPerReq: 11241
BusyWorkers: 1
IdleWorkers: 4
Scoreboard: .__..._W._
Here is the warning in cacti
Code: Select all
04/16/2012 05:22:43 PM - CMDPHP: Poller[0] Host[53] DS[1299] WARNING: Result from CMD not valid. Partial Result: U
04/16/2012 05:22:25 PM - CMDPHP: Poller[0] Host[53] DS[1301] WARNING: Result from CMD not valid. Partial Result: U
04/16/2012 05:22:07 PM - CMDPHP: Poller[0] Host[53] DS[1302] WARNING: Result from CMD not valid. Partial Result: U
04/16/2012 05:21:49 PM - CMDPHP: Poller[0] Host[53] DS[1303] WARNING: Result from CMD not valid. Partial Result: U
04/16/2012 05:21:31 PM - CMDPHP: Poller[0] Host[53] DS[1304] WARNING: Result from CMD not valid. Partial Result: U
04/16/2012 05:21:13 PM - CMDPHP: Poller[0] Host[53] DS[1305] WARNING: Result from CMD not valid. Partial Result: U
04/16/2012 05:20:55 PM - CMDPHP: Poller[0] Host[53] DS[1300] WARNING: Result from CMD not valid. Partial Result: U
Re: [XML] successor to apachestats 0.4
If you are using a proxy to access the internet, add the following to make it on line 26
comment out line 34 and 35 and move line 35 to the bottom and uncomment if needed
Code: Select all
$RETRIEVER="export http_proxy=http://proxy.uk.domain.com:3128 && /usr/bin/wget --user-agent=\"ApacheStats\/0.4 wget\/1.8\" -q -O - -t3 -T5";
comment out line 34 and 35 and move line 35 to the bottom and uncomment if needed
Re: different port
The config for 0.8 is entirely different; any chance of doing this customization for that version also? Thanks!Smux wrote:Hi amacks, i change the perl script for your question, just change var $url and add var $port:amacks wrote:I've got some servers running on port 8000. Would there be an easy way to configure the template to take a new arg of "port number" so I can set it for these servers?
A
search to my $hostname.. and add follow:now search to var $URL and change to:Code: Select all
my $port = $ARGV[1];
Alright, now this script support any ports.Code: Select all
$URL = "http:\/\/".$hostname.":".$port."\/server-status?auto";
Now go to your cacti and go to "Data Input Methods", look for "WebServer - Apache Statistics" or your Apache statistics template and add <port> after <hostname> in "Input String":
before:after:Code: Select all
perl <path_cacti>/scripts/ws_apachestats.pl <hostname>
Save and return to same template. In "Input Fields" click in add and make in attached screenshot. Save again and everything will be done.Code: Select all
perl <path_cacti>/scripts/ws_apachestats.pl <hostname> <port>
Try it and reply this post. I hope that I have helped you.
Regards and sorry for my bad english
Who is online
Users browsing this forum: No registered users and 1 guest