What is it you're trying to accomplish? I might be misinterpreting things but I'm guessing you want to find a match in the class for compare_val? One thing to know is that the class command typically uses the string and not the value - there might be a way to change that but I've never used it that way. In other words, you should flip the string and the value in your class. So if your class looks like this:
ltm data-group testssl-ma {
records {
AMIT2004.abc.com {
data amit
}
abcd.abcd.com {
data a
}
AMIT2004.foofoo.com {
data b
}
}
type string
}
And your iRule looks like this:
when HTTP_REQUEST {
set compare_val abcd.abcd.com
log local0.error "[class match -value $compare_val equals testssl-ma]"
}
You would get a log entry containing an "a", is that what you're trying to do?