MRTG like % on GPRINT

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

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

Post by raX »

This would have to be done with a CDEF. You could create a CDEF.

Create a new CDEF and add a new item to it. Check the "Use the current data source being used on the graph instead of a preset one." box and click "Save".

Add another item. Choose "Add a CDEF Function." and choose the '/' item. Click "Save".

Add another item. Choose "Add a Custom Entry." and type the maximum value in the box. Click "Save".

Now if you add a GPRINT graph item and choose this CDEF (and the data source to apply the math to), you should have a nice percentage to work with.

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

Post by raX »

HRULE's and VRULE's are used to put static lines on the graph. For instance, if you add an HRULE and type '10' for the value, it would place a horizontal line on the graph at '10'. A VRULE is the same thing, but is time-based. Here is some more information:

(from Danny Bendersky)
"$time = `date -d "today 00:00" +%s`;
add to your graph "VRULE:$time......"

If you excecute the command you will get something like: 1016164800

But this number represent the 00:00 time for today, so tomorrow will be different."

-Ian
User avatar
TFC
Cacti Pro User
Posts: 739
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Post by TFC »

raX wrote:This would have to be done with a CDEF. You could create a CDEF.

Create a new CDEF and add a new item to it. Check the "Use the current data source being used on the graph instead of a preset one." box and click "Save".

Add another item. Choose "Add a CDEF Function." and choose the '/' item. Click "Save".

Add another item. Choose "Add a Custom Entry." and type the maximum value in the box. Click "Save".

Now if you add a GPRINT graph item and choose this CDEF (and the data source to apply the math to), you should have a nice percentage to work with.

-Ian
Can you describe again for cacti 0.8.3a?
User avatar
TFC
Cacti Pro User
Posts: 739
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Post by TFC »

I can't achieve to dşsplay my GPRINTs like MRTG Style (XX(%XX) :(
Anybody help me by telling step by step?
And Ian, why don't u think to add this style to graph template in next version?
I use cacti 0. 8.3a
Pleaseee...
danbogos
Posts: 4
Joined: Fri May 13, 2005 10:22 am
Location: Zurich/Switzerland
Contact:

Percentage for Router Memory

Post by danbogos »

Hi,

I have recently tried to represent the memory percentage for different routers in one template with a CDEF Function. For this I am using the following function:
cdef=CURRENT_DATA_SOURCE,CURRENT_GRAPH_MAXIMUM_VALUE,/,100,*

I have selected into DATA TEMPLATE that I will put manually the Upper Value for the graph, since not all the routers are having the same amount of memory.

Can u please confirm me that my formula is correct?
Second thing is that I am afraid that, by replacing CURRENT_GRAPH_MAXIMUM_VALUE, Cacti will use the default value given into data template, and not the real Upper Value which I will set by each new graph. Am I right .. if so, who can help me with a new SPECIAL DATA source script which will read for me the Upper Value which I set per each graph, and also info how to import it into cacti...


Thank you in advance for your time!

Dan
danbogos
Posts: 4
Joined: Fri May 13, 2005 10:22 am
Location: Zurich/Switzerland
Contact:

Re: Percentage for Router Memory

Post by danbogos »

Hi again,

I found where I was mistaken. I was considering Uper Value that it is coming from Data Template, but now I see that it was taken from Graph.

My new question, if accepted ;), how can I pick Upper Value from Data Templates in Special Data Sources?

Am I on the right way now?

Thxs,
Dan
User avatar
thewall
Posts: 24
Joined: Thu Mar 03, 2005 9:13 am
Location: Brasil

Graphing % Rx Error

Post by thewall »

Hi All,

I'm trying to graph the % Error Rx in a wireless interface. I'm trying something like this:

Code: Select all

cdef=APG_Errors,/,(,APG_Frames,+,APG_Errors,),100,*
How can I use this CDEF in a expecific graph with two data_sources [total_errors and total_frames].

I have to add a GPRINT - CDEF for each data source on graph_template???

Tks
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests