[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Cheshire Cat Computing • View topic - routers.cgi*LowerLimit

Cheshire Cat Computing

Software support and information
It is currently Sat Nov 08, 2025 9:33 pm

All times are UTC + 12 hours [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: routers.cgi*LowerLimit
PostPosted: Wed Nov 23, 2005 5:38 am 
Offline
User

Joined: Wed Nov 23, 2005 5:27 am
Posts: 7
I am attempting to set the lower-limit for a farhenheit temperature graph. Currently the lower-limit is 0 and I would like it to be 50, I don't expect that room to get colder than 50. Here is my config:



Title[netbotz-temperature]: DRS Temperature
PageTop[netbotz-temperature]: <H1>DRS Temperature</H1>
MaxBytes[netbotz-temperature]: 200
Target[netbotz-temperature]: .1.3.6.1.4.1.5528.100.4.1.1.1.7.1095346743&.1.3.6.1.4.1.5528.100.4.1.1.1.7.1095346743:public@192.168.0.20 * 9 / 5 + 32
SetEnv[netbotz-temperature]: MRTG_INT_DESCR="Temperature"
Options[netbotz-temperature]: gauge, absolute, nopercent
Kilo[netbotz-temperature]: 1000
ShortLegend[netbotz-temperature]:
YLegend[netbotz-temperature]: Temperature
Legend1[netbotz-temperature]: Temperature
Legend2[netbotz-temperature]: Temperature
Legend3[netbotz-temperature]: Temperature
Legend4[netbotz-temperature]: Temperature
LegendI[netbotz-temperature]: &nbsp;Temperature:
LegendO[netbotz-temperature]: &nbsp;Temperature:
routers.cgi*Options[netbotz-temperature]: fixunit, nomax, noo
routers.cgi*Mode[netbotz-temperature]: general
routers.cgi*LowerLimit[netbotz-temperature]: 50



I turned on debugging and got this result:

rrdtool graph /mnt/mrtg/www/graphs/netbotz.cfg-netbotz-temperature-d-l2.png --imgformat PNG --base 1024 --lazy -l 0 --interlaced --units-exponent 0 -F -s end-2000m -u 1 --lower-limit 50 -w 530 -h 200 --x-grid HOUR:1:HOUR:24:HOUR:2:0:%k --title DRS Temperature --vertical-label Temperature DEF:in=/mnt/mrtg/www/rrd/netbotz-temperature.rrd:ds0:AVERAGE DEF:out=/mnt/mrtg/www/rrd/netbotz-temperature.rrd:ds1:AVERAGE DEF:min=/mnt/mrtg/www/rrd/netbotz-temperature.rrd:ds0:MAX DEF:mout=/mnt/mrtg/www/rrd/netbotz-temperature.rrd:ds1:MAX CDEF:pcin=in,100,*,200,/ CDEF:mpcin=min,100,*,200,/ CDEF:pcout=out,100,*,200,/ CDEF:mpcout=mout,100,*,200,/ AREA:in#00cc00:Temperature\l CDEF:down=in,UN,out,UN,+,2,EQ,INF,0,IF AREA:down#d0d0d0 GPRINT:min:MAX:Max Temperature\:%7.2lf \g GPRINT:in:AVERAGE: Avg Temperature\:%7.2lf \g GPRINT:in:LAST: Cur Temperature\:%7.2lf \g COMMENT:\l -->

I can see both a "-l 0" and a "--lower-limit 50" which may or may not be the issue. I'm using rrdtool 1.2.11 and routers.cgi v2.16. Any ideas on what I'm doing wrong?


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Wed Nov 23, 2005 5:55 am 
Offline
User

Joined: Wed Nov 23, 2005 5:27 am
Posts: 7
I saw a post about perhaps needing to set rigid, so I did so. For some reason that makes 1.0 the maximum value on the graph.

routers.cgi*Options[netbotz-temperature]: fixunit, nomax, noo, rigid




Top
 Profile Send private message  
 
 Post subject:
PostPosted: Wed Nov 23, 2005 9:30 am 
Offline
User

Joined: Wed Nov 23, 2005 5:27 am
Posts: 7
Just a little bit of experimentation and this is close to what I want. It it still graphing 40-50 degrees for some reason. I was using this command line, the major difference is in the CDEF:down.

./rrdtool graph /mnt/mrtg/www/test.png --imgformat PNG --base 1024 --lazy -l 0 --interlaced --units-exponent 0 -F -s end-2000m -u 1 --lower-limit 50 -w 530 -h 200 --x-grid HOUR:1:HOUR:24:HOUR:2:0:%k --title "DRS Temperature" --vertical-label Temperature DEF:in=/mnt/mrtg/www/rrd/netbotz-temperature.rrd:ds0:AVERAGE DEF:out=/mnt/mrtg/www/rrd/netbotz-temperature.rrd:ds1:AVERAGE DEF:min=/mnt/mrtg/www/rrd/netbotz-temperature.rrd:ds0:MAX DEF:mout=/mnt/mrtg/www/rrd/netbotz-temperature.rrd:ds1:MAX CDEF:pcin=in,100,*,200,/ CDEF:mpcin=min,100,*,200,/ CDEF:pcout=out,100,*,200,/ CDEF:mpcout=mout,100,*,200,/ AREA:in#00cc00:Temperature\l CDEF:down=in,UN,out,UN,+,2,EQ,INF,50,IF AREA:down#d0d0d0




Top
 Profile Send private message  
 
 Post subject:
PostPosted: Wed Nov 23, 2005 12:36 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
Okay....

First of, the 'rigid' option wont work unless you give an upper-limit to make rigid. Because you have your 'maxbytes' before the 'target' line it is ignored by routers2 (this is an old problem that requires a complete parser rewrite to correct) and so it defaults to 1. When you add rigid, this result happens.
If you put your Target line at the top of the definitions, it should be that 'rigid' will give you a graph from 50 (the lowerlimit) to 200 (the maxbytes). If you define a routers.cgi*UpperLimit[]: as well, then 'rigid' should force the graph to be between these values.

The -l 0 --lower-limit 50 is a bug in routers2 that seems not to affect things (the 50 seems to override the 0 on our system). However I'll correct it. The place to remove it is around line 4806 in the script (look for --lazy -l 0 and remove the -l 0).

Because of the way RRDTool works, you cannot have the lower limit rigid and the upper limit not. Therefore, if you specify a lower limit (which necessitates the graph being rigid, since the background wont work otherwise) then you MUST specify an upperlimit, either implicitly via maxbytes[] or explicitly via routers.cgi*UpperLimit[]

You win a cookie for finding the first bug since release (the -l0 one).

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Thu Nov 24, 2005 3:30 am 
Offline
User

Joined: Wed Nov 23, 2005 5:27 am
Posts: 7
Thanks for the clear explanation Steve. I wasn't aware that MaxBytes needed to come after Target and that I'd also need UpperLimit. Here is my config and resulting graph.

Title[netbotz-temperature]: DRS Temperature
PageTop[netbotz-temperature]: <H1>DRS Temperature</H1>
Target[netbotz-temperature]: .1.3.6.1.4.1.5528.100.4.1.1.1.7.1095346743&.1.3.6.1.4.1.5528.100.4.1.1.1.7.1095346743:public@192.168.0.20 * 9 / 5 + 32
SetEnv[netbotz-temperature]: MRTG_INT_DESCR="Temperature"
Options[netbotz-temperature]: gauge, absolute, nopercent
MaxBytes[netbotz-temperature]: 200
Kilo[netbotz-temperature]: 1000
ShortLegend[netbotz-temperature]:
YLegend[netbotz-temperature]: Temperature
Legend1[netbotz-temperature]: Temperature
Legend2[netbotz-temperature]: Temperature
Legend3[netbotz-temperature]: Temperature
Legend4[netbotz-temperature]: Temperature
LegendI[netbotz-temperature]: &nbsp;Temperature:
LegendO[netbotz-temperature]: &nbsp;Temperature:
routers.cgi*Options[netbotz-temperature]: fixunit, nomax, noo, rigid
routers.cgi*LowerLimit[netbotz-temperature]: 60
routers.cgi*UpperLimit[netbotz-temperature]: 90



We had, er, a bit of a problem with the HVAC system dumping hot air into the room.

Would there be any way (or feature request) to automatically determine the high and low values and create a graph with a bit of a Y-axis buffer? For example the NetBotz itself creates graphs like this:



Thanks again.


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Thu Nov 24, 2005 11:48 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
The script already pulls out the Max value, but a min value would be a bit harder since the standard RRD format does not save this.

Also, I'm currently using the automatic code in the RRD library to set the Y-axis. To do what you are suggesting would mean I'd have to bypass all of this and do the calculations myself - not necessarily too bad (the rescale button does something similar) but it would make life a bit more awkward and of course slow things down.

The new graph looks good - but isn't 80F approx 26C? Your operations staff will be going to work in beachwear if you don't sort out your AC unit :). Not a bad thing necessarily, but I wouldn't want *ours* to do it :shock:

Incidentally, the latest version added a new option for Americans - c2f. This will allow you to store the temperatures in your RRD in centigrade, but display them in farenheit. Just have 'routers.cgi*Options[xxx]: c2f' and this calculation is performed on display - so you can actually have the same data displayed on two different graphs, one as degC and one as degF.

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Tue Nov 29, 2005 9:28 am 
Offline
User

Joined: Wed Nov 23, 2005 5:27 am
Posts: 7
Back from the yank Thanksgiving holiday.

Ah, now that you point it out I do recall seeing a max value when doing an 'rrdtool dump' but no min value. I see where that would get tricky and slow things down.

Yep, 80F that would be about 26C. The room is our disaster recovery site at a remote campus which is rarely accessed, so nobody knew it was cooking our gear. We have nagios set to alarm if reaches and maintains 80F, but the temp was all over the place and merely spiked at 80F. :roll:

Thanks for the tip on c2f.


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 12 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group