Translation Rule

Started by wabbot22, October 10, 2014, 12:35:17 AM

Previous topic - Next topic

wabbot22

Hi,

I´ve a Problem.
I request a FAN Status from a cisco Switch an get a value from 1-4 back.
The Datatype is an integer. I want to translate the value in a cleartext word like OK warning etc.
Can someone tell me how I can do this ? I´ve a solution, but it works for one poll, after the next one
I´ve get only 0.

Many Thanks !!!

Alex Kirhenshtein

You can make use transformation script on DCI to do that. Sample script:
if ($1 == 0) { return "OK"; }
if ($1 == 1) { return "STATUS_1"; }
if ($1 == 2) { return "STATUS_2"; }
return "UNKNOWN (" . $1 . ")";