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
MRTG like % on GPRINT
Moderators: Developers, Moderators
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
(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
Can you describe again for cacti 0.8.3a?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
Percentage for Router Memory
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
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
Re: Percentage for Router Memory
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
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
Graphing % Rx Error
Hi All,
I'm trying to graph the % Error Rx in a wireless interface. I'm trying something like this:
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
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,*
I have to add a GPRINT - CDEF for each data source on graph_template???
Tks
Who is online
Users browsing this forum: No registered users and 1 guest