[XML] successor to apachestats 0.4
Moderators: Developers, Moderators
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
With Cacti 087b (at least), handling of ALL|SIMILAR_DATA_SOURCES_(NO)?DUPS has been corrected.
Unfortunately, this unveils an error with the old "Thread" Graph Template. This is due to the fact, that the AREA/STACK was using the MAXIMUM consolidation function whereas the TOTAL uses AVERAGE. As AVERAGE was never used, the Total of ALL never used datasources is "nothing"; ugly.
So I changed AREA/STACK to AVERAGE and now the Total shows up as requested.
Please be aware of the fact, that even the LEGENDs (Current, Average, Max) are referring to the CDEF=ALL_DATA_SOURCES_NODUPS which is now calculated for the AVERAGE consolidation function.
So, I you were assuming, e.g. the Legend for totalling "MAX" would refer to the Sum of all data sources Maximum of all Maxima (as it should), please note that is only sums the Maximum of all AVERAGEs.
Reinhard
Unfortunately, this unveils an error with the old "Thread" Graph Template. This is due to the fact, that the AREA/STACK was using the MAXIMUM consolidation function whereas the TOTAL uses AVERAGE. As AVERAGE was never used, the Total of ALL never used datasources is "nothing"; ugly.
So I changed AREA/STACK to AVERAGE and now the Total shows up as requested.
Please be aware of the fact, that even the LEGENDs (Current, Average, Max) are referring to the CDEF=ALL_DATA_SOURCES_NODUPS which is now calculated for the AVERAGE consolidation function.
So, I you were assuming, e.g. the Legend for totalling "MAX" would refer to the Sum of all data sources Maximum of all Maxima (as it should), please note that is only sums the Maximum of all AVERAGEs.
Reinhard
Hye,
I'm a new user of this forum.
Thanks a lot for your scripts and templates.
I've a little problem with it. I think that this is the apache configuration who isn't good.
I have any graphs for "Apache statistics kbits/s", hits, etc ...
But I have no problem "Apache statistics with thread details"
I have this in run the perl script manually :
perl ws_apachestats.pl localhost
apache_busy_workers:1 apache_idle_workers:9 thread_O:246 threadC:0 threadD:0 threadG:0 threadI:0 threadK:0 threadL:0 threadR:0 threadS:0 threadW:1 thread_W:9 apache_cpuload:W__..___.____...................................................................................................................................................................................................................................................
Please, can you help me ...
GauTux
From Paris (sorry for my english)
I'm a new user of this forum.
Thanks a lot for your scripts and templates.
I've a little problem with it. I think that this is the apache configuration who isn't good.
I have any graphs for "Apache statistics kbits/s", hits, etc ...
But I have no problem "Apache statistics with thread details"
I have this in run the perl script manually :
perl ws_apachestats.pl localhost
apache_busy_workers:1 apache_idle_workers:9 thread_O:246 threadC:0 threadD:0 threadG:0 threadI:0 threadK:0 threadL:0 threadR:0 threadS:0 threadW:1 thread_W:9 apache_cpuload:W__..___.____...................................................................................................................................................................................................................................................
Please, can you help me ...
GauTux
From Paris (sorry for my english)
hello
I'm turn on CentOS 5 and my error is
I'm turn on CentOS 5 and my error is
Code: Select all
03/30/2008 01:38:54 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/cacti/rra/serveur_aide_info_apache_busy_workers_33.rrd --template apache_busy_workers:apache_idle_workers:thread_O:threadC:threadD:threadG:threadI:threadK:threadL:threadR:threadS:threadW:thread_W 1206837533:1:8:247:0:0:0:0:0:0:0:0:1:8
OK u:0.00 s:0.00 r:1.06
03/30/2008 01:38:54 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/cacti/rra/serveur_aide_info_apache_busy_workers_31.rrd --template apache_busy_workers:apache_idle_workers:thread_O:threadC:threadD:threadG:threadI:threadK:threadL:threadR:threadS:threadW:thread_W 1206837533:1:8:247:0:0:0:0:0:0:0:0:1:8
OK u:0.00 s:0.00 r:1.06
03/30/2008 01:38:54 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/cacti/rra/serveur_aide_info_apache_busy_workers_30.rrd --template apache_busy_workers:apache_idle_workers:thread_O:threadC:threadD:threadG:threadI:threadK:threadL:threadR:threadS:threadW:thread_W 1206837533:1:8:247:0:0:0:0:0:0:0:0:1:8
OK u:0.00 s:0.00 r:1.06
03/30/2008 01:38:54 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/cacti/rra/localhost_proc_26.rrd --template proc 1206837533:106
OK u:0.00 s:0.00 r:1.06
03/30/2008 01:38:54 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/cacti/rra/localhost_users_25.rrd --template users 1206837533:2
OK u:0.00 s:0.00 r:1.06
03/30/2008 01:38:54 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/cacti/rra/localhost_hdd_free_27.rrd --template hdd_free:hdd_used 1206837533:8858484:5490448
OK u:0.00 s:0.00 r:1.06
03/30/2008 01:38:54 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool create /usr/bin/perl /var/www/cacti/scripts/ws_apachestats.pl 127.0.0.1 --step 300 DS:apache_busy_workers:GAUGE:600:0:500 DS:apache_total_hits:COUNTER:600:0:10000 DS:apache_total_kbytes:COUNTER:600:0:40000 DS:apache_idle_workers:GAUGE:600:0:1000 DS:threadC:GAUGE:600:0:500 DS:thread_O:GAUGE:600:0:500 DS:threadD:GAUGE:600:0:500 DS:threadK:GAUGE:600:0:100 DS:threadI:GAUGE:600:0:500 DS:threadG:GAUGE:600:0:500 DS:threadL:GAUGE:600:0:500 DS:threadW:GAUGE:600:0:500 DS:threadS:GAUGE:600:0:500 DS:threadR:GAUGE:600:0:500 DS:thread_W:GAUGE:600:0:500 DS:apache_cpuload:GAUGE:600:0:100 RRA:AVERAGE:0.5:1:500 RRA:AVERAGE:0.5:1:600 RRA:AVERAGE:0.5:6:700 RRA:AVERAGE:0.5:24:775 RRA:AVERAGE:0.5:288:797 RRA:MAX:0.5:1:500 RRA:MAX:0.5:1:600 RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797
ERROR: can't parse argument '/var/www/cacti/scripts/ws_apachestats.pl'
03/30/2008 01:38:54 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/bin/perl /var/www/cacti/scripts/ws_apachestats.pl 127.0.0.1 --template apache_busy_workers:apache_idle_workers:thread_O:threadC:threadD:threadG:threadI:threadK:threadL:threadR:threadS:threadW:thread_W N:1:8:247:0:0:0:0:0:0:0:0:1:8
ERROR: opening '/usr/bin/perl': Text file busy
Code: Select all
/var/www/cacti/scripts/ws_apachestats.pl 127.0.0.1
apache_busy_workers:1 apache_idle_workers:9 thread_O:246 threadC:0 threadD:0 threadG:0 threadI:0 threadK:0 threadL:0 threadR:0 threadS:0 threadW:1 thread_W:9 apache_cpuload:_W________......................................................................................................................................................................................................................................................
me too .thank you very muchIngimar wrote:That did the trick! Thanks alot!lvm wrote:This may be related to rrdtool 1.0.x. I used the TREND function. You may delete the "30 min moving average" items out of the graph template to get rid of this
Reinhard
I have 2 questions :
1) I found the pictures apache statistics -bytes/request , cpu load ,hits/s ,
KBits /s is empty ,what wrong with it ?
2) Is the template can draw the mem used of apache ?
Thank you very much !
thank you .It is my apache server problem , I want to monitor the memory the apache used , How can I do with the template ?gandalf wrote:I was under the impression that I've posted updated templates; hmmm.sgm277 wrote:KBits /s is empty ,what wrong with it ?
Please visit the failing graph at Graph Management as switch to DEBUG. Post a screenshot, please
Reinhard
Is there a way to display grand total hits, not as a graph but as a total number on the output of the legend below the graph?
**Well, I hate to come back here and just say "I figured it out" because its hard! And most forum threads and google searches end in a post that says "nevermind I figured it out" without telling how to do it
But, nevermind, I figured it out.
I even managed to compound my graphs in to one super graph of apache hits/s,hits/min,hits/hr,hits/day once I mastered cdef, which really only took a few minutes once I finally found the post that referred me to the rrdtools cdef tut. which is here by the way: http://oss.oetiker.ch/rrdtool/tut/cdeftutorial.en.html
**Well, I hate to come back here and just say "I figured it out" because its hard! And most forum threads and google searches end in a post that says "nevermind I figured it out" without telling how to do it
But, nevermind, I figured it out.
I even managed to compound my graphs in to one super graph of apache hits/s,hits/min,hits/hr,hits/day once I mastered cdef, which really only took a few minutes once I finally found the post that referred me to the rrdtools cdef tut. which is here by the way: http://oss.oetiker.ch/rrdtool/tut/cdeftutorial.en.html
Got some prob.
Thanks to Gandalf, the owningmaster of Cacti , i've seen that there are some new stuffs for Apache Statistics with new versions of Cacti :
- a new ws_apachestats.pl file, i've updated it on my Server2
- a xml file of the host_template, but i don't know where to update it, and what for ?
At this stage, my graphs of Apache stats still don't work, and the command perl ws_apachestats.pl localhost or perl ws_apachestats.pl myremothost.domain.com return nothing.
For information, my previous version of ws_apachestats.pl returned
<HTML>
<HEAD><TITLE>An Error Occurred</TITLE></HEAD>
<BODY>
<H1>An Error Occurred</H1>
404 Not Found
</BODY>
</HTML>
Thanks to Gandalf, the owningmaster of Cacti , i've seen that there are some new stuffs for Apache Statistics with new versions of Cacti :
- a new ws_apachestats.pl file, i've updated it on my Server2
- a xml file of the host_template, but i don't know where to update it, and what for ?
At this stage, my graphs of Apache stats still don't work, and the command perl ws_apachestats.pl localhost or perl ws_apachestats.pl myremothost.domain.com return nothing.
For information, my previous version of ws_apachestats.pl returned
<HTML>
<HEAD><TITLE>An Error Occurred</TITLE></HEAD>
<BODY>
<H1>An Error Occurred</H1>
404 Not Found
</BODY>
</HTML>
Server1
Cacti : 0.8.7h | Architecture : 3.0
autom8 : 0.35 | aggregate : 0.75 | settings : 0.71 | thold : 0.4.7 | weathermap : 0.97a
Server2
Cacti : 0.8.7g | Architecture : 2.8
autom8 : 0.35 | aggregate : 0.75 | settings : 0.7 | thold : 0.4.3 | weathermap : 0.97a | flowview : 0.6
Cacti : 0.8.7h | Architecture : 3.0
autom8 : 0.35 | aggregate : 0.75 | settings : 0.71 | thold : 0.4.7 | weathermap : 0.97a
Server2
Cacti : 0.8.7g | Architecture : 2.8
autom8 : 0.35 | aggregate : 0.75 | settings : 0.7 | thold : 0.4.3 | weathermap : 0.97a | flowview : 0.6
I've discovered that my server2 had to be able to contact the server-status page, and it can't.
It must be an allowing rule for server2 to contact the status page in the Apache configuration file on target server , or somethg...
It must be an allowing rule for server2 to contact the status page in the Apache configuration file on target server , or somethg...
Server1
Cacti : 0.8.7h | Architecture : 3.0
autom8 : 0.35 | aggregate : 0.75 | settings : 0.71 | thold : 0.4.7 | weathermap : 0.97a
Server2
Cacti : 0.8.7g | Architecture : 2.8
autom8 : 0.35 | aggregate : 0.75 | settings : 0.7 | thold : 0.4.3 | weathermap : 0.97a | flowview : 0.6
Cacti : 0.8.7h | Architecture : 3.0
autom8 : 0.35 | aggregate : 0.75 | settings : 0.71 | thold : 0.4.7 | weathermap : 0.97a
Server2
Cacti : 0.8.7g | Architecture : 2.8
autom8 : 0.35 | aggregate : 0.75 | settings : 0.7 | thold : 0.4.3 | weathermap : 0.97a | flowview : 0.6
by default, server-status is commented out,
when you uncomment it, the Allow from directive should be changed. My preference is to set it to the internal subnet of your network, so it would become
or
depending on your internal subnet, it could be something completely different.
In the httpd.conf, it says .example.com and you may be tempted to change that to yoursite.com, but that very likely resolves through dns to an external IP address, and firewalls generally don't like it when you go out of the firewall and then directly back into the firewall.
To connect to server-status at that point, connect to the IP apache is listening on inside the firewall.
If that doesn't answer your question, perhaps someone will find it useful
Code: Select all
#<Location /server-info>
# SetHandler server-info
# Order deny,allow
# Deny from all
# Allow from .example.com
#</Location>
Code: Select all
Allow from 192.168.0.0/24
Code: Select all
Allow from 10.0.0.0/8
In the httpd.conf, it says .example.com and you may be tempted to change that to yoursite.com, but that very likely resolves through dns to an external IP address, and firewalls generally don't like it when you go out of the firewall and then directly back into the firewall.
To connect to server-status at that point, connect to the IP apache is listening on inside the firewall.
If that doesn't answer your question, perhaps someone will find it useful
yep !! I've finally found what was wrong, i just had to add "Allow from IP_of_my_server2" in the apache2.conf target host
Server1
Cacti : 0.8.7h | Architecture : 3.0
autom8 : 0.35 | aggregate : 0.75 | settings : 0.71 | thold : 0.4.7 | weathermap : 0.97a
Server2
Cacti : 0.8.7g | Architecture : 2.8
autom8 : 0.35 | aggregate : 0.75 | settings : 0.7 | thold : 0.4.3 | weathermap : 0.97a | flowview : 0.6
Cacti : 0.8.7h | Architecture : 3.0
autom8 : 0.35 | aggregate : 0.75 | settings : 0.71 | thold : 0.4.7 | weathermap : 0.97a
Server2
Cacti : 0.8.7g | Architecture : 2.8
autom8 : 0.35 | aggregate : 0.75 | settings : 0.7 | thold : 0.4.3 | weathermap : 0.97a | flowview : 0.6
-
- Posts: 2
- Joined: Fri Sep 19, 2008 3:18 pm
ERROR: invalid rpn expression 'a,1800,TREND'
I get an error / no graph when I use:
"WebServer - Apache Statistics - CPU Load"
Can anyone point me in the right direction?
All the other apache graphs work fine....
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="nat228 (tools) - Apache Statistics - CPU Load" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="Apache CPU Load %" \
DEF:a="/web/sites/app/cacti/rra/nat228_tools_apache_busy_workers_68.rrd":apache_cpuload:AVERAGE \
DEF:b="/web/sites/app/cacti/rra/nat228_tools_apache_busy_workers_68.rrd":apache_cpuload:MAX \
CDEF:cdeff=a,1800,TREND \
AREA:a#FF5F00:"Apache CPU Load" \
GPRINTLAST:" Current\:%8.2lf %s" \
GPRINTAVERAGE:"Average\:%8.2lf %s" \
GPRINTMAX:"Maximum\:%8.2lf %s" \
LINE1:b#FF0000:"MAX" \
LINE1:cdeff#000000:"30min moving average\n"
RRDTool Says:
ERROR: invalid rpn expression 'a,1800,TREND'
"WebServer - Apache Statistics - CPU Load"
Can anyone point me in the right direction?
All the other apache graphs work fine....
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="nat228 (tools) - Apache Statistics - CPU Load" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="Apache CPU Load %" \
DEF:a="/web/sites/app/cacti/rra/nat228_tools_apache_busy_workers_68.rrd":apache_cpuload:AVERAGE \
DEF:b="/web/sites/app/cacti/rra/nat228_tools_apache_busy_workers_68.rrd":apache_cpuload:MAX \
CDEF:cdeff=a,1800,TREND \
AREA:a#FF5F00:"Apache CPU Load" \
GPRINTLAST:" Current\:%8.2lf %s" \
GPRINTAVERAGE:"Average\:%8.2lf %s" \
GPRINTMAX:"Maximum\:%8.2lf %s" \
LINE1:b#FF0000:"MAX" \
LINE1:cdeff#000000:"30min moving average\n"
RRDTool Says:
ERROR: invalid rpn expression 'a,1800,TREND'
Who is online
Users browsing this forum: No registered users and 0 guests