I am integrating Solarwinds with an external tool using data in JSON format. I have a component monitor that uses the Component Status/Error description variable (N=SwisEntity;M=ComponentAlert.StatusOrErrorDescription) as one of its JSON values.
Unfortunately, a few of the component messages contain string data that results in invalid JSON. Recent examples include:
A) message string contains a double quote - since I am using double quotes to encase the string in the JSON, this inner-string quote prematurely closes the JSON key-value pair.
"Component_ErrorStatus": ""SQL Server Reporting Services (ISARS)" service status is - Running.",
B) message string contains a carriage return, which is being interpreted as an invalid JSON end of line.
"Component_ErrorStatus": "Invalid SSL certificate. Authentication failed! Closing the connection... Exception message: A call to SSPI failed, see inner exception.
The message or signature supplied for verification has been altered",
Using SWQL Studio I am able to query component status (Orion.APM.CurrentComponentStatus) and see the 'ErrorMessage' property, but cannot seem to find the table containing the actual message strings. How would I go about:
A) locating the message strings in SWQL Studio and
B) replace offending invalid characters with a JSON-safe alternative (aka replace double quotes with single quotes & remove carriage returns in favor of spaces)
SolarWinds solutions are rooted in our deep connection to our user base in the THWACK® online community. More than 150,000 members are here to solve problems, share technology and best practices, and directly contribute to our product development process. Learn more today by joining now.