Not a customer? Click the 'Start a free trial' link to begin a 30-day SaaS trial of our product and to join our community.
Existing Cisco AppDynamics customers should click the 'Sign In' button to authenticate to access the community
08-15-2017 05:01 AM - last edited on 07-15-2021 10:14 AM by Ryan.Paredez
Hi there! I would like to know if there is perhaps a way to escape special characters inside the string pattern of the log monitor. Example:
"...searchStrings:
#displayName Should be unique across the patterns including the case.
- displayName: "DynamicErrorCodes"
pattern: "<ns0':'ResultMsgCode>.*?</ns0':'ResultMsgCode>"
matchExactString: false
caseSensitive: false..."
It seems as though the special character, in this case, is the ":" inside the "<ns0':'ResultMsgCode>..." part. I have tried using \\; ''; and ". The issue with this is that in appD it only shows the "<ns0" when it should display the entire string. I have attached a screenshot of the result in the attached pdf. Please assist?
Regards,
Dean
Solved! Go to Solution.
08-16-2017 11:24 PM - last edited on 07-15-2021 10:14 AM by Ryan.Paredez
Hi Dean,
MachineAgent uses ":" to separate metric names and values and this is the reason you are not seeing the whole string in the metric name. Try using "metricCharacterReplacer" config option to replace ":" with some other character. You can find a sample config at https://github.com/Appdynamics/log-monitoring-extension/blob/master/src/main/resources/conf/config.y....
Please create a help desk ticket (help@appdynamics.com ) with MachineAgent debug logs if this does not solve the problem.
Thanks,
Satish M
08-17-2017 12:17 AM - last edited on 07-15-2021 10:15 AM by Ryan.Paredez
Hi Satish,
This looks very promising thanks, will test and advise. Greatly appreciated thanks!
Regards,
Dean
08-17-2017 02:31 AM - last edited on 07-15-2021 10:15 AM by Ryan.Paredez
Hi,
Did some more digging, according to yaml.org this seems to be a limitation:
http://yaml.org/spec/1.2/spec.html#id2795688
“…Inside literal scalars, all (indented) characters are considered to be content, including white space characters. Note that all line break characters are normalized. In addition, empty lines are not folded, though final line breaks and trailing empty lines are chomped.
There is no way to escape characters inside literal scalars. This restricts them to printable characters. In addition, there is no way to break a long literal line.
|
Tried using “\” but this breaks the logmonitor:
“…[Agent-Monitor-Scheduler-4] 17 Aug 2017 10:34:32,506 ERROR LogMonitor - Unfortunately an issue has occurred:
while scanning a quoted scalar
in 'reader', line 24, column 19:
pattern: '<ns0\:ResultMsgCode>.*?</ns0\:R ...
^
found the unexpected end of stream
in 'reader', line 44, column 1:…”
Tried it in single quotes as well as no quotes and this chops the rest of the string off as it does with double-quotes. Replacing special characters seems to be the best method, many thanks for your assistance Satish
Regards,
Dean
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
Thank you! Your submission has been received!
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form