|
|
| Author |
Message |
churchi
Joined: 26 Oct 2004 Posts: 39
|
Posted: Wed Apr 04, 2007 11:28 pm Post subject: Changing the scale of the Y Axis and division of the Y axis |
|
|
Hi all,
Well we have been setting up some graphing for our temperature sensors.
They are an Enviromux Device (nti).
However i have run into a few problems with the graph i have created. As you can see by the attachment i can get the probe to graph, however i have a few questions.
1. i would like to know if cacti can divide the number received on the poll by 10 so that we can get a proper temperature reading. Currently the MIB that gets probed and sends a 3 digit number back, and that is what cacti is graphing.
EG: cacti will poll and receive 271 which in turn should be 27.1c so I was wondering if anyone knows if its possible to divide the total polled number by 10 then graph it?
2. i would like to know if on the Y Axis if i could get a few more values. at the moment you can see there is only 0, 100 and 200. that really doesn't give a good indication where the line is closest to, so is there a way to always show say 6 values at all times? we have the auto scale option currently turned on.
look forward to a few answers.
thank you
| Description: |
|
| Filesize: |
22.93 KB |
| Viewed: |
1482 Time(s) |

|
|
|
| Back to top |
|
 |
gandalf Developer
Joined: 02 Dec 2004 Posts: 12642 Location: Muenster, Germany
|
Posted: Thu Apr 05, 2007 4:08 am Post subject: Re: Changing the scale of the Y Axis and division of the Y a |
|
|
| churchi wrote: | 1. i would like to know if cacti can divide the number received on the poll by 10 so that we can get a proper temperature reading. Currently the MIB that gets probed and sends a 3 digit number back, and that is what cacti is graphing.
EG: cacti will poll and receive 271 which in turn should be 27.1c so I was wondering if anyone knows if its possible to divide the total polled number by 10 then graph it? | NP. Create a new CDEF. Make it look like "cdef=CURRENT_DATA_SOURCE,10,/" and apply it the all Graph Items of your graph template. That's all
| Quote: | | 2. i would like to know if on the Y Axis if i could get a few more values. at the moment you can see there is only 0, 100 and 200. that really doesn't give a good indication where the line is closest to, so is there a way to always show say 6 values at all times? we have the auto scale option currently turned on. | From "man rrdgraph"
look forward to a few answers.
thank you[/quote] | Code: | [-y|--y-grid none]
Y-axis grid lines appear at each grid step interval. Labels are placed every label factor lines. You can specify "-y none" to suppress
the grid and labels altogether. The default for this option is to automatically select sensible values.
[-Y|--alt-y-grid]
Place the Y grid dynamically based on the graph's Y range. The algorithm ensures that you always have a grid, that there are enough but not
too many grid lines, and that the grid is metric. That is the grid lines are placed every 1, 2, 5 or 10 units. This parameter will also
ensure that you get enough decimals displayed even if your graph goes from 69.998 to 70.001. (contributed by Sasha Mikheev). | There are special setting for each Graph Template. Personally, I was never able to define a Y-grid that would fit better in all situations. Be aware to spend some time ...
Reinhard
|
|
| Back to top |
|
 |
