From: Buchan M. <bg...@st...> - 2007-10-30 07:46:15
|
On Monday 29 October 2007 20:12:25 Teresa Kroeker wrote: > Buchan Milne wrote: > > On Monday 22 October 2007 17:43:23 Teresa Kroeker wrote: > >> I was able to create a transform that can create a correctly colored dot > >> with: > >> > >> SColour1 : SWITCH : {SensTemp1} < 24 = &green, 24 - 28 = > >> &yellow, > 28 = &red > >> > >> but the page color doesn't change. Will this be impossible to do? > >> > >> We need to get mail alerts when the temperature is too high and I can't > >> get devmon to work they way I would like it to. > > > > You should use SColour1.color (instead of STemp1.color) in your message, > > and I think that should result in the page changing colour. > > > > However, it does seem like numeric thresholds are broken in 0.3.0-beta2 > > ... I'll try and take a look at it some time. > > I gave that a try and SColour1.color was always green even though > SColour1 changed colour. Hence the page was always green. Ah, I see what you did, you're just forcing the normal Hobbit &red/&yellow/&green text into the page. You should rather put thresholds on your SColour1 variable, and then SColour1.color should work. Let me try this myself ... Yes, this seems to work. On the updated compaq-server template I posted last week, I added: cpqHeTemperatureCelsiusFake: SWITCH : {cpqHeTemperatureCelsius} < 28 = OK, 28 - 30 = WARN, > 30 = CRIT to transforms, cpqHeTemperatureCelsiusFake : green : OK : Normal cpqHeTemperatureCelsiusFake : yellow : WARN : Warning cpqHeTemperatureCelsiusFake : red : CRIT : Critical to thresholds, and then using cpqHeTemperatureCelsiusFake.color in the message file results in the correct icon, and changes the page colour appropriately. But, fixing the numeric thresholds need to be done. Regards, Buchan |