[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 - Graphs off?
Cheshire Cat Computing
http://www.steveshipway.org/forum/

Graphs off?
http://www.steveshipway.org/forum/viewtopic.php?f=2&t=346
Page 1 of 1

Author:  jwixted [ Thu Aug 19, 2004 8:04 am ]
Post subject:  Graphs off?

Okay, I'm an idiot! I've got MRTG and Routers.cgi running on a Windows 2003 server. I've decided to monitor the CPUs and disk on a Windows 2000 server using SNMP Informant (standard). Data is being collected, but the graphs are wrong. In the case of the CPU, I'm seeing the scale be from 1 to 800, rather than 1 - 100, and on the Disk, I'm getting the scale right (Gb), but the free space shows up as 1.58 kb, rather than 1.58Gb.

The configs:
# CPU
Title[osv-sql.cpu]:osv-sql % Processor Time (Total)
RouterUptime[osv-sql.cpu]: public@xx.xx.xx.xx
Pagetop[osv-sql.cpu]: <H1>osv-sql % Processor Time (Total)</H1>
MaxBytes[osv-sql.cpu]: 100
Unscaled[osv-sql.cpu]: dwmy
# Options[osv-sql.cpu]: gauge, nopercent,growright, integer, noo
Options[osv-sql.cpu]: gauge,growright
WithPeak[osv-sql.cpu]: wmy
Target[osv-sql.cpu]: .1.3.6.1.4.1.9600.1.1.5.1.5.6.95.84.111.116.97.108&.1.3.6.1.4.1.9600.1.1.5.1.5.6.95.84.111.116.97.108:public@xx.xx.xx.xx
YLegend[osv-sql.cpu]: % Utilization
ShortLegend[osv-sql.cpu]:%
LegendI[osv-sql.cpu]: &nbsp;5 Min:
routers.cgi*Mode[osv-sql.cpu]: generic


Title[OSV-SQL.ldisk.freec]:OSV-SQL Free Megabytes (C:)
RouterUptime[OSV-SQL.ldisk.freec]: public@xx.xx.xx.xx
Pagetop[OSV-SQL.ldisk.freec]: <H1>OSV-SQL Free Megabytes (C:)</H1>
Target[OSV-SQL.ldisk.freec]: 1.3.6.1.4.1.9600.1.1.1.1.20.2.67.58&1.3.6.1.4.1.9600.1.1.1.1.20.2.67.58:public@xx.xx.xx.xx
MaxBytes[OSV-SQL.ldisk.freec]: 7810000000
unscaled[OSV-SQL.ldisk.freec]: dwmy
Options[OSV-SQL.ldisk.freec]: gauge, growright
WithPeak[OSV-SQL.ldisk.freec]: wmy
YLegend[OSV-SQL.ldisk.freec]: bytes
ShortLegend[OSV-SQL.ldisk.freec]: b
Legend1[OSV-SQL.ldisk.freec]: C Disk space free
Legend2[OSV-SQL.ldisk.freec]:
Legend3[OSV-SQL.ldisk.freec]: C Peak space free
LegendO[OSV-SQL.ldisk.freec]:
routers.cgi*Options[OSV-SQL.ldisk.freec]: nototal
routers.cgi*Icon[OSV-SQL.ldisk.freec]: disk-sm.gif

Anyone point me in the right direction?

Author:  stevesh [ Thu Aug 19, 2004 12:44 pm ]
Post subject: 

(This is mentioned in the PROBLEMS documentation).

This problem is because routers2.cgi is incorrectly guessing that your target is a network interface. Usually it gets it right, but sometimes...

As a result, it is defaulting to 'bits' mode rather than 'bytes', and therefore multiplies by 8.

To stop this, you need to either tell it to use 'generic' mode, or force it to 'bytes' option. The best is to fix the Mode.

routers.cgi*Mode[_]: generic

This will stop it from trying to guess the nature of the target and set special options for it. In generic mode, it just does what you tell it!

Steve

Author:  jwixted [ Fri Aug 20, 2004 1:15 pm ]
Post subject: 

Thanks for the reply, Steve!

I looked thru the docs, and found a reference to values multiplied by 8, which appears to be the problem with the CPU. I already had the routers.cgi*Mode[osv-sql.cpu]: generic

line on that one. I added that same line to the free disk space target, but it made no difference...

Author:  stevesh [ Fri Aug 20, 2004 4:53 pm ]
Post subject: 

I should have looked closer. There's another problem --

You MUST have the Target[] line as the first line of the target definition. You seem to have the Title[] first, and the Target[] somewhere in the middle.

This is documented in the PROBLEMS file, but its not obvious at first that this is the cause. I suspect this is what is happening.

I wish I could fix this, but unfortunately I'd have to rewrite the whole parsing routines -- they would also lose their optimisation, as well, slowing things down yet more.

Steve

Author:  jwixted [ Sat Aug 21, 2004 1:57 am ]
Post subject: 

Thanks, that did fix the CPU graphs, but not the free disk space problem. The gauge on the right shows correctly in Gb, but the returned value for free space is showing as Kb, rather than Gb. The digits are right - 1.58 - but the value is wrong, and, since it's showing as Kb, doesn't show on the graph...

Author:  stevesh [ Sat Aug 21, 2004 11:52 am ]
Post subject: 

I suspect that OID returns a value in Kb, rather than a value in bytes.

If this is the case, you need

Factor[targetname]: 1024

to multiply it up so that it is in fact returning a count of bytes, not a count of Kb. You will need to divide your MaxBytes by 1024, as well, since this represents the maximum number being returned by the Target line (and if it is returning K then it will be less).

Finally, you can set the option

routers.cgi*UnScaled[targetname]: none

to make the graph autoscale (routers.cgi fixes graphs to show the max line by default, unless you have the nomax option set).

Steve

Author:  jwixted [ Sun Aug 22, 2004 4:42 am ]
Post subject: 

Okay, I'm still not getting it...

My config:

Target[OSV-SQL.ldisk.freec]: 1.3.6.1.4.1.9600.1.1.1.1.20.2.67.58&1.3.6.1.4.1.9600.1.1.1.1.20.2.67.58:public@xx.xx.xx.xx
Title[OSV-SQL.ldisk.freec]:OSV-SQL Free Megabytes (C:)
RouterUptime[OSV-SQL.ldisk.freec]: public@xx.xx.xx.xx
Pagetop[OSV-SQL.ldisk.freec]: <H1>OSV-SQL Free Megabytes (C:)</H1>
MaxBytes[OSV-SQL.ldisk.freec]: 7810000
Options[OSV-SQL.ldisk.freec]: gauge, growright,noo
Factor[OSV-SQL.ldisk.freec]: 1024
kMG[OSV-SQL.ldisk.freec]: M,G,T,P
kilo[OSV-SQL.ldisk.freec]: 1024
WithPeak[OSV-SQL.ldisk.freec]: wmy
YLegend[OSV-SQL.ldisk.freec]: bytes
ShortLegend[OSV-SQL.ldisk.freec]: b
Legend1[OSV-SQL.ldisk.freec]: C Disk space free
Legend2[OSV-SQL.ldisk.freec]:
Legend3[OSV-SQL.ldisk.freec]: C Peak space free
LegendO[OSV-SQL.ldisk.freec]:
routers.cgi*Options[OSV-SQL.ldisk.freec]: nototal
routers.cgi*Icon[OSV-SQL.ldisk.freec]: disk-sm.gif
routers.cgi*Mode[OSV-SQL.ldisk.freec]: generic
routers.cgi*UnScaled[OSV-SQL.ldisk.freec]: none

When I snmpwalk the oid, I get 1622, which, according to the description in GetIF is freespace in Megabytes. The above gives me the correct disk maximum, and the correct value for freespace, it's the scale of the freespace that's off, reporting as Mb, rather than Gb.

Sorry to be dense!

Author:  stevesh [ Sun Aug 22, 2004 10:56 am ]
Post subject: 

Aha -- the OID is returning megabytes?

In this case, use
Factor[targetname]: 1024000
to convert it to bytes, and get rid of kMG[].

The kMG[] directive is not supported by routers2.cgi, because the perl library interface does not have a parameter for it. Therefore, you need to use Factor[] instead to bring the number to the 'normal' prefix set. This is in the PROBLEMS and MRTG_INFO files...

Note that you will, of course, then have to give MaxBytes in Mb, since this is the value being returned by the OID.

Hope this helps! The general rule is, put Target first, set the returned MaxBytes, then use Factor to make the number into the correct unit. Ignore kMG. Thanks,

Steve

Author:  jwixted [ Mon Aug 23, 2004 1:54 am ]
Post subject: 

Thanks, Steve!

For future novice's, here's what I ended up with:


Target[OSV-SQL.ldisk.freec]: 1.3.6.1.4.1.9600.1.1.1.1.20.2.67.58&1.3.6.1.4.1.9600.1.1.1.1.20.2.67.58:public@xx.xx.xx.xx
MaxBytes[OSV-SQL.ldisk.freec]: 7810
Factor[OSV-SQL.ldisk.freec]: 1024000
Title[OSV-SQL.ldisk.freec]:OSV-SQL Free Megabytes (C:)
RouterUptime[OSV-SQL.ldisk.freec]: public@xx.xx.xx.xx
Pagetop[OSV-SQL.ldisk.freec]: <H1>OSV-SQL Free Megabytes (C:)</H1>
unscaled[OSV-SQL.ldisk.freec]: dwmy
Options[OSV-SQL.ldisk.freec]: gauge, growright,noo
kilo[OSV-SQL.ldisk.freec]: 1024
WithPeak[OSV-SQL.ldisk.freec]: wmy
YLegend[OSV-SQL.ldisk.freec]: bytes
ShortLegend[OSV-SQL.ldisk.freec]: b
Legend1[OSV-SQL.ldisk.freec]: C Disk space free
Legend2[OSV-SQL.ldisk.freec]:
Legend3[OSV-SQL.ldisk.freec]: C Peak space free
LegendO[OSV-SQL.ldisk.freec]:
routers.cgi*Options[OSV-SQL.ldisk.freec]: nototal
routers.cgi*Icon[OSV-SQL.ldisk.freec]: disk-sm.gif
routers.cgi*Mode[OSV-SQL.ldisk.freec]: generic

Page 1 of 1 All times are UTC + 12 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/