changing CDEF function for WMI template

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

Moderators: Developers, Moderators

Post Reply
skullbox15
Posts: 9
Joined: Tue Jul 23, 2013 2:02 pm

changing CDEF function for WMI template

Post by skullbox15 »

So I got WMI working from the templates/scripts provided here. Everything works except the Disk I/O which is the one we need the most. When I look at the graph I get the following error:

ERROR: invalid rpn expression in: a,e,+


I did some searching and found that it should start working if I change the "e" to a "b" but I cannot for the life of me figure out where to do that? I checked the XML in the actual template and cannot find any reference of it. The database itself only contains some hashed values. Can anyone tell me how to edit this value?

I'm using cacti version 0.8.8.a (The latest version contained in CactiEZ)
jftuga
Posts: 49
Joined: Mon Feb 07, 2011 11:50 am
Location: Athens, GA

Re: changing CDEF function for WMI template

Post by jftuga »

Did you find a fix for this? I am having a similar issue.

Thanks,
-John
skullbox15
Posts: 9
Joined: Tue Jul 23, 2013 2:02 pm

Re: changing CDEF function for WMI template

Post by skullbox15 »

Nope, I spent a good hour looking around for where I could change it. I've used the CDEF function before to change temperates from C to F.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: changing CDEF function for WMI template

Post by BSOD2600 »

post the graph debug output please.

CDEFs are defined under the Graph Management section.
skullbox15
Posts: 9
Joined: Tue Jul 23, 2013 2:02 pm

Re: changing CDEF function for WMI template

Post by skullbox15 »

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-60 \
--title='SQL02 - Disk I/O' \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit='0' \
--vertical-label='Operations Per Sec' \
--slope-mode \
--font TITLE:10: \
--font AXIS:8: \
--font LEGEND:8: \
--font UNIT:8: \
DEF:a="/var/www/html/rra/sql02_writespersec_1354.rrd":'ReadsPersec':AVERAGE \
DEF:b="/var/www/html/rra/sql02_writespersec_1354.rrd":'WritesPersec':AVERAGE \
DEF:c="/var/www/html/rra/sql02_writespersec_1354.rrd":'QueueLength':AVERAGE \
CDEF:cdefa='a,e,+' \
--watermark "Orlando Magic IT" \
--no-gridfit \
AREA:cdefa#BCBEB3FF:"Total\:" \
GPRINT:cdefa:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s\n" \
LINE1:a#FF0000FF:"Read\:" \
GPRINT:a:LAST:" Current\:%8.2lf %s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:a:MAX:"Maximum\:%8.2lf %s\n" \
LINE1:b#002A97FF:"Write\:" \
GPRINT:b:LAST:" Current\:%8.2lf %s" \
GPRINT:b:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:b:MAX:"Maximum\:%8.2lf %s\n" \
LINE1:c#000000FF:"Queue Length\:" \
GPRINT:c:LAST:"Current\:%8.2lf %s" \
GPRINT:c:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:c:MAX:"Maximum\:%8.2lf %s\n" RRDTool Says:

ERROR: invalid rpn expression in: a,e,+
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: changing CDEF function for WMI template

Post by BSOD2600 »

There is no DEF:e, thus the error is valid.

You need to review the CDEF logic it would appear. How's it defined?
skullbox15
Posts: 9
Joined: Tue Jul 23, 2013 2:02 pm

Re: changing CDEF function for WMI template

Post by skullbox15 »

That is my problem. I see that b is defined and e is not. I'm assuming that if I was able to change the expression

from: CDEF:cdefa='a,e,+' \
to : CDEF:cdefa='a,b,+' \

Then everything would work. I just don't how (more like where) to change that.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: changing CDEF function for WMI template

Post by BSOD2600 »

CDEFs are defined under Graph Management.

Sounds like the one you're using hardcodes in the values which is bad (as you've experienced).
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests