From: Buchan M. <bg...@st...> - 2011-02-04 05:17:02
|
On Thursday, 3 February 2011 21:01:20 Dan Smith wrote: > Are regular expressions supported in the OID name in the thresholds file? No. > I guess I was trying to be lazy, but I've got data aliases defined like > this: > # Power down=0 up=1 > AbcPEM48VoltAPowerSupply : .x.x.x.x.x.x.x.x.x.x.x.1.0 : leaf > AbcPEM48VoltBPowerSupply : .x.x.x.x.x.x.x.x.x.x.x.2.0 : leaf > AbcPEM5VoltAPowerSupply : .x.x.x.x.x.x.x.x.x.x.x.3.0 : leaf > AbcPEM5VoltBPowerSupply : .x.x.x.x.x.x.x.x.x.x.x.4.0 : leaf > AbcPEMHot5VoltPowerSupply : .x.x.x.x.x.x.x.x.x.x.x.5.0 : leaf This data would have better been supplied in a table IMHO, in which case you would have only needed one set of thresholds. > And I would like to apply the same up/down green/red threshold to > all...something like this: > AbcPEM.* : red : =0 : PSU is > currently DOWN > AbcPEM.* : green : =1 : PSU is > currently UP > > When I do that, devmon throws this error: > [11-02-03@13:54:06] Undefined oid 'AbcPEM.*' referenced in > /usr/share/devmon/templates/System-Abc/chassis/thresholds at line 8 > [11-02-03@13:54:06] Undefined oid 'AbcPEM.*' referenced in > /usr/share/devmon/templates/System-Abc/chassis/thresholds at line 8 > > I can't imagine a more simple regular expression than ".*", so am I correct > that the regular expression support does not apply to the data alias. > The TEMPLATES file talks about regular expressions in thresholds, but I > think it is saying that they can be used only in the VALUE portion. Correct. Regards, Buchan |