0Mbps circuit (vlan) causes failure

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
laird
Posts: 3
Joined: Wed Oct 23, 2002 12:24 am

0Mbps circuit (vlan) causes failure

Post by laird »

Hello,

I have a number of vlans that I would like to monitor that are not working. I get

ERROR: min must be less than max in DS definition
ERROR: opening '/home/cacti/rra/traf_rmon_vlan_1_65_out.rrd': No such file or directory

when the cron job runs and no rrd data is created for these vlans.

I'm just guessing but one issue I've run into the past is that the vlan has a circuit speed of 0Mbps since it's virtual and that throws off mrtg. I would have to manually set a circuit speed in mrtg to make it work.

Is is possible we are seeing the same thing here?

Regards,

Alan
laird
Posts: 3
Joined: Wed Oct 23, 2002 12:24 am

Post by laird »

Ok, it looks like cacti's call to rrdtool is the problem. From the logs;

/usr/local/bin/rrdtool create /home/cacti/rra/traf_rmon_vlan_1_65_in.rrd \
--step 300 \
DS:traf_rmon_vlan_1_65:COUNTER:600:0:0 \
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:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797

If done at the command line it produces the error 'ERROR: min must be less than max in DS definition' which drew my attention to the COUNTER:600:0:0 part of the call to rrdtool which is where rrdtool becomes unhappy.

I'm just guessing that because this VLAN has a max speed of 0Mbps, this max is getting passed to rrdtool which doesn't like it.

Alan
laird
Posts: 3
Joined: Wed Oct 23, 2002 12:24 am

Post by laird »

ok, this looks to be an issue specific to cacti trapping the corner case of a 0Mbps circuit and handling it differently than other circuits.

from the rrdtool docs:

"If you do not know or care about min and max, set them to U for unknown."

So it looks like when you have a vlan or other element with a max speed of 0Mbps due to it being a virtual circuit the correct thing for cacti to do is populate the max field with u.

Now to look at the code.

Alan
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

You are right about the 'U' value. However for some dumb reason I made the max_value column an int and did not create a better way to represent 'U'. I suggest changing the data type of this column to char(20) for now, even though I'll probably do something that mixes the best of both worlds in the future since I'd prefer not to make that column a char.

-Ian
User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

Post by bulek »

I don't think setting max_value as an integer is dumb idea. It's a number... right? How about using SQL NULL value (which is different than 0) for U representation?

- bulek
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

Awesome, I think that was the "best of both worlds" answer I was looking for :wink:. That is probably what I'll end up doing.

Thanks for the good idea.

-Ian
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests