Example, I would like to trim the result of ${N=SwisEntity;M=NodeDescription} or add text at the middle of it.
Or I want the result to be all in upper case and vice versa.
Not directly. You could write a wrapper SWQL query and do some minor string manipulation there, but it would get complex and tough to keep up.
${SWQL: SELECT REPLACE([N].NodeDescription, 'Windows', 'Microsoft Windows') AS [Output] FROM Orion.Nodes AS [N] WHERE [N].Uri = '${N=SwisEntity;M=Uri}'}
Something like the above - which 100% has not been tested - at all.
I'm not sure if it'd always work out as expected, but you might be able to have the alert fire off a PowerShell script to manipulate the string data, then store it into a different custom property. Then, you might be able to have a 2nd level escalation fire off to do the email part of it which would call the data you stored into that other custom property.
I do something like this for our CMTS nodes when the bandwidth for specific interfaces drops. The alert will run an NCM command, which will store the results, then the escalation action will dump those results into an email and fire it off.
Using an Informational/Notice Alert to update Custom Properties is a great way to automate things. Someone shared a way to do this in Custom Property Automation - Site/Country/Region .
I'll try this one. Thank you!
thank you for the inputs, I'll try this.
I'd say what kmsigma said, but with a flavour of "Yeah no worries"
For some macros you can add a ":F ..."to them to adjust them a bit. Not relevant to what you're trying to do here, but thought I'd mention itThere's a page here https://github.com/solarwinds/OrionSDK/wiki/SWQL-Functions for the functions in SWQL and the string functions section is what you want. There's some undocumented functions floating around, but you can update this page, I placed a couple in the pastIf you want to add text in the middle you could use REPLACE or CHARINDEX or CONCAT or some combination of those 3