[XML] successor to apachestats 0.4

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

Moderators: Developers, Moderators

Post Reply
amacks
Posts: 12
Joined: Thu May 22, 2008 10:23 pm

different port

Post by amacks »

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
Smux
Posts: 40
Joined: Mon Sep 10, 2007 2:47 pm

Post by Smux »

Hi,
i have imported this template in my cacti 0.8.7a patched to 0.8.7b but when i import, show this error:

Error: XML: Hash version does not exist.

anyone knows how i do to solve this?

thanks
Smux
Posts: 40
Joined: Mon Sep 10, 2007 2:47 pm

Re: different port

Post by Smux »

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
Hi amacks, i change the perl script for your question, just change var $url and add var $port:

search to my $hostname.. and add follow:

Code: Select all

 my $port = $ARGV[1];
now search to var $URL and change to:

Code: Select all

$URL = "http:\/\/".$hostname.":".$port."\/server-status?auto";
Alright, now this script support any ports.

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:

Code: Select all

perl <path_cacti>/scripts/ws_apachestats.pl <hostname>
after:

Code: Select all

perl <path_cacti>/scripts/ws_apachestats.pl <hostname> <port>
Save and return to same template. In "Input Fields" click in add and make in attached screenshot. Save again and everything will be done.

Try it and reply this post. I hope that I have helped you.

Regards and sorry for my bad english
Attachments
input fields.JPG
input fields.JPG (39.17 KiB) Viewed 11883 times
ws_apachestats-modified.pl
perl script modified to allow any httpd set ports
(3.03 KiB) Downloaded 856 times
amacks
Posts: 12
Joined: Thu May 22, 2008 10:23 pm

Perfect, thanks!

Post by amacks »

That did exactly what I need!
a
Gael
Posts: 3
Joined: Tue Feb 03, 2009 7:14 am
Location: London

Re: different port

Post by Gael »

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
Hi all,

I am fairly new to cacti so I do not know much about it but I need to monitor a couple of apache server running on port 81.

I have followed your explanation and I have upgraded the script on my monitoring host I cannot gather any data for servers on port 81 whereas I can for servers running on port 80 ...

Where can I define the port I want to be monitored?

Any help will be much appreciate!

Thanks a lot in advance!

Gael
fonts
Posts: 22
Joined: Tue Jan 08, 2008 8:19 pm

Post by fonts »

is there any chance someone can help me out
i am so stuck
i have followed everything i have even gone back 2 the original version.
i can run the script and it does what it should however cacti will not graph it.
any ideas ?
Thanks
TeckniX
Posts: 1
Joined: Fri Apr 03, 2009 4:37 pm

Post by TeckniX »

I'm experiencing some of the similar errors that others here have shown but haven't found any good solution for it.

it seems that for a host other than localhost, the files aren't getting created in the RRA folder.

I have the ws_apache.pl on a cronjob for every 5mins.

Here is some of the cacti.log output:

Code: Select all

04/03/2009 03:55:24 PM - CMDPHP: Poller[0] Host[1] DS[8] WARNING: Result from CMD not valid.  Partial Result: U
04/03/2009 03:55:24 PM - CMDPHP: Poller[0] Host[1] DS[9] WARNING: Result from CMD not valid.  Partial Result: U04/03/2009 03:55:24 PM - CMDPHP: Poller[0] Host[1] DS[10] WARNING: Result from CMD not valid.  Partial Result: U
04/03/2009 03:55:24 PM - CMDPHP: Poller[0] Host[1] DS[11] WARNING: Result from CMD not valid.  Partial Result: U
04/03/2009 03:55:24 PM - CMDPHP: Poller[0] Host[1] DS[12] WARNING: Result from CMD not valid.  Partial Result: U
04/03/2009 03:55:26 PM - SYSTEM STATS: Time:18.8044 Method:cmd.php Processes:1 Threads:N/A Hosts:3 HostsPerProcess:3 DataSources:18 RRDs
Processed:11
If I run the ./ws_apache.pl command on its own, I get the following:

Code: Select all

apache_busy_workers:1 apache_idle_workers:11 thread_O:244 threadC:0 threadD:0 threadG:0 threadI:0 threadK:0 threadL:0 threadR:0 threadS:0 threadW:1 thread_W:11 apache_cpuload:________W___....................................................................................................................................................................................................................................................
I've declared the hostname in the data input in the :
Host to be queried for \"/server-status?auto\"

