Hi Folks, hoping someone can help me with this one.
I am trying to do a if then else in a VROPs super metric. Effectively what i am trying to do is to check if the name of the cluster matches a string and if it does the value is equal to 3 and if not the value is equal to 4.
This is done in the format:
expression_condition ? expression_if_true : expression_if_false.
I am trying:
${adaptertype=VMWARE, objecttype=ClusterComputeResource, attribute=config|name, depth=1}contains"ClusterName" ? 3:4
has anyone achieve something similar. i have tried a few different variations of the above but no joy. I have seen similar stuff done with numeric metrics but not with string values.
String operators are valid in 'where' condition only. For example: ${this, metric=summary|runtime|isIdle, where = "System Properties|resource_kind_type !contains GENERAL"}
thanks very much for the reply, that explains why i cant get the IF statement to work with the string.
I don't see how i can achieve what i am trying to do with the where clause in VROPs as it look like i can only return one value using the where clause. I am trying to return a value for some cluster and a different value for another cluster.