churchi
Joined: 26 Oct 2004 Posts: 39
|
Posted: Thu Apr 05, 2007 5:33 am Post subject: |
|
|
Hi gandalf
thank you very much for your help. i have managed to get the division working nearly perfectly
i have it dividing by 10 now which is great, however one more thing i would like to do with this is to show it to one decimal point on the graph.
is this possible? or does cacti always display a whole integer on the Y and X axis?
please refer to the attached picture.
i have also got the same temp sensor graphing on MRTG (i am moving away from it) and i can see it in decimal point on the graph, so i was wondering if cacti could do the same. (please refer to the attachment as well).
Lastly, (forgive me if i don't know much about the customization) i am not sure where to make the changes for the Y axis tips you had listed above? is it on the graph templates itself or in the code some where? the reason i would like more on the Y axis is because its only Temperature i am graphing for this graph so the values do not change that much. (to get around the problem at the moment i have increased the size of the Y axis to 160 pixels) and i have set the minimal value to show to 13.
Again thank you very much for your help.
| Description: |
|
| Filesize: |
39.47 KB |
| Viewed: |
1471 Time(s) |

|
| Description: |
|
| Filesize: |
30.43 KB |
| Viewed: |
1471 Time(s) |

|
|
|
| Back to top |
|
 |
gandalf Developer
Joined: 02 Dec 2004 Posts: 12642 Location: Muenster, Germany
|
Posted: Thu Apr 05, 2007 7:52 am Post subject: |
|
|
| churchi wrote: | Hi gandalf
thank you very much for your help. i have managed to get the division working nearly perfectly  | Fine and congratulations, that you've managed it that fast!
| Quote: | i have it dividing by 10 now which is great, however one more thing i would like to do with this is to show it to one decimal point on the graph.
is this possible? or does cacti always display a whole integer on the Y and X axis?
please refer to the attached picture. | I simply don't know.
| Quote: | | i have also got the same temp sensor graphing on MRTG (i am moving away from it) and i can see it in decimal point on the graph, so i was wondering if cacti could do the same. (please refer to the attachment as well). | This should be possible with cacti, then. Because both MRTG and cacti use rrdtool. Please serach "man rrdgraph" again.
| Quote: |
Lastly, (forgive me if i don't know much about the customization) i am not sure where to make the changes for the Y axis tips you had listed above? is it on the graph templates itself or in the code some where? the reason i would like more on the Y axis is because its only Temperature i am graphing for this graph so the values do not change that much. (to get around the problem at the moment i have increased the size of the Y axis to 160 pixels) and i have set the minimal value to show to 13. | You should change the Graph Template beloging to your Graph
Reinhard
|
|
| Back to top |
|
 |
churchi
Joined: 26 Oct 2004 Posts: 39
|
Posted: Tue Apr 10, 2007 12:13 am Post subject: |
|
|
Hi Gandalf
thank you again for your help.
i managed to get the decimal points on the graph and it works really well.
| Quote: |
You should change the Graph Template beloging to your Graph
|
unfortunately i have looked and i still can't find this part on the graph that you are referring to that i may be able to change. is it anything on this page that i have attached to this post?
thank you
| Description: |
|
| Filesize: |
77.36 KB |
| Viewed: |
1420 Time(s) |

|
|
|
| Back to top |
|
 |
gandalf Developer
Joined: 02 Dec 2004 Posts: 12642 Location: Muenster, Germany
|
Posted: Tue Apr 10, 2007 2:27 am Post subject: |
|
|
Please change "Unit Value". From code: | Code: | "unit_value" => array(
"friendly_name" => "Unit Grid Value",
"method" => "textbox",
"max_length" => "50",
"default" => "",
"description" => "(--unit/--y-grid) Sets the xponent value on the Y-axis for numbers. Note: This option was
added in rrdtool 1.0.36 and depricated in 1.2.x. In RRDtool 1.2.x, this value is replaced by the --y-grid option.
In this option, Y-axis grid lines appear at each grid step interval. Labels are placed every label factor lines."
| Unfortunately, the description is not printed to the screen
Reinhard
|
|
| Back to top |
|
 |
churchi
Joined: 26 Oct 2004 Posts: 39
|
Posted: Wed Apr 11, 2007 5:06 am Post subject: |
|
|
hey gandalf,
np at all. thank you very much for your help on this topic.
|
|
| Back to top |
|
 |
DervMan
Joined: 29 Apr 2008 Posts: 4
|
Posted: Thu Nov 20, 2008 4:04 am Post subject: |
|
|
Hey churchi,
You still around? Any chance you can post what you did to fix this?
I've managed to get the divide working but can't change the graph Y axis from display 200m to 0.200.
Thanks
|
|
| Back to top |
|
 |
|