Any tip on how this can be solved?
lamah
Posts: 1
Joined: Sat Aug 08, 2009 5:14 am

Maximum value too small

Post by lamah »

The maximum value for total_hits was way too small for production servers (10000), my hits/s graph never showed any data. I had to edit it in Data Templates->Webserver - Apache Statistics->apache_total_hits, I set the maximum to 10000000 instead. I suggest that this value should be the default.. :). The apache_total_kbytes maximum is similarly tiny.
milton.paiva
Posts: 1
Joined: Wed Sep 16, 2009 9:12 am

Servers with a high number of access

Post by milton.paiva »

I had the same problem, graphics not been generated, even without having any problems in the log file. The solution was only to increase the number for the Maximum Value.

Console -> Data Templates -> Webserver then increase the number for "Maximum Value"

I noticed that the old graphics cannot update, it means they will not begin to generate the graphics, although if you create a new device it will generate the graphics properly.
sapparod
Posts: 4
Joined: Thu Aug 27, 2009 12:36 am

Post by sapparod »

Hi, I've the similar problem. The maximum value for busy worker are limited. After changing the maximum value all seem to be normal. You can change this without recreating device by reading gandalf signature.(using rrdtool tune command) But, for graph thread detail (%) It's always show at 50:50 busy:idle.

Any idea to solve this?
Attachments
apache stat thread details
apache stat thread details
cacti.png (24.14 KiB) Viewed 8799 times
zorooo
Posts: 18
Joined: Wed Aug 27, 2008 4:01 am

Post by zorooo »

hello all,

any question :

is still the only solution for apache grapher?
it works with apache 2.2.14?
My graph is empty, look my server-status?auto :

Code: Select all

BusyWorkers: 3
IdleWorkers: 8
Scoreboard: _....__K.__.W___K.....
it's ok ?

any idea ?
"@ Zorooo

www.system-linux.eu
zorooo
Posts: 18
Joined: Wed Aug 27, 2008 4:01 am

Post by zorooo »

nobody ?
"@ Zorooo

www.system-linux.eu
linebacker2
Posts: 28
Joined: Fri May 08, 2009 11:34 am

Apache Stats graphing issue?

Post by linebacker2 »

Hi,

I just did a new install of Cacti 0.8.7e on a fedora 10 installation with all patches. I have installed the plug-in Architecture 1.6 and followed instructions to successfully get Cacti up and running. My issue arises when I attempt to use Apache Stats Templates for Graphing. When I import the Graphs (I have already successfully fixed Graphs D and F) and add them to my devices I get odd behavior. I can successfully get up to two host using these graphs and graphing. When I attempt to add more devices these graphs get added but never graph. I get a mixture of "nan" or just "0" for output with no graphing.

Troubleshooting that I have done:
- assigned the correct permissions for the rra and log directory (chmod cactiuser:root)
- I have imported and attempted to use both apachestats version 0.8.1 and 0.8.2 templates
- deleted apache stats graphs, did a rrdclean, and deleted any remnants from the rra folder.
- disabled all plugins
- re-installed Cacti 0.8.7e including dropping of database and re-creating
- check that the correct ip for each device's snmp is pointing to the cacti server
- tested and check that server-status and all dependencies are enables for each device.
NOTE: thes same devices that I am trying to get apache stats to graph are being successfully grpahed by cacti's standards graph templates?? So weird??

Also I have successfully installed Cacti on a Windows system running Apache Stats 0.8.1 and these same devices are graphing successfully


Any Thought or ideas for what could be going on here?
uno
Posts: 32
Joined: Mon Aug 27, 2007 7:22 am

Re: [XML] successor to apachestats 0.4

Post by uno »

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:

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.._.__....___..._.._..........
Cacti log:

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 
st0ne
Posts: 1
Joined: Mon Oct 11, 2010 1:41 pm
Contact:

Re: [XML] successor to apachestats 0.4

Post by st0ne »

wow thanks
---
Best Regards,
St0ne!! :-)
---
Try Vphonet! A Great Software for Communication.
Link: http://www.vphonet.com
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest