You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(34) |
Feb
(22) |
Mar
(2) |
Apr
(4) |
May
|
Jun
(2) |
Jul
(2) |
Aug
|
Sep
(2) |
Oct
(4) |
Nov
(2) |
Dec
(22) |
2009 |
Jan
(20) |
Feb
(7) |
Mar
(5) |
Apr
(7) |
May
(10) |
Jun
|
Jul
(2) |
Aug
|
Sep
(21) |
Oct
(6) |
Nov
(10) |
Dec
(6) |
2010 |
Jan
(1) |
Feb
(4) |
Mar
(14) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(1) |
Nov
(5) |
Dec
(3) |
2011 |
Jan
(35) |
Feb
(1) |
Mar
(12) |
Apr
(9) |
May
(2) |
Jun
|
Jul
(2) |
Aug
(3) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
2012 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(3) |
2013 |
Jan
(3) |
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2016 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <buc...@us...> - 2009-12-29 08:08:56
|
Revision: 168 http://devmon.svn.sourceforge.net/devmon/?rev=168&view=rev Author: buchanmilne Date: 2009-12-29 08:08:41 +0000 (Tue, 29 Dec 2009) Log Message: ----------- Add initial template for AIX 5 Added Paths: ----------- trunk/templates/ibm-aix5/ trunk/templates/ibm-aix5/disk/ trunk/templates/ibm-aix5/disk/exceptions trunk/templates/ibm-aix5/disk/message trunk/templates/ibm-aix5/disk/oids trunk/templates/ibm-aix5/disk/thresholds trunk/templates/ibm-aix5/disk/transforms trunk/templates/ibm-aix5/if_load/ trunk/templates/ibm-aix5/if_load/exceptions trunk/templates/ibm-aix5/if_load/message trunk/templates/ibm-aix5/if_load/oids trunk/templates/ibm-aix5/if_load/thresholds trunk/templates/ibm-aix5/if_load/transforms trunk/templates/ibm-aix5/if_stat/ trunk/templates/ibm-aix5/if_stat/exceptions trunk/templates/ibm-aix5/if_stat/message trunk/templates/ibm-aix5/if_stat/oids trunk/templates/ibm-aix5/if_stat/thresholds trunk/templates/ibm-aix5/if_stat/transforms trunk/templates/ibm-aix5/memory/ trunk/templates/ibm-aix5/memory/exceptions trunk/templates/ibm-aix5/memory/message trunk/templates/ibm-aix5/memory/oids trunk/templates/ibm-aix5/memory/thresholds trunk/templates/ibm-aix5/memory/transforms trunk/templates/ibm-aix5/specs Added: trunk/templates/ibm-aix5/disk/exceptions =================================================================== --- trunk/templates/ibm-aix5/disk/exceptions (rev 0) +++ trunk/templates/ibm-aix5/disk/exceptions 2009-12-29 08:08:41 UTC (rev 168) @@ -0,0 +1,2 @@ +DiskName : alarm : .* +DiskName : ignore : Real.Memory.*|Swap Space|System RAM Added: trunk/templates/ibm-aix5/disk/message =================================================================== --- trunk/templates/ibm-aix5/disk/message (rev 0) +++ trunk/templates/ibm-aix5/disk/message 2009-12-29 08:08:41 UTC (rev 168) @@ -0,0 +1,3 @@ +TABLE:plain,noalarmsmsg +Filesystem 1024-blocks Used Available Capacity Mounted on +{DiskName} {DiskSize} {DiskSizeUsed} {DiskAvail} {DiskPerUse}% {DiskName} {DiskPerUse.color} Added: trunk/templates/ibm-aix5/disk/oids =================================================================== --- trunk/templates/ibm-aix5/disk/oids (rev 0) +++ trunk/templates/ibm-aix5/disk/oids 2009-12-29 08:08:41 UTC (rev 168) @@ -0,0 +1,4 @@ +DiskName : .1.3.6.1.2.1.25.2.3.1.3 : branch +DiskBlocks : .1.3.6.1.2.1.25.2.3.1.5 : branch +DiskBlocksUsed : .1.3.6.1.2.1.25.2.3.1.6 : branch +DiskBlockSize : .1.3.6.1.2.1.25.2.3.1.4 : branch Added: trunk/templates/ibm-aix5/disk/thresholds =================================================================== --- trunk/templates/ibm-aix5/disk/thresholds (rev 0) +++ trunk/templates/ibm-aix5/disk/thresholds 2009-12-29 08:08:41 UTC (rev 168) @@ -0,0 +1,2 @@ +DiskPerUse : yellow : 90 : Disk utilization is high +DiskPerUse : red : 95 : Disk utilization is critical Added: trunk/templates/ibm-aix5/disk/transforms =================================================================== --- trunk/templates/ibm-aix5/disk/transforms (rev 0) +++ trunk/templates/ibm-aix5/disk/transforms 2009-12-29 08:08:41 UTC (rev 168) @@ -0,0 +1,4 @@ +DiskSize : MATH : {DiskBlocks} x {DiskBlockSize} / 1024 : 0 +DiskSizeUsed : MATH : {DiskBlocksUsed} x {DiskBlockSize} / 1024 : 0 +DiskAvail : MATH : {DiskSize} - {DiskSizeUsed} : 0 +DiskPerUse : MATH : ({DiskSizeUsed} x 100) / {DiskSize} : 0 Added: trunk/templates/ibm-aix5/if_load/message =================================================================== --- trunk/templates/ibm-aix5/if_load/message (rev 0) +++ trunk/templates/ibm-aix5/if_load/message 2009-12-29 08:08:41 UTC (rev 168) @@ -0,0 +1,7 @@ + +<b>Interface error rates:</b> +Input load: yellow={ifInLoad.thresh:yellow}%, red={ifInLoad.thresh:red}% +Output load: yellow={ifOutLoad.thresh:yellow}%, red={ifOutLoad.thresh:red}% +TABLE:rrd(DS:ds0:ifInOctets:DERIVE; DS:ds1:ifOutOctets:DERIVE) +Ifc name|Ifc Speed|Rate in (load %)|Rate out (load %) +{ifNameFixed}|{ifSpeed}|{ifInLoad.color}{ifInSpeed} ({ifInLoad}%){ifInLoad.errors}|{ifOutLoad.color}{ifOutSpeed} ({ifOutLoad}%){ifOutLoad.errors} Added: trunk/templates/ibm-aix5/if_load/oids =================================================================== --- trunk/templates/ibm-aix5/if_load/oids (rev 0) +++ trunk/templates/ibm-aix5/if_load/oids 2009-12-29 08:08:41 UTC (rev 168) @@ -0,0 +1,4 @@ +ifName : .1.3.6.1.2.1.2.2.1.2 : branch +ifBps : .1.3.6.1.2.1.2.2.1.5 : branch +ifInOctets : .1.3.6.1.2.1.2.2.1.10 : branch +ifOutOctets : .1.3.6.1.2.1.2.2.1.16 : branch Added: trunk/templates/ibm-aix5/if_load/thresholds =================================================================== --- trunk/templates/ibm-aix5/if_load/thresholds (rev 0) +++ trunk/templates/ibm-aix5/if_load/thresholds 2009-12-29 08:08:41 UTC (rev 168) @@ -0,0 +1,4 @@ +ifInLoad : yellow : 75 : {ifName} load is high +ifInLoad : red : 95 : {ifName} load is very high +ifOutLoad : yellow : 75 : {ifName} load is high +ifOutLoad : red : 95 : {ifName} load is very high Added: trunk/templates/ibm-aix5/if_load/transforms =================================================================== --- trunk/templates/ibm-aix5/if_load/transforms (rev 0) +++ trunk/templates/ibm-aix5/if_load/transforms 2009-12-29 08:08:41 UTC (rev 168) @@ -0,0 +1,17 @@ +# Create a human-readable ifc speed +ifSpeed : SPEED : {ifBps} +# Get bit speed delta (so we dont have to provide custom delta limit) +ifInOps : DELTA : {ifInOctets} +ifOutOps : DELTA : {ifOutOctets} +# Convert our octets delta into bits per second +ifInBps : MATH : {ifInOps} x 8 +ifOutBps : MATH : {ifOutOps} x 8 +# Make some easily readable speed variables +ifInSpeed : SPEED : {ifInBps} +ifOutSpeed : SPEED : {ifOutBps} +# Now determine our percentage load, based on traffic and ifc speed +ifInLoad : MATH : ({ifInBps} / {ifBps}) x 100 +ifOutLoad : MATH : ({ifOutBps} / {ifBps}) x 100 +# Create an alias in a bracketed box, or nothing if alias is blank +#ifAliasBox : REGSUB : {ifAlias} /(\S+.*)/ [$1]/ +ifNameFixed : REGSUB : {ifName} / *(.*);.*/$1/ Added: trunk/templates/ibm-aix5/if_stat/exceptions =================================================================== --- trunk/templates/ibm-aix5/if_stat/exceptions (rev 0) +++ trunk/templates/ibm-aix5/if_stat/exceptions 2009-12-29 08:08:41 UTC (rev 168) @@ -0,0 +1 @@ +ifName : ignore : Nu.+|Vl.+ Added: trunk/templates/ibm-aix5/if_stat/message =================================================================== --- trunk/templates/ibm-aix5/if_stat/message (rev 0) +++ trunk/templates/ibm-aix5/if_stat/message 2009-12-29 08:08:41 UTC (rev 168) @@ -0,0 +1,3 @@ +TABLE: +Ifc name|Ifc speed|Ifc status +{ifNameFixed}|{ifSpeed}|{ifStat.color}{ifStat}{ifStat.errors} Added: trunk/templates/ibm-aix5/if_stat/oids =================================================================== --- trunk/templates/ibm-aix5/if_stat/oids (rev 0) +++ trunk/templates/ibm-aix5/if_stat/oids 2009-12-29 08:08:41 UTC (rev 168) @@ -0,0 +1,4 @@ +ifName : .1.3.6.1.2.1.2.2.1.2 : branch +ifBps : .1.3.6.1.2.1.2.2.1.5 : branch +ifAdminStatNum : .1.3.6.1.2.1.2.2.1.7 : branch +ifOperStatNum : .1.3.6.1.2.1.2.2.1.8 : branch Added: trunk/templates/ibm-aix5/if_stat/thresholds =================================================================== --- trunk/templates/ibm-aix5/if_stat/thresholds (rev 0) +++ trunk/templates/ibm-aix5/if_stat/thresholds 2009-12-29 08:08:41 UTC (rev 168) @@ -0,0 +1,6 @@ +ifAdminStatTxt : green : admin down : Interface {ifName} is {ifAdminStatTxt} +ifAdminStatTxt : yellow : testing : Interface {ifName} is {ifAdminStatTxt} +ifAdminStatTxt : red : up : Interface {ifName} is {ifAdminStatTxt} +ifOperStatTxt : green : up : Interface {ifName} is {ifOperStatTxt} +ifOperStatTxt : yellow : dormant|testing|yellow|not present|layer down : Interface {ifName} is {ifOperStatTxt} +ifOperStatTxt : red : down : Interface {ifName} is {ifOperStatTxt} Added: trunk/templates/ibm-aix5/if_stat/transforms =================================================================== --- trunk/templates/ibm-aix5/if_stat/transforms (rev 0) +++ trunk/templates/ibm-aix5/if_stat/transforms 2009-12-29 08:08:41 UTC (rev 168) @@ -0,0 +1,5 @@ +ifAdminStatTxt : SWITCH : {ifAdminStatNum} 1=up,2=admin down,3=testing +ifOperStatTxt : SWITCH : {ifOperStatNum} 1=up,2=down,3=testing,4=unknown,5=dormant,6=not present,7=lower layer down +ifStat : BEST : {ifAdminStatTxt},{ifOperStatTxt} +ifSpeed : SPEED : {ifBps} +ifNameFixed : REGSUB : {ifName} /(<|>| |,)// Added: trunk/templates/ibm-aix5/memory/message =================================================================== --- trunk/templates/ibm-aix5/memory/message (rev 0) +++ trunk/templates/ibm-aix5/memory/message 2009-12-29 08:08:41 UTC (rev 168) @@ -0,0 +1,4 @@ +Memory Used Total Percentage +Physical {MemSizeUsed}kB {MemSize}kB {MemPerUse}% {MemPerUse.color} +Swap {SwapSizeUsed}kB {SwapSize}kB {SwapPerUse}% {SwapPerUse.color} + Added: trunk/templates/ibm-aix5/memory/oids =================================================================== --- trunk/templates/ibm-aix5/memory/oids (rev 0) +++ trunk/templates/ibm-aix5/memory/oids 2009-12-29 08:08:41 UTC (rev 168) @@ -0,0 +1,6 @@ +MemBlocks : .1.3.6.1.2.1.25.2.3.1.5.2 : leaf +MemBlocksUsed : .1.3.6.1.2.1.25.2.3.1.6.2 : leaf +MemBlockSize : .1.3.6.1.2.1.25.2.3.1.4.2 : leaf +SwapBlocks : .1.3.6.1.2.1.25.2.3.1.5.3 : leaf +SwapBlocksUsed : .1.3.6.1.2.1.25.2.3.1.6.3 : leaf +SwapBlockSize : .1.3.6.1.2.1.25.2.3.1.4.3 : leaf Added: trunk/templates/ibm-aix5/memory/thresholds =================================================================== --- trunk/templates/ibm-aix5/memory/thresholds (rev 0) +++ trunk/templates/ibm-aix5/memory/thresholds 2009-12-29 08:08:41 UTC (rev 168) @@ -0,0 +1,6 @@ +MemPerUse : red : >99 : Memory utilization is critical +MemPerUse : yellow : >95 : Memory utilization is high + +SwapPerUse : red : >80 : Swap utilization is critical +SwapPerUse : yellow : >50 : Swap utilization is high + Added: trunk/templates/ibm-aix5/memory/transforms =================================================================== --- trunk/templates/ibm-aix5/memory/transforms (rev 0) +++ trunk/templates/ibm-aix5/memory/transforms 2009-12-29 08:08:41 UTC (rev 168) @@ -0,0 +1,11 @@ +MemSize : MATH : {MemBlocks} x {MemBlockSize} / 1024 : 0 +MemSizeUsed : MATH : {MemBlocksUsed} x {MemBlockSize} / 1024 : 0 +MemAvail : MATH : {MemSize} - {MemSizeUsed} : 0 +MemPerUse : MATH : ({MemSizeUsed} x 100) / {MemSize} : 0 + +SwapSize : MATH : {SwapBlocks} x {SwapBlockSize} / 1024 : 0 +SwapSizeUsed : MATH : {SwapBlocksUsed} x {SwapBlockSize} / 1024 : 0 +SwapAvail : MATH : {SwapSize} - {SwapSizeUsed} : 0 +SwapPerUse : MATH : ({SwapSizeUsed} x 100) / {SwapSize} : 0 + + Added: trunk/templates/ibm-aix5/specs =================================================================== --- trunk/templates/ibm-aix5/specs (rev 0) +++ trunk/templates/ibm-aix5/specs 2009-12-29 08:08:41 UTC (rev 168) @@ -0,0 +1,6 @@ +vendor : ibm +model : aix5 +snmpver : 1 +sysdesc : AIX version: 05. +#SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.2.3.1.2.1.1.3 +# .1.3.6.1.2.1.1.2.0 = OID: .1.3.6.1.4.1.2.3.1.2.1.1.3 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <buc...@us...> - 2009-12-29 08:03:34
|
Revision: 167 http://devmon.svn.sourceforge.net/devmon/?rev=167&view=rev Author: buchanmilne Date: 2009-12-29 08:03:25 +0000 (Tue, 29 Dec 2009) Log Message: ----------- Add initial template for Solaris 10 Added Paths: ----------- trunk/templates/sun-sunos10/ trunk/templates/sun-sunos10/disk/ trunk/templates/sun-sunos10/disk/exceptions trunk/templates/sun-sunos10/disk/message trunk/templates/sun-sunos10/disk/oids trunk/templates/sun-sunos10/disk/thresholds trunk/templates/sun-sunos10/disk/transforms trunk/templates/sun-sunos10/if_load/ trunk/templates/sun-sunos10/if_load/exceptions trunk/templates/sun-sunos10/if_load/message trunk/templates/sun-sunos10/if_load/oids trunk/templates/sun-sunos10/if_load/thresholds trunk/templates/sun-sunos10/if_load/transforms trunk/templates/sun-sunos10/memory/ trunk/templates/sun-sunos10/memory/exceptions trunk/templates/sun-sunos10/memory/message trunk/templates/sun-sunos10/memory/oids trunk/templates/sun-sunos10/memory/thresholds trunk/templates/sun-sunos10/memory/transforms trunk/templates/sun-sunos10/processes/ trunk/templates/sun-sunos10/processes/exceptions trunk/templates/sun-sunos10/processes/message trunk/templates/sun-sunos10/processes/oids trunk/templates/sun-sunos10/processes/thresholds trunk/templates/sun-sunos10/processes/transforms trunk/templates/sun-sunos10/specs Added: trunk/templates/sun-sunos10/disk/exceptions =================================================================== --- trunk/templates/sun-sunos10/disk/exceptions (rev 0) +++ trunk/templates/sun-sunos10/disk/exceptions 2009-12-29 08:03:25 UTC (rev 167) @@ -0,0 +1,2 @@ +DiskName : alarm : .* +DiskName : ignore : Real.Memory.*|Swap Space Added: trunk/templates/sun-sunos10/disk/message =================================================================== --- trunk/templates/sun-sunos10/disk/message (rev 0) +++ trunk/templates/sun-sunos10/disk/message 2009-12-29 08:03:25 UTC (rev 167) @@ -0,0 +1,3 @@ +TABLE:plain,noalarmsmsg +Filesystem 1024-blocks Used Available Capacity Mounted on +{DiskName} {DiskSize} {DiskSizeUsed} {DiskAvail} {DiskPerUse}% {DiskName} {DiskPerUse.color} Added: trunk/templates/sun-sunos10/disk/oids =================================================================== --- trunk/templates/sun-sunos10/disk/oids (rev 0) +++ trunk/templates/sun-sunos10/disk/oids 2009-12-29 08:03:25 UTC (rev 167) @@ -0,0 +1,4 @@ +DiskName : .1.3.6.1.2.1.25.2.3.1.3 : branch +DiskBlocks : .1.3.6.1.2.1.25.2.3.1.5 : branch +DiskBlocksUsed : .1.3.6.1.2.1.25.2.3.1.6 : branch +DiskBlockSize : .1.3.6.1.2.1.25.2.3.1.4 : branch Added: trunk/templates/sun-sunos10/disk/thresholds =================================================================== --- trunk/templates/sun-sunos10/disk/thresholds (rev 0) +++ trunk/templates/sun-sunos10/disk/thresholds 2009-12-29 08:03:25 UTC (rev 167) @@ -0,0 +1,2 @@ +DiskPerUse : yellow : 90 : Disk utilization is high +DiskPerUse : red : 95 : Disk utilization is critical Added: trunk/templates/sun-sunos10/disk/transforms =================================================================== --- trunk/templates/sun-sunos10/disk/transforms (rev 0) +++ trunk/templates/sun-sunos10/disk/transforms 2009-12-29 08:03:25 UTC (rev 167) @@ -0,0 +1,4 @@ +DiskSize : MATH : {DiskBlocks} x {DiskBlockSize} / 1024 : 0 +DiskSizeUsed : MATH : {DiskBlocksUsed} x {DiskBlockSize} / 1024 : 0 +DiskAvail : MATH : {DiskSize} - {DiskSizeUsed} : 0 +DiskPerUse : MATH : ({DiskSizeUsed} x 100) / {DiskSize} : 0 Added: trunk/templates/sun-sunos10/if_load/message =================================================================== --- trunk/templates/sun-sunos10/if_load/message (rev 0) +++ trunk/templates/sun-sunos10/if_load/message 2009-12-29 08:03:25 UTC (rev 167) @@ -0,0 +1,7 @@ + +<b>Interface error rates:</b> +Input load: yellow={ifInLoad.thresh:yellow}%, red={ifInLoad.thresh:red}% +Output load: yellow={ifOutLoad.thresh:yellow}%, red={ifOutLoad.thresh:red}% +TABLE:rrd(DS:ds0:ifInOctets:DERIVE; DS:ds1:ifOutOctets:DERIVE) +Ifc name|Ifc Speed|Rate in (load %)|Rate out (load %) +{ifName}|{ifSpeed}|{ifInLoad.color}{ifInSpeed} ({ifInLoad}%){ifInLoad.errors}|{ifOutLoad.color}{ifOutSpeed} ({ifOutLoad}%){ifOutLoad.errors} Added: trunk/templates/sun-sunos10/if_load/oids =================================================================== --- trunk/templates/sun-sunos10/if_load/oids (rev 0) +++ trunk/templates/sun-sunos10/if_load/oids 2009-12-29 08:03:25 UTC (rev 167) @@ -0,0 +1,4 @@ +ifName : .1.3.6.1.2.1.2.2.1.2 : branch +ifBps : .1.3.6.1.2.1.2.2.1.5 : branch +ifInOctets : .1.3.6.1.2.1.2.2.1.10 : branch +ifOutOctets : .1.3.6.1.2.1.2.2.1.16 : branch Added: trunk/templates/sun-sunos10/if_load/thresholds =================================================================== --- trunk/templates/sun-sunos10/if_load/thresholds (rev 0) +++ trunk/templates/sun-sunos10/if_load/thresholds 2009-12-29 08:03:25 UTC (rev 167) @@ -0,0 +1,4 @@ +ifInLoad : yellow : 75 : {ifName} load is high +ifInLoad : red : 95 : {ifName} load is very high +ifOutLoad : yellow : 75 : {ifName} load is high +ifOutLoad : red : 95 : {ifName} load is very high Added: trunk/templates/sun-sunos10/if_load/transforms =================================================================== --- trunk/templates/sun-sunos10/if_load/transforms (rev 0) +++ trunk/templates/sun-sunos10/if_load/transforms 2009-12-29 08:03:25 UTC (rev 167) @@ -0,0 +1,16 @@ +# Create a human-readable ifc speed +ifSpeed : SPEED : {ifBps} +# Get bit speed delta (so we dont have to provide custom delta limit) +ifInOps : DELTA : {ifInOctets} +ifOutOps : DELTA : {ifOutOctets} +# Convert our octets delta into bits per second +ifInBps : MATH : {ifInOps} x 8 +ifOutBps : MATH : {ifOutOps} x 8 +# Make some easily readable speed variables +ifInSpeed : SPEED : {ifInBps} +ifOutSpeed : SPEED : {ifOutBps} +# Now determine our percentage load, based on traffic and ifc speed +ifInLoad : MATH : ({ifInBps} / {ifBps}) x 100 +ifOutLoad : MATH : ({ifOutBps} / {ifBps}) x 100 +# Create an alias in a bracketed box, or nothing if alias is blank +#ifAliasBox : REGSUB : {ifAlias} /(\S+.*)/ [$1]/ Added: trunk/templates/sun-sunos10/memory/message =================================================================== --- trunk/templates/sun-sunos10/memory/message (rev 0) +++ trunk/templates/sun-sunos10/memory/message 2009-12-29 08:03:25 UTC (rev 167) @@ -0,0 +1,4 @@ +Memory Used Total Percentage +Physical {MemSizeUsed}kB {MemSize}kB {MemPerUse}% {MemPerUse.color} +Swap {SwapSizeUsed}kB {SwapSize}kB {SwapPerUse}% {SwapPerUse.color} + Added: trunk/templates/sun-sunos10/memory/oids =================================================================== --- trunk/templates/sun-sunos10/memory/oids (rev 0) +++ trunk/templates/sun-sunos10/memory/oids 2009-12-29 08:03:25 UTC (rev 167) @@ -0,0 +1,6 @@ +MemBlocks : .1.3.6.1.2.1.25.2.3.1.5.2 : leaf +MemBlocksUsed : .1.3.6.1.2.1.25.2.3.1.6.2 : leaf +MemBlockSize : .1.3.6.1.2.1.25.2.3.1.4.2 : leaf +SwapBlocks : .1.3.6.1.2.1.25.2.3.1.5.3 : leaf +SwapBlocksUsed : .1.3.6.1.2.1.25.2.3.1.6.3 : leaf +SwapBlockSize : .1.3.6.1.2.1.25.2.3.1.4.3 : leaf Added: trunk/templates/sun-sunos10/memory/thresholds =================================================================== --- trunk/templates/sun-sunos10/memory/thresholds (rev 0) +++ trunk/templates/sun-sunos10/memory/thresholds 2009-12-29 08:03:25 UTC (rev 167) @@ -0,0 +1,6 @@ +MemPerUse : red : >99 : Memory utilization is critical +MemPerUse : yellow : >95 : Memory utilization is high + +SwapPerUse : red : >80 : Swap utilization is critical +SwapPerUse : yellow : >50 : Swap utilization is high + Added: trunk/templates/sun-sunos10/memory/transforms =================================================================== --- trunk/templates/sun-sunos10/memory/transforms (rev 0) +++ trunk/templates/sun-sunos10/memory/transforms 2009-12-29 08:03:25 UTC (rev 167) @@ -0,0 +1,11 @@ +MemSize : MATH : {MemBlocks} x {MemBlockSize} / 1024 : 0 +MemSizeUsed : MATH : {MemBlocksUsed} x {MemBlockSize} / 1024 : 0 +MemAvail : MATH : {MemSize} - {MemSizeUsed} : 0 +MemPerUse : MATH : ({MemSizeUsed} x 100) / {MemSize} : 0 + +SwapSize : MATH : {SwapBlocks} x {SwapBlockSize} / 1024 : 0 +SwapSizeUsed : MATH : {SwapBlocksUsed} x {SwapBlockSize} / 1024 : 0 +SwapAvail : MATH : {SwapSize} - {SwapSizeUsed} : 0 +SwapPerUse : MATH : ({SwapSizeUsed} x 100) / {SwapSize} : 0 + + Added: trunk/templates/sun-sunos10/processes/message =================================================================== --- trunk/templates/sun-sunos10/processes/message (rev 0) +++ trunk/templates/sun-sunos10/processes/message 2009-12-29 08:03:25 UTC (rev 167) @@ -0,0 +1,5 @@ +# We need to collect values from multiple pids of the same process name +# before the graphs will be useful +TABLE:rrd(DS:ds0:hrSWRunPerfCPU:COUNTER; DS:ds1:hrSWRunPerfMem:GAUGE) +Name|PID|CPU|Mem (kB) +{hrSWRunName}|{hrSWRunIndex}|{hrSWRunPerfCPU}|{hrSWRunPerfMem} Added: trunk/templates/sun-sunos10/processes/oids =================================================================== --- trunk/templates/sun-sunos10/processes/oids (rev 0) +++ trunk/templates/sun-sunos10/processes/oids 2009-12-29 08:03:25 UTC (rev 167) @@ -0,0 +1,7 @@ +hrSWRunIndex : 1.3.6.1.2.1.25.4.2.1.1 : branch +hrSWRunName : 1.3.6.1.2.1.25.4.2.1.2 : branch +#hrSWRunID : 1.3.6.1.2.1.25.4.2.1.3 : branch +#hrSWRunParameters : 1.3.6.1.2.1.25.4.2.1.5 : branch +#hrSWRunStatus : 1.3.6.1.2.1.25.4.2.1.7 +hrSWRunPerfCPU : 1.3.6.1.2.1.25.5.1.1.1 : branch +hrSWRunPerfMem : 1.3.6.1.2.1.25.5.1.1.2 : branch Added: trunk/templates/sun-sunos10/specs =================================================================== --- trunk/templates/sun-sunos10/specs (rev 0) +++ trunk/templates/sun-sunos10/specs 2009-12-29 08:03:25 UTC (rev 167) @@ -0,0 +1,4 @@ +vendor : sun +model : sunos10 +snmpver : 2 +sysdesc : SunOS .+ 5.10 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <buc...@us...> - 2009-12-28 10:41:22
|
Revision: 166 http://devmon.svn.sourceforge.net/devmon/?rev=166&view=rev Author: buchanmilne Date: 2009-12-28 10:41:07 +0000 (Mon, 28 Dec 2009) Log Message: ----------- Fix typo reported by Wim Nelis Modified Paths: -------------- trunk/modules/dm_templates.pm Modified: trunk/modules/dm_templates.pm =================================================================== --- trunk/modules/dm_templates.pm 2009-12-16 10:17:11 UTC (rev 165) +++ trunk/modules/dm_templates.pm 2009-12-28 10:41:07 UTC (rev 166) @@ -578,7 +578,7 @@ my $type; if($if =~ /^\d+$/) {$type = 'num'} elsif($if =~ /^>\s*\d+(\.\d+)?$/) {$type = 'gt'} - elsif($if =~ /^>=\s*\d+(\.\d+?)$/) {$type = 'gte'} + elsif($if =~ /^>=\s*\d+(\.\d+)?$/) {$type = 'gte'} elsif($if =~ /^<\s*\d+(\.\d+)?$/) {$type = 'lt'} elsif($if =~ /^<=\s*\d+(\.\d+)?$/) {$type = 'lte'} elsif($if =~ /^\d+(\.\d+)?\s*-\s*\d+(\.\d+)?$/) {$type = 'rng'} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <buc...@us...> - 2009-12-16 10:17:26
|
Revision: 165 http://devmon.svn.sourceforge.net/devmon/?rev=165&view=rev Author: buchanmilne Date: 2009-12-16 10:17:11 +0000 (Wed, 16 Dec 2009) Log Message: ----------- Try and get Id key word to work Modified Paths: -------------- trunk/extras/do_devmon.c Modified: trunk/extras/do_devmon.c =================================================================== --- trunk/extras/do_devmon.c 2009-11-24 11:43:52 UTC (rev 164) +++ trunk/extras/do_devmon.c 2009-12-16 10:17:11 UTC (rev 165) @@ -9,7 +9,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char devmon_rcsid[] = "$Id $"; +static char devmon_rcsid[] = "$Id$"; int do_devmon_rrd(char *hostname, char *testname, char *msg, time_t tstamp) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <buc...@us...> - 2009-11-24 11:44:08
|
Revision: 164 http://devmon.svn.sourceforge.net/devmon/?rev=164&view=rev Author: buchanmilne Date: 2009-11-24 11:43:52 +0000 (Tue, 24 Nov 2009) Log Message: ----------- Improve input validation - check values returned by strtok, and report line number on invalid data Modified Paths: -------------- trunk/extras/do_devmon.c Modified: trunk/extras/do_devmon.c =================================================================== --- trunk/extras/do_devmon.c 2009-11-24 11:40:08 UTC (rev 163) +++ trunk/extras/do_devmon.c 2009-11-24 11:43:52 UTC (rev 164) @@ -24,6 +24,7 @@ int in_devmon = 1; int numds = 0; char *rrdbasename; + int lineno = 0; rrdbasename = NULL; curline = msg; @@ -40,6 +41,7 @@ int i; eoln = strchr(curline, '\n'); if (eoln) *eoln = '\0'; + lineno++; if(!strncmp(curline, "<!--DEVMON RRD: ",16)) { in_devmon = 0; @@ -85,7 +87,7 @@ dbgprintf("Found %d columns in devmon rrd data\n",columncount); if (columncount > 2) { - dbgprintf("Skipping line, found %d (max 2) columns in devmon rrd data, space in repeater name?\n",columncount); + dbgprintf("Skipping line %d, found %d (max 2) columns in devmon rrd data, space in repeater name?\n",lineno,columncount); goto nextline; } @@ -94,10 +96,18 @@ */ ifname = xstrdup(columns[0]); dsval = strtok(columns[1],":"); + if (dsval == NULL) { + dbgprintf("Skipping line %d, line is malformed\n",lineno); + goto nextline; + } sprintf(rrdvalues, "%d:", (int)tstamp); strcat(rrdvalues,dsval); for (i=1;i < numds;i++) { dsval = strtok(NULL,":"); + if (dsval == NULL) { + dbgprintf("Skipping line %d, %d tokens present, expecting %d\n",lineno,i,numds); + goto nextline; + } strcat(rrdvalues,":"); strcat(rrdvalues,dsval); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <buc...@us...> - 2009-11-24 11:40:16
|
Revision: 163 http://devmon.svn.sourceforge.net/devmon/?rev=163&view=rev Author: buchanmilne Date: 2009-11-24 11:40:08 +0000 (Tue, 24 Nov 2009) Log Message: ----------- Avoid invalid free (results in abort with some glibc versions) Modified Paths: -------------- trunk/extras/do_devmon.c Modified: trunk/extras/do_devmon.c =================================================================== --- trunk/extras/do_devmon.c 2009-11-23 14:13:52 UTC (rev 162) +++ trunk/extras/do_devmon.c 2009-11-24 11:40:08 UTC (rev 163) @@ -25,7 +25,7 @@ int numds = 0; char *rrdbasename; - rrdbasename = xstrdup(testname); + rrdbasename = NULL; curline = msg; while (curline) { char *fsline = NULL; @@ -43,7 +43,7 @@ if(!strncmp(curline, "<!--DEVMON RRD: ",16)) { in_devmon = 0; - if(rrdbasename) {xfree(rrdbasename);rrdbasename = NULL;} + /*if(rrdbasename) {xfree(rrdbasename);rrdbasename = NULL;}*/ rrdbasename = strtok(curline+16," "); if (rrdbasename == NULL) rrdbasename = xstrdup(testname); dbgprintf("DEVMON: changing testname from %s to %s\n",testname,rrdbasename); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Buchan M. <bg...@st...> - 2009-11-24 11:32:15
|
On Friday, 25 September 2009 05:33:30 dba...@us... wrote: > Revision: 154 > http://devmon.svn.sourceforge.net/devmon/?rev=154&view=rev > Author: dbaldwin > Date: 2009-09-25 04:33:30 +0000 (Fri, 25 Sep 2009) > > Log Message: > ----------- > extras/do_devmon.c fixes to handle multiple RRD data reports in one test Since this change, my hobbitd_rrd has been abort()ing. Run under valgrind, I get something like: *** glibc detected *** /home/bgmilne/rpm/BUILD/xymon-4.2.3/hobbitd/hobbitd_rrd: munmap_chunk(): invalid pointer: 0x00007f53c1c0fca6 *** ======= Backtrace: ========= /lib64/libc.so.6[0x7f53c114d9a8] /home/bgmilne/rpm/BUILD/xymon-4.2.3/hobbitd/hobbitd_rrd[0x403b2d] /home/bgmilne/rpm/BUILD/xymon-4.2.3/hobbitd/hobbitd_rrd[0x40d94d] /home/bgmilne/rpm/BUILD/xymon-4.2.3/hobbitd/hobbitd_rrd[0x40261b] /lib64/libc.so.6(__libc_start_main+0xe6)[0x7f53c10f9446] /home/bgmilne/rpm/BUILD/xymon-4.2.3/hobbitd/hobbitd_rrd[0x402119] ======= Memory map: ======== Running under valgrind (with 'hobbitd_channel --channel=status valgrind -v -- leak-check=full --show-reachable=yes /home/bgmilne/rpm/BUILD/xymon-4.2.3/hobbitd/hobbitd_rrd --rrddir=$BBVAR/rrd'), I get: ==15593== Invalid free() / delete / delete[] ==15593== at 0x4C2232F: free (vg_replace_malloc.c:323) ==15593== by 0x403B2C: do_devmon_rrd (do_devmon.c:48) ==15593== by 0x40D94C: update_rrd (do_rrd.c:427) ==15593== by 0x40261A: main (hobbitd_rrd.c:146) ==15593== Address 0x88e4d09 is 23,697 bytes inside a block of size 528,384 alloc'd ==15593== at 0x4C2362E: malloc (vg_replace_malloc.c:207) ==15593== by 0x410418: xmalloc (memory.c:119) ==15593== by 0x402EEA: get_hobbitd_message (hobbitd_worker.c:96) ==15593== by 0x4023D5: main (hobbitd_rrd.c:106) and at exit: ==15593== ==15593== Process terminating with default action of signal 2 (SIGINT) ==15593== at 0x556CF13: select (in /lib64/libc-2.9.so) ==15593== by 0x402AEF: get_hobbitd_message (hobbitd_worker.c:212) ==15593== by 0x4023D5: main (hobbitd_rrd.c:106) bash-3.2$ ==15593== ==15593== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 2 from 1) ==15593== ==15593== 1 errors in context 1 of 1: ==15593== Invalid free() / delete / delete[] ==15593== at 0x4C2232F: free (vg_replace_malloc.c:323) ==15593== by 0x403B2C: do_devmon_rrd (do_devmon.c:48) ==15593== by 0x40D94C: update_rrd (do_rrd.c:427) ==15593== by 0x40261A: main (hobbitd_rrd.c:146) ==15593== Address 0x88e4d09 is 23,697 bytes inside a block of size 528,384 alloc'd ==15593== at 0x4C2362E: malloc (vg_replace_malloc.c:207) ==15593== by 0x410418: xmalloc (memory.c:119) ==15593== by 0x402EEA: get_hobbitd_message (hobbitd_worker.c:96) ==15593== by 0x4023D5: main (hobbitd_rrd.c:106) --15593-- --15593-- supp: 2 dl-hack3-cond-1 ==15593== ==15593== IN SUMMARY: 1 errors from 1 contexts (suppressed: 2 from 1) ==15593== ==15593== malloc/free: in use at exit: 545,437 bytes in 411 blocks. ==15593== malloc/free: 9,391 allocs, 8,981 frees, 731,276 bytes allocated. ==15593== ==15593== searching for pointers to 411 not-freed blocks. ==15593== checked 402,376 bytes. ==15593== ==15593== ==15593== 9 bytes in 1 blocks are still reachable in loss record 1 of 7 ==15593== at 0x4C23761: realloc (vg_replace_malloc.c:429) ==15593== by 0x4103DD: xrealloc (memory.c:149) ==15593== by 0x403243: setup_template (do_rrd.c:93) ==15593== by 0x40C471: do_disk_rrd (do_disk.c:29) ==15593== by 0x40D886: update_rrd (do_rrd.c:407) ==15593== by 0x40261A: main (hobbitd_rrd.c:146) ==15593== ==15593== ==15593== 88 bytes in 4 blocks are definitely lost in loss record 2 of 7 ==15593== at 0x4C2362E: malloc (vg_replace_malloc.c:207) ==15593== by 0x5512431: strdup (in /lib64/libc-2.9.so) ==15593== by 0x41039D: xstrdup (memory.c:172) ==15593== by 0x403CDC: do_devmon_rrd (do_devmon.c:74) ==15593== by 0x40D94C: update_rrd (do_rrd.c:427) ==15593== by 0x40261A: main (hobbitd_rrd.c:146) ==15593== ==15593== ==15593== 94 bytes in 1 blocks are definitely lost in loss record 3 of 7 ==15593== at 0x4C2362E: malloc (vg_replace_malloc.c:207) ==15593== by 0x410418: xmalloc (memory.c:119) ==15593== by 0x40E452: xgetenv (environ.c:175) ==15593== by 0x412519: init_tcp_services (netservices.c:158) ==15593== by 0x40FA5B: rrd_setup (hobbitrrd.c:80) ==15593== by 0x40FE88: find_hobbit_rrd (hobbitrrd.c:156) ==15593== by 0x402603: main (hobbitd_rrd.c:145) ==15593== ==15593== ==15593== 1,453 bytes in 235 blocks are still reachable in loss record 4 of 7 ==15593== at 0x4C2362E: malloc (vg_replace_malloc.c:207) ==15593== by 0x5512431: strdup (in /lib64/libc-2.9.so) ==15593== by 0x41039D: xstrdup (memory.c:172) ==15593== by 0x40229D: main (hobbitd_rrd.c:61) ==15593== ==15593== ==15593== 1,632 bytes in 34 blocks are definitely lost in loss record 5 of 7 ==15593== at 0x4C21404: calloc (vg_replace_malloc.c:397) ==15593== by 0x410448: xcalloc (memory.c:102) ==15593== by 0x412709: init_tcp_services (netservices.c:196) ==15593== by 0x40FA5B: rrd_setup (hobbitrrd.c:80) ==15593== by 0x40FE88: find_hobbit_rrd (hobbitrrd.c:156) ==15593== by 0x402603: main (hobbitd_rrd.c:145) ==15593== ==15593== ==15593== 2,688 bytes in 2 blocks are still reachable in loss record 6 of 7 ==15593== at 0x4C21404: calloc (vg_replace_malloc.c:397) ==15593== by 0x410448: xcalloc (memory.c:102) ==15593== by 0x40FBAD: rrd_setup (hobbitrrd.c:94) ==15593== by 0x40FE88: find_hobbit_rrd (hobbitrrd.c:156) ==15593== by 0x402603: main (hobbitd_rrd.c:145) ==15593== ==15593== ==15593== 539,473 bytes in 134 blocks are still reachable in loss record 7 of 7 ==15593== at 0x4C2362E: malloc (vg_replace_malloc.c:207) ==15593== by 0x410418: xmalloc (memory.c:119) ==15593== by 0x402EEA: get_hobbitd_message (hobbitd_worker.c:96) ==15593== by 0x4023D5: main (hobbitd_rrd.c:106) ==15593== ==15593== LEAK SUMMARY: ==15593== definitely lost: 1,814 bytes in 39 blocks. ==15593== possibly lost: 0 bytes in 0 blocks. ==15593== still reachable: 543,623 bytes in 372 blocks. ==15593== suppressed: 0 bytes in 0 blocks. --15593-- memcheck: sanity checks: 34 cheap, 3 expensive --15593-- memcheck: auxmaps: 0 auxmap entries (0k, 0M) in use --15593-- memcheck: auxmaps_L1: 0 searches, 0 cmps, ratio 0:10 --15593-- memcheck: auxmaps_L2: 0 searches, 0 nodes --15593-- memcheck: SMs: n_issued = 58 (928k, 0M) --15593-- memcheck: SMs: n_deissued = 0 (0k, 0M) --15593-- memcheck: SMs: max_noaccess = 524287 (8388592k, 8191M) --15593-- memcheck: SMs: max_undefined = 8 (128k, 0M) --15593-- memcheck: SMs: max_defined = 978 (15648k, 15M) --15593-- memcheck: SMs: max_non_DSM = 58 (928k, 0M) --15593-- memcheck: max sec V bit nodes: 0 (0k, 0M) --15593-- memcheck: set_sec_vbits8 calls: 0 (new: 0, updates: 0) --15593-- memcheck: max shadow mem size: 5072k, 4M --15593-- translate: fast SP updates identified: 3,708 ( 87.4%) --15593-- translate: generic_known SP updates identified: 372 ( 8.7%) --15593-- translate: generic_unknown SP updates identified: 158 ( 3.7%) --15593-- tt/tc: 31,910 tt lookups requiring 33,559 probes --15593-- tt/tc: 31,910 fast-cache updates, 5 flushes --15593-- transtab: new 4,917 (111,939 -> 1,780,823; ratio 159:10) [0 scs] --15593-- transtab: dumped 0 (0 -> ??) --15593-- transtab: discarded 12 (257 -> ??) --15593-- scheduler: 3,479,385 jumps (bb entries). --15593-- scheduler: 34/57,963 major/minor sched events. --15593-- sanity: 35 cheap, 3 expensive checks. --15593-- exectx: 769 lists, 603 contexts (avg 0 per list) --15593-- exectx: 18,907 searches, 19,237 full compares (1,017 per 1000) --15593-- exectx: 927 cmp2, 1 cmp4, 0 cmpAll --15593-- errormgr: 10 supplist searches, 657 comparisons during search --15593-- errormgr: 3 errlist searches, 3 comparisons during search > > Modified Paths: > -------------- > trunk/extras/do_devmon.c > > Modified: trunk/extras/do_devmon.c > =================================================================== > --- trunk/extras/do_devmon.c 2009-09-23 04:53:49 UTC (rev 153) > +++ trunk/extras/do_devmon.c 2009-09-25 04:33:30 UTC (rev 154) > @@ -9,7 +9,7 @@ > /* > */ > /*------------------------------------------------------------------------- >---*/ > > -static char devmon_rcsid[] = "$Id$"; > +static char devmon_rcsid[] = "$Id $"; > > int do_devmon_rrd(char *hostname, char *testname, char *msg, time_t > tstamp) { > @@ -23,10 +23,13 @@ > static pcre *exclpattern = NULL; > int in_devmon = 1; > int numds = 0; > + char *rrdbasename; > > + rrdbasename = xstrdup(testname); > curline = msg; > while (curline) { > - char *fsline, *p; > + char *fsline = NULL; > + char *p; > char *columns[MAXCOLS]; > int columncount; > char *ifname = NULL; > @@ -38,8 +41,14 @@ > > eoln = strchr(curline, '\n'); if (eoln) *eoln = '\0'; > > - if(!strncmp(curline, "<!--DEVMON",10)) { > + if(!strncmp(curline, "<!--DEVMON RRD: ",16)) { > in_devmon = 0; This is line 48: > + if(rrdbasename) {xfree(rrdbasename);rrdbasename = NULL;} > + rrdbasename = strtok(curline+16," "); > + if (rrdbasename == NULL) rrdbasename = xstrdup(testname); > + dbgprintf("DEVMON: changing testname from %s to > %s\n",testname,rrdbasename); + numds = 0; > + if(devmon_tpl) {xfree(devmon_tpl);devmon_tpl= NULL;} > goto nextline; > } > if(in_devmon == 0 && !strncmp(curline, "-->",3)) { > @@ -70,7 +79,7 @@ > devmon_params[numds+5] = rra4; > devmon_params[numds+6] = NULL; > > - devmon_tpl = setup_template(devmon_params); > + if (devmon_tpl == NULL) devmon_tpl = setup_template(devmon_params); > goto nextline; > } > > @@ -93,18 +102,18 @@ > strcat(rrdvalues,dsval); > } > /* File names in the format if_load.eth0.0.rrd */ > - snprintf(rrdfn, sizeof(rrdfn)-1, "%s.%s.rrd", testname, ifname); > + snprintf(rrdfn, sizeof(rrdfn)-1, "%s.%s.rrd", rrdbasename, ifname); > rrdfn[sizeof(rrdfn)-1] = '\0'; > - dbgprintf("Sending from devmon to RRD for %s %s: > %s\n",testname,ifname,rrdvalues); + dbgprintf("Sending from devmon to RRD > for %s %s: %s\n",rrdbasename,ifname,rrdvalues); > create_and_update_rrd(hostname, rrdfn, devmon_params, devmon_tpl); if > (ifname) { xfree(ifname); ifname = NULL; } > > if (eoln) *eoln = '\n'; > - xfree(fsline); > > nextline: > + if (fsline) { xfree(fsline); fsline = NULL; } > curline = (eoln ? (eoln+1) : NULL); > } > - > + if(devmon_tpl) {xfree(devmon_tpl);devmon_tpl= NULL;} > return 0; > } > Commenting out line 48 avoids the abort, valgrind doesn't report an invalid free, and we get a new leak at line 29. ==17105== Process terminating with default action of signal 2 (SIGINT) ==17105== at 0x556CF13: select (in /lib64/libc-2.9.so) ==17105== by 0x402AEF: get_hobbitd_message (hobbitd_worker.c:212) ==17105== by 0x4023D5: main (hobbitd_rrd.c:106) ==17105== ==17105== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 1) --17105-- --17105-- supp: 2 dl-hack3-cond-1 ==17105== malloc/free: in use at exit: 545,447 bytes in 412 blocks. ==17105== malloc/free: 9,330 allocs, 8,918 frees, 735,459 bytes allocated. ==17105== ==17105== searching for pointers to 412 not-freed blocks. ==17105== checked 399,136 bytes. ==17105== ==17105== 9 bytes in 1 blocks are still reachable in loss record 1 of 7 ==17105== at 0x4C23761: realloc (vg_replace_malloc.c:429) ==17105== by 0x4103FD: xrealloc (memory.c:149) ==17105== by 0x403243: setup_template (do_rrd.c:93) ==17105== by 0x40C491: do_disk_rrd (do_disk.c:29) ==17105== by 0x40D8A6: update_rrd (do_rrd.c:407) ==17105== by 0x40261A: main (hobbitd_rrd.c:146) ==17105== ==17105== ==17105== 94 bytes in 1 blocks are definitely lost in loss record 2 of 7 ==17105== at 0x4C2362E: malloc (vg_replace_malloc.c:207) ==17105== by 0x410438: xmalloc (memory.c:119) ==17105== by 0x40E472: xgetenv (environ.c:175) ==17105== by 0x412539: init_tcp_services (netservices.c:158) ==17105== by 0x40FA7B: rrd_setup (hobbitrrd.c:80) ==17105== by 0x40FEA8: find_hobbit_rrd (hobbitrrd.c:156) ==17105== by 0x402603: main (hobbitd_rrd.c:145) ==17105== ==17105== ==17105== 106 bytes in 6 blocks are definitely lost in loss record 3 of 7 ==17105== at 0x4C2362E: malloc (vg_replace_malloc.c:207) ==17105== by 0x5512431: strdup (in /lib64/libc-2.9.so) ==17105== by 0x4103BD: xstrdup (memory.c:172) ==17105== by 0x403AF9: do_devmon_rrd (do_devmon.c:29) ==17105== by 0x40D96C: update_rrd (do_rrd.c:427) ==17105== by 0x40261A: main (hobbitd_rrd.c:146) ==17105== ==17105== ==17105== 1,453 bytes in 235 blocks are still reachable in loss record 4 of 7 ==17105== at 0x4C2362E: malloc (vg_replace_malloc.c:207) ==17105== by 0x5512431: strdup (in /lib64/libc-2.9.so) ==17105== by 0x4103BD: xstrdup (memory.c:172) ==17105== by 0x40229D: main (hobbitd_rrd.c:61) ==17105== ==17105== ==17105== 1,632 bytes in 34 blocks are definitely lost in loss record 5 of 7 ==17105== at 0x4C21404: calloc (vg_replace_malloc.c:397) ==17105== by 0x410468: xcalloc (memory.c:102) ==17105== by 0x412729: init_tcp_services (netservices.c:196) ==17105== by 0x40FA7B: rrd_setup (hobbitrrd.c:80) ==17105== by 0x40FEA8: find_hobbit_rrd (hobbitrrd.c:156) ==17105== by 0x402603: main (hobbitd_rrd.c:145) ==17105== ==17105== ==17105== 2,688 bytes in 2 blocks are still reachable in loss record 6 of 7 ==17105== at 0x4C21404: calloc (vg_replace_malloc.c:397) ==17105== by 0x410468: xcalloc (memory.c:102) ==17105== by 0x40FBCD: rrd_setup (hobbitrrd.c:94) ==17105== by 0x40FEA8: find_hobbit_rrd (hobbitrrd.c:156) ==17105== by 0x402603: main (hobbitd_rrd.c:145) ==17105== ==17105== ==17105== 539,465 bytes in 133 blocks are still reachable in loss record 7 of 7 ==17105== at 0x4C2362E: malloc (vg_replace_malloc.c:207) ==17105== by 0x410438: xmalloc (memory.c:119) ==17105== by 0x402EEA: get_hobbitd_message (hobbitd_worker.c:96) ==17105== by 0x4023D5: main (hobbitd_rrd.c:106) ==17105== ==17105== LEAK SUMMARY: ==17105== definitely lost: 1,832 bytes in 41 blocks. ==17105== possibly lost: 0 bytes in 0 blocks. ==17105== still reachable: 543,615 bytes in 371 blocks. ==17105== suppressed: 0 bytes in 0 blocks. --17105-- memcheck: sanity checks: 37 cheap, 3 expensive --17105-- memcheck: auxmaps: 0 auxmap entries (0k, 0M) in use --17105-- memcheck: auxmaps_L1: 0 searches, 0 cmps, ratio 0:10 --17105-- memcheck: auxmaps_L2: 0 searches, 0 nodes --17105-- memcheck: SMs: n_issued = 57 (912k, 0M) --17105-- memcheck: SMs: n_deissued = 0 (0k, 0M) --17105-- memcheck: SMs: max_noaccess = 524287 (8388592k, 8191M) --17105-- memcheck: SMs: max_undefined = 8 (128k, 0M) --17105-- memcheck: SMs: max_defined = 978 (15648k, 15M) --17105-- memcheck: SMs: max_non_DSM = 57 (912k, 0M) --17105-- memcheck: max sec V bit nodes: 0 (0k, 0M) --17105-- memcheck: set_sec_vbits8 calls: 0 (new: 0, updates: 0) --17105-- memcheck: max shadow mem size: 5056k, 4M --17105-- translate: fast SP updates identified: 3,796 ( 87.7%) --17105-- translate: generic_known SP updates identified: 377 ( 8.7%) --17105-- translate: generic_unknown SP updates identified: 151 ( 3.4%) --17105-- tt/tc: 32,898 tt lookups requiring 34,031 probes --17105-- tt/tc: 32,898 fast-cache updates, 5 flushes --17105-- transtab: new 4,932 (111,069 -> 1,776,409; ratio 159:10) [0 scs] --17105-- transtab: dumped 0 (0 -> ??) --17105-- transtab: discarded 12 (257 -> ??) --17105-- scheduler: 3,719,207 jumps (bb entries). --17105-- scheduler: 37/58,733 major/minor sched events. --17105-- sanity: 38 cheap, 3 expensive checks. --17105-- exectx: 769 lists, 602 contexts (avg 0 per list) --17105-- exectx: 18,781 searches, 18,746 full compares (998 per 1000) --17105-- exectx: 927 cmp2, 1 cmp4, 0 cmpAll --17105-- errormgr: 9 supplist searches, 578 comparisons during search --17105-- errormgr: 2 errlist searches, 1 comparisons during search So, I'm applying these two changes so I can work on some other small fixes. Regards, Buchan |
From: <buc...@us...> - 2009-11-23 14:14:02
|
Revision: 162 http://devmon.svn.sourceforge.net/devmon/?rev=162&view=rev Author: buchanmilne Date: 2009-11-23 14:13:52 +0000 (Mon, 23 Nov 2009) Log Message: ----------- Add note about downloading and unpacking templates Modified Paths: -------------- trunk/docs/INSTALLATION Modified: trunk/docs/INSTALLATION =================================================================== --- trunk/docs/INSTALLATION 2009-11-23 14:07:20 UTC (rev 161) +++ trunk/docs/INSTALLATION 2009-11-23 14:13:52 UTC (rev 162) @@ -15,6 +15,11 @@ 2. Unpack the Devmon tarball into your preferred directory. I typically use /usr/local/devmon, but it is totally up to you. + Since templates are now shipped in a separate tarball, download + the templates tarball and unpack it in the above directory, + and if the resulting direcotry is not named 'templates', rename + it to be 'templates'. + 3. Edit the devmon.cfg file. For a single node installation, the options you want to pay particular attention to are: MULTINODE, BBHOSTS, SNMPCIDS, PIDFILE, BBTYPE & DISPSERV. If @@ -95,6 +100,11 @@ 4. Unpack the Devmon tarball into your preferred directory. I typically use /usr/local/devmon, but it is totally up to you. + Since templates are now shipped in a separate tarball, download + the templates tarball and unpack it in the above directory, + and if the resulting direcotry is not named 'templates', rename + it to be 'templates'. + 5. Edit the devmon.cfg file, and modify the necessary local variables. The options you want to pay particular attention to are: MULTINODE, PIDFILE, LOGFILE, DBHOST, DBNAME, DBUSER & This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <buc...@us...> - 2009-11-23 14:07:31
|
Revision: 161 http://devmon.svn.sourceforge.net/devmon/?rev=161&view=rev Author: buchanmilne Date: 2009-11-23 14:07:20 +0000 (Mon, 23 Nov 2009) Log Message: ----------- Add svn keyword property Modified Paths: -------------- trunk/docs/OVERVIEW Property Changed: ---------------- trunk/docs/OVERVIEW Modified: trunk/docs/OVERVIEW =================================================================== --- trunk/docs/OVERVIEW 2009-11-23 14:04:13 UTC (rev 160) +++ trunk/docs/OVERVIEW 2009-11-23 14:07:20 UTC (rev 161) @@ -42,5 +42,5 @@ 6. Devmon sleeps for any remaining time in the poll cycle. -$Id: $ +$Id$ Property changes on: trunk/docs/OVERVIEW ___________________________________________________________________ Added: svn:keywords + Id This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <buc...@us...> - 2009-11-23 14:04:23
|
Revision: 160 http://devmon.svn.sourceforge.net/devmon/?rev=160&view=rev Author: buchanmilne Date: 2009-11-23 14:04:13 +0000 (Mon, 23 Nov 2009) Log Message: ----------- Split the overview section in INSTALLATION out to a separate file Modified Paths: -------------- trunk/docs/INSTALLATION Added Paths: ----------- trunk/docs/OVERVIEW Modified: trunk/docs/INSTALLATION =================================================================== --- trunk/docs/INSTALLATION 2009-11-23 13:59:04 UTC (rev 159) +++ trunk/docs/INSTALLATION 2009-11-23 14:04:13 UTC (rev 160) @@ -1,51 +1,8 @@ INSTALLING DEVMON ===================================================================== - A quick overview of how Devmon works: ---------------------------------------------------------------------- +For an overview of how Devmon works, please see the OVERVIEW file. - Once devmon starts, it will run in the background as a daemon - (unless instructed not to), and will run in an endless loop. - The loop looks something like this: - - 1. Devmon reads in the list of hosts to be monitored from its - database. - - In a single-node installation, the Devmon database is stored - in the 'hosts.db' file. In a multi-node installation, it - is kept in a MySQL database. - - This database must be populated at least once (by running - devmon with the --readbbhosts flag) before devmon will be - able to monitor anything. - - 2. Devmon reads in its templates. A single-node installation - reads the templates from disk at the beginning of every - polling cycle. The multi-node version reads the templates - from the database, but only if they have been updated/changed - since the last time it read them. - - 3. Devmon does SNMP queries on all of the devices in its database. - SNMP queries are optimized so that if the same SNMP OID is - specified in multiple tests for a device, it is only queried - once. - - 4. Devmon applies template logic against the returned SNMP data. - The involves doing transforms, applying thresholds, and then - finally rendering the message to be sent to the display server. - - The rendered message consists of a timestamp, the overall - status of the device (aka red, yellow, green) as determined - by devmon according to the the SNMP data and template thresholds, - and an HTML page providing detailed information for the device. - The pages that you see in bb/hobbit for tests generated by devmon - are part of the message that devmon sends to the display server. - - 5. Devmon sends the rendered messages to the display server. - - 6. Devmon sleeps for any remaining time in the poll cycle. - - Single-node installation --------------------------------------------------------------------- Added: trunk/docs/OVERVIEW =================================================================== --- trunk/docs/OVERVIEW (rev 0) +++ trunk/docs/OVERVIEW 2009-11-23 14:04:13 UTC (rev 160) @@ -0,0 +1,46 @@ + A quick overview of how Devmon works: +--------------------------------------------------------------------- + + Once devmon starts, it will run in the background as a daemon + (unless instructed not to), and will run in an endless loop. + The loop looks something like this: + + 1. Devmon reads in the list of hosts to be monitored from its + database. + + In a single-node installation, the Devmon database is stored + in the 'hosts.db' file. In a multi-node installation, it + is kept in a MySQL database. + + This database must be populated at least once (by running + devmon with the --readbbhosts flag) before devmon will be + able to monitor anything. + + 2. Devmon reads in its templates. A single-node installation + reads the templates from disk at the beginning of every + polling cycle. The multi-node version reads the templates + from the database, but only if they have been updated/changed + since the last time it read them. + + 3. Devmon does SNMP queries on all of the devices in its database. + SNMP queries are optimized so that if the same SNMP OID is + specified in multiple tests for a device, it is only queried + once. + + 4. Devmon applies template logic against the returned SNMP data. + The involves doing transforms, applying thresholds, and then + finally rendering the message to be sent to the display server. + + The rendered message consists of a timestamp, the overall + status of the device (aka red, yellow, green) as determined + by devmon according to the the SNMP data and template thresholds, + and an HTML page providing detailed information for the device. + The pages that you see in bb/hobbit for tests generated by devmon + are part of the message that devmon sends to the display server. + + 5. Devmon sends the rendered messages to the display server. + + 6. Devmon sleeps for any remaining time in the poll cycle. + +$Id: $ + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <buc...@us...> - 2009-11-23 13:59:21
|
Revision: 159 http://devmon.svn.sourceforge.net/devmon/?rev=159&view=rev Author: buchanmilne Date: 2009-11-23 13:59:04 +0000 (Mon, 23 Nov 2009) Log Message: ----------- Export log_fatal, dm_templates uses it to try and tell you it couldnt find the template directory Modified Paths: -------------- trunk/modules/dm_config.pm Modified: trunk/modules/dm_config.pm =================================================================== --- trunk/modules/dm_config.pm 2009-11-02 06:50:45 UTC (rev 158) +++ trunk/modules/dm_config.pm 2009-11-23 13:59:04 UTC (rev 159) @@ -2,7 +2,7 @@ require Exporter; @ISA = qw(Exporter); @EXPORT = qw(initialize sync_servers time_test do_log db_connect - bin_path na nd db_get db_get_array db_do); + bin_path na nd db_get db_get_array db_do log_fatal); @EXPORT_OK = qw(%c); # Devmon: An SNMP data collector & page generator for the BigBrother & This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: SourceForge.net <no...@so...> - 2009-11-13 17:05:53
|
Bugs item #2897345, was opened at 2009-11-13 17:05 Message generated for change (Tracker Item Submitted) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=816977&aid=2897345&group_id=160720 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Devmon Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: devmon goes purple Initial Comment: Regarding devmon version 0.3.1-beta1 - Devmon stops working at irregular intervals. - The dm column in xymon "goes purple" for lack of new information. - devmon processes remain running. - running "sudo killall devmon" (on ubuntu 8.10) is enough to return to a "green" state - no errors or new entries in devmon.log file after communication stops - upon sending a SIGTERM to the devmon master process, it stops all other processes, so it looks like it is responding to signals as it should Other users have commented that running a cron job to kill the processes is their workaround. Or to use xymon to run a SCRIPT upon receiving a "purple" alert to restart the services. (comments compiled from thorsten.erdmann and gthomas on hobbit/xymon mailing list) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=816977&aid=2897345&group_id=160720 |
From: Buchan M. <bg...@st...> - 2009-11-12 17:14:44
|
On Wednesday, 11 November 2009 23:52:59 David Baldwin wrote: > Buchan, > > Died again around 1:16AM this morning again. > > Attached strace dump from child which was still running at time of > purple event. It looks like the problem is in the master - the child > just doesn't get any more actions to perform from the socket. > > The strace command I'm using is: > # strace -p 21854 -e trace=\!time,alarm,rt_sigprocmask -t -f > > Will look through your reply and patch later this morning. > > I'll run an strace -f -tt on the new master. Lucky that OSX Terminal > saves unlimited output lines ;) > > Thanks, David. I've spent way too much time on this, but attached is a patch against current svn (if you applied the previous patch, you'll have to 'svn revert modules/dm_snmp.pm' first). It's a bit too much to explain in detail, but it covers: -Trying to catch failures in the socketpair comms -Sends data to the forks that have been idle for more than the cycle time to check that they are alive -Reporting some detail on the forks, and hopefully warning if a fork has become stuck However, when sending the 'ping' to the forks, they don't get the data ... returning the same error message that we see in the debug logs when devmon hangs, the last message we get from a fork: [09-11-12@18:00:44] Fork 4 thaw failed attempting to thaw 1258045244ping: Not a HASH reference at /home/bgmilne/Download/source/svn/sf/devmon/trunk/modules/dm_snmp.pm line 555, <$__ANONIO__> line 8. (except now, I put the serialized data in there to get an idea of what it got). However, in order to not kill the forks unnecessarily, if the data could not be thawed, I just send a pong back: [09-11-12@18:00:44] Fork 4 replying to corrupt message with a pong which the master gets: [09-11-12@18:00:44] DEBUG SNMP: Fork 4 was pinged, checking for reply [09-11-12@18:00:44] DEBUG SNMP: Fork 4 has data, reading it [09-11-12@18:00:44] DEBUG SNMP: Fork 4 returned complete message for ping request [09-11-12@18:00:44] DEBUG SNMP: Dethawing data for ping of fork 4 [09-11-12@18:00:44] Fork 4 responded to ping request 0 with 1258045244 at 1258045244 (it should have sent the ping time back, but since it didn't get it, it sends 0 and the pong time). So, if the problem is where I think it is, we should see something in the logs, and devmon shouldn't hang. If devmon hasn't received a pong back after the cycle time, it will kill the fork, and a new one will be spawned. If the fork wasn't killed, it's idletime will end up being bigger than twice the cycle time, and this should be highlighted on the dm test page ... Once some of the issues above are understood or fixed (why the ping doesn't get through), I'll have to work through the logic again, clean it up, and commit it. Comments welcome on how the forks should be (mis)treated when not behaving. I've only tested this on my laptop, which is only polling one device at present (itself), but it runs .... Regards, Buchan |
From: <dba...@us...> - 2009-11-02 06:51:27
|
Revision: 158 http://devmon.svn.sourceforge.net/devmon/?rev=158&view=rev Author: dbaldwin Date: 2009-11-02 06:50:45 +0000 (Mon, 02 Nov 2009) Log Message: ----------- Add option on DEVMON tag line to specify custom IP address using ip() Very handy for devices with multiple interfaces which choose a different source IP address for their SNMP reply packets than the primary IP in bb-hosts definitions. e.g. (from bb-hosts file) 10.0.0.11 multihomehost # conn=worst,10.0.0.12 DEVMON:ip(10.0.0.12) Modified Paths: -------------- trunk/docs/USING trunk/modules/dm_config.pm Modified: trunk/docs/USING =================================================================== --- trunk/docs/USING 2009-10-27 07:32:42 UTC (rev 157) +++ trunk/docs/USING 2009-11-02 06:50:45 UTC (rev 158) @@ -45,6 +45,10 @@ other than the ones specified in the SNMPCIDS variable in the devmon.cfg file + ip() : Define a custom IP address for this device + (other than the primary address in bb-hosts - + useful for hosts with multiple interfaces) + port() : Define a custom UDP SNMP port for this device (other than the default port of 161) @@ -107,6 +111,18 @@ + ip() + + If, for some reason, the device you are attempting to poll does + not answer on the primary IP address in bb-hosts, you can define + a custom IP address to query the device with - for UDP protocols + like SNMP the source address in the reply packet may not match + the address in the bb-hosts file: + +10.0.0.10 multihomehost # conn=worst,10.0.0.11 DEVMON:ip(10.0.0.11) + + + port() If, for some reason, the device you are attempting to poll does Modified: trunk/modules/dm_config.pm =================================================================== --- trunk/modules/dm_config.pm 2009-10-27 07:32:42 UTC (rev 157) +++ trunk/modules/dm_config.pm 2009-11-02 06:50:45 UTC (rev 158) @@ -1329,6 +1329,11 @@ $bb_hosts{$host}{'cid'} = $1; $custom_cids = 1; } + + # See if we have a custom IP + if($options =~ s/(?:,|^)ip\((\d+\.\d+\.\d+\.\d+)\),?//) { + $ip = $1; + } # See if we have a custom port if($options =~ s/(?:,|^)port\((\d+?)\),?//) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: SourceForge.net <no...@so...> - 2009-10-27 07:54:55
|
Bugs item #2817549, was opened at 2009-07-06 19:32 Message generated for change (Settings changed) made by buchanmilne You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=816977&aid=2817549&group_id=160720 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Closed Resolution: Fixed Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: custom_excepts table not updated correctly Initial Comment: If I set in bb-hosts a rule like this: 127.0.0.1 host1.network.domain.net #DEVMON:cid(mycommunity),model(cisco;3550),except(all;ifName;i:Gi0/[1-4]) and after some day then I change to: 127.0.0.1 host1.network.domain.net #DEVMON:cid(mycommunity),model(cisco;3550),except(all;ifName;o:Gi0/1|Gi0/49) The result in table custom_excepts will be: | host1.network.domain.net | all | ifName | ignore | Gi0/[1-4] | | host1.network.domain.net | all | ifName | only | Gi0/1|Gi0/49 | Like you can see, the two lines persist where I would like just the second with only option. I'm running devmon in multine but just with one node at time active The solution is to delete it manually in the database, otherwise the result will be strange. ---------------------------------------------------------------------- Comment By: Buchan Milne (buchanmilne) Date: 2009-10-27 09:47 Message: This block isn't taking into account that the type of threshold may have changed: # Exceptions for my $test (keys %{$new_hosts{$host}{'except'}}) { for my $oid (keys %{$new_hosts{$host}{'except'}{$test}}) { for my $type (keys %{$new_hosts{$host}{'except'}{$test}{$oid}}) { my $val = $new_hosts{$host}{'except'}{$test}{$oid}{$type}; my $old_val = $old_hosts{$host}{'except'}{$test}{$oid}{$type}; if (defined $val and defined $old_val and $val ne $old_val) { db_do("update custom_excepts set data='$val' where " . "host='$host' and test='$test' and type='$type'"); } elsif(defined $val and !defined $old_val) { db_do("delete from custom_excepts where " . "host='$host' and test='$test' and type='$type'"); db_do("insert into custom_excepts values " . "('$host','$test','$oid','$type','$val')"); } elsif(!defined $val and defined $old_val) { db_do("delete from custom_excepts where " . "host='$host' and test='$test' and type='$type'"); } } } } Should be fixed in svn rev 157 (http://devmon.svn.sourceforge.net/viewvc/devmon?view=rev&revision=157) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=816977&aid=2817549&group_id=160720 |
From: SourceForge.net <no...@so...> - 2009-10-27 07:49:02
|
Bugs item #2817549, was opened at 2009-07-06 19:32 Message generated for change (Settings changed) made by buchanmilne You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=816977&aid=2817549&group_id=160720 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: custom_excepts table not updated correctly Initial Comment: If I set in bb-hosts a rule like this: 127.0.0.1 host1.network.domain.net #DEVMON:cid(mycommunity),model(cisco;3550),except(all;ifName;i:Gi0/[1-4]) and after some day then I change to: 127.0.0.1 host1.network.domain.net #DEVMON:cid(mycommunity),model(cisco;3550),except(all;ifName;o:Gi0/1|Gi0/49) The result in table custom_excepts will be: | host1.network.domain.net | all | ifName | ignore | Gi0/[1-4] | | host1.network.domain.net | all | ifName | only | Gi0/1|Gi0/49 | Like you can see, the two lines persist where I would like just the second with only option. I'm running devmon in multine but just with one node at time active The solution is to delete it manually in the database, otherwise the result will be strange. ---------------------------------------------------------------------- Comment By: Buchan Milne (buchanmilne) Date: 2009-10-27 09:47 Message: This block isn't taking into account that the type of threshold may have changed: # Exceptions for my $test (keys %{$new_hosts{$host}{'except'}}) { for my $oid (keys %{$new_hosts{$host}{'except'}{$test}}) { for my $type (keys %{$new_hosts{$host}{'except'}{$test}{$oid}}) { my $val = $new_hosts{$host}{'except'}{$test}{$oid}{$type}; my $old_val = $old_hosts{$host}{'except'}{$test}{$oid}{$type}; if (defined $val and defined $old_val and $val ne $old_val) { db_do("update custom_excepts set data='$val' where " . "host='$host' and test='$test' and type='$type'"); } elsif(defined $val and !defined $old_val) { db_do("delete from custom_excepts where " . "host='$host' and test='$test' and type='$type'"); db_do("insert into custom_excepts values " . "('$host','$test','$oid','$type','$val')"); } elsif(!defined $val and defined $old_val) { db_do("delete from custom_excepts where " . "host='$host' and test='$test' and type='$type'"); } } } } Should be fixed in svn rev 157 (http://devmon.svn.sourceforge.net/viewvc/devmon?view=rev&revision=157) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=816977&aid=2817549&group_id=160720 |
From: SourceForge.net <no...@so...> - 2009-10-27 07:47:30
|
Bugs item #2817549, was opened at 2009-07-06 19:32 Message generated for change (Comment added) made by buchanmilne You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=816977&aid=2817549&group_id=160720 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: custom_excepts table not updated correctly Initial Comment: If I set in bb-hosts a rule like this: 127.0.0.1 host1.network.domain.net #DEVMON:cid(mycommunity),model(cisco;3550),except(all;ifName;i:Gi0/[1-4]) and after some day then I change to: 127.0.0.1 host1.network.domain.net #DEVMON:cid(mycommunity),model(cisco;3550),except(all;ifName;o:Gi0/1|Gi0/49) The result in table custom_excepts will be: | host1.network.domain.net | all | ifName | ignore | Gi0/[1-4] | | host1.network.domain.net | all | ifName | only | Gi0/1|Gi0/49 | Like you can see, the two lines persist where I would like just the second with only option. I'm running devmon in multine but just with one node at time active The solution is to delete it manually in the database, otherwise the result will be strange. ---------------------------------------------------------------------- >Comment By: Buchan Milne (buchanmilne) Date: 2009-10-27 09:47 Message: This block isn't taking into account that the type of threshold may have changed: # Exceptions for my $test (keys %{$new_hosts{$host}{'except'}}) { for my $oid (keys %{$new_hosts{$host}{'except'}{$test}}) { for my $type (keys %{$new_hosts{$host}{'except'}{$test}{$oid}}) { my $val = $new_hosts{$host}{'except'}{$test}{$oid}{$type}; my $old_val = $old_hosts{$host}{'except'}{$test}{$oid}{$type}; if (defined $val and defined $old_val and $val ne $old_val) { db_do("update custom_excepts set data='$val' where " . "host='$host' and test='$test' and type='$type'"); } elsif(defined $val and !defined $old_val) { db_do("delete from custom_excepts where " . "host='$host' and test='$test' and type='$type'"); db_do("insert into custom_excepts values " . "('$host','$test','$oid','$type','$val')"); } elsif(!defined $val and defined $old_val) { db_do("delete from custom_excepts where " . "host='$host' and test='$test' and type='$type'"); } } } } Should be fixed in svn rev 157 (http://devmon.svn.sourceforge.net/viewvc/devmon?view=rev&revision=157) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=816977&aid=2817549&group_id=160720 |
From: <buc...@us...> - 2009-10-27 07:32:54
|
Revision: 157 http://devmon.svn.sourceforge.net/devmon/?rev=157&view=rev Author: buchanmilne Date: 2009-10-27 07:32:42 +0000 (Tue, 27 Oct 2009) Log Message: ----------- Handle line continuations in bb-hosts file (W.J.M. Nelis) Modified Paths: -------------- trunk/modules/dm_config.pm Modified: trunk/modules/dm_config.pm =================================================================== --- trunk/modules/dm_config.pm 2009-10-26 12:34:38 UTC (rev 156) +++ trunk/modules/dm_config.pm 2009-10-27 07:32:42 UTC (rev 157) @@ -1784,6 +1784,13 @@ "host='$host' and test='$test' and type='$type'"); } } + # Clean up exception types that may have been present in the past + foreach (keys %{$old_hosts{$host}{'except'}{$test}{$oid}}) { + do_log("Checking for stale exception types $_ on host $host test $test oid $oid") if $g{'debug'}; + if (not defined $new_hosts{$host}{'except'}{$test}{$oid}{$_}) { + db_do("delete from custom_excepts where host='$host' and test='$test' and type='$_' and oid='$oid'"); + } + } } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <buc...@us...> - 2009-10-26 13:49:53
|
Revision: 156 http://devmon.svn.sourceforge.net/devmon/?rev=156&view=rev Author: buchanmilne Date: 2009-10-26 12:34:38 +0000 (Mon, 26 Oct 2009) Log Message: ----------- Ignore SNMP failures where the snmp error string is empty. This allows us, in the case where we get no data for one test (e.g., MIB is not supported/configured) to keep polling the other tests. Tests for which there is no data will then appear clear, while tests for which there is data will not (without this change, tests for which there is data available would appear clear, and finding the test with missing data was non-trivial). Modified Paths: -------------- trunk/modules/dm_snmp.pm Modified: trunk/modules/dm_snmp.pm =================================================================== --- trunk/modules/dm_snmp.pm 2009-10-26 11:59:58 UTC (rev 155) +++ trunk/modules/dm_snmp.pm 2009-10-26 12:34:38 UTC (rev 156) @@ -554,10 +554,12 @@ my $snmp_err; do_log("DEBUG SNMP: $SNMP_Session::errmsg",0) if $g{'debug'}; ($snmp_err = $SNMP_Session::errmsg) =~ s/\n.*//s; - my $error_str = - "Error walking $oid for $dev ($snmp_err)"; - $data_out{'error'}{$error_str} = 0; - ++$failed_query; + if ($snmp_err ne '') { + my $error_str = + "Error walking $oid for $dev ($snmp_err)"; + $data_out{'error'}{$error_str} = 0; + ++$failed_query; + } } else { # Record our maxrep value for our next poll cycle This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <buc...@us...> - 2009-10-26 12:00:18
|
Revision: 155 http://devmon.svn.sourceforge.net/devmon/?rev=155&view=rev Author: buchanmilne Date: 2009-10-26 11:59:58 +0000 (Mon, 26 Oct 2009) Log Message: ----------- Use table header tags instead of table data tags for column headings (Tracker ID #2592460, Richard Finegold) Modified Paths: -------------- trunk/modules/dm_tests.pm Modified: trunk/modules/dm_tests.pm =================================================================== --- trunk/modules/dm_tests.pm 2009-09-25 04:33:30 UTC (rev 154) +++ trunk/modules/dm_tests.pm 2009-10-26 11:59:58 UTC (rev 155) @@ -1792,8 +1792,8 @@ $line =~ s/\|/ /g; } else { - $line =~ s/\|/<\/td><td>/g; - $table .= "<tr><td>$line</td></tr>\n"; + $line =~ s/\|/<\/th><th>/g; + $table .= "<tr><th>$line</th></tr>\n"; } next MSG_LINE; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: David B. <dav...@au...> - 2009-09-30 08:23:08
|
Buchan, > Moving this thread onto the devmon-devel list .... > > Good move! > On Tuesday, 29 September 2009 08:57:39 David Baldwin wrote: > >> It would be good to get some plans for devmon development together. >> > > Indeed. I have had some of my own ideas, but it may be best to have more than > one person's thoughts on them. > > >> My >> current mish-mash of templates spanning varying hardware configs >> (differing RAID hardware) off a common base (HP Proliant servers) with >> various OS (Windows and Centos) and software (SNMP-Informant, DHCP >> stats, squid, Falconstor, etc) installed is driving me crazy! >> > > I've been wanting to move away from the one template per device model. There > are a number of cases when it fails: > -features that are present, but not always used/populated (IML on ProLiant, > quotas on Netapps, QoS on Cisco routers etc.) > -features that are not always present, the best example here is software with > SNMP support (e.g. RADIUS, squid, etc.). > > I think it may be feasible to move to a MIB-biased model as follows: > 1)Allow multiple templates per device (e.g. > DEVMON:model(compaq;server,squid;cache) > Need to ensure no collisions of test namespace, or have a precedence - first template wins. Also need to ensure subsequent options (test, thresh, etc) are tied to the relevant template if there is any potential for ambiguity, or a way of referencing the template. > 2)Allow templates to inherit from other templates (e.g. allow cisco-7206 to > specify that it should inherit cisco-IFMIB, while linux-netsnmp might inherit > ietf-IFMIB) > That would be very handy. At the moment I just have a symlink tangle going on... > 3)Allow templates to specify an OID that should be polled to determine if the > template is supported on the device. We need some means of electing a template > (e.g. maybe optional templates can specify what vendors they are compatible > with, e.g. squid-cache may specify that it is compatible with > sun,linux,windows device vendors, where a cisco QoS template may specify that > it is compatible with cisco device templates > > This should allow us to: > -not end up making host-specific templates which have tests from various > templates (e.g. I had a linux-squid into which I had just copied all of comaq- > server;linux-netsnmp and squid-cache) > -reduce the duplication of content between templates (think if_* for all the > cisco templates) > > >> Would also be good to nail a few things like the empty repeaters for UPS >> alarms, event logs, etc - maybe an option "emptyok" table option. >> > > Besides your change to increase the threshold for failed queries before devmon > gives up on a device, I have a change in my checkout that ignores any failures > if the error message is empty. I am not sure if it will still handle the > failures it was supposed to catch, I will try and test it. > > I have got "emptyok" going today in test for my UPS template, also incorporating Thorsten's "no error" patch. No major changes - I'll hopefully get a chance tomorrow to commit to SVN. I'm just trying to work out whether I should include the table headings - at the moment the table is completely missing. > However, I wonder if instead the device detection should check one OID from > each test in a template (maybe the same as from (3) above), and remove tests > that seem to not be supported on the device when writing into hosts.db. > > I would also like some better syntax for specifying the tests on a host (until > the test detection works), e.g. being able to specify which tests to exclude > (e.g. DEVMON:tests(*,-quota), instead of having to specify all the tests that > should be run (and then forgetting this when you add a new test and wonder why > it's not working). > > +1 for that! > At some stage I would also like to see if it is possible to move custom > thresholds into Xymon configuration files (and out of the DEVMON tag in bb- > hosts). This can be useful, especially when you start trying agent-less > monitoring of servers which have SNMP enabled and which have similar but not > identical tests. > > >> I've also thought about putting together some test templates that do >> unit testing of various template operations - it could be based of >> commonly available data like system, IfTable, etc which has repeaters >> and non-repeaters. Stress test OID dependency stuff in transforms, >> message generation, etc. >> > > One of my bigger concerns when making changes is that some features may only > be used on specific templates, and at present the only way to test those > features or templates is if you have the required hardware. I wonder if it is > worthwhile writing a trivial SNMP server that returns sample data that could > be collected and stored with the template. This would allow development of > templates without direct access to the device in question. > > It's probably pretty straightforward to do up an snmpd.conf file that would do this - run up a localhost daemon on some random high port backended by some perl to generate whatever test data required. Test wrapper could start it up, run tests and tear it down again afterwards. >> Was also thinking of looking into OID pruning to not retrieve data which >> doesn't actually get used, and looking into SNMP query optimisation but >> have no idea what potential there for that. >> > > Is that such a problem? I can't think where data is retrieved that is not > used. > > If OIDs are defined in oids file, devmon will retrieve them even if they are never used - it generates errors if they are missing - I have seen this in testing. Another possible optimisation would be to only re-parse a template if any of its files have changed. > In the end, i think we need to either move away from SNMP_Session, or use > additional modules (the way mrtg does) for the following reasons: > -SNMPv3 support > -possibly address some of the PDU etc. related issues > I put in a patch that bumped it up, but I think it's still too low for some big repeaters such as device event logs. I think devices like Brocade switches have extensive event logs but the recent stuff is at the end. This would require some sort of filtering either in the SNMP query itself, or of the returned values. > -allow use of MIBs to replace some of the manual work used in maintaining > templates (possibly remove the need to have oids and transforms files for any > tests) > Possible, but that introduces another dependency on the parsing functionality required, correct installation of MIBs, etc. > -move to an async-based polling method (possibly doing away with the forked > children) > > I also found an error in SNMP_Session retrieving a repeater at the end of the MIB view. Fortunately I didn't end up needing that OID, but I traced it to a bug in SNMP_Session deep in the bowels of BER and such like. > I was also wondering if the modules should be moved into a Devmon namespace > (e.g. Devmon::SNMP instead of dm_snmp). > > I will try and format this as a road map on the devmon wiki, as some parts may > be feasible in the 0.3.x series, while for others we may want to have a branch > for the changes in question. > > Regards, > Buchan > All for now, David. -- David Baldwin - IT Unit Australian Sports Commission www.ausport.gov.au Tel 02 62147830 Fax 02 62141830 PO Box 176 Belconnen ACT 2616 dav...@au... Leverrier Street Bruce ACT 2617 ------------------------------------------------------------------------------------- Keep up to date with what's happening in Australian sport visit http://www.ausport.gov.au This message is intended for the addressee named and may contain confidential and privileged information. If you are not the intended recipient please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you receive this message in error, please delete it and notify the sender. ------------------------------------------------------------------------------------- |
From: Buchan M. <bg...@st...> - 2009-09-30 07:01:18
|
Moving this thread onto the devmon-devel list .... On Tuesday, 29 September 2009 08:57:39 David Baldwin wrote: > It would be good to get some plans for devmon development together. Indeed. I have had some of my own ideas, but it may be best to have more than one person's thoughts on them. > My > current mish-mash of templates spanning varying hardware configs > (differing RAID hardware) off a common base (HP Proliant servers) with > various OS (Windows and Centos) and software (SNMP-Informant, DHCP > stats, squid, Falconstor, etc) installed is driving me crazy! I've been wanting to move away from the one template per device model. There are a number of cases when it fails: -features that are present, but not always used/populated (IML on ProLiant, quotas on Netapps, QoS on Cisco routers etc.) -features that are not always present, the best example here is software with SNMP support (e.g. RADIUS, squid, etc.). I think it may be feasible to move to a MIB-biased model as follows: 1)Allow multiple templates per device (e.g. DEVMON:model(compaq;server,squid;cache) 2)Allow templates to inherit from other templates (e.g. allow cisco-7206 to specify that it should inherit cisco-IFMIB, while linux-netsnmp might inherit ietf-IFMIB) 3)Allow templates to specify an OID that should be polled to determine if the template is supported on the device. We need some means of electing a template (e.g. maybe optional templates can specify what vendors they are compatible with, e.g. squid-cache may specify that it is compatible with sun,linux,windows device vendors, where a cisco QoS template may specify that it is compatible with cisco device templates This should allow us to: -not end up making host-specific templates which have tests from various templates (e.g. I had a linux-squid into which I had just copied all of comaq- server;linux-netsnmp and squid-cache) -reduce the duplication of content between templates (think if_* for all the cisco templates) > Would also be good to nail a few things like the empty repeaters for UPS > alarms, event logs, etc - maybe an option "emptyok" table option. Besides your change to increase the threshold for failed queries before devmon gives up on a device, I have a change in my checkout that ignores any failures if the error message is empty. I am not sure if it will still handle the failures it was supposed to catch, I will try and test it. However, I wonder if instead the device detection should check one OID from each test in a template (maybe the same as from (3) above), and remove tests that seem to not be supported on the device when writing into hosts.db. I would also like some better syntax for specifying the tests on a host (until the test detection works), e.g. being able to specify which tests to exclude (e.g. DEVMON:tests(*,-quota), instead of having to specify all the tests that should be run (and then forgetting this when you add a new test and wonder why it's not working). At some stage I would also like to see if it is possible to move custom thresholds into Xymon configuration files (and out of the DEVMON tag in bb- hosts). This can be useful, especially when you start trying agent-less monitoring of servers which have SNMP enabled and which have similar but not identical tests. > I've also thought about putting together some test templates that do > unit testing of various template operations - it could be based of > commonly available data like system, IfTable, etc which has repeaters > and non-repeaters. Stress test OID dependency stuff in transforms, > message generation, etc. One of my bigger concerns when making changes is that some features may only be used on specific templates, and at present the only way to test those features or templates is if you have the required hardware. I wonder if it is worthwhile writing a trivial SNMP server that returns sample data that could be collected and stored with the template. This would allow development of templates without direct access to the device in question. > Was also thinking of looking into OID pruning to not retrieve data which > doesn't actually get used, and looking into SNMP query optimisation but > have no idea what potential there for that. Is that such a problem? I can't think where data is retrieved that is not used. In the end, i think we need to either move away from SNMP_Session, or use additional modules (the way mrtg does) for the following reasons: -SNMPv3 support -possibly address some of the PDU etc. related issues -allow use of MIBs to replace some of the manual work used in maintaining templates (possibly remove the need to have oids and transforms files for any tests) -move to an async-based polling method (possibly doing away with the forked children) I was also wondering if the modules should be moved into a Devmon namespace (e.g. Devmon::SNMP instead of dm_snmp). I will try and format this as a road map on the devmon wiki, as some parts may be feasible in the 0.3.x series, while for others we may want to have a branch for the changes in question. Regards, Buchan |
From: <dba...@us...> - 2009-09-25 04:34:01
|
Revision: 154 http://devmon.svn.sourceforge.net/devmon/?rev=154&view=rev Author: dbaldwin Date: 2009-09-25 04:33:30 +0000 (Fri, 25 Sep 2009) Log Message: ----------- extras/do_devmon.c fixes to handle multiple RRD data reports in one test Modified Paths: -------------- trunk/extras/do_devmon.c Modified: trunk/extras/do_devmon.c =================================================================== --- trunk/extras/do_devmon.c 2009-09-23 04:53:49 UTC (rev 153) +++ trunk/extras/do_devmon.c 2009-09-25 04:33:30 UTC (rev 154) @@ -9,7 +9,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char devmon_rcsid[] = "$Id$"; +static char devmon_rcsid[] = "$Id $"; int do_devmon_rrd(char *hostname, char *testname, char *msg, time_t tstamp) { @@ -23,10 +23,13 @@ static pcre *exclpattern = NULL; int in_devmon = 1; int numds = 0; + char *rrdbasename; + rrdbasename = xstrdup(testname); curline = msg; while (curline) { - char *fsline, *p; + char *fsline = NULL; + char *p; char *columns[MAXCOLS]; int columncount; char *ifname = NULL; @@ -38,8 +41,14 @@ eoln = strchr(curline, '\n'); if (eoln) *eoln = '\0'; - if(!strncmp(curline, "<!--DEVMON",10)) { + if(!strncmp(curline, "<!--DEVMON RRD: ",16)) { in_devmon = 0; + if(rrdbasename) {xfree(rrdbasename);rrdbasename = NULL;} + rrdbasename = strtok(curline+16," "); + if (rrdbasename == NULL) rrdbasename = xstrdup(testname); + dbgprintf("DEVMON: changing testname from %s to %s\n",testname,rrdbasename); + numds = 0; + if(devmon_tpl) {xfree(devmon_tpl);devmon_tpl= NULL;} goto nextline; } if(in_devmon == 0 && !strncmp(curline, "-->",3)) { @@ -70,7 +79,7 @@ devmon_params[numds+5] = rra4; devmon_params[numds+6] = NULL; - devmon_tpl = setup_template(devmon_params); + if (devmon_tpl == NULL) devmon_tpl = setup_template(devmon_params); goto nextline; } @@ -93,18 +102,18 @@ strcat(rrdvalues,dsval); } /* File names in the format if_load.eth0.0.rrd */ - snprintf(rrdfn, sizeof(rrdfn)-1, "%s.%s.rrd", testname, ifname); + snprintf(rrdfn, sizeof(rrdfn)-1, "%s.%s.rrd", rrdbasename, ifname); rrdfn[sizeof(rrdfn)-1] = '\0'; - dbgprintf("Sending from devmon to RRD for %s %s: %s\n",testname,ifname,rrdvalues); + dbgprintf("Sending from devmon to RRD for %s %s: %s\n",rrdbasename,ifname,rrdvalues); create_and_update_rrd(hostname, rrdfn, devmon_params, devmon_tpl); if (ifname) { xfree(ifname); ifname = NULL; } if (eoln) *eoln = '\n'; - xfree(fsline); nextline: + if (fsline) { xfree(fsline); fsline = NULL; } curline = (eoln ? (eoln+1) : NULL); } - + if(devmon_tpl) {xfree(devmon_tpl);devmon_tpl= NULL;} return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dba...@us...> - 2009-09-23 04:53:57
|
Revision: 153 http://devmon.svn.sourceforge.net/devmon/?rev=153&view=rev Author: dbaldwin Date: 2009-09-23 04:53:49 +0000 (Wed, 23 Sep 2009) Log Message: ----------- Handle leaf data in tables correctly in dm_tests.pm Modified Paths: -------------- trunk/modules/dm_tests.pm Modified: trunk/modules/dm_tests.pm =================================================================== --- trunk/modules/dm_tests.pm 2009-09-23 01:39:50 UTC (rev 152) +++ trunk/modules/dm_tests.pm 2009-09-23 04:53:49 UTC (rev 153) @@ -1874,8 +1874,8 @@ my $oid_h = \%{$oids->{$oid}}; # Get our oid vars - my $val = $oid_h->{'val'}{$leaf}; - my $color = $oid_h->{'color'}{$leaf}; + my $val = $oid_h->{'repeat'} ? $oid_h->{'val'}{$leaf} : $oid_h->{'val'}; + my $color = $oid_h->{'repeat'} ? $oid_h->{'color'}{$leaf} : $oid_h->{'color'}; if (!defined $val) { do_log("Undefined value for $oid in test $test on $device, ignoring row for $pri_val") if $g{'debug'}; next T_LEAF; @@ -1981,7 +1981,7 @@ # Otherwise just display the oid val else { - my $substr = $oids->{$root}{'val'}{$leaf}; + my $substr = $oids->{$root}{'repeat'} ? $oids->{$root}{'val'}{$leaf} : $oids->{$root}{'val'}; $substr = 'Undefined' if !defined $substr; $row_data =~ s/\{$root}/$substr/; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dba...@us...> - 2009-09-23 01:40:40
|
Revision: 152 http://devmon.svn.sourceforge.net/devmon/?rev=152&view=rev Author: dbaldwin Date: 2009-09-23 01:39:50 +0000 (Wed, 23 Sep 2009) Log Message: ----------- cleanup SWITCH $val_pair parsing in dm_templates.pm Modified Paths: -------------- trunk/modules/dm_templates.pm Modified: trunk/modules/dm_templates.pm =================================================================== --- trunk/modules/dm_templates.pm 2009-09-22 05:21:12 UTC (rev 151) +++ trunk/modules/dm_templates.pm 2009-09-23 01:39:50 UTC (rev 152) @@ -270,31 +270,33 @@ $trans_data->{'dep_oid'} = $dep_oid; for my $val_pair (split /\s*,\s*/, $switch_data) { - my ($if, $then) = ($1, $2) - if $val_pair =~ /^\s*(\S+.*?)\s*=\s*(.+?)\s*$/; - my $type = ''; - if($if =~ /^\d+$/) {$type = 'num'} - elsif($if =~ /^>\s*([+-]?\d+(?:\.\d+)?)$/) - {$type = 'gt'; $if = $1} - elsif($if =~ /^>=\s*([+-]?\d+(?:\.\d+)?)$/) - {$type = 'gte'; $if = $1} - elsif($if =~ /^<\s*([+-]?\d+(?:\.\d+)?)$/) - {$type = 'lt'; $if = $1} - elsif($if =~ /^<=\s*([+-]?\d+(?:\.\d+)?)$/) - {$type = 'lte'; $if = $1} - elsif - ($if =~ /^([+-]?\d+(?:\.\d+)?)\s*-\s*([+-]?\d+(?:\.\d+)?)$/) - {$type = 'rng'; $if = "$1-$2"} + if( $val_pair =~ /^\s*(\S+.*?)\s*=\s*(.+?)\s*$/) { + my ($if, $then) = ($1, $2); + my $type = ''; + if($if =~ /^\d+$/) {$type = 'num'} + elsif($if =~ /^>\s*([+-]?\d+(?:\.\d+)?)$/) + {$type = 'gt'; $if = $1} + elsif($if =~ /^>=\s*([+-]?\d+(?:\.\d+)?)$/) + {$type = 'gte'; $if = $1} + elsif($if =~ /^<\s*([+-]?\d+(?:\.\d+)?)$/) + {$type = 'lt'; $if = $1} + elsif($if =~ /^<=\s*([+-]?\d+(?:\.\d+)?)$/) + {$type = 'lte'; $if = $1} + elsif + ($if =~ /^([+-]?\d+(?:\.\d+)?)\s*-\s*([+-]?\d+(?:\.\d+)?)$/) + {$type = 'rng'; $if = "$1-$2"} - elsif($if =~ /^'(.+)'$/) {$type = 'str'; $if = $1} - elsif($if =~ /^"(.+)"$/) {$type = 'reg'; $if = $1} - elsif($if =~ /^default$/i) {$default = $then; next} + elsif($if =~ /^'(.+)'$/) {$type = 'str'; $if = $1} + elsif($if =~ /^"(.+)"$/) {$type = 'reg'; $if = $1} + elsif($if =~ /^default$/i) {$default = $then; next} + $cases->{++$case_num}{'if'} = $if; + $cases->{$case_num}{'type'} = $type; + $cases->{$case_num}{'then'} = $then; - do_log("Could not determine case type for string '$if'", 0) - and next PTL_OID if !defined $if; - $cases->{++$case_num}{'if'} = $if; - $cases->{$case_num}{'type'} = $type; - $cases->{$case_num}{'then'} = $then; + } else { + do_log("Could not parse $dep_oid : ".uc($trans_type)." option '$val_pair'"); + next PTL_OID; + } } # Sort our case numbers this once This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |