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
  • Thanks for the tip on how to test the script. I had it set up as a script, just couldn't figure out how to dynamically gather the name. Now I am trying to take this script and put it into a rule condition. Are the variables that I defined above like portfolio, tier, priority, etc. available to the rest of the rule when the check of the rule is performed? Can I use these values to pass the information into an snmp trap or to set up message in the actions that I can email that reads something like ...The backup job on <instance> failed. Please notify the <Portfolio> team of the <priority> failure.
Reply
  • Thanks for the tip on how to test the script. I had it set up as a script, just couldn't figure out how to dynamically gather the name. Now I am trying to take this script and put it into a rule condition. Are the variables that I defined above like portfolio, tier, priority, etc. available to the rest of the rule when the check of the rule is performed? Can I use these values to pass the information into an snmp trap or to set up message in the actions that I can email that reads something like ...The backup job on <instance> failed. Please notify the <Portfolio> team of the <priority> failure.
Children
No Data