Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Changing the scale of the Y Axis and division of the Y axis

 
Post new topic   Reply to topic    Cacti Forum Index -> Help: General
Author Message
churchi



Joined: 26 Oct 2004
Posts: 39

PostPosted: Wed Apr 04, 2007 11:28 pm    Post subject: Changing the scale of the Y Axis and division of the Y axis Reply with quote

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



temperature_pic_01.JPG
 Description:
 Filesize:  22.93 KB
 Viewed:  1482 Time(s)

temperature_pic_01.JPG


Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12642
Location: Muenster, Germany

PostPosted: Thu Apr 05, 2007 4:08 am    Post subject: Re: Changing the scale of the Y Axis and division of the Y a Reply with quote

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

PostPosted: Thu Apr 05, 2007 5:33 am    Post subject: Reply with quote

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.



temperature_pic_03.JPG
 Description:
MRTG Graph
 Filesize:  39.47 KB
 Viewed:  1471 Time(s)

temperature_pic_03.JPG



temperature_pic_02.JPG
 Description:
New Cacti Graph
 Filesize:  30.43 KB
 Viewed:  1471 Time(s)

temperature_pic_02.JPG


Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12642
Location: Muenster, Germany

PostPosted: Thu Apr 05, 2007 7:52 am    Post subject: Reply with quote

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

PostPosted: Tue Apr 10, 2007 12:13 am    Post subject: Reply with quote

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



pic-03.JPG
 Description:
 Filesize:  77.36 KB
 Viewed:  1420 Time(s)

pic-03.JPG


Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12642
Location: Muenster, Germany

PostPosted: Tue Apr 10, 2007 2:27 am    Post subject: Reply with quote

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

PostPosted: Wed Apr 11, 2007 5:06 am    Post subject: Reply with quote

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

PostPosted: Thu Nov 20, 2008 4:04 am    Post subject: Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Help: General All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group