|
|
| Author |
Message |
gandalf Developer
Joined: 02 Dec 2004 Posts: 12166 Location: Muenster, Germany
|
Posted: Sat Dec 02, 2006 12:24 pm Post subject: |
|
|
Again, all DEF statements are missing. They refer to the datasources that should be graphed. Please check your Graph Template (or try to re-import again; some people reported that this solved their problems; should not be needed, but no error has been discovered yet)
Reinhard
|
|
| Back to top |
|
 |
soulshepard
Joined: 09 Feb 2007 Posts: 9
|
Posted: Fri Mar 16, 2007 8:34 am Post subject: |
|
|
| gandalf wrote: | | pyoung wrote: | | How did you pare down the script so it's not storing duplicated RRD data? | Well, to be honest, it DOES create all that duplicate rrd's if you create all graphs from the device screen.
You may do so and AFTERWARDS change the references to these rrd's from the Data Source list. Then you may delete the obsolete rrd's.
OR, you create only ONE of the graphs from the device screen. The others must be created from the Graph Management screen (not remembering exactly, no cacti installation here at the moment). There you may refer to the Graph Template AND define the rrd file manually (if I'm mistaken, it must have been the [/b]Data Source screen instead).
AFAIK there's no option to do this automatically
Reinhard |
but will there be one in the future?
|
|
| Back to top |
|
 |
gandalf Developer
Joined: 02 Dec 2004 Posts: 12166 Location: Muenster, Germany
|
Posted: Fri Mar 16, 2007 9:15 am Post subject: |
|
|
I've heard of it, but this will definitively be left to the core developers.
Reinhard
|
|
| Back to top |
|
 |
overclokkato
Joined: 19 Oct 2006 Posts: 5
|
Posted: Wed May 09, 2007 10:48 am Post subject: Problem Apache Graphs |
|
|
Hi,
i solved this problem enabling mod_status on apache ( http://httpd.apache.org/docs/2.0/mod/mod_status.html )
Insert this code in httpd.conf:
LoadModule status_module /usr/lib/apache2/mod_status.so
<Location /server-status>
SetHandler server-status
Order Deny,Allow
Allow from all
</Location>
ExtendedStatus On
restart Apache and then try : http://yourWebServer/server-status
Bye Bye
Simone
|
|
| Back to top |
|
 |
overclokkato
Joined: 19 Oct 2006 Posts: 5
|
Posted: Wed May 09, 2007 10:50 am Post subject: Problem Apache Graphs |
|
|
Hi,
i solved this problem enabling mod_status on apache ( http://httpd.apache.org/docs/2.0/mod/mod_status.html )
Insert this code in httpd.conf:
LoadModule status_module /usr/lib/apache2/mod_status.so
<Location /server-status>
SetHandler server-status
Order Deny,Allow
Allow from all
</Location>
ExtendedStatus On
restart Apache and then try : http://yourWebServer/server-status
Bye Bye
Simone
|
|
| Back to top |
|
 |
joedunn
Joined: 29 Jan 2007 Posts: 9
|
Posted: Fri May 18, 2007 10:12 am Post subject: |
|
|
| Is this template/script meant to work with Version 0.8.6j
|
|
| Back to top |
|
 |
wtb1
Joined: 03 May 2007 Posts: 47
|
Posted: Fri May 25, 2007 10:07 am Post subject: Problems getting web stats |
|
|
I have been trying to get apachestats to work for me but have an issue. When running the scripts from command I get errors posted in the first screen shot. When I go to a browser and go to http://localhost/server-status I get the second screen shot . Any thoughts?
| Description: |
|
| Filesize: |
60.58 KB |
| Viewed: |
5482 Time(s) |

|
| Description: |
|
| Filesize: |
76.86 KB |
| Viewed: |
5482 Time(s) |

|
|
|
| Back to top |
|
 |
gandalf Developer
Joined: 02 Dec 2004 Posts: 12166 Location: Muenster, Germany
|
Posted: Tue May 29, 2007 3:57 pm Post subject: |
|
|
I came across this lately. I will have to revisit my solution, please stay tuned
Reinhard
|
|
| Back to top |
|
 |
cksrealm Cacti User
Joined: 08 May 2005 Posts: 61
|
Posted: Thu Jun 07, 2007 8:17 am Post subject: |
|
|
Hi all, I am trying to get this working as well and run into some problems as a few of your seem to have had. When I run the script from the CLI I get
Use of uninitialized value in concatenation (.) or string at ./ws_apachestats.pl line 63.
Use of uninitialized value in concatenation (.) or string at ./ws_apachestats.pl line 65.
Use of uninitialized value in concatenation (.) or string at ./ws_apachestats.pl line 67.
Use of uninitialized value in concatenation (.) or string at ./ws_apachestats.pl line 69.
Use of uninitialized value in split at ./ws_apachestats.pl line 89.
Use of uninitialized value in concatenation (.) or string at ./ws_apachestats.pl line 103.
apache_total_hits: apache_total_kbytes: apache_busy_workers: apache_idle_workers: thread_O:0 threadC:0 threadD:0 threadG:0 threadI:0 threadK:0 threadL:0 threadR:0 threadS:0 threadW:0 thread_W:0 apache_cpuload:viper:/var/www/cacti/scripts#
One thing I will add is that this server is only listening on port 443 (https) when I browse to https://server/server-status?auto all I get is a 404 not found error, the modules have been set in the httpd.conf file to load so cant see any issues there, anyone got this working on a server running https at all?
Thanks
CK
|
|
| Back to top |
|
 |
cksrealm Cacti User
Joined: 08 May 2005 Posts: 61
|
Posted: Thu Jun 07, 2007 8:22 am Post subject: |
|
|
Ok I sorted it out to a point I can now access https://server/server-status? without any problems , however when I run the script from the command line I am still getting.
Use of uninitialized value in concatenation (.) or string at ./ws_apachestats.pl line 63.
Use of uninitialized value in concatenation (.) or string at ./ws_apachestats.pl line 65.
Use of uninitialized value in concatenation (.) or string at ./ws_apachestats.pl line 67.
Use of uninitialized value in concatenation (.) or string at ./ws_apachestats.pl line 69.
Is there something I can/need to edit in the script to get it to use https rather than http?
Thanks
CK
|
|
| Back to top |
|
 |
opus
Joined: 13 Jun 2007 Posts: 1 Location: Slovakia
|
Posted: Wed Jun 13, 2007 2:59 pm Post subject: Error = Localhost - Apache Statistics - Hits / s |
|
|
After succesful xml import I am trying to create graph "Localhost - Apache Statistics - Hits / s" with error:
RRDTool Command:
/usr/local/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Localhost - Apache Statistics - Hits / s" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="Hits/sec" \
--slope-mode \
AREA:#AAABA1:"Hits/sec" \
GPRINT::LAST:"Current\:%8.2lf %s" \
GPRINT::AVERAGE:"Average\:%8.2lf %s" \
GPRINT::MAX:"Maximum\:%8.2lf %s\n" \
COMMENT:" Represents the number of hits per second\n" \
COMMENT:" ApacheStats v0.4 - Rolf Poser\n"
RRDTool Says:
ERROR: parameter '#AAABA1' does not represent a number in line AREA:#AAABA1:Hits/sec
what's wrong?
Thread Details Graph:
RRDTool Command:
/usr/local/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Localhost - Apache Statistics - Thread Details" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="number of threads" \
--slope-mode \
CDEF:cdefi= \
AREA:#FF0000:"Busy" \
GPRINT::LAST:" Current\:%8.0lf" \
GPRINT::AVERAGE:"Average\:%8.0lf" \
GPRINT::MAX:"Maximum\:%8.0lf\n" \
AREA:#4444FF:"Idle":STACK \
GPRINT::LAST:" Current\:%8.0lf" \
GPRINT::AVERAGE:"Average\:%8.0lf" \
GPRINT::MAX:"Maximum\:%8.0lf\n" \
LINE1:cdefi#000000:"Total" \
GPRINT:cdefi:LAST:"Current\:%8.0lf" \
GPRINT:cdefi:AVERAGE:"Average\:%8.0lf" \
GPRINT:cdefi:MAX:"Maximum\:%8.0lf\n" \
COMMENT:" Represents the number of busy and idle threads\n" \
COMMENT:" ApacheStats v0.4 - Rolf Poser\n"
RRDTool Says:
Segmentation fault
Other graphs work ok, please help.
|
|
| Back to top |
|
 |
etn
Joined: 13 Feb 2006 Posts: 8
|
Posted: Thu Jun 14, 2007 3:32 am Post subject: |
|
|
Hello,
I'm a new user of this fantastic template and i discover a small 'bug'.
Indeed, it appears that if your apache has no request, the CPULoad var doesn't exists in the server-status?auto url:
| Code: |
Total Accesses: 180161
Total kBytes: 50907
Uptime: 27832
ReqPerSec: 6.47316
BytesPerSec: 1872.98
BytesPerReq: 289.345
BusyWorkers: 5
IdleWorkers: 49
Scoreboard: ____CK_______C__________W________C____________________
.................................................................................................
..................................................................................................
.......
|
In this case, result of ws_apachestats.pl is like that :
apache_total_hits:180161 apache_total_kbytes:50907 apache_busy_workers:5 apache_idle_workers:49 thread_O:202 threadC:3 threadD:0 threadG:0 threadI:0 threadK:1 threadL:0 threadR:0 threadS:0 threadW:1 thread_W:49 apache_cpuload:____CK_______C__________W________C___________
_________..........................................................................................
.........................................................................................................
.......
in order to return a 0 value for the CPULoad in this precise case, i modify the script, i replace the line:
| Code: |
# added CPULoad
$output =~ /CPULoad.*: (.*)/;
$out .= "apache_cpuload:".$1;
|
By :
| Code: |
# added CPULoad
$output =~ /CPULoad.*: (.*)/;
if(substr($1,1,1) ne ".")
{
$out .= "apache_cpuload:0";
}else
{
$out .= "apache_cpuload:".$1;
}
|
I want your opinion about this hack, i don't know if it's better to return .0 or 0 when CPULoad is null.
Etn
|
|
| Back to top |
|
 |
gandalf Developer
Joined: 02 Dec 2004 Posts: 12166 Location: Muenster, Germany
|
Posted: Mon Jul 23, 2007 9:53 am Post subject: |
|
|
| cksrealm wrote: | Ok I sorted it out to a point I can now access https://server/server-status? without any problems , however when I run the script from the command line I am still getting.
Use of uninitialized value in concatenation (.) or string at ./ws_apachestats.pl line 63.
Use of uninitialized value in concatenation (.) or string at ./ws_apachestats.pl line 65.
Use of uninitialized value in concatenation (.) or string at ./ws_apachestats.pl line 67.
Use of uninitialized value in concatenation (.) or string at ./ws_apachestats.pl line 69.
Is there something I can/need to edit in the script to get it to use https rather than http?
Thanks
CK | I posted a modified script to the original posting. Please try http://forums.cacti.net/viewtopic.php?p=44950#44950
Reinhard
|
|
| Back to top |
|
 |
paul-lmi
Joined: 26 Aug 2007 Posts: 13
|
Posted: Sun Aug 26, 2007 7:45 pm Post subject: |
|
|
I'm having issues with a few specific graphs.
RRDTool 1.2.23
Cacti is the newest avail. as of 8/25/07
Bytes / request is a broken image.
Debug on the graphs shows:
| Code: |
RRDTool Command:
/usr/local/rrdtool-1.2.23/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="httpd - Bytes / Request" \
--base=1024 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bytes / hit" \
--slope-mode \
DEF:a="/var/www/html/cacti/rra/localhost_apache_cpuload_8.rrd":apache_total_kbytes:AVERAGE \
DEF:b="/var/www/html/cacti/rra/localhost_apache_cpuload_8.rrd":apache_total_hits:AVERAGE \
CDEF:cdefa=cdefb,0,EQ,0,cdefa,1024,*,cdefb,/,IF,0,1000000,LIMIT \
CDEF:cdefe=a,0,0,LIMIT \
CDEF:cdefi=b,0,0,LIMIT \
AREA:cdefa#4123A1:"Bytes / Request" \
GPRINT:cdefa:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s\n" \
LINE2:cdefe#FF0000:"kBytes" \
GPRINT:a:LAST:" Current\:%8.2lf %s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:a:MAX:"Maximum\:%8.2lf %s\n" \
LINE2:cdefi#00FF00:"Hits" \
GPRINT:b:LAST:" Current\:%8.2lf %s" \
GPRINT:b:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:b:MAX:"Maximum\:%8.2lf %s\n" \
COMMENT:" Represents the number of bytes per hit\n"
RRDTool Says:
ERROR: invalid rpn expression in: cdefb,0,EQ,0,cdefa,1024,*,cdefb,/,IF,0,1000000,LIMIT
|
Hits / s is a broken image
Debug of graph shows:
| Code: |
RRDTool Command:
/usr/local/rrdtool-1.2.23/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="httpd - Hits / s" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="Hits/sec" \
--slope-mode \
AREA:#AAABA1:"Hits/sec" \
GPRINT::LAST:"Current\:%8.2lf %s" \
GPRINT::AVERAGE:"Average\:%8.2lf %s" \
GPRINT::MAX:"Maximum\:%8.2lf %s\n" \
COMMENT:" Represents the number of hits per second\n" \
COMMENT:" ApacheStats v0.4 - Rolf Poser\n"
RRDTool Says:
ERROR: parameter '#AAABA1' does not represent a number in line AREA:#AAABA1:Hits/sec
|
Thread Details % is a broken image
Graph debug shows:
| Code: |
RRDTool Command:
/usr/local/rrdtool-1.2.23/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="httpd - Thread Details (%)" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="number of threads" \
--slope-mode \
DEF:a="/var/www/html/cacti/rra/localhost_apache_cpuload_8.rrd":apache_busy_workers:AVERAGE \
DEF:b="/var/www/html/cacti/rra/localhost_apache_cpuload_8.rrd":apache_total_hits:AVERAGE \
CDEF:cdefa=a,UN,0,a,100000,GT,0,a,IF,IF \
CDEF:cdefb=b,UN,0,b,100000,GT,0,b,IF,IF \
CDEF:cdefc=cdefa,cdefb,+ \
CDEF:cdefd=cdefc,0,EQ,0,cdefa,100,*,cdefc,/,IF,0,110,LIMIT \
CDEF:cdefh=cdefc,0,EQ,0,cdefb,100,*,cdefc,/,IF,0,110,LIMIT \
CDEF:cdefbe=a,0,0,LIMIT \
CDEF:cdefbf=b,0,0,LIMIT \
COMMENT:"-\n" \
COMMENT:"-\n" \
COMMENT:"-\n" \
AREA:cdefd#FF0000:"Busy" \
GPRINT:cdefd:LAST:" Current\:%8.0lf" \
GPRINT:cdefd:AVERAGE:"Average\:%8.0lf" \
GPRINT:cdefd:MAX:"Maximum\:%8.0lf\n" \
AREA:cdefh#4444FF:"Idle":STACK \
GPRINT:cdefh:LAST:" Current\:%8.0lf" \
GPRINT:cdefh:AVERAGE:"Average\:%8.0lf" \
GPRINT:cdefh:MAX:"Maximum\:%8.0lf\n" \
GPRINT:cdefc:LAST:"Total Number of threads \:%8.0lf" \
GPRINT:cdefc:AVERAGE:"Average\:%8.0lf" \
GPRINT:cdefc:MAX:"Maximum\:%8.0lf\n" \
COMMENT:"" \
COMMENT:"\n" \
COMMENT:" Represents the number of busy threads as a % of total number of threads\n" \
COMMENT:" based on ApacheStats v0.4 - Rolf Poser\n"
RRDTool Says:
ERROR: Expected some arguments after 'COMMENT:'
|
if i remove the comments from the template, it's a similar error as above.
Thread Details is a broken image
The debug shows:
| Code: |
RRDTool Command:
/usr/local/rrdtool-1.2.23/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="httpd - Thread Details" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="number of threads" \
--slope-mode \
CDEF:cdefi= \
AREA:#FF0000:"Busy" \
GPRINT::LAST:" Current\:%8.0lf" \
GPRINT::AVERAGE:"Average\:%8.0lf" \
GPRINT::MAX:"Maximum\:%8.0lf\n" \
AREA:#4444FF:"Idle":STACK \
GPRINT::LAST:" Current\:%8.0lf" \
GPRINT::AVERAGE:"Average\:%8.0lf" \
GPRINT::MAX:"Maximum\:%8.0lf\n" \
LINE1:cdefi#000000:"Total" \
GPRINT:cdefi:LAST:"Current\:%8.0lf" \
GPRINT:cdefi:AVERAGE:"Average\:%8.0lf" \
GPRINT:cdefi:MAX:"Maximum\:%8.0lf\n" \
COMMENT:" Represents the number of busy and idle threads\n" \
COMMENT:" ApacheStats v0.4 - Rolf Poser\n"
RRDTool Says:
|
weird that is doesn't return anything
what i've tried:
*removing all traces of the template and script, and reuploading.
*ensuring the RRDTool setting was on 1.2.x in the settings (this fixed the time based graphs issue i had)
*running the script from the terminal, no errors.
I also noticed a discrepancy in the Kbytes / s template. It refers to bytes in the template, but bits in the graph by default. Which one should it be?
i'm at a total loss here. i'll admit perl isn't my strong point and i'm new to this package in general, but i'm throwing the white flag for some help here.
edit, fixed hits/s graph. apparantly the graph template didn't have the CDEF function defined for each line. I changed it to Total All Data Sources for each of the 3 lines, and then fixed the data source entry in the Graph's config to point to the total hits data source.
|
|
| Back to top |
|
 |
JohnneyBoy
Joined: 24 Aug 2007 Posts: 7
|
Posted: Mon Aug 27, 2007 11:13 am Post subject: |
|
|
Hello,
Any chance of publishing the fixed xml?
John
|
|
| Back to top |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|