Erratic graph, jagged/missing lines.
Moderators: Developers, Moderators
Erratic graph, jagged/missing lines.
I have a graph that seems to not want to draw full lines, it draws some of the lines, some of the time. On a different cacti server the exact same thing actually shows consistent data. I have gone step by step through the creation process but I cant figure why its doing this. I would expect that it would be a smooth connected line.
Attached are the graph and relevant graph template.
Attached are the graph and relevant graph template.
- Attachments
-
- Graph
- apache_errors-2.png (2.6 KiB) Viewed 2059 times
-
- Template.
- graph_template2.png (49.68 KiB) Viewed 2059 times
There is of course a problem with that, there are no NaN's in the graph, getting the AVERAGE I see the following for that item:
So I can only assume that the 0's are the issue. Looking at the logs I see a lot of 0's. Whats puzzling to me is that I see about 4k hits every 5 minutes, usually less than 10 400 & 500 errors (which is what the graph is tracking) but the graph either doesnt graph anything, or it spikes to near 100% or more (which looking by hand, doesnt happen at all in reality)
The apache templates that are available on the site dont do what we need in this respect. We need service time, 400/500 errors and apache aborts.
So of course any help trouble shooting the issue with the graph would be appreciated. The expected behavior is to have a line drawn representing the data, why its doing this insane spike/dot incorrect % thing is beyond me.
Code: Select all
9.2666666667e-01
7.3333333333e-02
0.0000000000e+00
0.0000000000e+00
0.0000000000e+00
0.0000000000e+00
0.0000000000e+00
0.0000000000e+00
0.0000000000e+00
2.7600000000e+00
3.0000000000e+00
3.0000000000e+00
1.1600000000e+00
8.0000000000e-02
0.0000000000e+00
9.2000000000e-01
8.0000000000e-02
2.7500000000e+00
2.1000000000e-01
3.7066666667e+00
2.9333333333e-01
0.0000000000e+00
9.2666666667e-01
9.3333333333e-02
9.2000000000e-01
7.3333333333e-02
0.0000000000e+00
0.0000000000e+00
0.0000000000e+00
9.2666666667e-01
8.6666666667e-02
0.0000000000e+00
0.0000000000e+00
9.2666666667e-01
7.6666666667e-02
0.0000000000e+00
0.0000000000e+00
0.0000000000e+00
0.0000000000e+00
9.2333333333e-01
The apache templates that are available on the site dont do what we need in this respect. We need service time, 400/500 errors and apache aborts.
So of course any help trouble shooting the issue with the graph would be appreciated. The expected behavior is to have a line drawn representing the data, why its doing this insane spike/dot incorrect % thing is beyond me.
Here ya go:
Code: Select all
/usr/local/rrdtool-1.0.49/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="p.02 - Apache Error Codes" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="percent" \
DEF:a="/opt/cacti/rra/p_02_status_4xx_3076.rrd":total:AVERAGE \
DEF:b="/opt/cacti/rra/p_02_status_4xx_3076.rrd":status_5xx:AVERAGE \
DEF:c="/opt/cacti/rra/p_02_status_4xx_3076.rrd":status_4xx: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=c,UN,0,c,100000,GT,0,c,IF,IF \
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:cdefbb=b,0,0,LIMIT \
CDEF:cdefbc=c,0,0,LIMIT \
CDEF:cdefbd=a,0,0,LIMIT \
COMMENT:"" \
COMMENT:"" \
COMMENT:"" \
LINE2:cdefd#FF4105:"5xx Errors" \
GPRINT:cdefd:LAST:"Current\:%8.2lf %%" \
GPRINT:cdefd:AVERAGE:"Average\:%8.2lf %%" \
GPRINT:cdefd:MAX:"Maximum\:%8.2lf %%\n" \
LINE2:cdefh#FFAB00:"4xx Errors" \
GPRINT:cdefh:LAST:"Current\:%8.2lf %%" \
GPRINT:cdefh:AVERAGE:"Average\:%8.2lf %%" \
GPRINT:cdefh:MAX:"Maximum\:%8.2lf %%\n" \
LINE1:cdefbb:"" \
LINE1:cdefbc:"" \
LINE1:cdefbd:""
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
These lines will change unknowns to 0 and will change all values greater than 10,000 to 0.clockwork wrote:Code: Select all
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=c,UN,0,c,100000,GT,0,c,IF,IF \
I don't understand the purpose of this. It should perform the percentage maths but I suppose this is wrongCDEF: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 \
Reinhard
Who is online
Users browsing this forum: No registered users and 4 guests