Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

Character encoding issue when retrieving Fortigate configuration via Discovery

ganuchi
Tera Contributor

I’m experiencing an issue where multibyte characters become garbled when retrieving Fortigate configuration through Discovery.


In the Discovery pattern, I set the Operation to Parse Command Output and specified show system interface in Set Command Details. Discovery successfully collected the configuration, but when I checked the output in the ECC Queue, all multibyte characters were corrupted.


What I would like to clarify is:

  1. Is there any way to resolve or avoid this character encoding issue?
  2. If this issue cannot be fixed, are there any other ways (not limited to Discovery) to retrieve Fortigate configuration?
    I don’t necessarily need to use Discovery—I'm simply looking for alternative approaches if Discovery cannot handle multibyte characters correctly.

Previously, ServiceNow support referred me to the following community thread, but applying it did not resolve the issue:
<https://www.servicenow.com/community/sysadmin-forum/jdbc-data-source-character-encoding-troubles/td-...>

Any advice or recommendations would be greatly appreciated.

1 REPLY 1

Fabian Kunzke
Mega Sage

Hey,

 

this is a tricky one. The pattern is not designed to change the character encoding when running the command action. The good news is, the "corrupted" output might just be the multibyte values being encoded in UTF-8. Now, this is an assumption from my side, as i would need to see the resulting string for myself. However, if this is the case, you can add a following step to the data collection where you use a script to convert the values to multibyte again.

 

This is an example of such a EVAL script (albeit in a more simplified form).

 

If, however, the output is not "just" a conversion of characters, then I am not sure where to go from here...

 

Regards

Fabian