This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to Parse a string in a rule condition

I have the need to take a string that is used as a Display Name for a database instance in Foglight for SQL Server and parse it.  For instance, the Display name might be something like C-Tier1-DatabaseInstance.   I am building a rule where I have the need to split the string in separate variables to build conditional statements.  What is the syntax to do something like this?

Parents
  • Thank you very much George! The only other thing that I had to do was to set the scope in each rule variable. It didn't like the @DBSS_HostName.split("-")[0]. It would return null. I change each variable to use the scope. In initial tests, this working like I was hoping.
Reply
  • Thank you very much George! The only other thing that I had to do was to set the scope in each rule variable. It didn't like the @DBSS_HostName.split("-")[0]. It would return null. I change each variable to use the scope. In initial tests, this working like I was hoping.
Children
No Data